-
Notifications
You must be signed in to change notification settings - Fork 12
/
types.go
53 lines (46 loc) · 1.32 KB
/
types.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
42
43
44
45
46
47
48
49
50
51
52
53
package adyen
const (
// Male to indicate "male" gender
Male = "MALE"
// Female to indicate "female" gender
Female = "FEMALE"
// Unknown to indicate "unknown" gender
Unknown = "UNKNOWN"
)
/**********
* Address *
**********/
// Address - base address type for customer billing and delivery addresses
//
// Link - https://docs.adyen.com/developers/api-reference/common-api#address
type Address struct {
City string `json:"city"`
Country string `json:"country"`
HouseNumberOrName string `json:"houseNumberOrName"`
PostalCode string `json:"postalCode,omitempty"`
StateOrProvince string `json:"stateOrProvince,omitempty"`
Street string `json:"street"`
}
/*******
* Card *
*******/
// Card structure representation
type Card struct {
Number string `json:"number"`
ExpireMonth string `json:"expiryMonth"`
ExpireYear string `json:"expiryYear"`
Cvc string `json:"cvc"`
HolderName string `json:"holderName"`
}
/*******
* Name *
*******/
// Name - generic name structure
//
// Link - https://docs.adyen.com/developers/api-reference/common-api#name
type Name struct {
FirstName string `json:"firstName"`
Gender string `json:"gender"` // Should be ENUM (Male, Female, Unknown) from a constants
Infix string `json:"infix,omitempty"`
LastName string `json:"lastName"`
}