forked from checkout/checkout-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create.go
41 lines (37 loc) · 1.77 KB
/
create.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package abc
import (
"github.com/PaddleHQ/checkout-sdk-go/common"
)
type (
CreateInstrumentRequest struct {
Type common.InstrumentType `json:"type" binding:"required"`
Token string `json:"token,omitempty"`
AccountHolder *InstrumentAccountHolder `json:"account_holder,omitempty"`
Customer *InstrumentCustomerRequest `json:"customer,omitempty"`
}
CreateInstrumentResponse struct {
HttpMetadata common.HttpMetadata
Type common.InstrumentType `json:"type,omitempty"`
Id string `json:"id,omitempty"`
Fingerprint string `json:"fingerprint,omitempty"`
ExpiryMonth int `json:"expiry_month,omitempty"`
ExpiryYear int `json:"expiry_year,omitempty"`
Scheme string `json:"scheme,omitempty"`
Last4 string `json:"last4,omitempty"`
Bin string `json:"bin,omitempty"`
CardType common.CardType `json:"card_type,omitempty"`
CardCategory common.CardCategory `json:"card_category,omitempty"`
Issuer string `json:"issuer,omitempty"`
IssuerCountry common.Country `json:"issuer_country,omitempty"`
ProductId string `json:"product_id,omitempty"`
ProductType string `json:"product_type,omitempty"`
Customer *common.CustomerResponse `json:"customer,omitempty"`
}
)
type InstrumentCustomerRequest struct {
Id string `json:"id,omitempty"`
Email string `json:"email,omitempty"`
Name string `json:"name,omitempty"`
Phone *common.Phone `json:"phone,omitempty"`
IsDefault bool `json:"default,omitempty"`
}