-
Notifications
You must be signed in to change notification settings - Fork 472
/
Copy pathpaymentmethoddomain.go
208 lines (179 loc) · 9.36 KB
/
paymentmethoddomain.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
//
//
// File generated from our OpenAPI spec
//
//
package stripe
// The status of the payment method on the domain.
type PaymentMethodDomainAmazonPayStatus string
// List of values that PaymentMethodDomainAmazonPayStatus can take
const (
PaymentMethodDomainAmazonPayStatusActive PaymentMethodDomainAmazonPayStatus = "active"
PaymentMethodDomainAmazonPayStatusInactive PaymentMethodDomainAmazonPayStatus = "inactive"
)
// The status of the payment method on the domain.
type PaymentMethodDomainApplePayStatus string
// List of values that PaymentMethodDomainApplePayStatus can take
const (
PaymentMethodDomainApplePayStatusActive PaymentMethodDomainApplePayStatus = "active"
PaymentMethodDomainApplePayStatusInactive PaymentMethodDomainApplePayStatus = "inactive"
)
// The status of the payment method on the domain.
type PaymentMethodDomainGooglePayStatus string
// List of values that PaymentMethodDomainGooglePayStatus can take
const (
PaymentMethodDomainGooglePayStatusActive PaymentMethodDomainGooglePayStatus = "active"
PaymentMethodDomainGooglePayStatusInactive PaymentMethodDomainGooglePayStatus = "inactive"
)
// The status of the payment method on the domain.
type PaymentMethodDomainLinkStatus string
// List of values that PaymentMethodDomainLinkStatus can take
const (
PaymentMethodDomainLinkStatusActive PaymentMethodDomainLinkStatus = "active"
PaymentMethodDomainLinkStatusInactive PaymentMethodDomainLinkStatus = "inactive"
)
// The status of the payment method on the domain.
type PaymentMethodDomainPaypalStatus string
// List of values that PaymentMethodDomainPaypalStatus can take
const (
PaymentMethodDomainPaypalStatusActive PaymentMethodDomainPaypalStatus = "active"
PaymentMethodDomainPaypalStatusInactive PaymentMethodDomainPaypalStatus = "inactive"
)
// Lists the details of existing payment method domains.
type PaymentMethodDomainListParams struct {
ListParams `form:"*"`
// The domain name that this payment method domain object represents.
DomainName *string `form:"domain_name"`
// Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements
Enabled *bool `form:"enabled"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
}
// AddExpand appends a new field to expand.
func (p *PaymentMethodDomainListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
// Creates a payment method domain.
type PaymentMethodDomainParams struct {
Params `form:"*"`
// The domain name that this payment method domain object represents.
DomainName *string `form:"domain_name"`
// Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements.
Enabled *bool `form:"enabled"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
}
// AddExpand appends a new field to expand.
func (p *PaymentMethodDomainParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
// Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain.
// The payment method doesn't appear in Elements for this domain until it is active.
//
// To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint.
//
// Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
type PaymentMethodDomainValidateParams struct {
Params `form:"*"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
}
// AddExpand appends a new field to expand.
func (p *PaymentMethodDomainValidateParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
// Contains additional details about the status of a payment method for a specific payment method domain.
type PaymentMethodDomainAmazonPayStatusDetails struct {
// The error message associated with the status of the payment method on the domain.
ErrorMessage string `json:"error_message"`
}
// Indicates the status of a specific payment method on a payment method domain.
type PaymentMethodDomainAmazonPay struct {
// The status of the payment method on the domain.
Status PaymentMethodDomainAmazonPayStatus `json:"status"`
// Contains additional details about the status of a payment method for a specific payment method domain.
StatusDetails *PaymentMethodDomainAmazonPayStatusDetails `json:"status_details"`
}
// Contains additional details about the status of a payment method for a specific payment method domain.
type PaymentMethodDomainApplePayStatusDetails struct {
// The error message associated with the status of the payment method on the domain.
ErrorMessage string `json:"error_message"`
}
// Indicates the status of a specific payment method on a payment method domain.
type PaymentMethodDomainApplePay struct {
// The status of the payment method on the domain.
Status PaymentMethodDomainApplePayStatus `json:"status"`
// Contains additional details about the status of a payment method for a specific payment method domain.
StatusDetails *PaymentMethodDomainApplePayStatusDetails `json:"status_details"`
}
// Contains additional details about the status of a payment method for a specific payment method domain.
type PaymentMethodDomainGooglePayStatusDetails struct {
// The error message associated with the status of the payment method on the domain.
ErrorMessage string `json:"error_message"`
}
// Indicates the status of a specific payment method on a payment method domain.
type PaymentMethodDomainGooglePay struct {
// The status of the payment method on the domain.
Status PaymentMethodDomainGooglePayStatus `json:"status"`
// Contains additional details about the status of a payment method for a specific payment method domain.
StatusDetails *PaymentMethodDomainGooglePayStatusDetails `json:"status_details"`
}
// Contains additional details about the status of a payment method for a specific payment method domain.
type PaymentMethodDomainLinkStatusDetails struct {
// The error message associated with the status of the payment method on the domain.
ErrorMessage string `json:"error_message"`
}
// Indicates the status of a specific payment method on a payment method domain.
type PaymentMethodDomainLink struct {
// The status of the payment method on the domain.
Status PaymentMethodDomainLinkStatus `json:"status"`
// Contains additional details about the status of a payment method for a specific payment method domain.
StatusDetails *PaymentMethodDomainLinkStatusDetails `json:"status_details"`
}
// Contains additional details about the status of a payment method for a specific payment method domain.
type PaymentMethodDomainPaypalStatusDetails struct {
// The error message associated with the status of the payment method on the domain.
ErrorMessage string `json:"error_message"`
}
// Indicates the status of a specific payment method on a payment method domain.
type PaymentMethodDomainPaypal struct {
// The status of the payment method on the domain.
Status PaymentMethodDomainPaypalStatus `json:"status"`
// Contains additional details about the status of a payment method for a specific payment method domain.
StatusDetails *PaymentMethodDomainPaypalStatusDetails `json:"status_details"`
}
// A payment method domain represents a web domain that you have registered with Stripe.
// Stripe Elements use registered payment method domains to control where certain payment methods are shown.
//
// Related guide: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
type PaymentMethodDomain struct {
APIResource
// Indicates the status of a specific payment method on a payment method domain.
AmazonPay *PaymentMethodDomainAmazonPay `json:"amazon_pay"`
// Indicates the status of a specific payment method on a payment method domain.
ApplePay *PaymentMethodDomainApplePay `json:"apple_pay"`
// Time at which the object was created. Measured in seconds since the Unix epoch.
Created int64 `json:"created"`
// The domain name that this payment method domain object represents.
DomainName string `json:"domain_name"`
// Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements.
Enabled bool `json:"enabled"`
// Indicates the status of a specific payment method on a payment method domain.
GooglePay *PaymentMethodDomainGooglePay `json:"google_pay"`
// Unique identifier for the object.
ID string `json:"id"`
// Indicates the status of a specific payment method on a payment method domain.
Link *PaymentMethodDomainLink `json:"link"`
// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
Livemode bool `json:"livemode"`
// String representing the object's type. Objects of the same type share the same value.
Object string `json:"object"`
// Indicates the status of a specific payment method on a payment method domain.
Paypal *PaymentMethodDomainPaypal `json:"paypal"`
}
// PaymentMethodDomainList is a list of PaymentMethodDomains as retrieved from a list endpoint.
type PaymentMethodDomainList struct {
APIResource
ListMeta
Data []*PaymentMethodDomain `json:"data"`
}