-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontract.go
3327 lines (2911 loc) · 168 KB
/
contract.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
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
package metronome
import (
"context"
"net/http"
"net/url"
"reflect"
"time"
"github.com/Metronome-Industries/metronome-go/internal/apijson"
"github.com/Metronome-Industries/metronome-go/internal/apiquery"
"github.com/Metronome-Industries/metronome-go/internal/param"
"github.com/Metronome-Industries/metronome-go/internal/requestconfig"
"github.com/Metronome-Industries/metronome-go/option"
"github.com/Metronome-Industries/metronome-go/shared"
"github.com/tidwall/gjson"
)
// ContractService 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 [NewContractService] method instead.
type ContractService struct {
Options []option.RequestOption
Products *ContractProductService
RateCards *ContractRateCardService
NamedSchedules *ContractNamedScheduleService
}
// NewContractService 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 NewContractService(opts ...option.RequestOption) (r *ContractService) {
r = &ContractService{}
r.Options = opts
r.Products = NewContractProductService(opts...)
r.RateCards = NewContractRateCardService(opts...)
r.NamedSchedules = NewContractNamedScheduleService(opts...)
return
}
// Create a new contract
func (r *ContractService) New(ctx context.Context, body ContractNewParams, opts ...option.RequestOption) (res *ContractNewResponse, err error) {
opts = append(r.Options[:], opts...)
path := "contracts/create"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
}
// Get a specific contract
func (r *ContractService) Get(ctx context.Context, body ContractGetParams, opts ...option.RequestOption) (res *ContractGetResponse, err error) {
opts = append(r.Options[:], opts...)
path := "contracts/get"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
}
// List all contracts for a customer
func (r *ContractService) List(ctx context.Context, body ContractListParams, opts ...option.RequestOption) (res *ContractListResponse, err error) {
opts = append(r.Options[:], opts...)
path := "contracts/list"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
}
// Add a manual balance entry
func (r *ContractService) AddManualBalanceEntry(ctx context.Context, body ContractAddManualBalanceEntryParams, opts ...option.RequestOption) (err error) {
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
path := "contracts/addManualBalanceLedgerEntry"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, nil, opts...)
return
}
// Amend a contract
func (r *ContractService) Amend(ctx context.Context, body ContractAmendParams, opts ...option.RequestOption) (res *ContractAmendResponse, err error) {
opts = append(r.Options[:], opts...)
path := "contracts/amend"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
}
// Archive a contract
func (r *ContractService) Archive(ctx context.Context, body ContractArchiveParams, opts ...option.RequestOption) (res *ContractArchiveResponse, err error) {
opts = append(r.Options[:], opts...)
path := "contracts/archive"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
}
// Creates historical usage invoices for a contract
func (r *ContractService) NewHistoricalInvoices(ctx context.Context, body ContractNewHistoricalInvoicesParams, opts ...option.RequestOption) (res *ContractNewHistoricalInvoicesResponse, err error) {
opts = append(r.Options[:], opts...)
path := "contracts/createHistoricalInvoices"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
}
// List balances (commits and credits).
func (r *ContractService) ListBalances(ctx context.Context, body ContractListBalancesParams, opts ...option.RequestOption) (res *ContractListBalancesResponse, err error) {
opts = append(r.Options[:], opts...)
path := "contracts/customerBalances/list"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
}
// Get the rate schedule for the rate card on a given contract.
func (r *ContractService) GetRateSchedule(ctx context.Context, params ContractGetRateScheduleParams, opts ...option.RequestOption) (res *ContractGetRateScheduleResponse, err error) {
opts = append(r.Options[:], opts...)
path := "contracts/getContractRateSchedule"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &res, opts...)
return
}
// Create a new scheduled invoice for Professional Services terms on a contract.
// This endpoint's availability is dependent on your client's configuration.
func (r *ContractService) ScheduleProServicesInvoice(ctx context.Context, body ContractScheduleProServicesInvoiceParams, opts ...option.RequestOption) (res *ContractScheduleProServicesInvoiceResponse, err error) {
opts = append(r.Options[:], opts...)
path := "contracts/scheduleProServicesInvoice"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
}
// Set usage filter for a contract
func (r *ContractService) SetUsageFilter(ctx context.Context, body ContractSetUsageFilterParams, opts ...option.RequestOption) (err error) {
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
path := "contracts/setUsageFilter"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, nil, opts...)
return
}
// Update the end date of a contract
func (r *ContractService) UpdateEndDate(ctx context.Context, body ContractUpdateEndDateParams, opts ...option.RequestOption) (res *ContractUpdateEndDateResponse, err error) {
opts = append(r.Options[:], opts...)
path := "contracts/updateEndDate"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
}
type ContractNewResponse struct {
Data shared.ID `json:"data,required"`
JSON contractNewResponseJSON `json:"-"`
}
// contractNewResponseJSON contains the JSON metadata for the struct
// [ContractNewResponse]
type contractNewResponseJSON struct {
Data apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractNewResponse) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractNewResponseJSON) RawJSON() string {
return r.raw
}
type ContractGetResponse struct {
Data ContractGetResponseData `json:"data,required"`
JSON contractGetResponseJSON `json:"-"`
}
// contractGetResponseJSON contains the JSON metadata for the struct
// [ContractGetResponse]
type contractGetResponseJSON struct {
Data apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractGetResponse) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractGetResponseJSON) RawJSON() string {
return r.raw
}
type ContractGetResponseData struct {
ID string `json:"id,required" format:"uuid"`
Amendments []ContractGetResponseDataAmendment `json:"amendments,required"`
Current shared.ContractWithoutAmendments `json:"current,required"`
CustomerID string `json:"customer_id,required" format:"uuid"`
Initial shared.ContractWithoutAmendments `json:"initial,required"`
// RFC 3339 timestamp indicating when the contract was archived. If not returned,
// the contract is not archived.
ArchivedAt time.Time `json:"archived_at" format:"date-time"`
CustomFields map[string]string `json:"custom_fields"`
// The billing provider configuration associated with a contract.
CustomerBillingProviderConfiguration ContractGetResponseDataCustomerBillingProviderConfiguration `json:"customer_billing_provider_configuration"`
// Determines which scheduled and commit charges to consolidate onto the Contract's
// usage invoice. The charge's `timestamp` must match the usage invoice's
// `ending_before` date for consolidation to occur. This field cannot be modified
// after a Contract has been created. If this field is omitted, charges will appear
// on a separate invoice from usage charges.
ScheduledChargesOnUsageInvoices ContractGetResponseDataScheduledChargesOnUsageInvoices `json:"scheduled_charges_on_usage_invoices"`
// Prevents the creation of duplicates. If a request to create a record is made
// with a previously used uniqueness key, a new record will not be created and the
// request will fail with a 409 error.
UniquenessKey string `json:"uniqueness_key"`
JSON contractGetResponseDataJSON `json:"-"`
}
// contractGetResponseDataJSON contains the JSON metadata for the struct
// [ContractGetResponseData]
type contractGetResponseDataJSON struct {
ID apijson.Field
Amendments apijson.Field
Current apijson.Field
CustomerID apijson.Field
Initial apijson.Field
ArchivedAt apijson.Field
CustomFields apijson.Field
CustomerBillingProviderConfiguration apijson.Field
ScheduledChargesOnUsageInvoices apijson.Field
UniquenessKey apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractGetResponseData) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractGetResponseDataJSON) RawJSON() string {
return r.raw
}
type ContractGetResponseDataAmendment struct {
ID string `json:"id,required" format:"uuid"`
Commits []shared.Commit `json:"commits,required"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
CreatedBy string `json:"created_by,required"`
Overrides []shared.Override `json:"overrides,required"`
ScheduledCharges []shared.ScheduledCharge `json:"scheduled_charges,required"`
StartingAt time.Time `json:"starting_at,required" format:"date-time"`
Credits []shared.Credit `json:"credits"`
// This field's availability is dependent on your client's configuration.
Discounts []shared.Discount `json:"discounts"`
// This field's availability is dependent on your client's configuration.
NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
// This field's availability is dependent on your client's configuration.
ProfessionalServices []shared.ProService `json:"professional_services"`
// This field's availability is dependent on your client's configuration.
ResellerRoyalties []ContractGetResponseDataAmendmentsResellerRoyalty `json:"reseller_royalties"`
// This field's availability is dependent on your client's configuration.
SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
JSON contractGetResponseDataAmendmentJSON `json:"-"`
}
// contractGetResponseDataAmendmentJSON contains the JSON metadata for the struct
// [ContractGetResponseDataAmendment]
type contractGetResponseDataAmendmentJSON struct {
ID apijson.Field
Commits apijson.Field
CreatedAt apijson.Field
CreatedBy apijson.Field
Overrides apijson.Field
ScheduledCharges apijson.Field
StartingAt apijson.Field
Credits apijson.Field
Discounts apijson.Field
NetsuiteSalesOrderID apijson.Field
ProfessionalServices apijson.Field
ResellerRoyalties apijson.Field
SalesforceOpportunityID apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractGetResponseDataAmendment) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractGetResponseDataAmendmentJSON) RawJSON() string {
return r.raw
}
type ContractGetResponseDataAmendmentsResellerRoyalty struct {
ResellerType ContractGetResponseDataAmendmentsResellerRoyaltiesResellerType `json:"reseller_type,required"`
AwsAccountNumber string `json:"aws_account_number"`
AwsOfferID string `json:"aws_offer_id"`
AwsPayerReferenceID string `json:"aws_payer_reference_id"`
EndingBefore time.Time `json:"ending_before,nullable" format:"date-time"`
Fraction float64 `json:"fraction"`
GcpAccountID string `json:"gcp_account_id"`
GcpOfferID string `json:"gcp_offer_id"`
NetsuiteResellerID string `json:"netsuite_reseller_id"`
ResellerContractValue float64 `json:"reseller_contract_value"`
StartingAt time.Time `json:"starting_at" format:"date-time"`
JSON contractGetResponseDataAmendmentsResellerRoyaltyJSON `json:"-"`
}
// contractGetResponseDataAmendmentsResellerRoyaltyJSON contains the JSON metadata
// for the struct [ContractGetResponseDataAmendmentsResellerRoyalty]
type contractGetResponseDataAmendmentsResellerRoyaltyJSON struct {
ResellerType apijson.Field
AwsAccountNumber apijson.Field
AwsOfferID apijson.Field
AwsPayerReferenceID apijson.Field
EndingBefore apijson.Field
Fraction apijson.Field
GcpAccountID apijson.Field
GcpOfferID apijson.Field
NetsuiteResellerID apijson.Field
ResellerContractValue apijson.Field
StartingAt apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractGetResponseDataAmendmentsResellerRoyalty) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractGetResponseDataAmendmentsResellerRoyaltyJSON) RawJSON() string {
return r.raw
}
type ContractGetResponseDataAmendmentsResellerRoyaltiesResellerType string
const (
ContractGetResponseDataAmendmentsResellerRoyaltiesResellerTypeAws ContractGetResponseDataAmendmentsResellerRoyaltiesResellerType = "AWS"
ContractGetResponseDataAmendmentsResellerRoyaltiesResellerTypeAwsProService ContractGetResponseDataAmendmentsResellerRoyaltiesResellerType = "AWS_PRO_SERVICE"
ContractGetResponseDataAmendmentsResellerRoyaltiesResellerTypeGcp ContractGetResponseDataAmendmentsResellerRoyaltiesResellerType = "GCP"
ContractGetResponseDataAmendmentsResellerRoyaltiesResellerTypeGcpProService ContractGetResponseDataAmendmentsResellerRoyaltiesResellerType = "GCP_PRO_SERVICE"
)
func (r ContractGetResponseDataAmendmentsResellerRoyaltiesResellerType) IsKnown() bool {
switch r {
case ContractGetResponseDataAmendmentsResellerRoyaltiesResellerTypeAws, ContractGetResponseDataAmendmentsResellerRoyaltiesResellerTypeAwsProService, ContractGetResponseDataAmendmentsResellerRoyaltiesResellerTypeGcp, ContractGetResponseDataAmendmentsResellerRoyaltiesResellerTypeGcpProService:
return true
}
return false
}
// The billing provider configuration associated with a contract.
type ContractGetResponseDataCustomerBillingProviderConfiguration struct {
BillingProvider ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider `json:"billing_provider,required"`
DeliveryMethod ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethod `json:"delivery_method,required"`
JSON contractGetResponseDataCustomerBillingProviderConfigurationJSON `json:"-"`
}
// contractGetResponseDataCustomerBillingProviderConfigurationJSON contains the
// JSON metadata for the struct
// [ContractGetResponseDataCustomerBillingProviderConfiguration]
type contractGetResponseDataCustomerBillingProviderConfigurationJSON struct {
BillingProvider apijson.Field
DeliveryMethod apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractGetResponseDataCustomerBillingProviderConfiguration) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractGetResponseDataCustomerBillingProviderConfigurationJSON) RawJSON() string {
return r.raw
}
type ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider string
const (
ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderAwsMarketplace ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider = "aws_marketplace"
ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderStripe ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider = "stripe"
ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderNetsuite ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider = "netsuite"
ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderCustom ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider = "custom"
ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderAzureMarketplace ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider = "azure_marketplace"
ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderQuickbooksOnline ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider = "quickbooks_online"
ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderWorkday ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider = "workday"
ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderGcpMarketplace ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider = "gcp_marketplace"
)
func (r ContractGetResponseDataCustomerBillingProviderConfigurationBillingProvider) IsKnown() bool {
switch r {
case ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderAwsMarketplace, ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderStripe, ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderNetsuite, ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderCustom, ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderAzureMarketplace, ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderQuickbooksOnline, ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderWorkday, ContractGetResponseDataCustomerBillingProviderConfigurationBillingProviderGcpMarketplace:
return true
}
return false
}
type ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethod string
const (
ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethodDirectToBillingProvider ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethod = "direct_to_billing_provider"
ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethodAwsSqs ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethod = "aws_sqs"
ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethodTackle ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethod = "tackle"
ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethodAwsSns ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethod = "aws_sns"
)
func (r ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethod) IsKnown() bool {
switch r {
case ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethodDirectToBillingProvider, ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethodAwsSqs, ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethodTackle, ContractGetResponseDataCustomerBillingProviderConfigurationDeliveryMethodAwsSns:
return true
}
return false
}
// Determines which scheduled and commit charges to consolidate onto the Contract's
// usage invoice. The charge's `timestamp` must match the usage invoice's
// `ending_before` date for consolidation to occur. This field cannot be modified
// after a Contract has been created. If this field is omitted, charges will appear
// on a separate invoice from usage charges.
type ContractGetResponseDataScheduledChargesOnUsageInvoices string
const (
ContractGetResponseDataScheduledChargesOnUsageInvoicesAll ContractGetResponseDataScheduledChargesOnUsageInvoices = "ALL"
)
func (r ContractGetResponseDataScheduledChargesOnUsageInvoices) IsKnown() bool {
switch r {
case ContractGetResponseDataScheduledChargesOnUsageInvoicesAll:
return true
}
return false
}
type ContractListResponse struct {
Data []ContractListResponseData `json:"data,required"`
JSON contractListResponseJSON `json:"-"`
}
// contractListResponseJSON contains the JSON metadata for the struct
// [ContractListResponse]
type contractListResponseJSON struct {
Data apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractListResponse) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractListResponseJSON) RawJSON() string {
return r.raw
}
type ContractListResponseData struct {
ID string `json:"id,required" format:"uuid"`
Amendments []ContractListResponseDataAmendment `json:"amendments,required"`
Current shared.ContractWithoutAmendments `json:"current,required"`
CustomerID string `json:"customer_id,required" format:"uuid"`
Initial shared.ContractWithoutAmendments `json:"initial,required"`
// RFC 3339 timestamp indicating when the contract was archived. If not returned,
// the contract is not archived.
ArchivedAt time.Time `json:"archived_at" format:"date-time"`
CustomFields map[string]string `json:"custom_fields"`
// The billing provider configuration associated with a contract.
CustomerBillingProviderConfiguration ContractListResponseDataCustomerBillingProviderConfiguration `json:"customer_billing_provider_configuration"`
// Determines which scheduled and commit charges to consolidate onto the Contract's
// usage invoice. The charge's `timestamp` must match the usage invoice's
// `ending_before` date for consolidation to occur. This field cannot be modified
// after a Contract has been created. If this field is omitted, charges will appear
// on a separate invoice from usage charges.
ScheduledChargesOnUsageInvoices ContractListResponseDataScheduledChargesOnUsageInvoices `json:"scheduled_charges_on_usage_invoices"`
// Prevents the creation of duplicates. If a request to create a record is made
// with a previously used uniqueness key, a new record will not be created and the
// request will fail with a 409 error.
UniquenessKey string `json:"uniqueness_key"`
JSON contractListResponseDataJSON `json:"-"`
}
// contractListResponseDataJSON contains the JSON metadata for the struct
// [ContractListResponseData]
type contractListResponseDataJSON struct {
ID apijson.Field
Amendments apijson.Field
Current apijson.Field
CustomerID apijson.Field
Initial apijson.Field
ArchivedAt apijson.Field
CustomFields apijson.Field
CustomerBillingProviderConfiguration apijson.Field
ScheduledChargesOnUsageInvoices apijson.Field
UniquenessKey apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractListResponseData) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractListResponseDataJSON) RawJSON() string {
return r.raw
}
type ContractListResponseDataAmendment struct {
ID string `json:"id,required" format:"uuid"`
Commits []shared.Commit `json:"commits,required"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
CreatedBy string `json:"created_by,required"`
Overrides []shared.Override `json:"overrides,required"`
ScheduledCharges []shared.ScheduledCharge `json:"scheduled_charges,required"`
StartingAt time.Time `json:"starting_at,required" format:"date-time"`
Credits []shared.Credit `json:"credits"`
// This field's availability is dependent on your client's configuration.
Discounts []shared.Discount `json:"discounts"`
// This field's availability is dependent on your client's configuration.
NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
// This field's availability is dependent on your client's configuration.
ProfessionalServices []shared.ProService `json:"professional_services"`
// This field's availability is dependent on your client's configuration.
ResellerRoyalties []ContractListResponseDataAmendmentsResellerRoyalty `json:"reseller_royalties"`
// This field's availability is dependent on your client's configuration.
SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
JSON contractListResponseDataAmendmentJSON `json:"-"`
}
// contractListResponseDataAmendmentJSON contains the JSON metadata for the struct
// [ContractListResponseDataAmendment]
type contractListResponseDataAmendmentJSON struct {
ID apijson.Field
Commits apijson.Field
CreatedAt apijson.Field
CreatedBy apijson.Field
Overrides apijson.Field
ScheduledCharges apijson.Field
StartingAt apijson.Field
Credits apijson.Field
Discounts apijson.Field
NetsuiteSalesOrderID apijson.Field
ProfessionalServices apijson.Field
ResellerRoyalties apijson.Field
SalesforceOpportunityID apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractListResponseDataAmendment) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractListResponseDataAmendmentJSON) RawJSON() string {
return r.raw
}
type ContractListResponseDataAmendmentsResellerRoyalty struct {
ResellerType ContractListResponseDataAmendmentsResellerRoyaltiesResellerType `json:"reseller_type,required"`
AwsAccountNumber string `json:"aws_account_number"`
AwsOfferID string `json:"aws_offer_id"`
AwsPayerReferenceID string `json:"aws_payer_reference_id"`
EndingBefore time.Time `json:"ending_before,nullable" format:"date-time"`
Fraction float64 `json:"fraction"`
GcpAccountID string `json:"gcp_account_id"`
GcpOfferID string `json:"gcp_offer_id"`
NetsuiteResellerID string `json:"netsuite_reseller_id"`
ResellerContractValue float64 `json:"reseller_contract_value"`
StartingAt time.Time `json:"starting_at" format:"date-time"`
JSON contractListResponseDataAmendmentsResellerRoyaltyJSON `json:"-"`
}
// contractListResponseDataAmendmentsResellerRoyaltyJSON contains the JSON metadata
// for the struct [ContractListResponseDataAmendmentsResellerRoyalty]
type contractListResponseDataAmendmentsResellerRoyaltyJSON struct {
ResellerType apijson.Field
AwsAccountNumber apijson.Field
AwsOfferID apijson.Field
AwsPayerReferenceID apijson.Field
EndingBefore apijson.Field
Fraction apijson.Field
GcpAccountID apijson.Field
GcpOfferID apijson.Field
NetsuiteResellerID apijson.Field
ResellerContractValue apijson.Field
StartingAt apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractListResponseDataAmendmentsResellerRoyalty) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractListResponseDataAmendmentsResellerRoyaltyJSON) RawJSON() string {
return r.raw
}
type ContractListResponseDataAmendmentsResellerRoyaltiesResellerType string
const (
ContractListResponseDataAmendmentsResellerRoyaltiesResellerTypeAws ContractListResponseDataAmendmentsResellerRoyaltiesResellerType = "AWS"
ContractListResponseDataAmendmentsResellerRoyaltiesResellerTypeAwsProService ContractListResponseDataAmendmentsResellerRoyaltiesResellerType = "AWS_PRO_SERVICE"
ContractListResponseDataAmendmentsResellerRoyaltiesResellerTypeGcp ContractListResponseDataAmendmentsResellerRoyaltiesResellerType = "GCP"
ContractListResponseDataAmendmentsResellerRoyaltiesResellerTypeGcpProService ContractListResponseDataAmendmentsResellerRoyaltiesResellerType = "GCP_PRO_SERVICE"
)
func (r ContractListResponseDataAmendmentsResellerRoyaltiesResellerType) IsKnown() bool {
switch r {
case ContractListResponseDataAmendmentsResellerRoyaltiesResellerTypeAws, ContractListResponseDataAmendmentsResellerRoyaltiesResellerTypeAwsProService, ContractListResponseDataAmendmentsResellerRoyaltiesResellerTypeGcp, ContractListResponseDataAmendmentsResellerRoyaltiesResellerTypeGcpProService:
return true
}
return false
}
// The billing provider configuration associated with a contract.
type ContractListResponseDataCustomerBillingProviderConfiguration struct {
BillingProvider ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider `json:"billing_provider,required"`
DeliveryMethod ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethod `json:"delivery_method,required"`
JSON contractListResponseDataCustomerBillingProviderConfigurationJSON `json:"-"`
}
// contractListResponseDataCustomerBillingProviderConfigurationJSON contains the
// JSON metadata for the struct
// [ContractListResponseDataCustomerBillingProviderConfiguration]
type contractListResponseDataCustomerBillingProviderConfigurationJSON struct {
BillingProvider apijson.Field
DeliveryMethod apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractListResponseDataCustomerBillingProviderConfiguration) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractListResponseDataCustomerBillingProviderConfigurationJSON) RawJSON() string {
return r.raw
}
type ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider string
const (
ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderAwsMarketplace ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider = "aws_marketplace"
ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderStripe ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider = "stripe"
ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderNetsuite ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider = "netsuite"
ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderCustom ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider = "custom"
ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderAzureMarketplace ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider = "azure_marketplace"
ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderQuickbooksOnline ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider = "quickbooks_online"
ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderWorkday ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider = "workday"
ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderGcpMarketplace ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider = "gcp_marketplace"
)
func (r ContractListResponseDataCustomerBillingProviderConfigurationBillingProvider) IsKnown() bool {
switch r {
case ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderAwsMarketplace, ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderStripe, ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderNetsuite, ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderCustom, ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderAzureMarketplace, ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderQuickbooksOnline, ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderWorkday, ContractListResponseDataCustomerBillingProviderConfigurationBillingProviderGcpMarketplace:
return true
}
return false
}
type ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethod string
const (
ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethodDirectToBillingProvider ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethod = "direct_to_billing_provider"
ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethodAwsSqs ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethod = "aws_sqs"
ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethodTackle ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethod = "tackle"
ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethodAwsSns ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethod = "aws_sns"
)
func (r ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethod) IsKnown() bool {
switch r {
case ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethodDirectToBillingProvider, ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethodAwsSqs, ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethodTackle, ContractListResponseDataCustomerBillingProviderConfigurationDeliveryMethodAwsSns:
return true
}
return false
}
// Determines which scheduled and commit charges to consolidate onto the Contract's
// usage invoice. The charge's `timestamp` must match the usage invoice's
// `ending_before` date for consolidation to occur. This field cannot be modified
// after a Contract has been created. If this field is omitted, charges will appear
// on a separate invoice from usage charges.
type ContractListResponseDataScheduledChargesOnUsageInvoices string
const (
ContractListResponseDataScheduledChargesOnUsageInvoicesAll ContractListResponseDataScheduledChargesOnUsageInvoices = "ALL"
)
func (r ContractListResponseDataScheduledChargesOnUsageInvoices) IsKnown() bool {
switch r {
case ContractListResponseDataScheduledChargesOnUsageInvoicesAll:
return true
}
return false
}
type ContractAmendResponse struct {
Data shared.ID `json:"data,required"`
JSON contractAmendResponseJSON `json:"-"`
}
// contractAmendResponseJSON contains the JSON metadata for the struct
// [ContractAmendResponse]
type contractAmendResponseJSON struct {
Data apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractAmendResponse) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractAmendResponseJSON) RawJSON() string {
return r.raw
}
type ContractArchiveResponse struct {
Data shared.ID `json:"data,required"`
JSON contractArchiveResponseJSON `json:"-"`
}
// contractArchiveResponseJSON contains the JSON metadata for the struct
// [ContractArchiveResponse]
type contractArchiveResponseJSON struct {
Data apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractArchiveResponse) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractArchiveResponseJSON) RawJSON() string {
return r.raw
}
type ContractNewHistoricalInvoicesResponse struct {
Data []Invoice `json:"data,required"`
JSON contractNewHistoricalInvoicesResponseJSON `json:"-"`
}
// contractNewHistoricalInvoicesResponseJSON contains the JSON metadata for the
// struct [ContractNewHistoricalInvoicesResponse]
type contractNewHistoricalInvoicesResponseJSON struct {
Data apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractNewHistoricalInvoicesResponse) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractNewHistoricalInvoicesResponseJSON) RawJSON() string {
return r.raw
}
type ContractListBalancesResponse struct {
Data []ContractListBalancesResponseData `json:"data,required"`
NextPage string `json:"next_page,required,nullable"`
JSON contractListBalancesResponseJSON `json:"-"`
}
// contractListBalancesResponseJSON contains the JSON metadata for the struct
// [ContractListBalancesResponse]
type contractListBalancesResponseJSON struct {
Data apijson.Field
NextPage apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractListBalancesResponse) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractListBalancesResponseJSON) RawJSON() string {
return r.raw
}
type ContractListBalancesResponseData struct {
ID string `json:"id,required" format:"uuid"`
// This field can have the runtime type of [shared.CommitProduct],
// [shared.CreditProduct].
Product interface{} `json:"product,required"`
Type ContractListBalancesResponseDataType `json:"type,required"`
// The schedule that the customer will gain access to the credits purposed with
// this commit.
AccessSchedule shared.ScheduleDuration `json:"access_schedule"`
// (DEPRECATED) Use access_schedule + invoice_schedule instead.
Amount float64 `json:"amount"`
// This field can have the runtime type of [[]string].
ApplicableContractIDs interface{} `json:"applicable_contract_ids"`
// This field can have the runtime type of [[]string].
ApplicableProductIDs interface{} `json:"applicable_product_ids"`
// This field can have the runtime type of [[]string].
ApplicableProductTags interface{} `json:"applicable_product_tags"`
// The current balance of the credit or commit. This balance reflects the amount of
// credit or commit that the customer has access to use at this moment - thus,
// expired and upcoming credit or commit segments contribute 0 to the balance. The
// balance will match the sum of all ledger entries with the exception of the case
// where the sum of negative manual ledger entries exceeds the positive amount
// remaining on the credit or commit - in that case, the balance will be 0. All
// manual ledger entries associated with active credit or commit segments are
// included in the balance, including future-dated manual ledger entries.
Balance float64 `json:"balance"`
// This field can have the runtime type of [shared.CommitContract],
// [shared.CreditContract].
Contract interface{} `json:"contract"`
// This field can have the runtime type of [map[string]string].
CustomFields interface{} `json:"custom_fields"`
Description string `json:"description"`
// This field can have the runtime type of [shared.CommitInvoiceContract].
InvoiceContract interface{} `json:"invoice_contract"`
// The schedule that the customer will be invoiced for this commit.
InvoiceSchedule shared.SchedulePointInTime `json:"invoice_schedule"`
// This field can have the runtime type of [[]shared.CommitLedger],
// [[]shared.CreditLedger].
Ledger interface{} `json:"ledger"`
Name string `json:"name"`
// This field's availability is dependent on your client's configuration.
NetsuiteSalesOrderID string `json:"netsuite_sales_order_id"`
// If multiple credits or commits are applicable, the one with the lower priority
// will apply first.
Priority float64 `json:"priority"`
RateType ContractListBalancesResponseDataRateType `json:"rate_type"`
// This field can have the runtime type of [shared.CommitRolledOverFrom].
RolledOverFrom interface{} `json:"rolled_over_from"`
RolloverFraction float64 `json:"rollover_fraction"`
// This field's availability is dependent on your client's configuration.
SalesforceOpportunityID string `json:"salesforce_opportunity_id"`
// Prevents the creation of duplicates. If a request to create a commit or credit
// is made with a uniqueness key that was previously used to create a commit or
// credit, a new record will not be created and the request will fail with a 409
// error.
UniquenessKey string `json:"uniqueness_key"`
JSON contractListBalancesResponseDataJSON `json:"-"`
union ContractListBalancesResponseDataUnion
}
// contractListBalancesResponseDataJSON contains the JSON metadata for the struct
// [ContractListBalancesResponseData]
type contractListBalancesResponseDataJSON struct {
ID apijson.Field
Product apijson.Field
Type apijson.Field
AccessSchedule apijson.Field
Amount apijson.Field
ApplicableContractIDs apijson.Field
ApplicableProductIDs apijson.Field
ApplicableProductTags apijson.Field
Balance apijson.Field
Contract apijson.Field
CustomFields apijson.Field
Description apijson.Field
InvoiceContract apijson.Field
InvoiceSchedule apijson.Field
Ledger apijson.Field
Name apijson.Field
NetsuiteSalesOrderID apijson.Field
Priority apijson.Field
RateType apijson.Field
RolledOverFrom apijson.Field
RolloverFraction apijson.Field
SalesforceOpportunityID apijson.Field
UniquenessKey apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r contractListBalancesResponseDataJSON) RawJSON() string {
return r.raw
}
func (r *ContractListBalancesResponseData) UnmarshalJSON(data []byte) (err error) {
*r = ContractListBalancesResponseData{}
err = apijson.UnmarshalRoot(data, &r.union)
if err != nil {
return err
}
return apijson.Port(r.union, &r)
}
// AsUnion returns a [ContractListBalancesResponseDataUnion] interface which you
// can cast to the specific types for more type safety.
//
// Possible runtime types of the union are [shared.Commit], [shared.Credit].
func (r ContractListBalancesResponseData) AsUnion() ContractListBalancesResponseDataUnion {
return r.union
}
// Union satisfied by [shared.Commit] or [shared.Credit].
type ContractListBalancesResponseDataUnion interface {
ImplementsContractListBalancesResponseData()
}
func init() {
apijson.RegisterUnion(
reflect.TypeOf((*ContractListBalancesResponseDataUnion)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(shared.Commit{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(shared.Credit{}),
},
)
}
type ContractListBalancesResponseDataType string
const (
ContractListBalancesResponseDataTypePrepaid ContractListBalancesResponseDataType = "PREPAID"
ContractListBalancesResponseDataTypePostpaid ContractListBalancesResponseDataType = "POSTPAID"
ContractListBalancesResponseDataTypeCredit ContractListBalancesResponseDataType = "CREDIT"
)
func (r ContractListBalancesResponseDataType) IsKnown() bool {
switch r {
case ContractListBalancesResponseDataTypePrepaid, ContractListBalancesResponseDataTypePostpaid, ContractListBalancesResponseDataTypeCredit:
return true
}
return false
}
type ContractListBalancesResponseDataRateType string
const (
ContractListBalancesResponseDataRateTypeCommitRate ContractListBalancesResponseDataRateType = "COMMIT_RATE"
ContractListBalancesResponseDataRateTypeListRate ContractListBalancesResponseDataRateType = "LIST_RATE"
)
func (r ContractListBalancesResponseDataRateType) IsKnown() bool {
switch r {
case ContractListBalancesResponseDataRateTypeCommitRate, ContractListBalancesResponseDataRateTypeListRate:
return true
}
return false
}
type ContractGetRateScheduleResponse struct {
Data []ContractGetRateScheduleResponseData `json:"data,required"`
NextPage string `json:"next_page,nullable"`
JSON contractGetRateScheduleResponseJSON `json:"-"`
}
// contractGetRateScheduleResponseJSON contains the JSON metadata for the struct
// [ContractGetRateScheduleResponse]
type contractGetRateScheduleResponseJSON struct {
Data apijson.Field
NextPage apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractGetRateScheduleResponse) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractGetRateScheduleResponseJSON) RawJSON() string {
return r.raw
}
type ContractGetRateScheduleResponseData struct {
Entitled bool `json:"entitled,required"`
ListRate shared.Rate `json:"list_rate,required"`
ProductCustomFields map[string]string `json:"product_custom_fields,required"`
ProductID string `json:"product_id,required" format:"uuid"`
ProductName string `json:"product_name,required"`
ProductTags []string `json:"product_tags,required"`
RateCardID string `json:"rate_card_id,required" format:"uuid"`
StartingAt time.Time `json:"starting_at,required" format:"date-time"`
// A distinct rate on the rate card. You can choose to use this rate rather than
// list rate when consuming a credit or commit.
CommitRate ContractGetRateScheduleResponseDataCommitRate `json:"commit_rate"`
EndingBefore time.Time `json:"ending_before" format:"date-time"`
OverrideRate shared.Rate `json:"override_rate"`
PricingGroupValues map[string]string `json:"pricing_group_values"`
JSON contractGetRateScheduleResponseDataJSON `json:"-"`
}
// contractGetRateScheduleResponseDataJSON contains the JSON metadata for the
// struct [ContractGetRateScheduleResponseData]
type contractGetRateScheduleResponseDataJSON struct {
Entitled apijson.Field
ListRate apijson.Field
ProductCustomFields apijson.Field
ProductID apijson.Field
ProductName apijson.Field
ProductTags apijson.Field
RateCardID apijson.Field
StartingAt apijson.Field
CommitRate apijson.Field
EndingBefore apijson.Field
OverrideRate apijson.Field
PricingGroupValues apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ContractGetRateScheduleResponseData) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r contractGetRateScheduleResponseDataJSON) RawJSON() string {