-
Notifications
You must be signed in to change notification settings - Fork 158
/
shared.d.ts
125 lines (104 loc) · 2.23 KB
/
shared.d.ts
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
export interface Metadata {
[name: string]: string;
}
/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* While you can send values as numbers, they will be returned as strings.
*/
export interface MetadataParam {
[name: string]: string | number | null;
}
/**
* The Address object.
*/
export interface Address {
/**
* City/District/Suburb/Town/Village.
*/
city: string | null;
/**
* 2-letter country code.
*/
country: string | null;
/**
* Address line 1 (Street address/PO Box/Company name).
*/
line1: string | null;
/**
* Address line 2 (Apartment/Suite/Unit/Building).
*/
line2: string | null;
/**
* ZIP or postal code.
*/
postal_code: string | null;
/**
* State/County/Province/Region.
*/
state: string | null;
}
export interface AccountAddressParam {
/**
* City, district, suburb, town, or village.
*/
city?: string;
/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country?: string;
/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
line1?: string;
/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string;
/**
* ZIP or postal code.
*/
postal_code?: string;
/**
* State, county, province, or region.
*/
state?: string;
}
export interface AddressParam extends AccountAddressParam {
/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
line1: string;
}
export interface JapanAddressParam {
/**
* City or ward.
*/
city?: string;
/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country?: string;
/**
* Block or building number.
*/
line1?: string;
/**
* Building details.
*/
line2?: string;
/**
* Postal code.
*/
postal_code?: string;
/**
* Prefecture.
*/
state?: string;
/**
* Town or cho-me.
*/
town?: string;
}