package forms

// SetupIntent setupIntent API response
type SetupIntent struct {
	PublicKey    string `json:"public_key"`
	ClientSecret string `json:"client_secret"`
}

// PaymentMethod is the response of payment method API
type StripePaymentMethod struct {
	ID             string          `json:"id"`
	Card           *Card           `json:"card"`
	BillingDetails *BillingDetails `json:"billing_details"`
}

// Card is the credit card
type Card struct {
	Brand       string `json:"brand"`
	Country     string `json:"country"`
	ExpMonth    uint64 `json:"exp_month,string"`
	ExpYear     uint64 `json:"exp_year,string"`
	Fingerprint string `json:"fingerprint"`
	Funding     string `json:"funding"`
	Last4       string `json:"last4"`
}

// BillingDetails is the user detail billing information
type BillingDetails struct {
	Address *Address `json:"address"`
	Email   *string  `json:"email"`
	Name    string   `json:"name"`
	Phone   *string  `json:"phone"`
}

// Address is the billing Address
type Address struct {
	City       string `json:"city"`
	Country    string `json:"country"`
	Line1      string `json:"line1"`
	Line2      string `json:"line2"`
	PostalCode string `json:"postal_code"`
	State      string `json:"state"`
}

type StripeCustomerInfo struct {
	ID            string   `json:"id"`
	TenantID      string   `json:"dbaas_id"`
	Email         string   `json:"email"`
	Name          string   `json:"name"`
	Description   string   `json:"description"`
	DefaultSource string   `json:"default_source"`
	Address       *Address `json:"address"`
}

// Invoice is the response of invoice API
type StripeInvoice struct {
	AmountDue  int64  `json:"amount_due,string"`
	AmountPaid int64  `json:"amount_paid,string"`
	Created    int64  `json:"created,string"`
	Currency   string `json:"currency"`
	DueDate    int64  `json:"due_date,string"`
	CreditUsed int64  `json:"credit_used,string"`
	ID         string `json:"id"`
	Number     string `json:"number"`
	InvoicePDF string `json:"invoice_pdf"`
	Total      int64  `json:"total,string"`
	Paid       bool   `json:"paid"`
	Status     string `json:"status"`
}
