Class: MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb

Defined Under Namespace

Classes: AddCommit, AddCredit, AddOverride, AddRecurringCommit, AddRecurringCredit, AddResellerRoyalty, AddScheduledCharge, AddUsageFilter, ArchiveCommit, ArchiveCredit, ArchiveScheduledCharge, RemoveOverride, UpdateCommit, UpdateCredit, UpdateDiscount, UpdatePrepaidBalanceThresholdConfiguration, UpdateRecurringCommit, UpdateRecurringCredit, UpdateRefundInvoice, UpdateScheduledCharge, UpdateSpendThresholdConfiguration, UpdateSubscription

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(commit: nil, is_enabled: nil, payment_gate_config: nil, threshold_amount: nil) ⇒ Object

Some parameter documentations has been truncated, see UpdateSpendThresholdConfiguration for more details.

Parameters:



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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 17

class Data < MetronomeSDK::Internal::Type::BaseModel
  # @!attribute id
  #
  #   @return [String]
  required :id, String

  # @!attribute add_commits
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit>, nil]
  optional :add_commits,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit] }

  # @!attribute add_credits
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit>, nil]
  optional :add_credits,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit] }

  # @!attribute add_discounts
  #
  #   @return [Array<MetronomeSDK::Models::Discount>, nil]
  optional :add_discounts, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Discount] }

  # @!attribute add_overrides
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride>, nil]
  optional :add_overrides,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride] }

  # @!attribute add_prepaid_balance_threshold_configuration
  #
  #   @return [MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2, nil]
  optional :add_prepaid_balance_threshold_configuration,
           -> { MetronomeSDK::PrepaidBalanceThresholdConfigurationV2 }

  # @!attribute add_pro_services
  #
  #   @return [Array<MetronomeSDK::Models::ProService>, nil]
  optional :add_pro_services, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ProService] }

  # @!attribute add_recurring_commits
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit>, nil]
  optional :add_recurring_commits,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit] }

  # @!attribute add_recurring_credits
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit>, nil]
  optional :add_recurring_credits,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit] }

  # @!attribute add_reseller_royalties
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty>, nil]
  optional :add_reseller_royalties,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty] }

  # @!attribute add_scheduled_charges
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge>, nil]
  optional :add_scheduled_charges,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge] }

  # @!attribute add_spend_threshold_configuration
  #
  #   @return [MetronomeSDK::Models::SpendThresholdConfigurationV2, nil]
  optional :add_spend_threshold_configuration, -> { MetronomeSDK::SpendThresholdConfigurationV2 }

  # @!attribute add_subscriptions
  #   List of subscriptions on the contract.
  #
  #   @return [Array<MetronomeSDK::Models::Subscription>, nil]
  optional :add_subscriptions, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Subscription] }

  # @!attribute add_usage_filters
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddUsageFilter>, nil]
  optional :add_usage_filters,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddUsageFilter] }

  # @!attribute archive_commits
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveCommit>, nil]
  optional :archive_commits,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveCommit] }

  # @!attribute archive_credits
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveCredit>, nil]
  optional :archive_credits,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveCredit] }

  # @!attribute archive_scheduled_charges
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveScheduledCharge>, nil]
  optional :archive_scheduled_charges,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveScheduledCharge] }

  # @!attribute remove_overrides
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::RemoveOverride>, nil]
  optional :remove_overrides,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::RemoveOverride] }

  # @!attribute timestamp
  #
  #   @return [Time, nil]
  optional :timestamp, Time

  # @!attribute uniqueness_key
  #   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.
  #
  #   @return [String, nil]
  optional :uniqueness_key, String

  # @!attribute update_commits
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit>, nil]
  optional :update_commits,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit] }

  # @!attribute update_contract_end_date
  #
  #   @return [Time, nil]
  optional :update_contract_end_date, Time

  # @!attribute update_contract_name
  #   Value to update the contract name to. If not provided, the contract name will
  #   remain unchanged.
  #
  #   @return [String, nil]
  optional :update_contract_name, String, nil?: true

  # @!attribute update_credits
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit>, nil]
  optional :update_credits,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit] }

  # @!attribute update_discounts
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount>, nil]
  optional :update_discounts,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount] }

  # @!attribute update_prepaid_balance_threshold_configuration
  #
  #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration, nil]
  optional :update_prepaid_balance_threshold_configuration,
           -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration }

  # @!attribute update_recurring_commits
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit>, nil]
  optional :update_recurring_commits,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit] }

  # @!attribute update_recurring_credits
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit>, nil]
  optional :update_recurring_credits,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit] }

  # @!attribute update_refund_invoices
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRefundInvoice>, nil]
  optional :update_refund_invoices,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRefundInvoice] }

  # @!attribute update_scheduled_charges
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge>, nil]
  optional :update_scheduled_charges,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge] }

  # @!attribute update_spend_threshold_configuration
  #
  #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration, nil]
  optional :update_spend_threshold_configuration,
           -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration }

  # @!attribute update_subscriptions
  #   Optional list of subscriptions to update.
  #
  #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSubscription>, nil]
  optional :update_subscriptions,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSubscription] }

  # @!method initialize(id:, add_commits: nil, add_credits: nil, add_discounts: nil, add_overrides: nil, add_prepaid_balance_threshold_configuration: nil, add_pro_services: nil, add_recurring_commits: nil, add_recurring_credits: nil, add_reseller_royalties: nil, add_scheduled_charges: nil, add_spend_threshold_configuration: nil, add_subscriptions: nil, add_usage_filters: nil, archive_commits: nil, archive_credits: nil, archive_scheduled_charges: nil, remove_overrides: nil, timestamp: nil, uniqueness_key: nil, update_commits: nil, update_contract_end_date: nil, update_contract_name: nil, update_credits: nil, update_discounts: nil, update_prepaid_balance_threshold_configuration: nil, update_recurring_commits: nil, update_recurring_credits: nil, update_refund_invoices: nil, update_scheduled_charges: nil, update_spend_threshold_configuration: nil, update_subscriptions: nil)
  #   Some parameter documentations has been truncated, see
  #   {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data} for more
  #   details.
  #
  #   @param id [String]
  #
  #   @param add_commits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit>]
  #
  #   @param add_credits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit>]
  #
  #   @param add_discounts [Array<MetronomeSDK::Models::Discount>]
  #
  #   @param add_overrides [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride>]
  #
  #   @param add_prepaid_balance_threshold_configuration [MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2]
  #
  #   @param add_pro_services [Array<MetronomeSDK::Models::ProService>]
  #
  #   @param add_recurring_commits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit>]
  #
  #   @param add_recurring_credits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit>]
  #
  #   @param add_reseller_royalties [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty>]
  #
  #   @param add_scheduled_charges [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge>]
  #
  #   @param add_spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfigurationV2]
  #
  #   @param add_subscriptions [Array<MetronomeSDK::Models::Subscription>] List of subscriptions on the contract.
  #
  #   @param add_usage_filters [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddUsageFilter>]
  #
  #   @param archive_commits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveCommit>]
  #
  #   @param archive_credits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveCredit>]
  #
  #   @param archive_scheduled_charges [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveScheduledCharge>]
  #
  #   @param remove_overrides [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::RemoveOverride>]
  #
  #   @param timestamp [Time]
  #
  #   @param uniqueness_key [String] Prevents the creation of duplicates. If a request to create a record is made wit
  #
  #   @param update_commits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit>]
  #
  #   @param update_contract_end_date [Time]
  #
  #   @param update_contract_name [String, nil] Value to update the contract name to. If not provided, the contract name will re
  #
  #   @param update_credits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit>]
  #
  #   @param update_discounts [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount>]
  #
  #   @param update_prepaid_balance_threshold_configuration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration]
  #
  #   @param update_recurring_commits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit>]
  #
  #   @param update_recurring_credits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit>]
  #
  #   @param update_refund_invoices [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRefundInvoice>]
  #
  #   @param update_scheduled_charges [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge>]
  #
  #   @param update_spend_threshold_configuration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration]
  #
  #   @param update_subscriptions [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSubscription>] Optional list of subscriptions to update.

  class AddCommit < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!attribute product
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Product]
    required :product,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Product }

    # @!attribute type
    #
    #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Type]
    required :type,
             enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Type }

    # @!attribute access_schedule
    #   The schedule that the customer will gain access to the credits purposed with
    #   this commit.
    #
    #   @return [MetronomeSDK::Models::ScheduleDuration, nil]
    optional :access_schedule, -> { MetronomeSDK::ScheduleDuration }

    # @!attribute applicable_product_ids
    #
    #   @return [Array<String>, nil]
    optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

    # @!attribute applicable_product_tags
    #
    #   @return [Array<String>, nil]
    optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]

    # @!attribute description
    #
    #   @return [String, nil]
    optional :description, String

    # @!attribute hierarchy_configuration
    #   Optional configuration for commit hierarchy access control
    #
    #   @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
    optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }

    # @!attribute invoice_schedule
    #   The schedule that the customer will be invoiced for this commit.
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule, nil]
    optional :invoice_schedule,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule }

    # @!attribute name
    #
    #   @return [String, nil]
    optional :name, String

    # @!attribute netsuite_sales_order_id
    #   This field's availability is dependent on your client's configuration.
    #
    #   @return [String, nil]
    optional :netsuite_sales_order_id, String

    # @!attribute priority
    #   If multiple credits or commits are applicable, the one with the lower priority
    #   will apply first.
    #
    #   @return [Float, nil]
    optional :priority, Float

    # @!attribute rate_type
    #
    #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::RateType, nil]
    optional :rate_type,
             enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::RateType }

    # @!attribute rollover_fraction
    #
    #   @return [Float, nil]
    optional :rollover_fraction, Float

    # @!attribute salesforce_opportunity_id
    #   This field's availability is dependent on your client's configuration.
    #
    #   @return [String, nil]
    optional :salesforce_opportunity_id, String

    # @!attribute specifiers
    #   List of filters that determine what kind of customer usage draws down a commit
    #   or credit. A customer's usage needs to meet the condition of at least one of the
    #   specifiers to contribute to a commit's or credit's drawdown. This field cannot
    #   be used together with `applicable_product_ids` or `applicable_product_tags`.
    #   Instead, to target usage by product or product tag, pass those values in the
    #   body of `specifiers`.
    #
    #   @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
    optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }

    # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, rollover_fraction: nil, salesforce_opportunity_id: nil, specifiers: nil)
    #   Some parameter documentations has been truncated, see
    #   {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit} for
    #   more details.
    #
    #   @param id [String]
    #
    #   @param product [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Product]
    #
    #   @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Type]
    #
    #   @param access_schedule [MetronomeSDK::Models::ScheduleDuration] The schedule that the customer will gain access to the credits purposed with thi
    #
    #   @param applicable_product_ids [Array<String>]
    #
    #   @param applicable_product_tags [Array<String>]
    #
    #   @param description [String]
    #
    #   @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for commit hierarchy access control
    #
    #   @param invoice_schedule [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule] The schedule that the customer will be invoiced for this commit.
    #
    #   @param name [String]
    #
    #   @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
    #
    #   @param priority [Float] If multiple credits or commits are applicable, the one with the lower priority w
    #
    #   @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::RateType]
    #
    #   @param rollover_fraction [Float]
    #
    #   @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
    #
    #   @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit#product
    class Product < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute id
      #
      #   @return [String]
      required :id, String

      # @!attribute name
      #
      #   @return [String]
      required :name, String

      # @!method initialize(id:, name:)
      #   @param id [String]
      #   @param name [String]
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit#type
    module Type
      extend MetronomeSDK::Internal::Type::Enum

      PREPAID = :PREPAID
      POSTPAID = :POSTPAID

      # @!method self.values
      #   @return [Array<Symbol>]
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit#invoice_schedule
    class InvoiceSchedule < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute credit_type
      #
      #   @return [MetronomeSDK::Models::CreditTypeData, nil]
      optional :credit_type, -> { MetronomeSDK::CreditTypeData }

      # @!attribute do_not_invoice
      #   If true, this schedule will not generate an invoice.
      #
      #   @return [Boolean, nil]
      optional :do_not_invoice, MetronomeSDK::Internal::Type::Boolean

      # @!attribute schedule_items
      #
      #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule::ScheduleItem>, nil]
      optional :schedule_items,
               -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule::ScheduleItem] }

      # @!method initialize(credit_type: nil, do_not_invoice: nil, schedule_items: nil)
      #   The schedule that the customer will be invoiced for this commit.
      #
      #   @param credit_type [MetronomeSDK::Models::CreditTypeData]
      #
      #   @param do_not_invoice [Boolean] If true, this schedule will not generate an invoice.
      #
      #   @param schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule::ScheduleItem>]

      class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
        # @!attribute id
        #
        #   @return [String]
        required :id, String

        # @!attribute timestamp
        #
        #   @return [Time]
        required :timestamp, Time

        # @!attribute amount
        #
        #   @return [Float, nil]
        optional :amount, Float

        # @!attribute invoice_id
        #
        #   @return [String, nil]
        optional :invoice_id, String, nil?: true

        # @!attribute quantity
        #
        #   @return [Float, nil]
        optional :quantity, Float

        # @!attribute unit_price
        #
        #   @return [Float, nil]
        optional :unit_price, Float

        # @!method initialize(id:, timestamp:, amount: nil, invoice_id: nil, quantity: nil, unit_price: nil)
        #   @param id [String]
        #   @param timestamp [Time]
        #   @param amount [Float]
        #   @param invoice_id [String, nil]
        #   @param quantity [Float]
        #   @param unit_price [Float]
      end
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit#rate_type
    module RateType
      extend MetronomeSDK::Internal::Type::Enum

      COMMIT_RATE = :COMMIT_RATE
      LIST_RATE = :LIST_RATE

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  class AddCredit < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!attribute product
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::Product]
    required :product,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::Product }

    # @!attribute type
    #
    #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::Type]
    required :type,
             enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::Type }

    # @!attribute access_schedule
    #   The schedule that the customer will gain access to the credits.
    #
    #   @return [MetronomeSDK::Models::ScheduleDuration, nil]
    optional :access_schedule, -> { MetronomeSDK::ScheduleDuration }

    # @!attribute applicable_product_ids
    #
    #   @return [Array<String>, nil]
    optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

    # @!attribute applicable_product_tags
    #
    #   @return [Array<String>, nil]
    optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]

    # @!attribute description
    #
    #   @return [String, nil]
    optional :description, String

    # @!attribute hierarchy_configuration
    #   Optional configuration for recurring credit hierarchy access control
    #
    #   @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
    optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }

    # @!attribute name
    #
    #   @return [String, nil]
    optional :name, String

    # @!attribute netsuite_sales_order_id
    #   This field's availability is dependent on your client's configuration.
    #
    #   @return [String, nil]
    optional :netsuite_sales_order_id, String

    # @!attribute priority
    #   If multiple credits or commits are applicable, the one with the lower priority
    #   will apply first.
    #
    #   @return [Float, nil]
    optional :priority, Float

    # @!attribute salesforce_opportunity_id
    #   This field's availability is dependent on your client's configuration.
    #
    #   @return [String, nil]
    optional :salesforce_opportunity_id, String

    # @!attribute specifiers
    #   List of filters that determine what kind of customer usage draws down a commit
    #   or credit. A customer's usage needs to meet the condition of at least one of the
    #   specifiers to contribute to a commit's or credit's drawdown. This field cannot
    #   be used together with `applicable_product_ids` or `applicable_product_tags`.
    #   Instead, to target usage by product or product tag, pass those values in the
    #   body of `specifiers`.
    #
    #   @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
    optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }

    # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, salesforce_opportunity_id: nil, specifiers: nil)
    #   Some parameter documentations has been truncated, see
    #   {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit} for
    #   more details.
    #
    #   @param id [String]
    #
    #   @param product [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::Product]
    #
    #   @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::Type]
    #
    #   @param access_schedule [MetronomeSDK::Models::ScheduleDuration] The schedule that the customer will gain access to the credits.
    #
    #   @param applicable_product_ids [Array<String>]
    #
    #   @param applicable_product_tags [Array<String>]
    #
    #   @param description [String]
    #
    #   @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
    #
    #   @param name [String]
    #
    #   @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
    #
    #   @param priority [Float] If multiple credits or commits are applicable, the one with the lower priority w
    #
    #   @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
    #
    #   @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit#product
    class Product < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute id
      #
      #   @return [String]
      required :id, String

      # @!attribute name
      #
      #   @return [String]
      required :name, String

      # @!method initialize(id:, name:)
      #   @param id [String]
      #   @param name [String]
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit#type
    module Type
      extend MetronomeSDK::Internal::Type::Enum

      CREDIT = :CREDIT

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  class AddOverride < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!attribute starting_at
    #
    #   @return [Time]
    required :starting_at, Time

    # @!attribute applicable_product_tags
    #
    #   @return [Array<String>, nil]
    optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]

    # @!attribute ending_before
    #
    #   @return [Time, nil]
    optional :ending_before, Time

    # @!attribute entitled
    #
    #   @return [Boolean, nil]
    optional :entitled, MetronomeSDK::Internal::Type::Boolean

    # @!attribute is_commit_specific
    #
    #   @return [Boolean, nil]
    optional :is_commit_specific, MetronomeSDK::Internal::Type::Boolean

    # @!attribute multiplier
    #
    #   @return [Float, nil]
    optional :multiplier, Float

    # @!attribute override_specifiers
    #
    #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideSpecifier>, nil]
    optional :override_specifiers,
             -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideSpecifier] }

    # @!attribute override_tiers
    #
    #   @return [Array<MetronomeSDK::Models::OverrideTier>, nil]
    optional :override_tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::OverrideTier] }

    # @!attribute overwrite_rate
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate, nil]
    optional :overwrite_rate,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate }

    # @!attribute priority
    #
    #   @return [Float, nil]
    optional :priority, Float

    # @!attribute product
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::Product, nil]
    optional :product,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::Product }

    # @!attribute target
    #
    #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::Target, nil]
    optional :target,
             enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::Target }

    # @!attribute type
    #
    #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::Type, nil]
    optional :type,
             enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::Type }

    # @!method initialize(id:, starting_at:, applicable_product_tags: nil, ending_before: nil, entitled: nil, is_commit_specific: nil, multiplier: nil, override_specifiers: nil, override_tiers: nil, overwrite_rate: nil, priority: nil, product: nil, target: nil, type: nil)
    #   @param id [String]
    #   @param starting_at [Time]
    #   @param applicable_product_tags [Array<String>]
    #   @param ending_before [Time]
    #   @param entitled [Boolean]
    #   @param is_commit_specific [Boolean]
    #   @param multiplier [Float]
    #   @param override_specifiers [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideSpecifier>]
    #   @param override_tiers [Array<MetronomeSDK::Models::OverrideTier>]
    #   @param overwrite_rate [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate]
    #   @param priority [Float]
    #   @param product [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::Product]
    #   @param target [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::Target]
    #   @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::Type]

    class OverrideSpecifier < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute billing_frequency
      #
      #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideSpecifier::BillingFrequency, nil]
      optional :billing_frequency,
               enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideSpecifier::BillingFrequency }

      # @!attribute commit_ids
      #
      #   @return [Array<String>, nil]
      optional :commit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

      # @!attribute presentation_group_values
      #
      #   @return [Hash{Symbol=>String, nil}, nil]
      optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String, nil?: true]

      # @!attribute pricing_group_values
      #
      #   @return [Hash{Symbol=>String}, nil]
      optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]

      # @!attribute product_id
      #
      #   @return [String, nil]
      optional :product_id, String

      # @!attribute product_tags
      #
      #   @return [Array<String>, nil]
      optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]

      # @!attribute recurring_commit_ids
      #
      #   @return [Array<String>, nil]
      optional :recurring_commit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

      # @!attribute recurring_credit_ids
      #
      #   @return [Array<String>, nil]
      optional :recurring_credit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

      # @!method initialize(billing_frequency: nil, commit_ids: nil, presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil, recurring_commit_ids: nil, recurring_credit_ids: nil)
      #   @param billing_frequency [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideSpecifier::BillingFrequency]
      #   @param commit_ids [Array<String>]
      #   @param presentation_group_values [Hash{Symbol=>String, nil}]
      #   @param pricing_group_values [Hash{Symbol=>String}]
      #   @param product_id [String]
      #   @param product_tags [Array<String>]
      #   @param recurring_commit_ids [Array<String>]
      #   @param recurring_credit_ids [Array<String>]

      # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideSpecifier#billing_frequency
      module BillingFrequency
        extend MetronomeSDK::Internal::Type::Enum

        MONTHLY = :MONTHLY
        QUARTERLY = :QUARTERLY
        ANNUAL = :ANNUAL
        WEEKLY = :WEEKLY

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride#overwrite_rate
    class OverwriteRate < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute rate_type
      #
      #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate::RateType]
      required :rate_type,
               enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate::RateType }

      # @!attribute credit_type
      #
      #   @return [MetronomeSDK::Models::CreditTypeData, nil]
      optional :credit_type, -> { MetronomeSDK::CreditTypeData }

      # @!attribute custom_rate
      #   Only set for CUSTOM rate_type. This field is interpreted by custom rate
      #   processors.
      #
      #   @return [Hash{Symbol=>Object}, nil]
      optional :custom_rate, MetronomeSDK::Internal::Type::HashOf[MetronomeSDK::Internal::Type::Unknown]

      # @!attribute is_prorated
      #   Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
      #   set to true.
      #
      #   @return [Boolean, nil]
      optional :is_prorated, MetronomeSDK::Internal::Type::Boolean

      # @!attribute price
      #   Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
      #   this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
      #
      #   @return [Float, nil]
      optional :price, Float

      # @!attribute quantity
      #   Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
      #
      #   @return [Float, nil]
      optional :quantity, Float

      # @!attribute tiers
      #   Only set for TIERED rate_type.
      #
      #   @return [Array<MetronomeSDK::Models::Tier>, nil]
      optional :tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Tier] }

      # @!method initialize(rate_type:, credit_type: nil, custom_rate: nil, is_prorated: nil, price: nil, quantity: nil, tiers: nil)
      #   Some parameter documentations has been truncated, see
      #   {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate}
      #   for more details.
      #
      #   @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate::RateType]
      #
      #   @param credit_type [MetronomeSDK::Models::CreditTypeData]
      #
      #   @param custom_rate [Hash{Symbol=>Object}] Only set for CUSTOM rate_type. This field is interpreted by custom rate processo
      #
      #   @param is_prorated [Boolean] Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
      #
      #   @param price [Float] Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type, t
      #
      #   @param quantity [Float] Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
      #
      #   @param tiers [Array<MetronomeSDK::Models::Tier>] Only set for TIERED rate_type.

      # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate#rate_type
      module RateType
        extend MetronomeSDK::Internal::Type::Enum

        FLAT = :FLAT
        PERCENTAGE = :PERCENTAGE
        SUBSCRIPTION = :SUBSCRIPTION
        TIERED = :TIERED
        CUSTOM = :CUSTOM

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride#product
    class Product < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute id
      #
      #   @return [String]
      required :id, String

      # @!attribute name
      #
      #   @return [String]
      required :name, String

      # @!method initialize(id:, name:)
      #   @param id [String]
      #   @param name [String]
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride#target
    module Target
      extend MetronomeSDK::Internal::Type::Enum

      COMMIT_RATE = :COMMIT_RATE
      LIST_RATE = :LIST_RATE

      # @!method self.values
      #   @return [Array<Symbol>]
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride#type
    module Type
      extend MetronomeSDK::Internal::Type::Enum

      OVERWRITE = :OVERWRITE
      MULTIPLIER = :MULTIPLIER
      TIERED = :TIERED

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  class AddRecurringCommit < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!attribute access_amount
    #   The amount of commit to grant.
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::AccessAmount]
    required :access_amount,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::AccessAmount }

    # @!attribute commit_duration
    #   The amount of time the created commits will be valid for
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::CommitDuration]
    required :commit_duration,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::CommitDuration }

    # @!attribute priority
    #   Will be passed down to the individual commits
    #
    #   @return [Float]
    required :priority, Float

    # @!attribute product
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Product]
    required :product,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Product }

    # @!attribute rate_type
    #   Whether the created commits will use the commit rate or list rate
    #
    #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::RateType]
    required :rate_type,
             enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::RateType }

    # @!attribute starting_at
    #   Determines the start time for the first commit
    #
    #   @return [Time]
    required :starting_at, Time

    # @!attribute applicable_product_ids
    #   Will be passed down to the individual commits
    #
    #   @return [Array<String>, nil]
    optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

    # @!attribute applicable_product_tags
    #   Will be passed down to the individual commits
    #
    #   @return [Array<String>, nil]
    optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]

    # @!attribute contract
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Contract, nil]
    optional :contract,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Contract }

    # @!attribute description
    #   Will be passed down to the individual commits
    #
    #   @return [String, nil]
    optional :description, String

    # @!attribute ending_before
    #   Determines when the contract will stop creating recurring commits. Optional
    #
    #   @return [Time, nil]
    optional :ending_before, Time

    # @!attribute hierarchy_configuration
    #   Optional configuration for recurring credit hierarchy access control
    #
    #   @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
    optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }

    # @!attribute invoice_amount
    #   The amount the customer should be billed for the commit. Not required.
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::InvoiceAmount, nil]
    optional :invoice_amount,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::InvoiceAmount }

    # @!attribute name
    #   Displayed on invoices. Will be passed through to the individual commits
    #
    #   @return [String, nil]
    optional :name, String

    # @!attribute netsuite_sales_order_id
    #   Will be passed down to the individual commits
    #
    #   @return [String, nil]
    optional :netsuite_sales_order_id, String

    # @!attribute proration
    #   Determines whether the first and last commit will be prorated. If not provided,
    #   the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
    #
    #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Proration, nil]
    optional :proration,
             enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Proration }

    # @!attribute recurrence_frequency
    #   The frequency at which the recurring commits will be created. If not provided: -
    #   The commits will be created on the usage invoice frequency. If provided: - The
    #   period defined in the duration will correspond to this frequency. - Commits will
    #   be created aligned with the recurring commit's starting_at rather than the usage
    #   invoice dates.
    #
    #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::RecurrenceFrequency, nil]
    optional :recurrence_frequency,
             enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::RecurrenceFrequency }

    # @!attribute rollover_fraction
    #   Will be passed down to the individual commits. This controls how much of an
    #   individual unexpired commit will roll over upon contract transition. Must be
    #   between 0 and 1.
    #
    #   @return [Float, nil]
    optional :rollover_fraction, Float

    # @!attribute specifiers
    #   List of filters that determine what kind of customer usage draws down a commit
    #   or credit. A customer's usage needs to meet the condition of at least one of the
    #   specifiers to contribute to a commit's or credit's drawdown.
    #
    #   @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
    optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }

    # @!attribute subscription_config
    #   Attach a subscription to the recurring commit/credit.
    #
    #   @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
    optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }

    # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, invoice_amount: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
    #   Some parameter documentations has been truncated, see
    #   {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit}
    #   for more details.
    #
    #   @param id [String]
    #
    #   @param access_amount [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::AccessAmount] The amount of commit to grant.
    #
    #   @param commit_duration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::CommitDuration] The amount of time the created commits will be valid for
    #
    #   @param priority [Float] Will be passed down to the individual commits
    #
    #   @param product [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Product]
    #
    #   @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::RateType] Whether the created commits will use the commit rate or list rate
    #
    #   @param starting_at [Time] Determines the start time for the first commit
    #
    #   @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
    #
    #   @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
    #
    #   @param contract [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Contract]
    #
    #   @param description [String] Will be passed down to the individual commits
    #
    #   @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
    #
    #   @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
    #
    #   @param invoice_amount [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::InvoiceAmount] The amount the customer should be billed for the commit. Not required.
    #
    #   @param name [String] Displayed on invoices. Will be passed through to the individual commits
    #
    #   @param netsuite_sales_order_id [String] Will be passed down to the individual commits
    #
    #   @param proration [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Proration] Determines whether the first and last commit will be prorated. If not provided,
    #
    #   @param recurrence_frequency [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
    #
    #   @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
    #
    #   @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
    #
    #   @param subscription_config [MetronomeSDK::Models::RecurringCommitSubscriptionConfig] Attach a subscription to the recurring commit/credit.

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#access_amount
    class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute credit_type_id
      #
      #   @return [String]
      required :credit_type_id, String

      # @!attribute unit_price
      #
      #   @return [Float]
      required :unit_price, Float

      # @!attribute quantity
      #
      #   @return [Float, nil]
      optional :quantity, Float

      # @!method initialize(credit_type_id:, unit_price:, quantity: nil)
      #   The amount of commit to grant.
      #
      #   @param credit_type_id [String]
      #   @param unit_price [Float]
      #   @param quantity [Float]
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#commit_duration
    class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute value
      #
      #   @return [Float]
      required :value, Float

      # @!attribute unit
      #
      #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::CommitDuration::Unit, nil]
      optional :unit,
               enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::CommitDuration::Unit }

      # @!method initialize(value:, unit: nil)
      #   The amount of time the created commits will be valid for
      #
      #   @param value [Float]
      #   @param unit [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::CommitDuration::Unit]

      # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::CommitDuration#unit
      module Unit
        extend MetronomeSDK::Internal::Type::Enum

        PERIODS = :PERIODS

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#product
    class Product < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute id
      #
      #   @return [String]
      required :id, String

      # @!attribute name
      #
      #   @return [String]
      required :name, String

      # @!method initialize(id:, name:)
      #   @param id [String]
      #   @param name [String]
    end

    # Whether the created commits will use the commit rate or list rate
    #
    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#rate_type
    module RateType
      extend MetronomeSDK::Internal::Type::Enum

      COMMIT_RATE = :COMMIT_RATE
      LIST_RATE = :LIST_RATE

      # @!method self.values
      #   @return [Array<Symbol>]
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#contract
    class Contract < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute id
      #
      #   @return [String]
      required :id, String

      # @!method initialize(id:)
      #   @param id [String]
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#invoice_amount
    class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute credit_type_id
      #
      #   @return [String]
      required :credit_type_id, String

      # @!attribute quantity
      #
      #   @return [Float]
      required :quantity, Float

      # @!attribute unit_price
      #
      #   @return [Float]
      required :unit_price, Float

      # @!method initialize(credit_type_id:, quantity:, unit_price:)
      #   The amount the customer should be billed for the commit. Not required.
      #
      #   @param credit_type_id [String]
      #   @param quantity [Float]
      #   @param unit_price [Float]
    end

    # Determines whether the first and last commit will be prorated. If not provided,
    # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
    #
    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#proration
    module Proration
      extend MetronomeSDK::Internal::Type::Enum

      NONE = :NONE
      FIRST = :FIRST
      LAST = :LAST
      FIRST_AND_LAST = :FIRST_AND_LAST

      # @!method self.values
      #   @return [Array<Symbol>]
    end

    # The frequency at which the recurring commits will be created. If not provided: -
    # The commits will be created on the usage invoice frequency. If provided: - The
    # period defined in the duration will correspond to this frequency. - Commits will
    # be created aligned with the recurring commit's starting_at rather than the usage
    # invoice dates.
    #
    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#recurrence_frequency
    module RecurrenceFrequency
      extend MetronomeSDK::Internal::Type::Enum

      MONTHLY = :MONTHLY
      QUARTERLY = :QUARTERLY
      ANNUAL = :ANNUAL
      WEEKLY = :WEEKLY

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  class AddRecurringCredit < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!attribute access_amount
    #   The amount of commit to grant.
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::AccessAmount]
    required :access_amount,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::AccessAmount }

    # @!attribute commit_duration
    #   The amount of time the created commits will be valid for
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::CommitDuration]
    required :commit_duration,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::CommitDuration }

    # @!attribute priority
    #   Will be passed down to the individual commits
    #
    #   @return [Float]
    required :priority, Float

    # @!attribute product
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Product]
    required :product,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Product }

    # @!attribute rate_type
    #   Whether the created commits will use the commit rate or list rate
    #
    #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::RateType]
    required :rate_type,
             enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::RateType }

    # @!attribute starting_at
    #   Determines the start time for the first commit
    #
    #   @return [Time]
    required :starting_at, Time

    # @!attribute applicable_product_ids
    #   Will be passed down to the individual commits
    #
    #   @return [Array<String>, nil]
    optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

    # @!attribute applicable_product_tags
    #   Will be passed down to the individual commits
    #
    #   @return [Array<String>, nil]
    optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]

    # @!attribute contract
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Contract, nil]
    optional :contract,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Contract }

    # @!attribute description
    #   Will be passed down to the individual commits
    #
    #   @return [String, nil]
    optional :description, String

    # @!attribute ending_before
    #   Determines when the contract will stop creating recurring commits. Optional
    #
    #   @return [Time, nil]
    optional :ending_before, Time

    # @!attribute hierarchy_configuration
    #   Optional configuration for recurring credit hierarchy access control
    #
    #   @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
    optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }

    # @!attribute name
    #   Displayed on invoices. Will be passed through to the individual commits
    #
    #   @return [String, nil]
    optional :name, String

    # @!attribute netsuite_sales_order_id
    #   Will be passed down to the individual commits
    #
    #   @return [String, nil]
    optional :netsuite_sales_order_id, String

    # @!attribute proration
    #   Determines whether the first and last commit will be prorated. If not provided,
    #   the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
    #
    #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Proration, nil]
    optional :proration,
             enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Proration }

    # @!attribute recurrence_frequency
    #   The frequency at which the recurring commits will be created. If not provided: -
    #   The commits will be created on the usage invoice frequency. If provided: - The
    #   period defined in the duration will correspond to this frequency. - Commits will
    #   be created aligned with the recurring commit's starting_at rather than the usage
    #   invoice dates.
    #
    #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::RecurrenceFrequency, nil]
    optional :recurrence_frequency,
             enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::RecurrenceFrequency }

    # @!attribute rollover_fraction
    #   Will be passed down to the individual commits. This controls how much of an
    #   individual unexpired commit will roll over upon contract transition. Must be
    #   between 0 and 1.
    #
    #   @return [Float, nil]
    optional :rollover_fraction, Float

    # @!attribute specifiers
    #   List of filters that determine what kind of customer usage draws down a commit
    #   or credit. A customer's usage needs to meet the condition of at least one of the
    #   specifiers to contribute to a commit's or credit's drawdown.
    #
    #   @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
    optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }

    # @!attribute subscription_config
    #   Attach a subscription to the recurring commit/credit.
    #
    #   @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
    optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }

    # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
    #   Some parameter documentations has been truncated, see
    #   {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit}
    #   for more details.
    #
    #   @param id [String]
    #
    #   @param access_amount [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::AccessAmount] The amount of commit to grant.
    #
    #   @param commit_duration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::CommitDuration] The amount of time the created commits will be valid for
    #
    #   @param priority [Float] Will be passed down to the individual commits
    #
    #   @param product [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Product]
    #
    #   @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::RateType] Whether the created commits will use the commit rate or list rate
    #
    #   @param starting_at [Time] Determines the start time for the first commit
    #
    #   @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
    #
    #   @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
    #
    #   @param contract [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Contract]
    #
    #   @param description [String] Will be passed down to the individual commits
    #
    #   @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
    #
    #   @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
    #
    #   @param name [String] Displayed on invoices. Will be passed through to the individual commits
    #
    #   @param netsuite_sales_order_id [String] Will be passed down to the individual commits
    #
    #   @param proration [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Proration] Determines whether the first and last commit will be prorated. If not provided,
    #
    #   @param recurrence_frequency [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
    #
    #   @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
    #
    #   @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
    #
    #   @param subscription_config [MetronomeSDK::Models::RecurringCommitSubscriptionConfig] Attach a subscription to the recurring commit/credit.

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#access_amount
    class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute credit_type_id
      #
      #   @return [String]
      required :credit_type_id, String

      # @!attribute unit_price
      #
      #   @return [Float]
      required :unit_price, Float

      # @!attribute quantity
      #
      #   @return [Float, nil]
      optional :quantity, Float

      # @!method initialize(credit_type_id:, unit_price:, quantity: nil)
      #   The amount of commit to grant.
      #
      #   @param credit_type_id [String]
      #   @param unit_price [Float]
      #   @param quantity [Float]
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#commit_duration
    class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute value
      #
      #   @return [Float]
      required :value, Float

      # @!attribute unit
      #
      #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::CommitDuration::Unit, nil]
      optional :unit,
               enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::CommitDuration::Unit }

      # @!method initialize(value:, unit: nil)
      #   The amount of time the created commits will be valid for
      #
      #   @param value [Float]
      #   @param unit [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::CommitDuration::Unit]

      # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::CommitDuration#unit
      module Unit
        extend MetronomeSDK::Internal::Type::Enum

        PERIODS = :PERIODS

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#product
    class Product < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute id
      #
      #   @return [String]
      required :id, String

      # @!attribute name
      #
      #   @return [String]
      required :name, String

      # @!method initialize(id:, name:)
      #   @param id [String]
      #   @param name [String]
    end

    # Whether the created commits will use the commit rate or list rate
    #
    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#rate_type
    module RateType
      extend MetronomeSDK::Internal::Type::Enum

      COMMIT_RATE = :COMMIT_RATE
      LIST_RATE = :LIST_RATE

      # @!method self.values
      #   @return [Array<Symbol>]
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#contract
    class Contract < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute id
      #
      #   @return [String]
      required :id, String

      # @!method initialize(id:)
      #   @param id [String]
    end

    # Determines whether the first and last commit will be prorated. If not provided,
    # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
    #
    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#proration
    module Proration
      extend MetronomeSDK::Internal::Type::Enum

      NONE = :NONE
      FIRST = :FIRST
      LAST = :LAST
      FIRST_AND_LAST = :FIRST_AND_LAST

      # @!method self.values
      #   @return [Array<Symbol>]
    end

    # The frequency at which the recurring commits will be created. If not provided: -
    # The commits will be created on the usage invoice frequency. If provided: - The
    # period defined in the duration will correspond to this frequency. - Commits will
    # be created aligned with the recurring commit's starting_at rather than the usage
    # invoice dates.
    #
    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#recurrence_frequency
    module RecurrenceFrequency
      extend MetronomeSDK::Internal::Type::Enum

      MONTHLY = :MONTHLY
      QUARTERLY = :QUARTERLY
      ANNUAL = :ANNUAL
      WEEKLY = :WEEKLY

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  class AddResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute reseller_type
    #
    #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty::ResellerType]
    required :reseller_type,
             enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty::ResellerType }

    # @!attribute applicable_product_ids
    #
    #   @return [Array<String>, nil]
    optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

    # @!attribute applicable_product_tags
    #
    #   @return [Array<String>, nil]
    optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]

    # @!attribute aws_account_number
    #
    #   @return [String, nil]
    optional :aws_account_number, String

    # @!attribute aws_offer_id
    #
    #   @return [String, nil]
    optional :aws_offer_id, String

    # @!attribute aws_payer_reference_id
    #
    #   @return [String, nil]
    optional :aws_payer_reference_id, String

    # @!attribute ending_before
    #
    #   @return [Time, nil]
    optional :ending_before, Time, nil?: true

    # @!attribute fraction
    #
    #   @return [Float, nil]
    optional :fraction, Float

    # @!attribute gcp_account_id
    #
    #   @return [String, nil]
    optional :gcp_account_id, String

    # @!attribute gcp_offer_id
    #
    #   @return [String, nil]
    optional :gcp_offer_id, String

    # @!attribute netsuite_reseller_id
    #
    #   @return [String, nil]
    optional :netsuite_reseller_id, String

    # @!attribute reseller_contract_value
    #
    #   @return [Float, nil]
    optional :reseller_contract_value, Float

    # @!attribute starting_at
    #
    #   @return [Time, nil]
    optional :starting_at, Time

    # @!method initialize(reseller_type:, applicable_product_ids: nil, applicable_product_tags: nil, aws_account_number: nil, aws_offer_id: nil, aws_payer_reference_id: nil, ending_before: nil, fraction: nil, gcp_account_id: nil, gcp_offer_id: nil, netsuite_reseller_id: nil, reseller_contract_value: nil, starting_at: nil)
    #   @param reseller_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty::ResellerType]
    #   @param applicable_product_ids [Array<String>]
    #   @param applicable_product_tags [Array<String>]
    #   @param aws_account_number [String]
    #   @param aws_offer_id [String]
    #   @param aws_payer_reference_id [String]
    #   @param ending_before [Time, nil]
    #   @param fraction [Float]
    #   @param gcp_account_id [String]
    #   @param gcp_offer_id [String]
    #   @param netsuite_reseller_id [String]
    #   @param reseller_contract_value [Float]
    #   @param starting_at [Time]

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty#reseller_type
    module ResellerType
      extend MetronomeSDK::Internal::Type::Enum

      AWS = :AWS
      AWS_PRO_SERVICE = :AWS_PRO_SERVICE
      GCP = :GCP
      GCP_PRO_SERVICE = :GCP_PRO_SERVICE

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  class AddScheduledCharge < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!attribute product
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge::Product]
    required :product,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge::Product }

    # @!attribute schedule
    #
    #   @return [MetronomeSDK::Models::SchedulePointInTime]
    required :schedule, -> { MetronomeSDK::SchedulePointInTime }

    # @!attribute name
    #   displayed on invoices
    #
    #   @return [String, nil]
    optional :name, String

    # @!attribute netsuite_sales_order_id
    #   This field's availability is dependent on your client's configuration.
    #
    #   @return [String, nil]
    optional :netsuite_sales_order_id, String

    # @!method initialize(id:, product:, schedule:, name: nil, netsuite_sales_order_id: nil)
    #   @param id [String]
    #
    #   @param product [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge::Product]
    #
    #   @param schedule [MetronomeSDK::Models::SchedulePointInTime]
    #
    #   @param name [String] displayed on invoices
    #
    #   @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge#product
    class Product < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute id
      #
      #   @return [String]
      required :id, String

      # @!attribute name
      #
      #   @return [String]
      required :name, String

      # @!method initialize(id:, name:)
      #   @param id [String]
      #   @param name [String]
    end
  end

  class AddUsageFilter < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute group_key
    #
    #   @return [String]
    required :group_key, String

    # @!attribute group_values
    #
    #   @return [Array<String>]
    required :group_values, MetronomeSDK::Internal::Type::ArrayOf[String]

    # @!attribute starting_at
    #   This will match contract starting_at value if usage filter is active from the
    #   beginning of the contract.
    #
    #   @return [Time]
    required :starting_at, Time

    # @!attribute ending_before
    #   This will match contract ending_before value if usage filter is active until the
    #   end of the contract. It will be undefined if the contract is open-ended.
    #
    #   @return [Time, nil]
    optional :ending_before, Time

    # @!method initialize(group_key:, group_values:, starting_at:, ending_before: nil)
    #   Some parameter documentations has been truncated, see
    #   {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddUsageFilter}
    #   for more details.
    #
    #   @param group_key [String]
    #
    #   @param group_values [Array<String>]
    #
    #   @param starting_at [Time] This will match contract starting_at value if usage filter is active from the be
    #
    #   @param ending_before [Time] This will match contract ending_before value if usage filter is active until the
  end

  class ArchiveCommit < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!method initialize(id:)
    #   @param id [String]
  end

  class ArchiveCredit < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!method initialize(id:)
    #   @param id [String]
  end

  class ArchiveScheduledCharge < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!method initialize(id:)
    #   @param id [String]
  end

  class RemoveOverride < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!method initialize(id:)
    #   @param id [String]
  end

  class UpdateCommit < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!attribute access_schedule
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule, nil]
    optional :access_schedule,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule }

    # @!attribute applicable_product_ids
    #   Which products the commit applies to. If applicable_product_ids,
    #   applicable_product_tags or specifiers are not provided, the commit applies to
    #   all products.
    #
    #   @return [Array<String>, nil]
    optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true

    # @!attribute applicable_product_tags
    #   Which tags the commit applies to. If applicable_product_ids,
    #   applicable_product_tags or specifiers are not provided, the commit applies to
    #   all products.
    #
    #   @return [Array<String>, nil]
    optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true

    # @!attribute hierarchy_configuration
    #   Optional configuration for commit hierarchy access control
    #
    #   @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
    optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }

    # @!attribute invoice_schedule
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule, nil]
    optional :invoice_schedule,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule }

    # @!attribute name
    #
    #   @return [String, nil]
    optional :name, String

    # @!attribute netsuite_sales_order_id
    #
    #   @return [String, nil]
    optional :netsuite_sales_order_id, String, nil?: true

    # @!attribute priority
    #   If multiple commits are applicable, the one with the lower priority will apply
    #   first.
    #
    #   @return [Float, nil]
    optional :priority, Float, nil?: true

    # @!attribute product_id
    #
    #   @return [String, nil]
    optional :product_id, String

    # @!attribute rate_type
    #   If set, the commit's rate type was updated to the specified value.
    #
    #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::RateType, nil]
    optional :rate_type,
             enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::RateType }

    # @!attribute rollover_fraction
    #
    #   @return [Float, nil]
    optional :rollover_fraction, Float, nil?: true

    # @!attribute specifiers
    #   List of filters that determine what kind of customer usage draws down a commit
    #   or credit. A customer's usage needs to meet the condition of at least one of the
    #   specifiers to contribute to a commit's or credit's drawdown. This field cannot
    #   be used together with `applicable_product_ids` or `applicable_product_tags`.
    #   Instead, to target usage by product or product tag, pass those values in the
    #   body of `specifiers`.
    #
    #   @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
    optional :specifiers,
             -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] },
             nil?: true

    # @!method initialize(id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, product_id: nil, rate_type: nil, rollover_fraction: nil, specifiers: nil)
    #   Some parameter documentations has been truncated, see
    #   {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit}
    #   for more details.
    #
    #   @param id [String]
    #
    #   @param access_schedule [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule]
    #
    #   @param applicable_product_ids [Array<String>, nil] Which products the commit applies to. If applicable_product_ids, applicable_prod
    #
    #   @param applicable_product_tags [Array<String>, nil] Which tags the commit applies to. If applicable*product_ids, applicable_product*
    #
    #   @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for commit hierarchy access control
    #
    #   @param invoice_schedule [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule]
    #
    #   @param name [String]
    #
    #   @param netsuite_sales_order_id [String, nil]
    #
    #   @param priority [Float, nil] If multiple commits are applicable, the one with the lower priority will apply f
    #
    #   @param product_id [String]
    #
    #   @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::RateType] If set, the commit's rate type was updated to the specified value.
    #
    #   @param rollover_fraction [Float, nil]
    #
    #   @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil] List of filters that determine what kind of customer usage draws down a commit o

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit#access_schedule
    class AccessSchedule < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute add_schedule_items
      #
      #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule::AddScheduleItem>, nil]
      optional :add_schedule_items,
               -> do
                 MetronomeSDK::Internal::Type::ArrayOf[
                   MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule::AddScheduleItem
                 ]
               end

      # @!attribute remove_schedule_items
      #
      #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule::RemoveScheduleItem>, nil]
      optional :remove_schedule_items,
               -> do
                 MetronomeSDK::Internal::Type::ArrayOf[
                   MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule::RemoveScheduleItem
                 ]
               end

      # @!attribute update_schedule_items
      #
      #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule::UpdateScheduleItem>, nil]
      optional :update_schedule_items,
               -> do
                 MetronomeSDK::Internal::Type::ArrayOf[
                   MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule::UpdateScheduleItem
                 ]
               end

      # @!method initialize(add_schedule_items: nil, remove_schedule_items: nil, update_schedule_items: nil)
      #   @param add_schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule::AddScheduleItem>]
      #   @param remove_schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule::RemoveScheduleItem>]
      #   @param update_schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule::UpdateScheduleItem>]

      class AddScheduleItem < MetronomeSDK::Internal::Type::BaseModel
        # @!attribute amount
        #
        #   @return [Float]
        required :amount, Float

        # @!attribute ending_before
        #   RFC 3339 timestamp (exclusive)
        #
        #   @return [Time]
        required :ending_before, Time

        # @!attribute starting_at
        #   RFC 3339 timestamp (inclusive)
        #
        #   @return [Time]
        required :starting_at, Time

        # @!method initialize(amount:, ending_before:, starting_at:)
        #   @param amount [Float]
        #
        #   @param ending_before [Time] RFC 3339 timestamp (exclusive)
        #
        #   @param starting_at [Time] RFC 3339 timestamp (inclusive)
      end

      class RemoveScheduleItem < MetronomeSDK::Internal::Type::BaseModel
        # @!attribute id
        #
        #   @return [String]
        required :id, String

        # @!method initialize(id:)
        #   @param id [String]
      end

      class UpdateScheduleItem < MetronomeSDK::Internal::Type::BaseModel
        # @!attribute id
        #
        #   @return [String]
        required :id, String

        # @!attribute amount
        #
        #   @return [Float, nil]
        optional :amount, Float

        # @!attribute ending_before
        #   RFC 3339 timestamp (exclusive)
        #
        #   @return [Time, nil]
        optional :ending_before, Time

        # @!attribute starting_at
        #   RFC 3339 timestamp (inclusive)
        #
        #   @return [Time, nil]
        optional :starting_at, Time

        # @!method initialize(id:, amount: nil, ending_before: nil, starting_at: nil)
        #   @param id [String]
        #
        #   @param amount [Float]
        #
        #   @param ending_before [Time] RFC 3339 timestamp (exclusive)
        #
        #   @param starting_at [Time] RFC 3339 timestamp (inclusive)
      end
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit#invoice_schedule
    class InvoiceSchedule < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute add_schedule_items
      #
      #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule::AddScheduleItem>, nil]
      optional :add_schedule_items,
               -> do
                 MetronomeSDK::Internal::Type::ArrayOf[
                   MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule::AddScheduleItem
                 ]
               end

      # @!attribute remove_schedule_items
      #
      #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule::RemoveScheduleItem>, nil]
      optional :remove_schedule_items,
               -> do
                 MetronomeSDK::Internal::Type::ArrayOf[
                   MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule::RemoveScheduleItem
                 ]
               end

      # @!attribute update_schedule_items
      #
      #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule::UpdateScheduleItem>, nil]
      optional :update_schedule_items,
               -> do
                 MetronomeSDK::Internal::Type::ArrayOf[
                   MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule::UpdateScheduleItem
                 ]
               end

      # @!method initialize(add_schedule_items: nil, remove_schedule_items: nil, update_schedule_items: nil)
      #   @param add_schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule::AddScheduleItem>]
      #   @param remove_schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule::RemoveScheduleItem>]
      #   @param update_schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule::UpdateScheduleItem>]

      class AddScheduleItem < MetronomeSDK::Internal::Type::BaseModel
        # @!attribute timestamp
        #
        #   @return [Time]
        required :timestamp, Time

        # @!attribute amount
        #
        #   @return [Float, nil]
        optional :amount, Float

        # @!attribute quantity
        #
        #   @return [Float, nil]
        optional :quantity, Float

        # @!attribute unit_price
        #
        #   @return [Float, nil]
        optional :unit_price, Float

        # @!method initialize(timestamp:, amount: nil, quantity: nil, unit_price: nil)
        #   @param timestamp [Time]
        #   @param amount [Float]
        #   @param quantity [Float]
        #   @param unit_price [Float]
      end

      class RemoveScheduleItem < MetronomeSDK::Internal::Type::BaseModel
        # @!attribute id
        #
        #   @return [String]
        required :id, String

        # @!method initialize(id:)
        #   @param id [String]
      end

      class UpdateScheduleItem < MetronomeSDK::Internal::Type::BaseModel
        # @!attribute id
        #
        #   @return [String]
        required :id, String

        # @!attribute amount
        #
        #   @return [Float, nil]
        optional :amount, Float

        # @!attribute quantity
        #
        #   @return [Float, nil]
        optional :quantity, Float

        # @!attribute timestamp
        #
        #   @return [Time, nil]
        optional :timestamp, Time

        # @!attribute unit_price
        #
        #   @return [Float, nil]
        optional :unit_price, Float

        # @!method initialize(id:, amount: nil, quantity: nil, timestamp: nil, unit_price: nil)
        #   @param id [String]
        #   @param amount [Float]
        #   @param quantity [Float]
        #   @param timestamp [Time]
        #   @param unit_price [Float]
      end
    end

    # If set, the commit's rate type was updated to the specified value.
    #
    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit#rate_type
    module RateType
      extend MetronomeSDK::Internal::Type::Enum

      COMMIT_RATE = :COMMIT_RATE
      LIST_RATE = :LIST_RATE

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  class UpdateCredit < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!attribute access_schedule
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::AccessSchedule, nil]
    optional :access_schedule,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::AccessSchedule }

    # @!attribute hierarchy_configuration
    #   Optional configuration for credit hierarchy access control
    #
    #   @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
    optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }

    # @!attribute name
    #
    #   @return [String, nil]
    optional :name, String

    # @!attribute netsuite_sales_order_id
    #
    #   @return [String, nil]
    optional :netsuite_sales_order_id, String, nil?: true

    # @!attribute priority
    #   If multiple credits are applicable, the one with the lower priority will apply
    #   first.
    #
    #   @return [Float, nil]
    optional :priority, Float, nil?: true

    # @!attribute rate_type
    #   If set, the credit's rate type was updated to the specified value.
    #
    #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::RateType, nil]
    optional :rate_type,
             enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::RateType }

    # @!attribute rollover_fraction
    #
    #   @return [Float, nil]
    optional :rollover_fraction, Float, nil?: true

    # @!method initialize(id:, access_schedule: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, rollover_fraction: nil)
    #   Some parameter documentations has been truncated, see
    #   {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit}
    #   for more details.
    #
    #   @param id [String]
    #
    #   @param access_schedule [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::AccessSchedule]
    #
    #   @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for credit hierarchy access control
    #
    #   @param name [String]
    #
    #   @param netsuite_sales_order_id [String, nil]
    #
    #   @param priority [Float, nil] If multiple credits are applicable, the one with the lower priority will apply f
    #
    #   @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::RateType] If set, the credit's rate type was updated to the specified value.
    #
    #   @param rollover_fraction [Float, nil]

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit#access_schedule
    class AccessSchedule < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute add_schedule_items
      #
      #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::AccessSchedule::AddScheduleItem>, nil]
      optional :add_schedule_items,
               -> do
                 MetronomeSDK::Internal::Type::ArrayOf[
                   MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::AccessSchedule::AddScheduleItem
                 ]
               end

      # @!attribute remove_schedule_items
      #
      #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::AccessSchedule::RemoveScheduleItem>, nil]
      optional :remove_schedule_items,
               -> do
                 MetronomeSDK::Internal::Type::ArrayOf[
                   MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::AccessSchedule::RemoveScheduleItem
                 ]
               end

      # @!attribute update_schedule_items
      #
      #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::AccessSchedule::UpdateScheduleItem>, nil]
      optional :update_schedule_items,
               -> do
                 MetronomeSDK::Internal::Type::ArrayOf[
                   MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::AccessSchedule::UpdateScheduleItem
                 ]
               end

      # @!method initialize(add_schedule_items: nil, remove_schedule_items: nil, update_schedule_items: nil)
      #   @param add_schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::AccessSchedule::AddScheduleItem>]
      #   @param remove_schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::AccessSchedule::RemoveScheduleItem>]
      #   @param update_schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::AccessSchedule::UpdateScheduleItem>]

      class AddScheduleItem < MetronomeSDK::Internal::Type::BaseModel
        # @!attribute amount
        #
        #   @return [Float]
        required :amount, Float

        # @!attribute ending_before
        #   RFC 3339 timestamp (exclusive)
        #
        #   @return [Time]
        required :ending_before, Time

        # @!attribute starting_at
        #   RFC 3339 timestamp (inclusive)
        #
        #   @return [Time]
        required :starting_at, Time

        # @!method initialize(amount:, ending_before:, starting_at:)
        #   @param amount [Float]
        #
        #   @param ending_before [Time] RFC 3339 timestamp (exclusive)
        #
        #   @param starting_at [Time] RFC 3339 timestamp (inclusive)
      end

      class RemoveScheduleItem < MetronomeSDK::Internal::Type::BaseModel
        # @!attribute id
        #
        #   @return [String]
        required :id, String

        # @!method initialize(id:)
        #   @param id [String]
      end

      class UpdateScheduleItem < MetronomeSDK::Internal::Type::BaseModel
        # @!attribute id
        #
        #   @return [String]
        required :id, String

        # @!attribute amount
        #
        #   @return [Float, nil]
        optional :amount, Float

        # @!attribute ending_before
        #   RFC 3339 timestamp (exclusive)
        #
        #   @return [Time, nil]
        optional :ending_before, Time

        # @!attribute starting_at
        #   RFC 3339 timestamp (inclusive)
        #
        #   @return [Time, nil]
        optional :starting_at, Time

        # @!method initialize(id:, amount: nil, ending_before: nil, starting_at: nil)
        #   @param id [String]
        #
        #   @param amount [Float]
        #
        #   @param ending_before [Time] RFC 3339 timestamp (exclusive)
        #
        #   @param starting_at [Time] RFC 3339 timestamp (inclusive)
      end
    end

    # If set, the credit's rate type was updated to the specified value.
    #
    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit#rate_type
    module RateType
      extend MetronomeSDK::Internal::Type::Enum

      LIST_RATE = :LIST_RATE
      COMMIT_RATE = :COMMIT_RATE

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  class UpdateDiscount < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!attribute custom_fields
    #   Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
    #
    #   @return [Hash{Symbol=>String}, nil]
    optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]

    # @!attribute name
    #
    #   @return [String, nil]
    optional :name, String

    # @!attribute netsuite_sales_order_id
    #
    #   @return [String, nil]
    optional :netsuite_sales_order_id, String

    # @!attribute schedule
    #   Must provide either schedule_items or recurring_schedule.
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule, nil]
    optional :schedule,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule }

    # @!method initialize(id:, custom_fields: nil, name: nil, netsuite_sales_order_id: nil, schedule: nil)
    #   @param id [String]
    #
    #   @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
    #
    #   @param name [String]
    #
    #   @param netsuite_sales_order_id [String]
    #
    #   @param schedule [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule] Must provide either schedule_items or recurring_schedule.

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount#schedule
    class Schedule < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute credit_type_id
      #   Defaults to USD (cents) if not passed.
      #
      #   @return [String, nil]
      optional :credit_type_id, String

      # @!attribute do_not_invoice
      #   This field is only applicable to commit invoice schedules. If true, this
      #   schedule will not generate an invoice.
      #
      #   @return [Boolean, nil]
      optional :do_not_invoice, MetronomeSDK::Internal::Type::Boolean

      # @!attribute recurring_schedule
      #   Enter the unit price and quantity for the charge or instead only send the
      #   amount. If amount is sent, the unit price is assumed to be the amount and
      #   quantity is inferred to be 1.
      #
      #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::RecurringSchedule, nil]
      optional :recurring_schedule,
               -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::RecurringSchedule }

      # @!attribute schedule_items
      #   Either provide amount or provide both unit_price and quantity.
      #
      #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::ScheduleItem>, nil]
      optional :schedule_items,
               -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::ScheduleItem] }

      # @!method initialize(credit_type_id: nil, do_not_invoice: nil, recurring_schedule: nil, schedule_items: nil)
      #   Some parameter documentations has been truncated, see
      #   {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule}
      #   for more details.
      #
      #   Must provide either schedule_items or recurring_schedule.
      #
      #   @param credit_type_id [String] Defaults to USD (cents) if not passed.
      #
      #   @param do_not_invoice [Boolean] This field is only applicable to commit invoice schedules. If true, this schedul
      #
      #   @param recurring_schedule [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::RecurringSchedule] Enter the unit price and quantity for the charge or instead only send the amount
      #
      #   @param schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::ScheduleItem>] Either provide amount or provide both unit_price and quantity.

      # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule#recurring_schedule
      class RecurringSchedule < MetronomeSDK::Internal::Type::BaseModel
        # @!attribute amount_distribution
        #
        #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::RecurringSchedule::AmountDistribution]
        required :amount_distribution,
                 enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::RecurringSchedule::AmountDistribution }

        # @!attribute ending_before
        #   RFC 3339 timestamp (exclusive).
        #
        #   @return [Time]
        required :ending_before, Time

        # @!attribute frequency
        #
        #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::RecurringSchedule::Frequency]
        required :frequency,
                 enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::RecurringSchedule::Frequency }

        # @!attribute starting_at
        #   RFC 3339 timestamp (inclusive).
        #
        #   @return [Time]
        required :starting_at, Time

        # @!attribute amount
        #   Amount for the charge. Can be provided instead of unit_price and quantity. If
        #   amount is sent, the unit_price is assumed to be the amount and quantity is
        #   inferred to be 1.
        #
        #   @return [Float, nil]
        optional :amount, Float

        # @!attribute quantity
        #   Quantity for the charge. Will be multiplied by unit_price to determine the
        #   amount and must be specified with unit_price. If specified amount cannot be
        #   provided.
        #
        #   @return [Float, nil]
        optional :quantity, Float

        # @!attribute unit_price
        #   Unit price for the charge. Will be multiplied by quantity to determine the
        #   amount and must be specified with quantity. If specified amount cannot be
        #   provided.
        #
        #   @return [Float, nil]
        optional :unit_price, Float

        # @!method initialize(amount_distribution:, ending_before:, frequency:, starting_at:, amount: nil, quantity: nil, unit_price: nil)
        #   Some parameter documentations has been truncated, see
        #   {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::RecurringSchedule}
        #   for more details.
        #
        #   Enter the unit price and quantity for the charge or instead only send the
        #   amount. If amount is sent, the unit price is assumed to be the amount and
        #   quantity is inferred to be 1.
        #
        #   @param amount_distribution [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::RecurringSchedule::AmountDistribution]
        #
        #   @param ending_before [Time] RFC 3339 timestamp (exclusive).
        #
        #   @param frequency [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::RecurringSchedule::Frequency]
        #
        #   @param starting_at [Time] RFC 3339 timestamp (inclusive).
        #
        #   @param amount [Float] Amount for the charge. Can be provided instead of unit_price and quantity. If am
        #
        #   @param quantity [Float] Quantity for the charge. Will be multiplied by unit_price to determine the amoun
        #
        #   @param unit_price [Float] Unit price for the charge. Will be multiplied by quantity to determine the amoun

        # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::RecurringSchedule#amount_distribution
        module AmountDistribution
          extend MetronomeSDK::Internal::Type::Enum

          DIVIDED = :DIVIDED
          DIVIDED_ROUNDED = :DIVIDED_ROUNDED
          EACH = :EACH

          # @!method self.values
          #   @return [Array<Symbol>]
        end

        # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::RecurringSchedule#frequency
        module Frequency
          extend MetronomeSDK::Internal::Type::Enum

          MONTHLY = :MONTHLY
          QUARTERLY = :QUARTERLY
          SEMI_ANNUAL = :SEMI_ANNUAL
          ANNUAL = :ANNUAL
          WEEKLY = :WEEKLY

          # @!method self.values
          #   @return [Array<Symbol>]
        end
      end

      class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
        # @!attribute timestamp
        #   timestamp of the scheduled event
        #
        #   @return [Time]
        required :timestamp, Time

        # @!attribute amount
        #   Amount for the charge. Can be provided instead of unit_price and quantity. If
        #   amount is sent, the unit_price is assumed to be the amount and quantity is
        #   inferred to be 1.
        #
        #   @return [Float, nil]
        optional :amount, Float

        # @!attribute quantity
        #   Quantity for the charge. Will be multiplied by unit_price to determine the
        #   amount and must be specified with unit_price. If specified amount cannot be
        #   provided.
        #
        #   @return [Float, nil]
        optional :quantity, Float

        # @!attribute unit_price
        #   Unit price for the charge. Will be multiplied by quantity to determine the
        #   amount and must be specified with quantity. If specified amount cannot be
        #   provided.
        #
        #   @return [Float, nil]
        optional :unit_price, Float

        # @!method initialize(timestamp:, amount: nil, quantity: nil, unit_price: nil)
        #   Some parameter documentations has been truncated, see
        #   {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::ScheduleItem}
        #   for more details.
        #
        #   @param timestamp [Time] timestamp of the scheduled event
        #
        #   @param amount [Float] Amount for the charge. Can be provided instead of unit_price and quantity. If am
        #
        #   @param quantity [Float] Quantity for the charge. Will be multiplied by unit_price to determine the amoun
        #
        #   @param unit_price [Float] Unit price for the charge. Will be multiplied by quantity to determine the amoun
      end
    end
  end

  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data#update_prepaid_balance_threshold_configuration
  class UpdatePrepaidBalanceThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute commit
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::Commit, nil]
    optional :commit,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::Commit }

    # @!attribute custom_credit_type_id
    #   If provided, the threshold, recharge-to amount, and the resulting threshold
    #   commit amount will be in terms of this credit type instead of the fiat currency.
    #
    #   @return [String, nil]
    optional :custom_credit_type_id, String, nil?: true

    # @!attribute is_enabled
    #   When set to false, the contract will not be evaluated against the
    #   threshold_amount. Toggling to true will result an immediate evaluation,
    #   regardless of prior state.
    #
    #   @return [Boolean, nil]
    optional :is_enabled, MetronomeSDK::Internal::Type::Boolean

    # @!attribute payment_gate_config
    #
    #   @return [MetronomeSDK::Models::PaymentGateConfigV2, nil]
    optional :payment_gate_config, -> { MetronomeSDK::PaymentGateConfigV2 }

    # @!attribute recharge_to_amount
    #   Specify the amount the balance should be recharged to.
    #
    #   @return [Float, nil]
    optional :recharge_to_amount, Float

    # @!attribute threshold_amount
    #   Specify the threshold amount for the contract. Each time the contract's balance
    #   lowers to this amount, a threshold charge will be initiated.
    #
    #   @return [Float, nil]
    optional :threshold_amount, Float

    # @!method initialize(commit: nil, custom_credit_type_id: nil, is_enabled: nil, payment_gate_config: nil, recharge_to_amount: nil, threshold_amount: nil)
    #   Some parameter documentations has been truncated, see
    #   {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration}
    #   for more details.
    #
    #   @param commit [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::Commit]
    #
    #   @param custom_credit_type_id [String, nil] If provided, the threshold, recharge-to amount, and the resulting threshold comm
    #
    #   @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
    #
    #   @param payment_gate_config [MetronomeSDK::Models::PaymentGateConfigV2]
    #
    #   @param recharge_to_amount [Float] Specify the amount the balance should be recharged to.
    #
    #   @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's balance

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration#commit
    class Commit < MetronomeSDK::Models::UpdateBaseThresholdCommit
      # @!attribute applicable_product_ids
      #   Which products the threshold commit applies to. If both applicable_product_ids
      #   and applicable_product_tags are not provided, the commit applies to all
      #   products.
      #
      #   @return [Array<String>, nil]
      optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true

      # @!attribute applicable_product_tags
      #   Which tags the threshold commit applies to. If both applicable_product_ids and
      #   applicable_product_tags are not provided, the commit applies to all products.
      #
      #   @return [Array<String>, nil]
      optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true

      # @!attribute specifiers
      #   List of filters that determine what kind of customer usage draws down a commit
      #   or credit. A customer's usage needs to meet the condition of at least one of the
      #   specifiers to contribute to a commit's or credit's drawdown. This field cannot
      #   be used together with `applicable_product_ids` or `applicable_product_tags`.
      #   Instead, to target usage by product or product tag, pass those values in the
      #   body of `specifiers`.
      #
      #   @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
      optional :specifiers,
               -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] },
               nil?: true

      # @!method initialize(applicable_product_ids: nil, applicable_product_tags: nil, specifiers: nil)
      #   Some parameter documentations has been truncated, see
      #   {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::Commit}
      #   for more details.
      #
      #   @param applicable_product_ids [Array<String>, nil] Which products the threshold commit applies to. If both applicable_product_ids a
      #
      #   @param applicable_product_tags [Array<String>, nil] Which tags the threshold commit applies to. If both applicable_product_ids and a
      #
      #   @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil] List of filters that determine what kind of customer usage draws down a commit o
    end
  end

  class UpdateRecurringCommit < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!attribute access_amount
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::AccessAmount, nil]
    optional :access_amount,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::AccessAmount }

    # @!attribute ending_before
    #
    #   @return [Time, nil]
    optional :ending_before, Time

    # @!attribute invoice_amount
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::InvoiceAmount, nil]
    optional :invoice_amount,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::InvoiceAmount }

    # @!attribute rate_type
    #
    #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::RateType, nil]
    optional :rate_type,
             enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::RateType }

    # @!method initialize(id:, access_amount: nil, ending_before: nil, invoice_amount: nil, rate_type: nil)
    #   @param id [String]
    #   @param access_amount [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::AccessAmount]
    #   @param ending_before [Time]
    #   @param invoice_amount [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::InvoiceAmount]
    #   @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::RateType]

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit#access_amount
    class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute quantity
      #
      #   @return [Float, nil]
      optional :quantity, Float

      # @!attribute unit_price
      #
      #   @return [Float, nil]
      optional :unit_price, Float

      # @!method initialize(quantity: nil, unit_price: nil)
      #   @param quantity [Float]
      #   @param unit_price [Float]
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit#invoice_amount
    class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute quantity
      #
      #   @return [Float, nil]
      optional :quantity, Float

      # @!attribute unit_price
      #
      #   @return [Float, nil]
      optional :unit_price, Float

      # @!method initialize(quantity: nil, unit_price: nil)
      #   @param quantity [Float]
      #   @param unit_price [Float]
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit#rate_type
    module RateType
      extend MetronomeSDK::Internal::Type::Enum

      LIST_RATE = :LIST_RATE
      COMMIT_RATE = :COMMIT_RATE

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  class UpdateRecurringCredit < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!attribute access_amount
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::AccessAmount, nil]
    optional :access_amount,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::AccessAmount }

    # @!attribute ending_before
    #
    #   @return [Time, nil]
    optional :ending_before, Time

    # @!attribute rate_type
    #
    #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::RateType, nil]
    optional :rate_type,
             enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::RateType }

    # @!method initialize(id:, access_amount: nil, ending_before: nil, rate_type: nil)
    #   @param id [String]
    #   @param access_amount [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::AccessAmount]
    #   @param ending_before [Time]
    #   @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::RateType]

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit#access_amount
    class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute quantity
      #
      #   @return [Float, nil]
      optional :quantity, Float

      # @!attribute unit_price
      #
      #   @return [Float, nil]
      optional :unit_price, Float

      # @!method initialize(quantity: nil, unit_price: nil)
      #   @param quantity [Float]
      #   @param unit_price [Float]
    end

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit#rate_type
    module RateType
      extend MetronomeSDK::Internal::Type::Enum

      LIST_RATE = :LIST_RATE
      COMMIT_RATE = :COMMIT_RATE

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  class UpdateRefundInvoice < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute date
    #
    #   @return [Time]
    required :date, Time

    # @!attribute invoice_id
    #
    #   @return [String]
    required :invoice_id, String

    # @!method initialize(date:, invoice_id:)
    #   @param date [Time]
    #   @param invoice_id [String]
  end

  class UpdateScheduledCharge < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!attribute invoice_schedule
    #
    #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge::InvoiceSchedule, nil]
    optional :invoice_schedule,
             -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge::InvoiceSchedule }

    # @!attribute name
    #
    #   @return [String, nil]
    optional :name, String

    # @!attribute netsuite_sales_order_id
    #
    #   @return [String, nil]
    optional :netsuite_sales_order_id, String, nil?: true

    # @!method initialize(id:, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil)
    #   @param id [String]
    #   @param invoice_schedule [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge::InvoiceSchedule]
    #   @param name [String]
    #   @param netsuite_sales_order_id [String, nil]

    # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge#invoice_schedule
    class InvoiceSchedule < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute add_schedule_items
      #
      #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge::InvoiceSchedule::AddScheduleItem>, nil]
      optional :add_schedule_items,
               -> do
                 MetronomeSDK::Internal::Type::ArrayOf[
                   MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge::InvoiceSchedule::AddScheduleItem
                 ]
               end

      # @!attribute remove_schedule_items
      #
      #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge::InvoiceSchedule::RemoveScheduleItem>, nil]
      optional :remove_schedule_items,
               -> do
                 MetronomeSDK::Internal::Type::ArrayOf[
                   MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge::InvoiceSchedule::RemoveScheduleItem
                 ]
               end

      # @!attribute update_schedule_items
      #
      #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge::InvoiceSchedule::UpdateScheduleItem>, nil]
      optional :update_schedule_items,
               -> do
                 MetronomeSDK::Internal::Type::ArrayOf[
                   MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge::InvoiceSchedule::UpdateScheduleItem
                 ]
               end

      # @!method initialize(add_schedule_items: nil, remove_schedule_items: nil, update_schedule_items: nil)
      #   @param add_schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge::InvoiceSchedule::AddScheduleItem>]
      #   @param remove_schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge::InvoiceSchedule::RemoveScheduleItem>]
      #   @param update_schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge::InvoiceSchedule::UpdateScheduleItem>]

      class AddScheduleItem < MetronomeSDK::Internal::Type::BaseModel
        # @!attribute timestamp
        #
        #   @return [Time]
        required :timestamp, Time

        # @!attribute amount
        #
        #   @return [Float, nil]
        optional :amount, Float

        # @!attribute quantity
        #
        #   @return [Float, nil]
        optional :quantity, Float

        # @!attribute unit_price
        #
        #   @return [Float, nil]
        optional :unit_price, Float

        # @!method initialize(timestamp:, amount: nil, quantity: nil, unit_price: nil)
        #   @param timestamp [Time]
        #   @param amount [Float]
        #   @param quantity [Float]
        #   @param unit_price [Float]
      end

      class RemoveScheduleItem < MetronomeSDK::Internal::Type::BaseModel
        # @!attribute id
        #
        #   @return [String]
        required :id, String

        # @!method initialize(id:)
        #   @param id [String]
      end

      class UpdateScheduleItem < MetronomeSDK::Internal::Type::BaseModel
        # @!attribute id
        #
        #   @return [String]
        required :id, String

        # @!attribute amount
        #
        #   @return [Float, nil]
        optional :amount, Float

        # @!attribute quantity
        #
        #   @return [Float, nil]
        optional :quantity, Float

        # @!attribute timestamp
        #
        #   @return [Time, nil]
        optional :timestamp, Time

        # @!attribute unit_price
        #
        #   @return [Float, nil]
        optional :unit_price, Float

        # @!method initialize(id:, amount: nil, quantity: nil, timestamp: nil, unit_price: nil)
        #   @param id [String]
        #   @param amount [Float]
        #   @param quantity [Float]
        #   @param timestamp [Time]
        #   @param unit_price [Float]
      end
    end
  end

  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data#update_spend_threshold_configuration
  class UpdateSpendThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute commit
    #
    #   @return [MetronomeSDK::Models::UpdateBaseThresholdCommit, nil]
    optional :commit, -> { MetronomeSDK::UpdateBaseThresholdCommit }

    # @!attribute is_enabled
    #   When set to false, the contract will not be evaluated against the
    #   threshold_amount. Toggling to true will result an immediate evaluation,
    #   regardless of prior state.
    #
    #   @return [Boolean, nil]
    optional :is_enabled, MetronomeSDK::Internal::Type::Boolean

    # @!attribute payment_gate_config
    #
    #   @return [MetronomeSDK::Models::PaymentGateConfigV2, nil]
    optional :payment_gate_config, -> { MetronomeSDK::PaymentGateConfigV2 }

    # @!attribute threshold_amount
    #   Specify the threshold amount for the contract. Each time the contract's usage
    #   hits this amount, a threshold charge will be initiated.
    #
    #   @return [Float, nil]
    optional :threshold_amount, Float

    # @!method initialize(commit: nil, is_enabled: nil, payment_gate_config: nil, threshold_amount: nil)
    #   Some parameter documentations has been truncated, see
    #   {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration}
    #   for more details.
    #
    #   @param commit [MetronomeSDK::Models::UpdateBaseThresholdCommit]
    #
    #   @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
    #
    #   @param payment_gate_config [MetronomeSDK::Models::PaymentGateConfigV2]
    #
    #   @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's usage hi
  end

  class UpdateSubscription < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!attribute ending_before
    #
    #   @return [Time, nil]
    optional :ending_before, Time

    # @!attribute quantity_updates
    #
    #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSubscription::QuantityUpdate>, nil]
    optional :quantity_updates,
             -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSubscription::QuantityUpdate] }

    # @!method initialize(id:, ending_before: nil, quantity_updates: nil)
    #   @param id [String]
    #   @param ending_before [Time]
    #   @param quantity_updates [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSubscription::QuantityUpdate>]

    class QuantityUpdate < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute starting_at
      #
      #   @return [Time]
      required :starting_at, Time

      # @!attribute quantity
      #
      #   @return [Float, nil]
      optional :quantity, Float

      # @!attribute quantity_delta
      #
      #   @return [Float, nil]
      optional :quantity_delta, Float

      # @!method initialize(starting_at:, quantity: nil, quantity_delta: nil)
      #   @param starting_at [Time]
      #   @param quantity [Float]
      #   @param quantity_delta [Float]
    end
  end
