-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcustomerbillingconfig.go
352 lines (308 loc) · 24.3 KB
/
customerbillingconfig.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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
package metronome
import (
"context"
"errors"
"fmt"
"net/http"
"time"
"github.com/Metronome-Industries/metronome-go/internal/apijson"
"github.com/Metronome-Industries/metronome-go/internal/param"
"github.com/Metronome-Industries/metronome-go/internal/requestconfig"
"github.com/Metronome-Industries/metronome-go/option"
)
// CustomerBillingConfigService contains methods and other services that help with
// interacting with the metronome API.
//
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewCustomerBillingConfigService] method instead.
type CustomerBillingConfigService struct {
Options []option.RequestOption
}
// NewCustomerBillingConfigService generates a new service that applies the given
// options to each request. These options are applied after the parent client's
// options (if there is one), and before any request-specific options.
func NewCustomerBillingConfigService(opts ...option.RequestOption) (r *CustomerBillingConfigService) {
r = &CustomerBillingConfigService{}
r.Options = opts
return
}
// Set the billing configuration for a given customer.
func (r *CustomerBillingConfigService) New(ctx context.Context, params CustomerBillingConfigNewParams, opts ...option.RequestOption) (err error) {
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
if params.CustomerID.Value == "" {
err = errors.New("missing required customer_id parameter")
return
}
path := fmt.Sprintf("customers/%s/billing-config/%v", params.CustomerID, params.BillingProviderType)
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, nil, opts...)
return
}
// Fetch the billing configuration for the given customer.
func (r *CustomerBillingConfigService) Get(ctx context.Context, query CustomerBillingConfigGetParams, opts ...option.RequestOption) (res *CustomerBillingConfigGetResponse, err error) {
opts = append(r.Options[:], opts...)
if query.CustomerID.Value == "" {
err = errors.New("missing required customer_id parameter")
return
}
path := fmt.Sprintf("customers/%s/billing-config/%v", query.CustomerID, query.BillingProviderType)
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
// Delete the billing configuration for a given customer. Note: this is unsupported
// for Azure and AWS Marketplace customers.
func (r *CustomerBillingConfigService) Delete(ctx context.Context, body CustomerBillingConfigDeleteParams, opts ...option.RequestOption) (err error) {
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
if body.CustomerID.Value == "" {
err = errors.New("missing required customer_id parameter")
return
}
path := fmt.Sprintf("customers/%s/billing-config/%v", body.CustomerID, body.BillingProviderType)
err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, nil, opts...)
return
}
type CustomerBillingConfigGetResponse struct {
Data CustomerBillingConfigGetResponseData `json:"data,required"`
JSON customerBillingConfigGetResponseJSON `json:"-"`
}
// customerBillingConfigGetResponseJSON contains the JSON metadata for the struct
// [CustomerBillingConfigGetResponse]
type customerBillingConfigGetResponseJSON struct {
Data apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *CustomerBillingConfigGetResponse) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r customerBillingConfigGetResponseJSON) RawJSON() string {
return r.raw
}
type CustomerBillingConfigGetResponseData struct {
// Contract expiration date for the customer. The expected format is RFC 3339 and
// can be retrieved from
// [AWS's GetEntitlements API](https://docs.aws.amazon.com/marketplaceentitlement/latest/APIReference/API_GetEntitlements.html).
AwsExpirationDate time.Time `json:"aws_expiration_date" format:"date-time"`
AwsProductCode string `json:"aws_product_code"`
AwsRegion CustomerBillingConfigGetResponseDataAwsRegion `json:"aws_region"`
// Subscription term start/end date for the customer. The expected format is RFC
// 3339 and can be retrieved from
// [Azure's Get Subscription API](https://learn.microsoft.com/en-us/partner-center/marketplace/partner-center-portal/pc-saas-fulfillment-subscription-api#get-subscription).
AzureExpirationDate time.Time `json:"azure_expiration_date" format:"date-time"`
AzurePlanID string `json:"azure_plan_id" format:"uuid"`
// Subscription term start/end date for the customer. The expected format is RFC
// 3339 and can be retrieved from
// [Azure's Get Subscription API](https://learn.microsoft.com/en-us/partner-center/marketplace/partner-center-portal/pc-saas-fulfillment-subscription-api#get-subscription).
AzureStartDate time.Time `json:"azure_start_date" format:"date-time"`
AzureSubscriptionStatus CustomerBillingConfigGetResponseDataAzureSubscriptionStatus `json:"azure_subscription_status"`
BillingProviderCustomerID string `json:"billing_provider_customer_id"`
StripeCollectionMethod CustomerBillingConfigGetResponseDataStripeCollectionMethod `json:"stripe_collection_method"`
JSON customerBillingConfigGetResponseDataJSON `json:"-"`
}
// customerBillingConfigGetResponseDataJSON contains the JSON metadata for the
// struct [CustomerBillingConfigGetResponseData]
type customerBillingConfigGetResponseDataJSON struct {
AwsExpirationDate apijson.Field
AwsProductCode apijson.Field
AwsRegion apijson.Field
AzureExpirationDate apijson.Field
AzurePlanID apijson.Field
AzureStartDate apijson.Field
AzureSubscriptionStatus apijson.Field
BillingProviderCustomerID apijson.Field
StripeCollectionMethod apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *CustomerBillingConfigGetResponseData) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r customerBillingConfigGetResponseDataJSON) RawJSON() string {
return r.raw
}
type CustomerBillingConfigGetResponseDataAwsRegion string
const (
CustomerBillingConfigGetResponseDataAwsRegionAfSouth1 CustomerBillingConfigGetResponseDataAwsRegion = "af-south-1"
CustomerBillingConfigGetResponseDataAwsRegionApEast1 CustomerBillingConfigGetResponseDataAwsRegion = "ap-east-1"
CustomerBillingConfigGetResponseDataAwsRegionApNortheast1 CustomerBillingConfigGetResponseDataAwsRegion = "ap-northeast-1"
CustomerBillingConfigGetResponseDataAwsRegionApNortheast2 CustomerBillingConfigGetResponseDataAwsRegion = "ap-northeast-2"
CustomerBillingConfigGetResponseDataAwsRegionApNortheast3 CustomerBillingConfigGetResponseDataAwsRegion = "ap-northeast-3"
CustomerBillingConfigGetResponseDataAwsRegionApSouth1 CustomerBillingConfigGetResponseDataAwsRegion = "ap-south-1"
CustomerBillingConfigGetResponseDataAwsRegionApSoutheast1 CustomerBillingConfigGetResponseDataAwsRegion = "ap-southeast-1"
CustomerBillingConfigGetResponseDataAwsRegionApSoutheast2 CustomerBillingConfigGetResponseDataAwsRegion = "ap-southeast-2"
CustomerBillingConfigGetResponseDataAwsRegionCaCentral1 CustomerBillingConfigGetResponseDataAwsRegion = "ca-central-1"
CustomerBillingConfigGetResponseDataAwsRegionCnNorth1 CustomerBillingConfigGetResponseDataAwsRegion = "cn-north-1"
CustomerBillingConfigGetResponseDataAwsRegionCnNorthwest1 CustomerBillingConfigGetResponseDataAwsRegion = "cn-northwest-1"
CustomerBillingConfigGetResponseDataAwsRegionEuCentral1 CustomerBillingConfigGetResponseDataAwsRegion = "eu-central-1"
CustomerBillingConfigGetResponseDataAwsRegionEuNorth1 CustomerBillingConfigGetResponseDataAwsRegion = "eu-north-1"
CustomerBillingConfigGetResponseDataAwsRegionEuSouth1 CustomerBillingConfigGetResponseDataAwsRegion = "eu-south-1"
CustomerBillingConfigGetResponseDataAwsRegionEuWest1 CustomerBillingConfigGetResponseDataAwsRegion = "eu-west-1"
CustomerBillingConfigGetResponseDataAwsRegionEuWest2 CustomerBillingConfigGetResponseDataAwsRegion = "eu-west-2"
CustomerBillingConfigGetResponseDataAwsRegionEuWest3 CustomerBillingConfigGetResponseDataAwsRegion = "eu-west-3"
CustomerBillingConfigGetResponseDataAwsRegionMeSouth1 CustomerBillingConfigGetResponseDataAwsRegion = "me-south-1"
CustomerBillingConfigGetResponseDataAwsRegionSaEast1 CustomerBillingConfigGetResponseDataAwsRegion = "sa-east-1"
CustomerBillingConfigGetResponseDataAwsRegionUsEast1 CustomerBillingConfigGetResponseDataAwsRegion = "us-east-1"
CustomerBillingConfigGetResponseDataAwsRegionUsEast2 CustomerBillingConfigGetResponseDataAwsRegion = "us-east-2"
CustomerBillingConfigGetResponseDataAwsRegionUsGovEast1 CustomerBillingConfigGetResponseDataAwsRegion = "us-gov-east-1"
CustomerBillingConfigGetResponseDataAwsRegionUsGovWest1 CustomerBillingConfigGetResponseDataAwsRegion = "us-gov-west-1"
CustomerBillingConfigGetResponseDataAwsRegionUsWest1 CustomerBillingConfigGetResponseDataAwsRegion = "us-west-1"
CustomerBillingConfigGetResponseDataAwsRegionUsWest2 CustomerBillingConfigGetResponseDataAwsRegion = "us-west-2"
)
func (r CustomerBillingConfigGetResponseDataAwsRegion) IsKnown() bool {
switch r {
case CustomerBillingConfigGetResponseDataAwsRegionAfSouth1, CustomerBillingConfigGetResponseDataAwsRegionApEast1, CustomerBillingConfigGetResponseDataAwsRegionApNortheast1, CustomerBillingConfigGetResponseDataAwsRegionApNortheast2, CustomerBillingConfigGetResponseDataAwsRegionApNortheast3, CustomerBillingConfigGetResponseDataAwsRegionApSouth1, CustomerBillingConfigGetResponseDataAwsRegionApSoutheast1, CustomerBillingConfigGetResponseDataAwsRegionApSoutheast2, CustomerBillingConfigGetResponseDataAwsRegionCaCentral1, CustomerBillingConfigGetResponseDataAwsRegionCnNorth1, CustomerBillingConfigGetResponseDataAwsRegionCnNorthwest1, CustomerBillingConfigGetResponseDataAwsRegionEuCentral1, CustomerBillingConfigGetResponseDataAwsRegionEuNorth1, CustomerBillingConfigGetResponseDataAwsRegionEuSouth1, CustomerBillingConfigGetResponseDataAwsRegionEuWest1, CustomerBillingConfigGetResponseDataAwsRegionEuWest2, CustomerBillingConfigGetResponseDataAwsRegionEuWest3, CustomerBillingConfigGetResponseDataAwsRegionMeSouth1, CustomerBillingConfigGetResponseDataAwsRegionSaEast1, CustomerBillingConfigGetResponseDataAwsRegionUsEast1, CustomerBillingConfigGetResponseDataAwsRegionUsEast2, CustomerBillingConfigGetResponseDataAwsRegionUsGovEast1, CustomerBillingConfigGetResponseDataAwsRegionUsGovWest1, CustomerBillingConfigGetResponseDataAwsRegionUsWest1, CustomerBillingConfigGetResponseDataAwsRegionUsWest2:
return true
}
return false
}
type CustomerBillingConfigGetResponseDataAzureSubscriptionStatus string
const (
CustomerBillingConfigGetResponseDataAzureSubscriptionStatusSubscribed CustomerBillingConfigGetResponseDataAzureSubscriptionStatus = "Subscribed"
CustomerBillingConfigGetResponseDataAzureSubscriptionStatusUnsubscribed CustomerBillingConfigGetResponseDataAzureSubscriptionStatus = "Unsubscribed"
CustomerBillingConfigGetResponseDataAzureSubscriptionStatusSuspended CustomerBillingConfigGetResponseDataAzureSubscriptionStatus = "Suspended"
CustomerBillingConfigGetResponseDataAzureSubscriptionStatusPendingFulfillmentStart CustomerBillingConfigGetResponseDataAzureSubscriptionStatus = "PendingFulfillmentStart"
)
func (r CustomerBillingConfigGetResponseDataAzureSubscriptionStatus) IsKnown() bool {
switch r {
case CustomerBillingConfigGetResponseDataAzureSubscriptionStatusSubscribed, CustomerBillingConfigGetResponseDataAzureSubscriptionStatusUnsubscribed, CustomerBillingConfigGetResponseDataAzureSubscriptionStatusSuspended, CustomerBillingConfigGetResponseDataAzureSubscriptionStatusPendingFulfillmentStart:
return true
}
return false
}
type CustomerBillingConfigGetResponseDataStripeCollectionMethod string
const (
CustomerBillingConfigGetResponseDataStripeCollectionMethodChargeAutomatically CustomerBillingConfigGetResponseDataStripeCollectionMethod = "charge_automatically"
CustomerBillingConfigGetResponseDataStripeCollectionMethodSendInvoice CustomerBillingConfigGetResponseDataStripeCollectionMethod = "send_invoice"
)
func (r CustomerBillingConfigGetResponseDataStripeCollectionMethod) IsKnown() bool {
switch r {
case CustomerBillingConfigGetResponseDataStripeCollectionMethodChargeAutomatically, CustomerBillingConfigGetResponseDataStripeCollectionMethodSendInvoice:
return true
}
return false
}
type CustomerBillingConfigNewParams struct {
CustomerID param.Field[string] `path:"customer_id,required" format:"uuid"`
BillingProviderType param.Field[CustomerBillingConfigNewParamsBillingProviderType] `path:"billing_provider_type,required"`
// The customer ID in the billing provider's system. For Azure, this is the
// subscription ID.
BillingProviderCustomerID param.Field[string] `json:"billing_provider_customer_id,required"`
AwsProductCode param.Field[string] `json:"aws_product_code"`
AwsRegion param.Field[CustomerBillingConfigNewParamsAwsRegion] `json:"aws_region"`
StripeCollectionMethod param.Field[CustomerBillingConfigNewParamsStripeCollectionMethod] `json:"stripe_collection_method"`
}
func (r CustomerBillingConfigNewParams) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
type CustomerBillingConfigNewParamsBillingProviderType string
const (
CustomerBillingConfigNewParamsBillingProviderTypeAwsMarketplace CustomerBillingConfigNewParamsBillingProviderType = "aws_marketplace"
CustomerBillingConfigNewParamsBillingProviderTypeStripe CustomerBillingConfigNewParamsBillingProviderType = "stripe"
CustomerBillingConfigNewParamsBillingProviderTypeNetsuite CustomerBillingConfigNewParamsBillingProviderType = "netsuite"
CustomerBillingConfigNewParamsBillingProviderTypeCustom CustomerBillingConfigNewParamsBillingProviderType = "custom"
CustomerBillingConfigNewParamsBillingProviderTypeAzureMarketplace CustomerBillingConfigNewParamsBillingProviderType = "azure_marketplace"
CustomerBillingConfigNewParamsBillingProviderTypeQuickbooksOnline CustomerBillingConfigNewParamsBillingProviderType = "quickbooks_online"
CustomerBillingConfigNewParamsBillingProviderTypeWorkday CustomerBillingConfigNewParamsBillingProviderType = "workday"
CustomerBillingConfigNewParamsBillingProviderTypeGcpMarketplace CustomerBillingConfigNewParamsBillingProviderType = "gcp_marketplace"
)
func (r CustomerBillingConfigNewParamsBillingProviderType) IsKnown() bool {
switch r {
case CustomerBillingConfigNewParamsBillingProviderTypeAwsMarketplace, CustomerBillingConfigNewParamsBillingProviderTypeStripe, CustomerBillingConfigNewParamsBillingProviderTypeNetsuite, CustomerBillingConfigNewParamsBillingProviderTypeCustom, CustomerBillingConfigNewParamsBillingProviderTypeAzureMarketplace, CustomerBillingConfigNewParamsBillingProviderTypeQuickbooksOnline, CustomerBillingConfigNewParamsBillingProviderTypeWorkday, CustomerBillingConfigNewParamsBillingProviderTypeGcpMarketplace:
return true
}
return false
}
type CustomerBillingConfigNewParamsAwsRegion string
const (
CustomerBillingConfigNewParamsAwsRegionAfSouth1 CustomerBillingConfigNewParamsAwsRegion = "af-south-1"
CustomerBillingConfigNewParamsAwsRegionApEast1 CustomerBillingConfigNewParamsAwsRegion = "ap-east-1"
CustomerBillingConfigNewParamsAwsRegionApNortheast1 CustomerBillingConfigNewParamsAwsRegion = "ap-northeast-1"
CustomerBillingConfigNewParamsAwsRegionApNortheast2 CustomerBillingConfigNewParamsAwsRegion = "ap-northeast-2"
CustomerBillingConfigNewParamsAwsRegionApNortheast3 CustomerBillingConfigNewParamsAwsRegion = "ap-northeast-3"
CustomerBillingConfigNewParamsAwsRegionApSouth1 CustomerBillingConfigNewParamsAwsRegion = "ap-south-1"
CustomerBillingConfigNewParamsAwsRegionApSoutheast1 CustomerBillingConfigNewParamsAwsRegion = "ap-southeast-1"
CustomerBillingConfigNewParamsAwsRegionApSoutheast2 CustomerBillingConfigNewParamsAwsRegion = "ap-southeast-2"
CustomerBillingConfigNewParamsAwsRegionCaCentral1 CustomerBillingConfigNewParamsAwsRegion = "ca-central-1"
CustomerBillingConfigNewParamsAwsRegionCnNorth1 CustomerBillingConfigNewParamsAwsRegion = "cn-north-1"
CustomerBillingConfigNewParamsAwsRegionCnNorthwest1 CustomerBillingConfigNewParamsAwsRegion = "cn-northwest-1"
CustomerBillingConfigNewParamsAwsRegionEuCentral1 CustomerBillingConfigNewParamsAwsRegion = "eu-central-1"
CustomerBillingConfigNewParamsAwsRegionEuNorth1 CustomerBillingConfigNewParamsAwsRegion = "eu-north-1"
CustomerBillingConfigNewParamsAwsRegionEuSouth1 CustomerBillingConfigNewParamsAwsRegion = "eu-south-1"
CustomerBillingConfigNewParamsAwsRegionEuWest1 CustomerBillingConfigNewParamsAwsRegion = "eu-west-1"
CustomerBillingConfigNewParamsAwsRegionEuWest2 CustomerBillingConfigNewParamsAwsRegion = "eu-west-2"
CustomerBillingConfigNewParamsAwsRegionEuWest3 CustomerBillingConfigNewParamsAwsRegion = "eu-west-3"
CustomerBillingConfigNewParamsAwsRegionMeSouth1 CustomerBillingConfigNewParamsAwsRegion = "me-south-1"
CustomerBillingConfigNewParamsAwsRegionSaEast1 CustomerBillingConfigNewParamsAwsRegion = "sa-east-1"
CustomerBillingConfigNewParamsAwsRegionUsEast1 CustomerBillingConfigNewParamsAwsRegion = "us-east-1"
CustomerBillingConfigNewParamsAwsRegionUsEast2 CustomerBillingConfigNewParamsAwsRegion = "us-east-2"
CustomerBillingConfigNewParamsAwsRegionUsGovEast1 CustomerBillingConfigNewParamsAwsRegion = "us-gov-east-1"
CustomerBillingConfigNewParamsAwsRegionUsGovWest1 CustomerBillingConfigNewParamsAwsRegion = "us-gov-west-1"
CustomerBillingConfigNewParamsAwsRegionUsWest1 CustomerBillingConfigNewParamsAwsRegion = "us-west-1"
CustomerBillingConfigNewParamsAwsRegionUsWest2 CustomerBillingConfigNewParamsAwsRegion = "us-west-2"
)
func (r CustomerBillingConfigNewParamsAwsRegion) IsKnown() bool {
switch r {
case CustomerBillingConfigNewParamsAwsRegionAfSouth1, CustomerBillingConfigNewParamsAwsRegionApEast1, CustomerBillingConfigNewParamsAwsRegionApNortheast1, CustomerBillingConfigNewParamsAwsRegionApNortheast2, CustomerBillingConfigNewParamsAwsRegionApNortheast3, CustomerBillingConfigNewParamsAwsRegionApSouth1, CustomerBillingConfigNewParamsAwsRegionApSoutheast1, CustomerBillingConfigNewParamsAwsRegionApSoutheast2, CustomerBillingConfigNewParamsAwsRegionCaCentral1, CustomerBillingConfigNewParamsAwsRegionCnNorth1, CustomerBillingConfigNewParamsAwsRegionCnNorthwest1, CustomerBillingConfigNewParamsAwsRegionEuCentral1, CustomerBillingConfigNewParamsAwsRegionEuNorth1, CustomerBillingConfigNewParamsAwsRegionEuSouth1, CustomerBillingConfigNewParamsAwsRegionEuWest1, CustomerBillingConfigNewParamsAwsRegionEuWest2, CustomerBillingConfigNewParamsAwsRegionEuWest3, CustomerBillingConfigNewParamsAwsRegionMeSouth1, CustomerBillingConfigNewParamsAwsRegionSaEast1, CustomerBillingConfigNewParamsAwsRegionUsEast1, CustomerBillingConfigNewParamsAwsRegionUsEast2, CustomerBillingConfigNewParamsAwsRegionUsGovEast1, CustomerBillingConfigNewParamsAwsRegionUsGovWest1, CustomerBillingConfigNewParamsAwsRegionUsWest1, CustomerBillingConfigNewParamsAwsRegionUsWest2:
return true
}
return false
}
type CustomerBillingConfigNewParamsStripeCollectionMethod string
const (
CustomerBillingConfigNewParamsStripeCollectionMethodChargeAutomatically CustomerBillingConfigNewParamsStripeCollectionMethod = "charge_automatically"
CustomerBillingConfigNewParamsStripeCollectionMethodSendInvoice CustomerBillingConfigNewParamsStripeCollectionMethod = "send_invoice"
)
func (r CustomerBillingConfigNewParamsStripeCollectionMethod) IsKnown() bool {
switch r {
case CustomerBillingConfigNewParamsStripeCollectionMethodChargeAutomatically, CustomerBillingConfigNewParamsStripeCollectionMethodSendInvoice:
return true
}
return false
}
type CustomerBillingConfigGetParams struct {
CustomerID param.Field[string] `path:"customer_id,required" format:"uuid"`
BillingProviderType param.Field[CustomerBillingConfigGetParamsBillingProviderType] `path:"billing_provider_type,required"`
}
type CustomerBillingConfigGetParamsBillingProviderType string
const (
CustomerBillingConfigGetParamsBillingProviderTypeAwsMarketplace CustomerBillingConfigGetParamsBillingProviderType = "aws_marketplace"
CustomerBillingConfigGetParamsBillingProviderTypeStripe CustomerBillingConfigGetParamsBillingProviderType = "stripe"
CustomerBillingConfigGetParamsBillingProviderTypeNetsuite CustomerBillingConfigGetParamsBillingProviderType = "netsuite"
CustomerBillingConfigGetParamsBillingProviderTypeCustom CustomerBillingConfigGetParamsBillingProviderType = "custom"
CustomerBillingConfigGetParamsBillingProviderTypeAzureMarketplace CustomerBillingConfigGetParamsBillingProviderType = "azure_marketplace"
CustomerBillingConfigGetParamsBillingProviderTypeQuickbooksOnline CustomerBillingConfigGetParamsBillingProviderType = "quickbooks_online"
CustomerBillingConfigGetParamsBillingProviderTypeWorkday CustomerBillingConfigGetParamsBillingProviderType = "workday"
CustomerBillingConfigGetParamsBillingProviderTypeGcpMarketplace CustomerBillingConfigGetParamsBillingProviderType = "gcp_marketplace"
)
func (r CustomerBillingConfigGetParamsBillingProviderType) IsKnown() bool {
switch r {
case CustomerBillingConfigGetParamsBillingProviderTypeAwsMarketplace, CustomerBillingConfigGetParamsBillingProviderTypeStripe, CustomerBillingConfigGetParamsBillingProviderTypeNetsuite, CustomerBillingConfigGetParamsBillingProviderTypeCustom, CustomerBillingConfigGetParamsBillingProviderTypeAzureMarketplace, CustomerBillingConfigGetParamsBillingProviderTypeQuickbooksOnline, CustomerBillingConfigGetParamsBillingProviderTypeWorkday, CustomerBillingConfigGetParamsBillingProviderTypeGcpMarketplace:
return true
}
return false
}
type CustomerBillingConfigDeleteParams struct {
CustomerID param.Field[string] `path:"customer_id,required" format:"uuid"`
BillingProviderType param.Field[CustomerBillingConfigDeleteParamsBillingProviderType] `path:"billing_provider_type,required"`
}
type CustomerBillingConfigDeleteParamsBillingProviderType string
const (
CustomerBillingConfigDeleteParamsBillingProviderTypeAwsMarketplace CustomerBillingConfigDeleteParamsBillingProviderType = "aws_marketplace"
CustomerBillingConfigDeleteParamsBillingProviderTypeStripe CustomerBillingConfigDeleteParamsBillingProviderType = "stripe"
CustomerBillingConfigDeleteParamsBillingProviderTypeNetsuite CustomerBillingConfigDeleteParamsBillingProviderType = "netsuite"
CustomerBillingConfigDeleteParamsBillingProviderTypeCustom CustomerBillingConfigDeleteParamsBillingProviderType = "custom"
CustomerBillingConfigDeleteParamsBillingProviderTypeAzureMarketplace CustomerBillingConfigDeleteParamsBillingProviderType = "azure_marketplace"
CustomerBillingConfigDeleteParamsBillingProviderTypeQuickbooksOnline CustomerBillingConfigDeleteParamsBillingProviderType = "quickbooks_online"
CustomerBillingConfigDeleteParamsBillingProviderTypeWorkday CustomerBillingConfigDeleteParamsBillingProviderType = "workday"
CustomerBillingConfigDeleteParamsBillingProviderTypeGcpMarketplace CustomerBillingConfigDeleteParamsBillingProviderType = "gcp_marketplace"
)
func (r CustomerBillingConfigDeleteParamsBillingProviderType) IsKnown() bool {
switch r {
case CustomerBillingConfigDeleteParamsBillingProviderTypeAwsMarketplace, CustomerBillingConfigDeleteParamsBillingProviderTypeStripe, CustomerBillingConfigDeleteParamsBillingProviderTypeNetsuite, CustomerBillingConfigDeleteParamsBillingProviderTypeCustom, CustomerBillingConfigDeleteParamsBillingProviderTypeAzureMarketplace, CustomerBillingConfigDeleteParamsBillingProviderTypeQuickbooksOnline, CustomerBillingConfigDeleteParamsBillingProviderTypeWorkday, CustomerBillingConfigDeleteParamsBillingProviderTypeGcpMarketplace:
return true
}
return false
}