end

Instance Attribute Details

#add_commitsArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit>?



26
27
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 26

optional :add_commits,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit] }

#add_creditsArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit>?



32
33
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 32

optional :add_credits,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit] }

#add_discountsArray<MetronomeSDK::Models::Discount>?

Returns:



38
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 38

optional :add_discounts, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Discount] }

#add_overridesArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride>?



43
44
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 43

optional :add_overrides,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride] }

#add_prepaid_balance_threshold_configurationMetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2?



49
50
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 49

optional :add_prepaid_balance_threshold_configuration,
-> { MetronomeSDK::PrepaidBalanceThresholdConfigurationV2 }

#add_pro_servicesArray<MetronomeSDK::Models::ProService>?

Returns:



55
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 55

optional :add_pro_services, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ProService] }

#add_recurring_commitsArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit>?



60
61
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 60

optional :add_recurring_commits,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit] }

#add_recurring_creditsArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit>?



66
67
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 66

optional :add_recurring_credits,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit] }

#add_reseller_royaltiesArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty>?



72
73
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 72

optional :add_reseller_royalties,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty] }

#add_scheduled_chargesArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge>?



78
79
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 78

optional :add_scheduled_charges,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge] }

#add_spend_threshold_configurationMetronomeSDK::Models::SpendThresholdConfigurationV2?



84
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 84

optional :add_spend_threshold_configuration, -> { MetronomeSDK::SpendThresholdConfigurationV2 }

#add_subscriptionsArray<MetronomeSDK::Models::Subscription>?

List of subscriptions on the contract.

Returns:



90
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 90

optional :add_subscriptions, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Subscription] }

#add_usage_filtersArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddUsageFilter>?



95
96
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 95

optional :add_usage_filters,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddUsageFilter] }

#archive_commitsArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveCommit>?



101
102
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 101

optional :archive_commits,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveCommit] }

#archive_creditsArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveCredit>?



107
108
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 107

optional :archive_credits,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveCredit] }

#archive_scheduled_chargesArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveScheduledCharge>?



113
114
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 113

optional :archive_scheduled_charges,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveScheduledCharge] }

#idString

Returns:

  • (String)


21
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 21

required :id, String

#remove_overridesArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::RemoveOverride>?



119
120
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 119

optional :remove_overrides,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::RemoveOverride] }

#timestampTime?

Returns:

  • (Time, nil)


125
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 125

optional :timestamp, Time

#uniqueness_keyString?

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.

Returns:

  • (String, nil)


133
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 133

optional :uniqueness_key, String

#update_commitsArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit>?



138
139
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 138

optional :update_commits,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit] }

#update_contract_end_dateTime?

Returns:

  • (Time, nil)


144
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 144

optional :update_contract_end_date, Time

#update_contract_nameString?

Value to update the contract name to. If not provided, the contract name will remain unchanged.

Returns:

  • (String, nil)


151
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 151

optional :update_contract_name, String, nil?: true

#update_creditsArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit>?



156
157
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 156

optional :update_credits,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit] }

#update_discountsArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount>?



162
163
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 162

optional :update_discounts,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount] }

#update_prepaid_balance_threshold_configurationMetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration?



168
169
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 168

optional :update_prepaid_balance_threshold_configuration,
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration }

#update_recurring_commitsArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit>?



174
175
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 174

optional :update_recurring_commits,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit] }

#update_recurring_creditsArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit>?



180
181
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 180

optional :update_recurring_credits,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit] }

#update_refund_invoicesArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRefundInvoice>?



186
187
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 186

optional :update_refund_invoices,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRefundInvoice] }

#update_scheduled_chargesArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge>?



192
193
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 192

optional :update_scheduled_charges,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge] }

#update_spend_threshold_configurationMetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration?



198
199
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 198

optional :update_spend_threshold_configuration,
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration }

#update_subscriptionsArray<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSubscription>?

Optional list of subscriptions to update.



205
206
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 205

optional :update_subscriptions,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSubscription] }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 517