metronome-sdk 0.1.0.pre.alpha.3 → 0.1.0.pre.alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (403) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +40 -0
  3. data/README.md +1 -1
  4. data/lib/metronome_sdk/errors.rb +22 -0
  5. data/lib/metronome_sdk/internal/transport/base_client.rb +10 -2
  6. data/lib/metronome_sdk/internal/type/array_of.rb +6 -1
  7. data/lib/metronome_sdk/internal/type/base_model.rb +82 -26
  8. data/lib/metronome_sdk/internal/type/boolean.rb +7 -1
  9. data/lib/metronome_sdk/internal/type/converter.rb +42 -34
  10. data/lib/metronome_sdk/internal/type/enum.rb +16 -5
  11. data/lib/metronome_sdk/internal/type/file_input.rb +6 -1
  12. data/lib/metronome_sdk/internal/type/hash_of.rb +6 -1
  13. data/lib/metronome_sdk/internal/type/union.rb +17 -9
  14. data/lib/metronome_sdk/internal/type/unknown.rb +7 -1
  15. data/lib/metronome_sdk/internal/util.rb +8 -9
  16. data/lib/metronome_sdk/models/base_usage_filter.rb +27 -0
  17. data/lib/metronome_sdk/models/commit.rb +1010 -0
  18. data/lib/metronome_sdk/models/contract_without_amendments.rb +1803 -0
  19. data/lib/metronome_sdk/models/credit.rb +634 -0
  20. data/lib/metronome_sdk/models/credit_type_data.rb +21 -0
  21. data/lib/metronome_sdk/models/discount.rb +68 -0
  22. data/lib/metronome_sdk/models/event_type_filter.rb +33 -0
  23. data/lib/metronome_sdk/models/id.rb +15 -0
  24. data/lib/metronome_sdk/models/override.rb +381 -0
  25. data/lib/metronome_sdk/models/pro_service.rb +73 -0
  26. data/lib/metronome_sdk/models/property_filter.rb +52 -0
  27. data/lib/metronome_sdk/models/rate.rb +101 -0
  28. data/lib/metronome_sdk/models/schedule_duration.rb +50 -0
  29. data/lib/metronome_sdk/models/schedule_point_in_time.rb +62 -0
  30. data/lib/metronome_sdk/models/scheduled_charge.rb +76 -0
  31. data/lib/metronome_sdk/models/tier.rb +21 -0
  32. data/lib/metronome_sdk/models/v1/alert_archive_response.rb +3 -14
  33. data/lib/metronome_sdk/models/v1/alert_create_params.rb +4 -1
  34. data/lib/metronome_sdk/models/v1/alert_create_response.rb +3 -14
  35. data/lib/metronome_sdk/models/v1/billable_metric_archive_params.rb +2 -8
  36. data/lib/metronome_sdk/models/v1/billable_metric_archive_response.rb +3 -14
  37. data/lib/metronome_sdk/models/v1/billable_metric_create_params.rb +6 -86
  38. data/lib/metronome_sdk/models/v1/billable_metric_create_response.rb +3 -14
  39. data/lib/metronome_sdk/models/v1/billable_metric_list_response.rb +6 -85
  40. data/lib/metronome_sdk/models/v1/billable_metric_retrieve_response.rb +8 -85
  41. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +312 -35
  42. data/lib/metronome_sdk/models/v1/contract_amend_response.rb +3 -14
  43. data/lib/metronome_sdk/models/v1/contract_archive_response.rb +3 -14
  44. data/lib/metronome_sdk/models/v1/contract_create_historical_invoices_response.rb +3 -1276
  45. data/lib/metronome_sdk/models/v1/contract_create_params.rb +550 -102
  46. data/lib/metronome_sdk/models/v1/contract_create_response.rb +3 -14
  47. data/lib/metronome_sdk/models/v1/contract_list_balances_response.rb +5 -1645
  48. data/lib/metronome_sdk/models/v1/contract_list_response.rb +253 -10692
  49. data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rb +9 -295
  50. data/lib/metronome_sdk/models/v1/contract_retrieve_response.rb +254 -10721
  51. data/lib/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_response.rb +3 -1276
  52. data/lib/metronome_sdk/models/v1/contract_update_end_date_response.rb +3 -14
  53. data/lib/metronome_sdk/models/v1/contracts/product_archive_response.rb +3 -14
  54. data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +6 -97
  55. data/lib/metronome_sdk/models/v1/contracts/product_create_response.rb +3 -14
  56. data/lib/metronome_sdk/models/v1/contracts/product_list_item_state.rb +148 -0
  57. data/lib/metronome_sdk/models/v1/contracts/product_list_response.rb +12 -561
  58. data/lib/metronome_sdk/models/v1/contracts/product_retrieve_params.rb +2 -8
  59. data/lib/metronome_sdk/models/v1/contracts/product_retrieve_response.rb +14 -559
  60. data/lib/metronome_sdk/models/v1/contracts/product_update_params.rb +6 -97
  61. data/lib/metronome_sdk/models/v1/contracts/product_update_response.rb +3 -14
  62. data/lib/metronome_sdk/models/v1/contracts/quantity_conversion.rb +57 -0
  63. data/lib/metronome_sdk/models/v1/contracts/quantity_rounding.rb +45 -0
  64. data/lib/metronome_sdk/models/v1/contracts/rate_card_archive_params.rb +2 -8
  65. data/lib/metronome_sdk/models/v1/contracts/rate_card_archive_response.rb +3 -14
  66. data/lib/metronome_sdk/models/v1/contracts/rate_card_create_response.rb +3 -14
  67. data/lib/metronome_sdk/models/v1/contracts/rate_card_list_response.rb +6 -42
  68. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_params.rb +2 -8
  69. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rb +6 -159
  70. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rb +6 -42
  71. data/lib/metronome_sdk/models/v1/contracts/rate_card_update_response.rb +3 -14
  72. data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_set_response.rb +3 -14
  73. data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_response.rb +3 -14
  74. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +6 -44
  75. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_response.rb +3 -16
  76. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +6 -44
  77. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rb +9 -61
  78. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rb +6 -158
  79. data/lib/metronome_sdk/models/v1/credit_grant_create_params.rb +5 -77
  80. data/lib/metronome_sdk/models/v1/credit_grant_create_response.rb +3 -14
  81. data/lib/metronome_sdk/models/v1/credit_grant_edit_response.rb +3 -14
  82. data/lib/metronome_sdk/models/v1/credit_grant_list_entries_params.rb +20 -1
  83. data/lib/metronome_sdk/models/v1/credit_grant_list_entries_response.rb +11 -153
  84. data/lib/metronome_sdk/models/v1/credit_grant_list_response.rb +14 -175
  85. data/lib/metronome_sdk/models/v1/credit_grant_void_response.rb +3 -14
  86. data/lib/metronome_sdk/models/v1/credit_ledger_entry.rb +69 -0
  87. data/lib/metronome_sdk/models/v1/customer.rb +53 -0
  88. data/lib/metronome_sdk/models/v1/customer_archive_params.rb +2 -8
  89. data/lib/metronome_sdk/models/v1/customer_archive_response.rb +3 -14
  90. data/lib/metronome_sdk/models/v1/customer_create_response.rb +3 -50
  91. data/lib/metronome_sdk/models/v1/{customer_list_response.rb → customer_detail.rb} +14 -15
  92. data/lib/metronome_sdk/models/v1/customer_list_billable_metrics_response.rb +6 -86
  93. data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +115 -0
  94. data/lib/metronome_sdk/models/v1/customer_preview_events_response.rb +18 -0
  95. data/lib/metronome_sdk/models/v1/customer_retrieve_response.rb +3 -126
  96. data/lib/metronome_sdk/models/v1/customer_set_name_response.rb +3 -50
  97. data/lib/metronome_sdk/models/v1/customers/alert_list_response.rb +5 -276
  98. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_response.rb +3 -279
  99. data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +9 -1
  100. data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +8 -6
  101. data/lib/metronome_sdk/models/v1/customers/commit_create_response.rb +3 -14
  102. data/lib/metronome_sdk/models/v1/customers/commit_list_response.rb +3 -1047
  103. data/lib/metronome_sdk/models/v1/customers/commit_update_end_date_response.rb +3 -14
  104. data/lib/metronome_sdk/models/v1/customers/credit_create_response.rb +3 -14
  105. data/lib/metronome_sdk/models/v1/customers/credit_list_response.rb +3 -593
  106. data/lib/metronome_sdk/models/v1/customers/credit_update_end_date_response.rb +3 -14
  107. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +270 -0
  108. data/lib/metronome_sdk/models/v1/customers/{invoice_list_response.rb → invoice.rb} +119 -303
  109. data/lib/metronome_sdk/models/v1/customers/invoice_list_breakdowns_response.rb +2 -1271
  110. data/lib/metronome_sdk/models/v1/customers/invoice_retrieve_response.rb +3 -1276
  111. data/lib/metronome_sdk/models/v1/customers/plan_add_response.rb +3 -14
  112. data/lib/metronome_sdk/models/v1/customers/plan_list_response.rb +3 -21
  113. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +1 -0
  114. data/lib/metronome_sdk/models/v1/plan_detail.rb +200 -0
  115. data/lib/metronome_sdk/models/v1/plan_get_details_response.rb +3 -286
  116. data/lib/metronome_sdk/models/v1/plan_list_charges_response.rb +3 -20
  117. data/lib/metronome_sdk/models/v1/plan_list_customers_response.rb +3 -128
  118. data/lib/metronome_sdk/models/v1/rollover_amount_max_amount.rb +38 -0
  119. data/lib/metronome_sdk/models/v1/rollover_amount_max_percentage.rb +38 -0
  120. data/lib/metronome_sdk/models/v1/usage_search_params.rb +24 -0
  121. data/lib/metronome_sdk/models/v1/usage_search_response.rb +249 -0
  122. data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +11 -8
  123. data/lib/metronome_sdk/models/v2/contract_edit_commit_response.rb +3 -14
  124. data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +3 -2
  125. data/lib/metronome_sdk/models/v2/contract_edit_credit_response.rb +3 -14
  126. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +885 -103
  127. data/lib/metronome_sdk/models/v2/contract_edit_response.rb +3 -14
  128. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +351 -625
  129. data/lib/metronome_sdk/models/v2/contract_list_response.rb +590 -749
  130. data/lib/metronome_sdk/models/v2/contract_retrieve_response.rb +590 -751
  131. data/lib/metronome_sdk/models.rb +36 -4
  132. data/lib/metronome_sdk/resources/v1/alerts.rb +1 -1
  133. data/lib/metronome_sdk/resources/v1/billable_metrics.rb +2 -2
  134. data/lib/metronome_sdk/resources/v1/contracts/products.rb +4 -4
  135. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +1 -1
  136. data/lib/metronome_sdk/resources/v1/contracts.rb +8 -4
  137. data/lib/metronome_sdk/resources/v1/credit_grants.rb +4 -2
  138. data/lib/metronome_sdk/resources/v1/customers/commits.rb +2 -2
  139. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +2 -2
  140. data/lib/metronome_sdk/resources/v1/customers.rb +40 -2
  141. data/lib/metronome_sdk/resources/v1/usage.rb +25 -0
  142. data/lib/metronome_sdk/resources/v2/contracts.rb +11 -9
  143. data/lib/metronome_sdk/version.rb +1 -1
  144. data/lib/metronome_sdk.rb +31 -2
  145. data/rbi/metronome_sdk/errors.rbi +16 -0
  146. data/rbi/metronome_sdk/internal/type/boolean.rbi +2 -0
  147. data/rbi/metronome_sdk/internal/type/converter.rbi +15 -15
  148. data/rbi/metronome_sdk/internal/type/union.rbi +5 -0
  149. data/rbi/metronome_sdk/internal/type/unknown.rbi +2 -0
  150. data/rbi/metronome_sdk/internal/util.rbi +2 -0
  151. data/rbi/metronome_sdk/models/base_usage_filter.rbi +46 -0
  152. data/rbi/metronome_sdk/models/commit.rbi +1962 -0
  153. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +3676 -0
  154. data/rbi/metronome_sdk/models/credit.rbi +1230 -0
  155. data/rbi/metronome_sdk/models/credit_type_data.rbi +26 -0
  156. data/rbi/metronome_sdk/models/discount.rbi +106 -0
  157. data/rbi/metronome_sdk/models/event_type_filter.rbi +57 -0
  158. data/rbi/metronome_sdk/models/id.rbi +23 -0
  159. data/rbi/metronome_sdk/models/override.rbi +675 -0
  160. data/rbi/metronome_sdk/models/pro_service.rbi +98 -0
  161. data/rbi/metronome_sdk/models/property_filter.rbi +88 -0
  162. data/rbi/metronome_sdk/models/rate.rbi +155 -0
  163. data/rbi/metronome_sdk/models/schedule_duration.rbi +89 -0
  164. data/rbi/metronome_sdk/models/schedule_point_in_time.rbi +121 -0
  165. data/rbi/metronome_sdk/models/scheduled_charge.rbi +119 -0
  166. data/rbi/metronome_sdk/models/tier.rbi +29 -0
  167. data/rbi/metronome_sdk/models/v1/alert_archive_response.rbi +4 -37
  168. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +6 -0
  169. data/rbi/metronome_sdk/models/v1/alert_create_response.rbi +4 -37
  170. data/rbi/metronome_sdk/models/v1/billable_metric_archive_params.rbi +6 -12
  171. data/rbi/metronome_sdk/models/v1/billable_metric_archive_response.rbi +4 -44
  172. data/rbi/metronome_sdk/models/v1/billable_metric_create_params.rbi +8 -177
  173. data/rbi/metronome_sdk/models/v1/billable_metric_create_response.rbi +4 -43
  174. data/rbi/metronome_sdk/models/v1/billable_metric_list_response.rbi +8 -177
  175. data/rbi/metronome_sdk/models/v1/billable_metric_retrieve_response.rbi +8 -175
  176. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +712 -68
  177. data/rbi/metronome_sdk/models/v1/contract_amend_response.rbi +4 -37
  178. data/rbi/metronome_sdk/models/v1/contract_archive_response.rbi +4 -39
  179. data/rbi/metronome_sdk/models/v1/contract_create_historical_invoices_response.rbi +3 -2595
  180. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +1100 -172
  181. data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +4 -37
  182. data/rbi/metronome_sdk/models/v1/contract_list_balances_response.rbi +3 -3366
  183. data/rbi/metronome_sdk/models/v1/contract_list_response.rbi +375 -22523
  184. data/rbi/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbi +12 -632
  185. data/rbi/metronome_sdk/models/v1/contract_retrieve_response.rbi +375 -22523
  186. data/rbi/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_response.rbi +3 -2595
  187. data/rbi/metronome_sdk/models/v1/contract_update_end_date_response.rbi +4 -44
  188. data/rbi/metronome_sdk/models/v1/contracts/product_archive_response.rbi +4 -44
  189. data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +8 -209
  190. data/rbi/metronome_sdk/models/v1/contracts/product_create_response.rbi +4 -44
  191. data/rbi/metronome_sdk/models/v1/contracts/product_list_item_state.rbi +237 -0
  192. data/rbi/metronome_sdk/models/v1/contracts/product_list_response.rbi +76 -1143
  193. data/rbi/metronome_sdk/models/v1/contracts/product_retrieve_params.rbi +3 -9
  194. data/rbi/metronome_sdk/models/v1/contracts/product_retrieve_response.rbi +76 -1137
  195. data/rbi/metronome_sdk/models/v1/contracts/product_update_params.rbi +8 -209
  196. data/rbi/metronome_sdk/models/v1/contracts/product_update_response.rbi +4 -44
  197. data/rbi/metronome_sdk/models/v1/contracts/quantity_conversion.rbi +111 -0
  198. data/rbi/metronome_sdk/models/v1/contracts/quantity_rounding.rbi +94 -0
  199. data/rbi/metronome_sdk/models/v1/contracts/rate_card_archive_params.rbi +3 -9
  200. data/rbi/metronome_sdk/models/v1/contracts/rate_card_archive_response.rbi +4 -44
  201. data/rbi/metronome_sdk/models/v1/contracts/rate_card_create_response.rbi +4 -44
  202. data/rbi/metronome_sdk/models/v1/contracts/rate_card_list_response.rbi +8 -74
  203. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_params.rbi +3 -9
  204. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbi +8 -344
  205. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rbi +8 -74
  206. data/rbi/metronome_sdk/models/v1/contracts/rate_card_update_response.rbi +4 -44
  207. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/product_order_set_response.rbi +4 -44
  208. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_response.rbi +4 -44
  209. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +8 -108
  210. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_response.rbi +4 -45
  211. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +8 -108
  212. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbi +12 -149
  213. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbi +8 -344
  214. data/rbi/metronome_sdk/models/v1/credit_grant_create_params.rbi +8 -166
  215. data/rbi/metronome_sdk/models/v1/credit_grant_create_response.rbi +4 -41
  216. data/rbi/metronome_sdk/models/v1/credit_grant_edit_response.rbi +4 -39
  217. data/rbi/metronome_sdk/models/v1/credit_grant_list_entries_params.rbi +58 -0
  218. data/rbi/metronome_sdk/models/v1/credit_grant_list_entries_response.rbi +10 -231
  219. data/rbi/metronome_sdk/models/v1/credit_grant_list_response.rbi +14 -281
  220. data/rbi/metronome_sdk/models/v1/credit_grant_void_response.rbi +4 -39
  221. data/rbi/metronome_sdk/models/v1/credit_ledger_entry.rbi +90 -0
  222. data/rbi/metronome_sdk/models/v1/customer.rbi +74 -0
  223. data/rbi/metronome_sdk/models/v1/customer_archive_params.rbi +6 -12
  224. data/rbi/metronome_sdk/models/v1/customer_archive_response.rbi +4 -39
  225. data/rbi/metronome_sdk/models/v1/customer_create_response.rbi +6 -84
  226. data/rbi/metronome_sdk/models/v1/{customer_list_response.rbi → customer_detail.rbi} +19 -26
  227. data/rbi/metronome_sdk/models/v1/customer_list_billable_metrics_response.rbi +8 -177
  228. data/rbi/metronome_sdk/models/v1/customer_preview_events_params.rbi +214 -0
  229. data/rbi/metronome_sdk/models/v1/customer_preview_events_response.rbi +35 -0
  230. data/rbi/metronome_sdk/models/v1/customer_retrieve_response.rbi +6 -255
  231. data/rbi/metronome_sdk/models/v1/customer_set_name_response.rbi +6 -86
  232. data/rbi/metronome_sdk/models/v1/customers/alert_list_response.rbi +3 -623
  233. data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_response.rbi +4 -622
  234. data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +11 -0
  235. data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +12 -8
  236. data/rbi/metronome_sdk/models/v1/customers/commit_create_response.rbi +4 -44
  237. data/rbi/metronome_sdk/models/v1/customers/commit_list_response.rbi +3 -2164
  238. data/rbi/metronome_sdk/models/v1/customers/commit_update_end_date_response.rbi +4 -44
  239. data/rbi/metronome_sdk/models/v1/customers/credit_create_response.rbi +4 -44
  240. data/rbi/metronome_sdk/models/v1/customers/credit_list_response.rbi +3 -1224
  241. data/rbi/metronome_sdk/models/v1/customers/credit_update_end_date_response.rbi +4 -44
  242. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +572 -0
  243. data/rbi/metronome_sdk/models/v1/customers/{invoice_list_response.rbi → invoice.rbi} +182 -589
  244. data/rbi/metronome_sdk/models/v1/customers/invoice_list_breakdowns_response.rbi +4 -2561
  245. data/rbi/metronome_sdk/models/v1/customers/invoice_retrieve_response.rbi +6 -2612
  246. data/rbi/metronome_sdk/models/v1/customers/plan_add_response.rbi +4 -41
  247. data/rbi/metronome_sdk/models/v1/customers/plan_list_response.rbi +4 -39
  248. data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +5 -0
  249. data/rbi/metronome_sdk/models/v1/plan_detail.rbi +349 -0
  250. data/rbi/metronome_sdk/models/v1/plan_get_details_response.rbi +6 -560
  251. data/rbi/metronome_sdk/models/v1/plan_list_charges_response.rbi +4 -37
  252. data/rbi/metronome_sdk/models/v1/plan_list_customers_response.rbi +4 -248
  253. data/rbi/metronome_sdk/models/v1/rollover_amount_max_amount.rbi +79 -0
  254. data/rbi/metronome_sdk/models/v1/rollover_amount_max_percentage.rbi +80 -0
  255. data/rbi/metronome_sdk/models/v1/usage_search_params.rbi +48 -0
  256. data/rbi/metronome_sdk/models/v1/usage_search_response.rbi +438 -0
  257. data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +23 -23
  258. data/rbi/metronome_sdk/models/v2/contract_edit_commit_response.rbi +4 -41
  259. data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +11 -15
  260. data/rbi/metronome_sdk/models/v2/contract_edit_credit_response.rbi +4 -41
  261. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +1859 -202
  262. data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +4 -37
  263. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +700 -1447
  264. data/rbi/metronome_sdk/models/v2/contract_list_response.rbi +1204 -1472
  265. data/rbi/metronome_sdk/models/v2/contract_retrieve_response.rbi +1204 -1472
  266. data/rbi/metronome_sdk/models.rbi +32 -0
  267. data/rbi/metronome_sdk/resources/v1/alerts.rbi +3 -0
  268. data/rbi/metronome_sdk/resources/v1/billable_metrics.rbi +2 -6
  269. data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +4 -4
  270. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +1 -4
  271. data/rbi/metronome_sdk/resources/v1/contracts.rbi +10 -4
  272. data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +4 -0
  273. data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +6 -4
  274. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +1 -1
  275. data/rbi/metronome_sdk/resources/v1/customers.rbi +34 -3
  276. data/rbi/metronome_sdk/resources/v1/usage.rbi +17 -0
  277. data/rbi/metronome_sdk/resources/v2/contracts.rbi +24 -14
  278. data/sig/metronome_sdk/errors.rbs +9 -0
  279. data/sig/metronome_sdk/internal/type/converter.rbs +7 -1
  280. data/sig/metronome_sdk/models/base_usage_filter.rbs +28 -0
  281. data/sig/metronome_sdk/models/commit.rbs +1020 -0
  282. data/sig/metronome_sdk/models/contract_without_amendments.rbs +1582 -0
  283. data/sig/metronome_sdk/models/credit.rbs +643 -0
  284. data/sig/metronome_sdk/models/credit_type_data.rbs +15 -0
  285. data/sig/metronome_sdk/models/discount.rbs +63 -0
  286. data/sig/metronome_sdk/models/event_type_filter.rbs +26 -0
  287. data/sig/metronome_sdk/models/id.rbs +13 -0
  288. data/sig/metronome_sdk/models/override.rbs +399 -0
  289. data/sig/metronome_sdk/models/pro_service.rbs +61 -0
  290. data/sig/metronome_sdk/models/property_filter.rbs +41 -0
  291. data/sig/metronome_sdk/models/rate.rbs +94 -0
  292. data/sig/metronome_sdk/models/schedule_duration.rbs +56 -0
  293. data/sig/metronome_sdk/models/schedule_point_in_time.rbs +75 -0
  294. data/sig/metronome_sdk/models/scheduled_charge.rbs +70 -0
  295. data/sig/metronome_sdk/models/tier.rbs +17 -0
  296. data/sig/metronome_sdk/models/v1/alert_archive_response.rbs +4 -19
  297. data/sig/metronome_sdk/models/v1/alert_create_response.rbs +4 -19
  298. data/sig/metronome_sdk/models/v1/billable_metric_archive_params.rbs +4 -12
  299. data/sig/metronome_sdk/models/v1/billable_metric_archive_response.rbs +4 -19
  300. data/sig/metronome_sdk/models/v1/billable_metric_create_params.rbs +12 -73
  301. data/sig/metronome_sdk/models/v1/billable_metric_create_response.rbs +4 -19
  302. data/sig/metronome_sdk/models/v1/billable_metric_list_response.rbs +12 -73
  303. data/sig/metronome_sdk/models/v1/billable_metric_retrieve_response.rbs +12 -73
  304. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +291 -24
  305. data/sig/metronome_sdk/models/v1/contract_amend_response.rbs +4 -19
  306. data/sig/metronome_sdk/models/v1/contract_archive_response.rbs +4 -19
  307. data/sig/metronome_sdk/models/v1/contract_create_historical_invoices_response.rbs +4 -1291
  308. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +448 -84
  309. data/sig/metronome_sdk/models/v1/contract_create_response.rbs +4 -19
  310. data/sig/metronome_sdk/models/v1/contract_list_balances_response.rbs +1 -1642
  311. data/sig/metronome_sdk/models/v1/contract_list_response.rbs +188 -10437
  312. data/sig/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbs +15 -271
  313. data/sig/metronome_sdk/models/v1/contract_retrieve_response.rbs +188 -10437
  314. data/sig/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_response.rbs +4 -1291
  315. data/sig/metronome_sdk/models/v1/contract_update_end_date_response.rbs +4 -19
  316. data/sig/metronome_sdk/models/v1/contracts/product_archive_response.rbs +4 -21
  317. data/sig/metronome_sdk/models/v1/contracts/product_create_params.rbs +8 -82
  318. data/sig/metronome_sdk/models/v1/contracts/product_create_response.rbs +4 -21
  319. data/sig/metronome_sdk/models/v1/contracts/product_list_item_state.rbs +121 -0
  320. data/sig/metronome_sdk/models/v1/contracts/product_list_response.rbs +16 -466
  321. data/sig/metronome_sdk/models/v1/contracts/product_retrieve_params.rbs +4 -12
  322. data/sig/metronome_sdk/models/v1/contracts/product_retrieve_response.rbs +16 -466
  323. data/sig/metronome_sdk/models/v1/contracts/product_update_params.rbs +8 -82
  324. data/sig/metronome_sdk/models/v1/contracts/product_update_response.rbs +4 -21
  325. data/sig/metronome_sdk/models/v1/contracts/quantity_conversion.rbs +47 -0
  326. data/sig/metronome_sdk/models/v1/contracts/quantity_rounding.rbs +41 -0
  327. data/sig/metronome_sdk/models/v1/contracts/rate_card_archive_params.rbs +4 -12
  328. data/sig/metronome_sdk/models/v1/contracts/rate_card_archive_response.rbs +4 -21
  329. data/sig/metronome_sdk/models/v1/contracts/rate_card_create_response.rbs +4 -21
  330. data/sig/metronome_sdk/models/v1/contracts/rate_card_list_response.rbs +10 -34
  331. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_params.rbs +4 -12
  332. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbs +10 -144
  333. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rbs +10 -34
  334. data/sig/metronome_sdk/models/v1/contracts/rate_card_update_response.rbs +4 -21
  335. data/sig/metronome_sdk/models/v1/contracts/rate_cards/product_order_set_response.rbs +4 -21
  336. data/sig/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_response.rbs +4 -21
  337. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +12 -40
  338. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_response.rbs +4 -21
  339. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +12 -40
  340. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbs +18 -58
  341. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbs +10 -144
  342. data/sig/metronome_sdk/models/v1/credit_grant_create_params.rbs +2 -66
  343. data/sig/metronome_sdk/models/v1/credit_grant_create_response.rbs +4 -19
  344. data/sig/metronome_sdk/models/v1/credit_grant_edit_response.rbs +4 -19
  345. data/sig/metronome_sdk/models/v1/credit_grant_list_entries_params.rbs +20 -0
  346. data/sig/metronome_sdk/models/v1/credit_grant_list_entries_response.rbs +12 -118
  347. data/sig/metronome_sdk/models/v1/credit_grant_list_response.rbs +16 -140
  348. data/sig/metronome_sdk/models/v1/credit_grant_void_response.rbs +4 -19
  349. data/sig/metronome_sdk/models/v1/credit_ledger_entry.rbs +52 -0
  350. data/sig/metronome_sdk/models/v1/customer.rbs +44 -0
  351. data/sig/metronome_sdk/models/v1/customer_archive_params.rbs +4 -12
  352. data/sig/metronome_sdk/models/v1/customer_archive_response.rbs +4 -19
  353. data/sig/metronome_sdk/models/v1/customer_create_response.rbs +4 -48
  354. data/sig/metronome_sdk/models/v1/{customer_list_response.rbs → customer_detail.rbs} +17 -17
  355. data/sig/metronome_sdk/models/v1/customer_list_billable_metrics_response.rbs +12 -73
  356. data/sig/metronome_sdk/models/v1/customer_preview_events_params.rbs +105 -0
  357. data/sig/metronome_sdk/models/v1/customer_preview_events_response.rbs +16 -0
  358. data/sig/metronome_sdk/models/v1/customer_retrieve_response.rbs +4 -112
  359. data/sig/metronome_sdk/models/v1/customer_set_name_response.rbs +4 -48
  360. data/sig/metronome_sdk/models/v1/customers/alert_list_response.rbs +4 -243
  361. data/sig/metronome_sdk/models/v1/customers/alert_retrieve_response.rbs +4 -247
  362. data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbs +7 -0
  363. data/sig/metronome_sdk/models/v1/customers/commit_create_response.rbs +4 -21
  364. data/sig/metronome_sdk/models/v1/customers/commit_list_response.rbs +4 -1057
  365. data/sig/metronome_sdk/models/v1/customers/commit_update_end_date_response.rbs +4 -21
  366. data/sig/metronome_sdk/models/v1/customers/credit_create_response.rbs +4 -21
  367. data/sig/metronome_sdk/models/v1/customers/credit_list_response.rbs +4 -596
  368. data/sig/metronome_sdk/models/v1/customers/credit_update_end_date_response.rbs +4 -21
  369. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +234 -0
  370. data/sig/metronome_sdk/models/v1/customers/{invoice_list_response.rbs → invoice.rbs} +147 -305
  371. data/sig/metronome_sdk/models/v1/customers/invoice_list_breakdowns_response.rbs +8 -1278
  372. data/sig/metronome_sdk/models/v1/customers/invoice_retrieve_response.rbs +4 -1294
  373. data/sig/metronome_sdk/models/v1/customers/plan_add_response.rbs +4 -19
  374. data/sig/metronome_sdk/models/v1/customers/plan_list_response.rbs +4 -16
  375. data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +2 -1
  376. data/sig/metronome_sdk/models/v1/plan_detail.rbs +203 -0
  377. data/sig/metronome_sdk/models/v1/plan_get_details_response.rbs +4 -267
  378. data/sig/metronome_sdk/models/v1/plan_list_charges_response.rbs +4 -16
  379. data/sig/metronome_sdk/models/v1/plan_list_customers_response.rbs +4 -108
  380. data/sig/metronome_sdk/models/v1/rollover_amount_max_amount.rbs +37 -0
  381. data/sig/metronome_sdk/models/v1/rollover_amount_max_percentage.rbs +37 -0
  382. data/sig/metronome_sdk/models/v1/usage_search_params.rbs +26 -0
  383. data/sig/metronome_sdk/models/v1/usage_search_response.rbs +230 -0
  384. data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +4 -8
  385. data/sig/metronome_sdk/models/v2/contract_edit_commit_response.rbs +4 -19
  386. data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +4 -8
  387. data/sig/metronome_sdk/models/v2/contract_edit_credit_response.rbs +4 -19
  388. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +743 -77
  389. data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +4 -19
  390. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +274 -665
  391. data/sig/metronome_sdk/models/v2/contract_list_response.rbs +567 -759
  392. data/sig/metronome_sdk/models/v2/contract_retrieve_response.rbs +567 -759
  393. data/sig/metronome_sdk/models.rbs +32 -0
  394. data/sig/metronome_sdk/resources/v1/billable_metrics.rbs +2 -2
  395. data/sig/metronome_sdk/resources/v1/contracts/products.rbs +4 -4
  396. data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +1 -1
  397. data/sig/metronome_sdk/resources/v1/contracts.rbs +3 -1
  398. data/sig/metronome_sdk/resources/v1/credit_grants.rbs +1 -0
  399. data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +1 -1
  400. data/sig/metronome_sdk/resources/v1/customers.rbs +9 -1
  401. data/sig/metronome_sdk/resources/v1/usage.rbs +5 -0
  402. data/sig/metronome_sdk/resources/v2/contracts.rbs +3 -2
  403. metadata +95 -8
@@ -0,0 +1,3676 @@
1
+ # typed: strong
2
+
3
+ module MetronomeSDK
4
+ module Models
5
+ class ContractWithoutAmendments < MetronomeSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ MetronomeSDK::ContractWithoutAmendments,
10
+ MetronomeSDK::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ sig { returns(T::Array[MetronomeSDK::Commit]) }
15
+ attr_accessor :commits
16
+
17
+ sig { returns(Time) }
18
+ attr_accessor :created_at
19
+
20
+ sig { returns(String) }
21
+ attr_accessor :created_by
22
+
23
+ sig { returns(T::Array[MetronomeSDK::Override]) }
24
+ attr_accessor :overrides
25
+
26
+ sig { returns(T::Array[MetronomeSDK::ScheduledCharge]) }
27
+ attr_accessor :scheduled_charges
28
+
29
+ sig { returns(Time) }
30
+ attr_accessor :starting_at
31
+
32
+ sig do
33
+ returns(T::Array[MetronomeSDK::ContractWithoutAmendments::Transition])
34
+ end
35
+ attr_accessor :transitions
36
+
37
+ sig do
38
+ returns(MetronomeSDK::ContractWithoutAmendments::UsageStatementSchedule)
39
+ end
40
+ attr_reader :usage_statement_schedule
41
+
42
+ sig do
43
+ params(
44
+ usage_statement_schedule:
45
+ MetronomeSDK::ContractWithoutAmendments::UsageStatementSchedule::OrHash
46
+ ).void
47
+ end
48
+ attr_writer :usage_statement_schedule
49
+
50
+ sig { returns(T.nilable(T::Array[MetronomeSDK::Credit])) }
51
+ attr_reader :credits
52
+
53
+ sig { params(credits: T::Array[MetronomeSDK::Credit::OrHash]).void }
54
+ attr_writer :credits
55
+
56
+ # This field's availability is dependent on your client's configuration.
57
+ sig { returns(T.nilable(T::Array[MetronomeSDK::Discount])) }
58
+ attr_reader :discounts
59
+
60
+ sig { params(discounts: T::Array[MetronomeSDK::Discount::OrHash]).void }
61
+ attr_writer :discounts
62
+
63
+ sig { returns(T.nilable(Time)) }
64
+ attr_reader :ending_before
65
+
66
+ sig { params(ending_before: Time).void }
67
+ attr_writer :ending_before
68
+
69
+ # Either a **parent** configuration with a list of children or a **child**
70
+ # configuration with a single parent.
71
+ sig do
72
+ returns(
73
+ T.nilable(
74
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::Variants
75
+ )
76
+ )
77
+ end
78
+ attr_reader :hierarchy_configuration
79
+
80
+ sig do
81
+ params(
82
+ hierarchy_configuration:
83
+ T.any(
84
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ParentHierarchyConfiguration::OrHash,
85
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration::OrHash
86
+ )
87
+ ).void
88
+ end
89
+ attr_writer :hierarchy_configuration
90
+
91
+ sig { returns(T.nilable(String)) }
92
+ attr_reader :name
93
+
94
+ sig { params(name: String).void }
95
+ attr_writer :name
96
+
97
+ sig { returns(T.nilable(Float)) }
98
+ attr_reader :net_payment_terms_days
99
+
100
+ sig { params(net_payment_terms_days: Float).void }
101
+ attr_writer :net_payment_terms_days
102
+
103
+ # This field's availability is dependent on your client's configuration.
104
+ sig { returns(T.nilable(String)) }
105
+ attr_reader :netsuite_sales_order_id
106
+
107
+ sig { params(netsuite_sales_order_id: String).void }
108
+ attr_writer :netsuite_sales_order_id
109
+
110
+ sig do
111
+ returns(
112
+ T.nilable(
113
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration
114
+ )
115
+ )
116
+ end
117
+ attr_reader :prepaid_balance_threshold_configuration
118
+
119
+ sig do
120
+ params(
121
+ prepaid_balance_threshold_configuration:
122
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::OrHash
123
+ ).void
124
+ end
125
+ attr_writer :prepaid_balance_threshold_configuration
126
+
127
+ # This field's availability is dependent on your client's configuration.
128
+ sig { returns(T.nilable(T::Array[MetronomeSDK::ProService])) }
129
+ attr_reader :professional_services
130
+
131
+ sig do
132
+ params(
133
+ professional_services: T::Array[MetronomeSDK::ProService::OrHash]
134
+ ).void
135
+ end
136
+ attr_writer :professional_services
137
+
138
+ sig { returns(T.nilable(String)) }
139
+ attr_reader :rate_card_id
140
+
141
+ sig { params(rate_card_id: String).void }
142
+ attr_writer :rate_card_id
143
+
144
+ sig do
145
+ returns(
146
+ T.nilable(
147
+ T::Array[MetronomeSDK::ContractWithoutAmendments::RecurringCommit]
148
+ )
149
+ )
150
+ end
151
+ attr_reader :recurring_commits
152
+
153
+ sig do
154
+ params(
155
+ recurring_commits:
156
+ T::Array[
157
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::OrHash
158
+ ]
159
+ ).void
160
+ end
161
+ attr_writer :recurring_commits
162
+
163
+ sig do
164
+ returns(
165
+ T.nilable(
166
+ T::Array[MetronomeSDK::ContractWithoutAmendments::RecurringCredit]
167
+ )
168
+ )
169
+ end
170
+ attr_reader :recurring_credits
171
+
172
+ sig do
173
+ params(
174
+ recurring_credits:
175
+ T::Array[
176
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::OrHash
177
+ ]
178
+ ).void
179
+ end
180
+ attr_writer :recurring_credits
181
+
182
+ # This field's availability is dependent on your client's configuration.
183
+ sig do
184
+ returns(
185
+ T.nilable(
186
+ T::Array[MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty]
187
+ )
188
+ )
189
+ end
190
+ attr_reader :reseller_royalties
191
+
192
+ sig do
193
+ params(
194
+ reseller_royalties:
195
+ T::Array[
196
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::OrHash
197
+ ]
198
+ ).void
199
+ end
200
+ attr_writer :reseller_royalties
201
+
202
+ # This field's availability is dependent on your client's configuration.
203
+ sig { returns(T.nilable(String)) }
204
+ attr_reader :salesforce_opportunity_id
205
+
206
+ sig { params(salesforce_opportunity_id: String).void }
207
+ attr_writer :salesforce_opportunity_id
208
+
209
+ # Determines which scheduled and commit charges to consolidate onto the Contract's
210
+ # usage invoice. The charge's `timestamp` must match the usage invoice's
211
+ # `ending_before` date for consolidation to occur. This field cannot be modified
212
+ # after a Contract has been created. If this field is omitted, charges will appear
213
+ # on a separate invoice from usage charges.
214
+ sig do
215
+ returns(
216
+ T.nilable(
217
+ MetronomeSDK::ContractWithoutAmendments::ScheduledChargesOnUsageInvoices::TaggedSymbol
218
+ )
219
+ )
220
+ end
221
+ attr_reader :scheduled_charges_on_usage_invoices
222
+
223
+ sig do
224
+ params(
225
+ scheduled_charges_on_usage_invoices:
226
+ MetronomeSDK::ContractWithoutAmendments::ScheduledChargesOnUsageInvoices::OrSymbol
227
+ ).void
228
+ end
229
+ attr_writer :scheduled_charges_on_usage_invoices
230
+
231
+ sig do
232
+ returns(
233
+ T.nilable(
234
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration
235
+ )
236
+ )
237
+ end
238
+ attr_reader :spend_threshold_configuration
239
+
240
+ sig do
241
+ params(
242
+ spend_threshold_configuration:
243
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::OrHash
244
+ ).void
245
+ end
246
+ attr_writer :spend_threshold_configuration
247
+
248
+ # This field's availability is dependent on your client's configuration.
249
+ sig { returns(T.nilable(Float)) }
250
+ attr_reader :total_contract_value
251
+
252
+ sig { params(total_contract_value: Float).void }
253
+ attr_writer :total_contract_value
254
+
255
+ sig do
256
+ returns(T.nilable(MetronomeSDK::ContractWithoutAmendments::UsageFilter))
257
+ end
258
+ attr_reader :usage_filter
259
+
260
+ sig do
261
+ params(
262
+ usage_filter:
263
+ MetronomeSDK::ContractWithoutAmendments::UsageFilter::OrHash
264
+ ).void
265
+ end
266
+ attr_writer :usage_filter
267
+
268
+ sig do
269
+ params(
270
+ commits: T::Array[MetronomeSDK::Commit::OrHash],
271
+ created_at: Time,
272
+ created_by: String,
273
+ overrides: T::Array[MetronomeSDK::Override::OrHash],
274
+ scheduled_charges: T::Array[MetronomeSDK::ScheduledCharge::OrHash],
275
+ starting_at: Time,
276
+ transitions:
277
+ T::Array[
278
+ MetronomeSDK::ContractWithoutAmendments::Transition::OrHash
279
+ ],
280
+ usage_statement_schedule:
281
+ MetronomeSDK::ContractWithoutAmendments::UsageStatementSchedule::OrHash,
282
+ credits: T::Array[MetronomeSDK::Credit::OrHash],
283
+ discounts: T::Array[MetronomeSDK::Discount::OrHash],
284
+ ending_before: Time,
285
+ hierarchy_configuration:
286
+ T.any(
287
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ParentHierarchyConfiguration::OrHash,
288
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration::OrHash
289
+ ),
290
+ name: String,
291
+ net_payment_terms_days: Float,
292
+ netsuite_sales_order_id: String,
293
+ prepaid_balance_threshold_configuration:
294
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::OrHash,
295
+ professional_services: T::Array[MetronomeSDK::ProService::OrHash],
296
+ rate_card_id: String,
297
+ recurring_commits:
298
+ T::Array[
299
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::OrHash
300
+ ],
301
+ recurring_credits:
302
+ T::Array[
303
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::OrHash
304
+ ],
305
+ reseller_royalties:
306
+ T::Array[
307
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::OrHash
308
+ ],
309
+ salesforce_opportunity_id: String,
310
+ scheduled_charges_on_usage_invoices:
311
+ MetronomeSDK::ContractWithoutAmendments::ScheduledChargesOnUsageInvoices::OrSymbol,
312
+ spend_threshold_configuration:
313
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::OrHash,
314
+ total_contract_value: Float,
315
+ usage_filter:
316
+ MetronomeSDK::ContractWithoutAmendments::UsageFilter::OrHash
317
+ ).returns(T.attached_class)
318
+ end
319
+ def self.new(
320
+ commits:,
321
+ created_at:,
322
+ created_by:,
323
+ overrides:,
324
+ scheduled_charges:,
325
+ starting_at:,
326
+ transitions:,
327
+ usage_statement_schedule:,
328
+ credits: nil,
329
+ # This field's availability is dependent on your client's configuration.
330
+ discounts: nil,
331
+ ending_before: nil,
332
+ # Either a **parent** configuration with a list of children or a **child**
333
+ # configuration with a single parent.
334
+ hierarchy_configuration: nil,
335
+ name: nil,
336
+ net_payment_terms_days: nil,
337
+ # This field's availability is dependent on your client's configuration.
338
+ netsuite_sales_order_id: nil,
339
+ prepaid_balance_threshold_configuration: nil,
340
+ # This field's availability is dependent on your client's configuration.
341
+ professional_services: nil,
342
+ rate_card_id: nil,
343
+ recurring_commits: nil,
344
+ recurring_credits: nil,
345
+ # This field's availability is dependent on your client's configuration.
346
+ reseller_royalties: nil,
347
+ # This field's availability is dependent on your client's configuration.
348
+ salesforce_opportunity_id: nil,
349
+ # Determines which scheduled and commit charges to consolidate onto the Contract's
350
+ # usage invoice. The charge's `timestamp` must match the usage invoice's
351
+ # `ending_before` date for consolidation to occur. This field cannot be modified
352
+ # after a Contract has been created. If this field is omitted, charges will appear
353
+ # on a separate invoice from usage charges.
354
+ scheduled_charges_on_usage_invoices: nil,
355
+ spend_threshold_configuration: nil,
356
+ # This field's availability is dependent on your client's configuration.
357
+ total_contract_value: nil,
358
+ usage_filter: nil
359
+ )
360
+ end
361
+
362
+ sig do
363
+ override.returns(
364
+ {
365
+ commits: T::Array[MetronomeSDK::Commit],
366
+ created_at: Time,
367
+ created_by: String,
368
+ overrides: T::Array[MetronomeSDK::Override],
369
+ scheduled_charges: T::Array[MetronomeSDK::ScheduledCharge],
370
+ starting_at: Time,
371
+ transitions:
372
+ T::Array[MetronomeSDK::ContractWithoutAmendments::Transition],
373
+ usage_statement_schedule:
374
+ MetronomeSDK::ContractWithoutAmendments::UsageStatementSchedule,
375
+ credits: T::Array[MetronomeSDK::Credit],
376
+ discounts: T::Array[MetronomeSDK::Discount],
377
+ ending_before: Time,
378
+ hierarchy_configuration:
379
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::Variants,
380
+ name: String,
381
+ net_payment_terms_days: Float,
382
+ netsuite_sales_order_id: String,
383
+ prepaid_balance_threshold_configuration:
384
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration,
385
+ professional_services: T::Array[MetronomeSDK::ProService],
386
+ rate_card_id: String,
387
+ recurring_commits:
388
+ T::Array[
389
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit
390
+ ],
391
+ recurring_credits:
392
+ T::Array[
393
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit
394
+ ],
395
+ reseller_royalties:
396
+ T::Array[
397
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty
398
+ ],
399
+ salesforce_opportunity_id: String,
400
+ scheduled_charges_on_usage_invoices:
401
+ MetronomeSDK::ContractWithoutAmendments::ScheduledChargesOnUsageInvoices::TaggedSymbol,
402
+ spend_threshold_configuration:
403
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration,
404
+ total_contract_value: Float,
405
+ usage_filter: MetronomeSDK::ContractWithoutAmendments::UsageFilter
406
+ }
407
+ )
408
+ end
409
+ def to_hash
410
+ end
411
+
412
+ class Transition < MetronomeSDK::Internal::Type::BaseModel
413
+ OrHash =
414
+ T.type_alias do
415
+ T.any(
416
+ MetronomeSDK::ContractWithoutAmendments::Transition,
417
+ MetronomeSDK::Internal::AnyHash
418
+ )
419
+ end
420
+
421
+ sig { returns(String) }
422
+ attr_accessor :from_contract_id
423
+
424
+ sig { returns(String) }
425
+ attr_accessor :to_contract_id
426
+
427
+ sig do
428
+ returns(
429
+ MetronomeSDK::ContractWithoutAmendments::Transition::Type::TaggedSymbol
430
+ )
431
+ end
432
+ attr_accessor :type
433
+
434
+ sig do
435
+ params(
436
+ from_contract_id: String,
437
+ to_contract_id: String,
438
+ type:
439
+ MetronomeSDK::ContractWithoutAmendments::Transition::Type::OrSymbol
440
+ ).returns(T.attached_class)
441
+ end
442
+ def self.new(from_contract_id:, to_contract_id:, type:)
443
+ end
444
+
445
+ sig do
446
+ override.returns(
447
+ {
448
+ from_contract_id: String,
449
+ to_contract_id: String,
450
+ type:
451
+ MetronomeSDK::ContractWithoutAmendments::Transition::Type::TaggedSymbol
452
+ }
453
+ )
454
+ end
455
+ def to_hash
456
+ end
457
+
458
+ module Type
459
+ extend MetronomeSDK::Internal::Type::Enum
460
+
461
+ TaggedSymbol =
462
+ T.type_alias do
463
+ T.all(
464
+ Symbol,
465
+ MetronomeSDK::ContractWithoutAmendments::Transition::Type
466
+ )
467
+ end
468
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
469
+
470
+ SUPERSEDE =
471
+ T.let(
472
+ :SUPERSEDE,
473
+ MetronomeSDK::ContractWithoutAmendments::Transition::Type::TaggedSymbol
474
+ )
475
+ RENEWAL =
476
+ T.let(
477
+ :RENEWAL,
478
+ MetronomeSDK::ContractWithoutAmendments::Transition::Type::TaggedSymbol
479
+ )
480
+
481
+ sig do
482
+ override.returns(
483
+ T::Array[
484
+ MetronomeSDK::ContractWithoutAmendments::Transition::Type::TaggedSymbol
485
+ ]
486
+ )
487
+ end
488
+ def self.values
489
+ end
490
+ end
491
+ end
492
+
493
+ class UsageStatementSchedule < MetronomeSDK::Internal::Type::BaseModel
494
+ OrHash =
495
+ T.type_alias do
496
+ T.any(
497
+ MetronomeSDK::ContractWithoutAmendments::UsageStatementSchedule,
498
+ MetronomeSDK::Internal::AnyHash
499
+ )
500
+ end
501
+
502
+ # Contract usage statements follow a selected cadence based on this date.
503
+ sig { returns(Time) }
504
+ attr_accessor :billing_anchor_date
505
+
506
+ sig do
507
+ returns(
508
+ MetronomeSDK::ContractWithoutAmendments::UsageStatementSchedule::Frequency::TaggedSymbol
509
+ )
510
+ end
511
+ attr_accessor :frequency
512
+
513
+ sig do
514
+ params(
515
+ billing_anchor_date: Time,
516
+ frequency:
517
+ MetronomeSDK::ContractWithoutAmendments::UsageStatementSchedule::Frequency::OrSymbol
518
+ ).returns(T.attached_class)
519
+ end
520
+ def self.new(
521
+ # Contract usage statements follow a selected cadence based on this date.
522
+ billing_anchor_date:,
523
+ frequency:
524
+ )
525
+ end
526
+
527
+ sig do
528
+ override.returns(
529
+ {
530
+ billing_anchor_date: Time,
531
+ frequency:
532
+ MetronomeSDK::ContractWithoutAmendments::UsageStatementSchedule::Frequency::TaggedSymbol
533
+ }
534
+ )
535
+ end
536
+ def to_hash
537
+ end
538
+
539
+ module Frequency
540
+ extend MetronomeSDK::Internal::Type::Enum
541
+
542
+ TaggedSymbol =
543
+ T.type_alias do
544
+ T.all(
545
+ Symbol,
546
+ MetronomeSDK::ContractWithoutAmendments::UsageStatementSchedule::Frequency
547
+ )
548
+ end
549
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
550
+
551
+ MONTHLY =
552
+ T.let(
553
+ :MONTHLY,
554
+ MetronomeSDK::ContractWithoutAmendments::UsageStatementSchedule::Frequency::TaggedSymbol
555
+ )
556
+ QUARTERLY =
557
+ T.let(
558
+ :QUARTERLY,
559
+ MetronomeSDK::ContractWithoutAmendments::UsageStatementSchedule::Frequency::TaggedSymbol
560
+ )
561
+ ANNUAL =
562
+ T.let(
563
+ :ANNUAL,
564
+ MetronomeSDK::ContractWithoutAmendments::UsageStatementSchedule::Frequency::TaggedSymbol
565
+ )
566
+ WEEKLY =
567
+ T.let(
568
+ :WEEKLY,
569
+ MetronomeSDK::ContractWithoutAmendments::UsageStatementSchedule::Frequency::TaggedSymbol
570
+ )
571
+
572
+ sig do
573
+ override.returns(
574
+ T::Array[
575
+ MetronomeSDK::ContractWithoutAmendments::UsageStatementSchedule::Frequency::TaggedSymbol
576
+ ]
577
+ )
578
+ end
579
+ def self.values
580
+ end
581
+ end
582
+ end
583
+
584
+ # Either a **parent** configuration with a list of children or a **child**
585
+ # configuration with a single parent.
586
+ module HierarchyConfiguration
587
+ extend MetronomeSDK::Internal::Type::Union
588
+
589
+ Variants =
590
+ T.type_alias do
591
+ T.any(
592
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ParentHierarchyConfiguration,
593
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration
594
+ )
595
+ end
596
+
597
+ class ParentHierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
598
+ OrHash =
599
+ T.type_alias do
600
+ T.any(
601
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ParentHierarchyConfiguration,
602
+ MetronomeSDK::Internal::AnyHash
603
+ )
604
+ end
605
+
606
+ # List of contracts that belong to this parent.
607
+ sig do
608
+ returns(
609
+ T::Array[
610
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ParentHierarchyConfiguration::Child
611
+ ]
612
+ )
613
+ end
614
+ attr_accessor :children
615
+
616
+ sig do
617
+ params(
618
+ children:
619
+ T::Array[
620
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ParentHierarchyConfiguration::Child::OrHash
621
+ ]
622
+ ).returns(T.attached_class)
623
+ end
624
+ def self.new(
625
+ # List of contracts that belong to this parent.
626
+ children:
627
+ )
628
+ end
629
+
630
+ sig do
631
+ override.returns(
632
+ {
633
+ children:
634
+ T::Array[
635
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ParentHierarchyConfiguration::Child
636
+ ]
637
+ }
638
+ )
639
+ end
640
+ def to_hash
641
+ end
642
+
643
+ class Child < MetronomeSDK::Internal::Type::BaseModel
644
+ OrHash =
645
+ T.type_alias do
646
+ T.any(
647
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ParentHierarchyConfiguration::Child,
648
+ MetronomeSDK::Internal::AnyHash
649
+ )
650
+ end
651
+
652
+ sig { returns(String) }
653
+ attr_accessor :contract_id
654
+
655
+ sig { returns(String) }
656
+ attr_accessor :customer_id
657
+
658
+ sig do
659
+ params(contract_id: String, customer_id: String).returns(
660
+ T.attached_class
661
+ )
662
+ end
663
+ def self.new(contract_id:, customer_id:)
664
+ end
665
+
666
+ sig do
667
+ override.returns({ contract_id: String, customer_id: String })
668
+ end
669
+ def to_hash
670
+ end
671
+ end
672
+ end
673
+
674
+ class ChildHierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
675
+ OrHash =
676
+ T.type_alias do
677
+ T.any(
678
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration,
679
+ MetronomeSDK::Internal::AnyHash
680
+ )
681
+ end
682
+
683
+ # The single parent contract/customer for this child.
684
+ sig do
685
+ returns(
686
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration::Parent
687
+ )
688
+ end
689
+ attr_reader :parent
690
+
691
+ sig do
692
+ params(
693
+ parent:
694
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration::Parent::OrHash
695
+ ).void
696
+ end
697
+ attr_writer :parent
698
+
699
+ sig do
700
+ params(
701
+ parent:
702
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration::Parent::OrHash
703
+ ).returns(T.attached_class)
704
+ end
705
+ def self.new(
706
+ # The single parent contract/customer for this child.
707
+ parent:
708
+ )
709
+ end
710
+
711
+ sig do
712
+ override.returns(
713
+ {
714
+ parent:
715
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration::Parent
716
+ }
717
+ )
718
+ end
719
+ def to_hash
720
+ end
721
+
722
+ class Parent < MetronomeSDK::Internal::Type::BaseModel
723
+ OrHash =
724
+ T.type_alias do
725
+ T.any(
726
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration::Parent,
727
+ MetronomeSDK::Internal::AnyHash
728
+ )
729
+ end
730
+
731
+ sig { returns(String) }
732
+ attr_accessor :contract_id
733
+
734
+ sig { returns(String) }
735
+ attr_accessor :customer_id
736
+
737
+ # The single parent contract/customer for this child.
738
+ sig do
739
+ params(contract_id: String, customer_id: String).returns(
740
+ T.attached_class
741
+ )
742
+ end
743
+ def self.new(contract_id:, customer_id:)
744
+ end
745
+
746
+ sig do
747
+ override.returns({ contract_id: String, customer_id: String })
748
+ end
749
+ def to_hash
750
+ end
751
+ end
752
+ end
753
+
754
+ sig do
755
+ override.returns(
756
+ T::Array[
757
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::Variants
758
+ ]
759
+ )
760
+ end
761
+ def self.variants
762
+ end
763
+ end
764
+
765
+ class PrepaidBalanceThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
766
+ OrHash =
767
+ T.type_alias do
768
+ T.any(
769
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration,
770
+ MetronomeSDK::Internal::AnyHash
771
+ )
772
+ end
773
+
774
+ sig do
775
+ returns(
776
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit
777
+ )
778
+ end
779
+ attr_reader :commit
780
+
781
+ sig do
782
+ params(
783
+ commit:
784
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit::OrHash
785
+ ).void
786
+ end
787
+ attr_writer :commit
788
+
789
+ # When set to false, the contract will not be evaluated against the
790
+ # threshold_amount. Toggling to true will result an immediate evaluation,
791
+ # regardless of prior state.
792
+ sig { returns(T::Boolean) }
793
+ attr_accessor :is_enabled
794
+
795
+ sig do
796
+ returns(
797
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig
798
+ )
799
+ end
800
+ attr_reader :payment_gate_config
801
+
802
+ sig do
803
+ params(
804
+ payment_gate_config:
805
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::OrHash
806
+ ).void
807
+ end
808
+ attr_writer :payment_gate_config
809
+
810
+ # Specify the amount the balance should be recharged to.
811
+ sig { returns(Float) }
812
+ attr_accessor :recharge_to_amount
813
+
814
+ # Specify the threshold amount for the contract. Each time the contract's prepaid
815
+ # balance lowers to this amount, a threshold charge will be initiated.
816
+ sig { returns(Float) }
817
+ attr_accessor :threshold_amount
818
+
819
+ # If provided, the threshold, recharge-to amount, and the resulting threshold
820
+ # commit amount will be in terms of this credit type instead of the fiat currency.
821
+ sig { returns(T.nilable(String)) }
822
+ attr_reader :custom_credit_type_id
823
+
824
+ sig { params(custom_credit_type_id: String).void }
825
+ attr_writer :custom_credit_type_id
826
+
827
+ sig do
828
+ params(
829
+ commit:
830
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit::OrHash,
831
+ is_enabled: T::Boolean,
832
+ payment_gate_config:
833
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::OrHash,
834
+ recharge_to_amount: Float,
835
+ threshold_amount: Float,
836
+ custom_credit_type_id: String
837
+ ).returns(T.attached_class)
838
+ end
839
+ def self.new(
840
+ commit:,
841
+ # When set to false, the contract will not be evaluated against the
842
+ # threshold_amount. Toggling to true will result an immediate evaluation,
843
+ # regardless of prior state.
844
+ is_enabled:,
845
+ payment_gate_config:,
846
+ # Specify the amount the balance should be recharged to.
847
+ recharge_to_amount:,
848
+ # Specify the threshold amount for the contract. Each time the contract's prepaid
849
+ # balance lowers to this amount, a threshold charge will be initiated.
850
+ threshold_amount:,
851
+ # If provided, the threshold, recharge-to amount, and the resulting threshold
852
+ # commit amount will be in terms of this credit type instead of the fiat currency.
853
+ custom_credit_type_id: nil
854
+ )
855
+ end
856
+
857
+ sig do
858
+ override.returns(
859
+ {
860
+ commit:
861
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit,
862
+ is_enabled: T::Boolean,
863
+ payment_gate_config:
864
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig,
865
+ recharge_to_amount: Float,
866
+ threshold_amount: Float,
867
+ custom_credit_type_id: String
868
+ }
869
+ )
870
+ end
871
+ def to_hash
872
+ end
873
+
874
+ class Commit < MetronomeSDK::Internal::Type::BaseModel
875
+ OrHash =
876
+ T.type_alias do
877
+ T.any(
878
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit,
879
+ MetronomeSDK::Internal::AnyHash
880
+ )
881
+ end
882
+
883
+ # The commit product that will be used to generate the line item for commit
884
+ # payment.
885
+ sig { returns(String) }
886
+ attr_accessor :product_id
887
+
888
+ # Which products the threshold commit applies to. If applicable_product_ids,
889
+ # applicable_product_tags or specifiers are not provided, the commit applies to
890
+ # all products.
891
+ sig { returns(T.nilable(T::Array[String])) }
892
+ attr_reader :applicable_product_ids
893
+
894
+ sig { params(applicable_product_ids: T::Array[String]).void }
895
+ attr_writer :applicable_product_ids
896
+
897
+ # Which tags the threshold commit applies to. If applicable_product_ids,
898
+ # applicable_product_tags or specifiers are not provided, the commit applies to
899
+ # all products.
900
+ sig { returns(T.nilable(T::Array[String])) }
901
+ attr_reader :applicable_product_tags
902
+
903
+ sig { params(applicable_product_tags: T::Array[String]).void }
904
+ attr_writer :applicable_product_tags
905
+
906
+ sig { returns(T.nilable(String)) }
907
+ attr_reader :description
908
+
909
+ sig { params(description: String).void }
910
+ attr_writer :description
911
+
912
+ # Specify the name of the line item for the threshold charge. If left blank, it
913
+ # will default to the commit product name.
914
+ sig { returns(T.nilable(String)) }
915
+ attr_reader :name
916
+
917
+ sig { params(name: String).void }
918
+ attr_writer :name
919
+
920
+ # List of filters that determine what kind of customer usage draws down a commit
921
+ # or credit. A customer's usage needs to meet the condition of at least one of the
922
+ # specifiers to contribute to a commit's or credit's drawdown. This field cannot
923
+ # be used together with `applicable_product_ids` or `applicable_product_tags`.
924
+ sig do
925
+ returns(
926
+ T.nilable(
927
+ T::Array[
928
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit::Specifier
929
+ ]
930
+ )
931
+ )
932
+ end
933
+ attr_reader :specifiers
934
+
935
+ sig do
936
+ params(
937
+ specifiers:
938
+ T::Array[
939
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit::Specifier::OrHash
940
+ ]
941
+ ).void
942
+ end
943
+ attr_writer :specifiers
944
+
945
+ sig do
946
+ params(
947
+ product_id: String,
948
+ applicable_product_ids: T::Array[String],
949
+ applicable_product_tags: T::Array[String],
950
+ description: String,
951
+ name: String,
952
+ specifiers:
953
+ T::Array[
954
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit::Specifier::OrHash
955
+ ]
956
+ ).returns(T.attached_class)
957
+ end
958
+ def self.new(
959
+ # The commit product that will be used to generate the line item for commit
960
+ # payment.
961
+ product_id:,
962
+ # Which products the threshold commit applies to. If applicable_product_ids,
963
+ # applicable_product_tags or specifiers are not provided, the commit applies to
964
+ # all products.
965
+ applicable_product_ids: nil,
966
+ # Which tags the threshold commit applies to. If applicable_product_ids,
967
+ # applicable_product_tags or specifiers are not provided, the commit applies to
968
+ # all products.
969
+ applicable_product_tags: nil,
970
+ description: nil,
971
+ # Specify the name of the line item for the threshold charge. If left blank, it
972
+ # will default to the commit product name.
973
+ name: nil,
974
+ # List of filters that determine what kind of customer usage draws down a commit
975
+ # or credit. A customer's usage needs to meet the condition of at least one of the
976
+ # specifiers to contribute to a commit's or credit's drawdown. This field cannot
977
+ # be used together with `applicable_product_ids` or `applicable_product_tags`.
978
+ specifiers: nil
979
+ )
980
+ end
981
+
982
+ sig do
983
+ override.returns(
984
+ {
985
+ product_id: String,
986
+ applicable_product_ids: T::Array[String],
987
+ applicable_product_tags: T::Array[String],
988
+ description: String,
989
+ name: String,
990
+ specifiers:
991
+ T::Array[
992
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit::Specifier
993
+ ]
994
+ }
995
+ )
996
+ end
997
+ def to_hash
998
+ end
999
+
1000
+ class Specifier < MetronomeSDK::Internal::Type::BaseModel
1001
+ OrHash =
1002
+ T.type_alias do
1003
+ T.any(
1004
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit::Specifier,
1005
+ MetronomeSDK::Internal::AnyHash
1006
+ )
1007
+ end
1008
+
1009
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
1010
+ attr_reader :presentation_group_values
1011
+
1012
+ sig do
1013
+ params(presentation_group_values: T::Hash[Symbol, String]).void
1014
+ end
1015
+ attr_writer :presentation_group_values
1016
+
1017
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
1018
+ attr_reader :pricing_group_values
1019
+
1020
+ sig { params(pricing_group_values: T::Hash[Symbol, String]).void }
1021
+ attr_writer :pricing_group_values
1022
+
1023
+ # If provided, the specifier will only apply to the product with the specified ID.
1024
+ sig { returns(T.nilable(String)) }
1025
+ attr_reader :product_id
1026
+
1027
+ sig { params(product_id: String).void }
1028
+ attr_writer :product_id
1029
+
1030
+ # If provided, the specifier will only apply to products with all the specified
1031
+ # tags.
1032
+ sig { returns(T.nilable(T::Array[String])) }
1033
+ attr_reader :product_tags
1034
+
1035
+ sig { params(product_tags: T::Array[String]).void }
1036
+ attr_writer :product_tags
1037
+
1038
+ sig do
1039
+ params(
1040
+ presentation_group_values: T::Hash[Symbol, String],
1041
+ pricing_group_values: T::Hash[Symbol, String],
1042
+ product_id: String,
1043
+ product_tags: T::Array[String]
1044
+ ).returns(T.attached_class)
1045
+ end
1046
+ def self.new(
1047
+ presentation_group_values: nil,
1048
+ pricing_group_values: nil,
1049
+ # If provided, the specifier will only apply to the product with the specified ID.
1050
+ product_id: nil,
1051
+ # If provided, the specifier will only apply to products with all the specified
1052
+ # tags.
1053
+ product_tags: nil
1054
+ )
1055
+ end
1056
+
1057
+ sig do
1058
+ override.returns(
1059
+ {
1060
+ presentation_group_values: T::Hash[Symbol, String],
1061
+ pricing_group_values: T::Hash[Symbol, String],
1062
+ product_id: String,
1063
+ product_tags: T::Array[String]
1064
+ }
1065
+ )
1066
+ end
1067
+ def to_hash
1068
+ end
1069
+ end
1070
+ end
1071
+
1072
+ class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
1073
+ OrHash =
1074
+ T.type_alias do
1075
+ T.any(
1076
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig,
1077
+ MetronomeSDK::Internal::AnyHash
1078
+ )
1079
+ end
1080
+
1081
+ # Gate access to the commit balance based on successful collection of payment.
1082
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
1083
+ # facilitate payment using your own payment integration. Select NONE if you do not
1084
+ # wish to payment gate the commit balance.
1085
+ sig do
1086
+ returns(
1087
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol
1088
+ )
1089
+ end
1090
+ attr_accessor :payment_gate_type
1091
+
1092
+ # Only applicable if using PRECALCULATED as your tax type.
1093
+ sig do
1094
+ returns(
1095
+ T.nilable(
1096
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig
1097
+ )
1098
+ )
1099
+ end
1100
+ attr_reader :precalculated_tax_config
1101
+
1102
+ sig do
1103
+ params(
1104
+ precalculated_tax_config:
1105
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig::OrHash
1106
+ ).void
1107
+ end
1108
+ attr_writer :precalculated_tax_config
1109
+
1110
+ # Only applicable if using STRIPE as your payment gate type.
1111
+ sig do
1112
+ returns(
1113
+ T.nilable(
1114
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig
1115
+ )
1116
+ )
1117
+ end
1118
+ attr_reader :stripe_config
1119
+
1120
+ sig do
1121
+ params(
1122
+ stripe_config:
1123
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::OrHash
1124
+ ).void
1125
+ end
1126
+ attr_writer :stripe_config
1127
+
1128
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
1129
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
1130
+ # will default to NONE.
1131
+ sig do
1132
+ returns(
1133
+ T.nilable(
1134
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
1135
+ )
1136
+ )
1137
+ end
1138
+ attr_reader :tax_type
1139
+
1140
+ sig do
1141
+ params(
1142
+ tax_type:
1143
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType::OrSymbol
1144
+ ).void
1145
+ end
1146
+ attr_writer :tax_type
1147
+
1148
+ sig do
1149
+ params(
1150
+ payment_gate_type:
1151
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType::OrSymbol,
1152
+ precalculated_tax_config:
1153
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig::OrHash,
1154
+ stripe_config:
1155
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::OrHash,
1156
+ tax_type:
1157
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType::OrSymbol
1158
+ ).returns(T.attached_class)
1159
+ end
1160
+ def self.new(
1161
+ # Gate access to the commit balance based on successful collection of payment.
1162
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
1163
+ # facilitate payment using your own payment integration. Select NONE if you do not
1164
+ # wish to payment gate the commit balance.
1165
+ payment_gate_type:,
1166
+ # Only applicable if using PRECALCULATED as your tax type.
1167
+ precalculated_tax_config: nil,
1168
+ # Only applicable if using STRIPE as your payment gate type.
1169
+ stripe_config: nil,
1170
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
1171
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
1172
+ # will default to NONE.
1173
+ tax_type: nil
1174
+ )
1175
+ end
1176
+
1177
+ sig do
1178
+ override.returns(
1179
+ {
1180
+ payment_gate_type:
1181
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol,
1182
+ precalculated_tax_config:
1183
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig,
1184
+ stripe_config:
1185
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig,
1186
+ tax_type:
1187
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
1188
+ }
1189
+ )
1190
+ end
1191
+ def to_hash
1192
+ end
1193
+
1194
+ # Gate access to the commit balance based on successful collection of payment.
1195
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
1196
+ # facilitate payment using your own payment integration. Select NONE if you do not
1197
+ # wish to payment gate the commit balance.
1198
+ module PaymentGateType
1199
+ extend MetronomeSDK::Internal::Type::Enum
1200
+
1201
+ TaggedSymbol =
1202
+ T.type_alias do
1203
+ T.all(
1204
+ Symbol,
1205
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType
1206
+ )
1207
+ end
1208
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1209
+
1210
+ NONE =
1211
+ T.let(
1212
+ :NONE,
1213
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol
1214
+ )
1215
+ STRIPE =
1216
+ T.let(
1217
+ :STRIPE,
1218
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol
1219
+ )
1220
+ EXTERNAL =
1221
+ T.let(
1222
+ :EXTERNAL,
1223
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol
1224
+ )
1225
+
1226
+ sig do
1227
+ override.returns(
1228
+ T::Array[
1229
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol
1230
+ ]
1231
+ )
1232
+ end
1233
+ def self.values
1234
+ end
1235
+ end
1236
+
1237
+ class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
1238
+ OrHash =
1239
+ T.type_alias do
1240
+ T.any(
1241
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig,
1242
+ MetronomeSDK::Internal::AnyHash
1243
+ )
1244
+ end
1245
+
1246
+ # Amount of tax to be applied. This should be in the same currency and
1247
+ # denomination as the commit's invoice schedule
1248
+ sig { returns(Float) }
1249
+ attr_accessor :tax_amount
1250
+
1251
+ # Name of the tax to be applied. This may be used in an invoice line item
1252
+ # description.
1253
+ sig { returns(T.nilable(String)) }
1254
+ attr_reader :tax_name
1255
+
1256
+ sig { params(tax_name: String).void }
1257
+ attr_writer :tax_name
1258
+
1259
+ # Only applicable if using PRECALCULATED as your tax type.
1260
+ sig do
1261
+ params(tax_amount: Float, tax_name: String).returns(
1262
+ T.attached_class
1263
+ )
1264
+ end
1265
+ def self.new(
1266
+ # Amount of tax to be applied. This should be in the same currency and
1267
+ # denomination as the commit's invoice schedule
1268
+ tax_amount:,
1269
+ # Name of the tax to be applied. This may be used in an invoice line item
1270
+ # description.
1271
+ tax_name: nil
1272
+ )
1273
+ end
1274
+
1275
+ sig { override.returns({ tax_amount: Float, tax_name: String }) }
1276
+ def to_hash
1277
+ end
1278
+ end
1279
+
1280
+ class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
1281
+ OrHash =
1282
+ T.type_alias do
1283
+ T.any(
1284
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig,
1285
+ MetronomeSDK::Internal::AnyHash
1286
+ )
1287
+ end
1288
+
1289
+ # If left blank, will default to INVOICE
1290
+ sig do
1291
+ returns(
1292
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol
1293
+ )
1294
+ end
1295
+ attr_accessor :payment_type
1296
+
1297
+ # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
1298
+ # your payment type.
1299
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
1300
+ attr_reader :invoice_metadata
1301
+
1302
+ sig { params(invoice_metadata: T::Hash[Symbol, String]).void }
1303
+ attr_writer :invoice_metadata
1304
+
1305
+ # Only applicable if using STRIPE as your payment gate type.
1306
+ sig do
1307
+ params(
1308
+ payment_type:
1309
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
1310
+ invoice_metadata: T::Hash[Symbol, String]
1311
+ ).returns(T.attached_class)
1312
+ end
1313
+ def self.new(
1314
+ # If left blank, will default to INVOICE
1315
+ payment_type:,
1316
+ # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
1317
+ # your payment type.
1318
+ invoice_metadata: nil
1319
+ )
1320
+ end
1321
+
1322
+ sig do
1323
+ override.returns(
1324
+ {
1325
+ payment_type:
1326
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol,
1327
+ invoice_metadata: T::Hash[Symbol, String]
1328
+ }
1329
+ )
1330
+ end
1331
+ def to_hash
1332
+ end
1333
+
1334
+ # If left blank, will default to INVOICE
1335
+ module PaymentType
1336
+ extend MetronomeSDK::Internal::Type::Enum
1337
+
1338
+ TaggedSymbol =
1339
+ T.type_alias do
1340
+ T.all(
1341
+ Symbol,
1342
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType
1343
+ )
1344
+ end
1345
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1346
+
1347
+ INVOICE =
1348
+ T.let(
1349
+ :INVOICE,
1350
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol
1351
+ )
1352
+ PAYMENT_INTENT =
1353
+ T.let(
1354
+ :PAYMENT_INTENT,
1355
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol
1356
+ )
1357
+
1358
+ sig do
1359
+ override.returns(
1360
+ T::Array[
1361
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol
1362
+ ]
1363
+ )
1364
+ end
1365
+ def self.values
1366
+ end
1367
+ end
1368
+ end
1369
+
1370
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
1371
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
1372
+ # will default to NONE.
1373
+ module TaxType
1374
+ extend MetronomeSDK::Internal::Type::Enum
1375
+
1376
+ TaggedSymbol =
1377
+ T.type_alias do
1378
+ T.all(
1379
+ Symbol,
1380
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType
1381
+ )
1382
+ end
1383
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1384
+
1385
+ NONE =
1386
+ T.let(
1387
+ :NONE,
1388
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
1389
+ )
1390
+ STRIPE =
1391
+ T.let(
1392
+ :STRIPE,
1393
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
1394
+ )
1395
+ ANROK =
1396
+ T.let(
1397
+ :ANROK,
1398
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
1399
+ )
1400
+ PRECALCULATED =
1401
+ T.let(
1402
+ :PRECALCULATED,
1403
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
1404
+ )
1405
+
1406
+ sig do
1407
+ override.returns(
1408
+ T::Array[
1409
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
1410
+ ]
1411
+ )
1412
+ end
1413
+ def self.values
1414
+ end
1415
+ end
1416
+ end
1417
+ end
1418
+
1419
+ class RecurringCommit < MetronomeSDK::Internal::Type::BaseModel
1420
+ OrHash =
1421
+ T.type_alias do
1422
+ T.any(
1423
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit,
1424
+ MetronomeSDK::Internal::AnyHash
1425
+ )
1426
+ end
1427
+
1428
+ sig { returns(String) }
1429
+ attr_accessor :id
1430
+
1431
+ # The amount of commit to grant.
1432
+ sig do
1433
+ returns(
1434
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::AccessAmount
1435
+ )
1436
+ end
1437
+ attr_reader :access_amount
1438
+
1439
+ sig do
1440
+ params(
1441
+ access_amount:
1442
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::AccessAmount::OrHash
1443
+ ).void
1444
+ end
1445
+ attr_writer :access_amount
1446
+
1447
+ # The amount of time the created commits will be valid for
1448
+ sig do
1449
+ returns(
1450
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration
1451
+ )
1452
+ end
1453
+ attr_reader :commit_duration
1454
+
1455
+ sig do
1456
+ params(
1457
+ commit_duration:
1458
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::OrHash
1459
+ ).void
1460
+ end
1461
+ attr_writer :commit_duration
1462
+
1463
+ # Will be passed down to the individual commits
1464
+ sig { returns(Float) }
1465
+ attr_accessor :priority
1466
+
1467
+ sig do
1468
+ returns(
1469
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Product
1470
+ )
1471
+ end
1472
+ attr_reader :product
1473
+
1474
+ sig do
1475
+ params(
1476
+ product:
1477
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Product::OrHash
1478
+ ).void
1479
+ end
1480
+ attr_writer :product
1481
+
1482
+ # Whether the created commits will use the commit rate or list rate
1483
+ sig do
1484
+ returns(
1485
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RateType::TaggedSymbol
1486
+ )
1487
+ end
1488
+ attr_accessor :rate_type
1489
+
1490
+ # Determines the start time for the first commit
1491
+ sig { returns(Time) }
1492
+ attr_accessor :starting_at
1493
+
1494
+ # Will be passed down to the individual commits
1495
+ sig { returns(T.nilable(T::Array[String])) }
1496
+ attr_reader :applicable_product_ids
1497
+
1498
+ sig { params(applicable_product_ids: T::Array[String]).void }
1499
+ attr_writer :applicable_product_ids
1500
+
1501
+ # Will be passed down to the individual commits
1502
+ sig { returns(T.nilable(T::Array[String])) }
1503
+ attr_reader :applicable_product_tags
1504
+
1505
+ sig { params(applicable_product_tags: T::Array[String]).void }
1506
+ attr_writer :applicable_product_tags
1507
+
1508
+ sig do
1509
+ returns(
1510
+ T.nilable(
1511
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Contract
1512
+ )
1513
+ )
1514
+ end
1515
+ attr_reader :contract
1516
+
1517
+ sig do
1518
+ params(
1519
+ contract:
1520
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Contract::OrHash
1521
+ ).void
1522
+ end
1523
+ attr_writer :contract
1524
+
1525
+ # Will be passed down to the individual commits
1526
+ sig { returns(T.nilable(String)) }
1527
+ attr_reader :description
1528
+
1529
+ sig { params(description: String).void }
1530
+ attr_writer :description
1531
+
1532
+ # Determines when the contract will stop creating recurring commits. Optional
1533
+ sig { returns(T.nilable(Time)) }
1534
+ attr_reader :ending_before
1535
+
1536
+ sig { params(ending_before: Time).void }
1537
+ attr_writer :ending_before
1538
+
1539
+ # The amount the customer should be billed for the commit. Not required.
1540
+ sig do
1541
+ returns(
1542
+ T.nilable(
1543
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::InvoiceAmount
1544
+ )
1545
+ )
1546
+ end
1547
+ attr_reader :invoice_amount
1548
+
1549
+ sig do
1550
+ params(
1551
+ invoice_amount:
1552
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::InvoiceAmount::OrHash
1553
+ ).void
1554
+ end
1555
+ attr_writer :invoice_amount
1556
+
1557
+ # Displayed on invoices. Will be passed through to the individual commits
1558
+ sig { returns(T.nilable(String)) }
1559
+ attr_reader :name
1560
+
1561
+ sig { params(name: String).void }
1562
+ attr_writer :name
1563
+
1564
+ # Will be passed down to the individual commits
1565
+ sig { returns(T.nilable(String)) }
1566
+ attr_reader :netsuite_sales_order_id
1567
+
1568
+ sig { params(netsuite_sales_order_id: String).void }
1569
+ attr_writer :netsuite_sales_order_id
1570
+
1571
+ # Determines whether the first and last commit will be prorated. If not provided,
1572
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1573
+ sig do
1574
+ returns(
1575
+ T.nilable(
1576
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::TaggedSymbol
1577
+ )
1578
+ )
1579
+ end
1580
+ attr_reader :proration
1581
+
1582
+ sig do
1583
+ params(
1584
+ proration:
1585
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::OrSymbol
1586
+ ).void
1587
+ end
1588
+ attr_writer :proration
1589
+
1590
+ # The frequency at which the recurring commits will be created. If not provided: -
1591
+ # The commits will be created on the usage invoice frequency. If provided: - The
1592
+ # period defined in the duration will correspond to this frequency. - Commits will
1593
+ # be created aligned with the recurring commit's starting_at rather than the usage
1594
+ # invoice dates.
1595
+ sig do
1596
+ returns(
1597
+ T.nilable(
1598
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol
1599
+ )
1600
+ )
1601
+ end
1602
+ attr_reader :recurrence_frequency
1603
+
1604
+ sig do
1605
+ params(
1606
+ recurrence_frequency:
1607
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::OrSymbol
1608
+ ).void
1609
+ end
1610
+ attr_writer :recurrence_frequency
1611
+
1612
+ # Will be passed down to the individual commits. This controls how much of an
1613
+ # individual unexpired commit will roll over upon contract transition. Must be
1614
+ # between 0 and 1.
1615
+ sig { returns(T.nilable(Float)) }
1616
+ attr_reader :rollover_fraction
1617
+
1618
+ sig { params(rollover_fraction: Float).void }
1619
+ attr_writer :rollover_fraction
1620
+
1621
+ # List of filters that determine what kind of customer usage draws down a commit
1622
+ # or credit. A customer's usage needs to meet the condition of at least one of the
1623
+ # specifiers to contribute to a commit's or credit's drawdown.
1624
+ sig do
1625
+ returns(
1626
+ T.nilable(
1627
+ T::Array[
1628
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Specifier
1629
+ ]
1630
+ )
1631
+ )
1632
+ end
1633
+ attr_reader :specifiers
1634
+
1635
+ sig do
1636
+ params(
1637
+ specifiers:
1638
+ T::Array[
1639
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Specifier::OrHash
1640
+ ]
1641
+ ).void
1642
+ end
1643
+ attr_writer :specifiers
1644
+
1645
+ sig do
1646
+ params(
1647
+ id: String,
1648
+ access_amount:
1649
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::AccessAmount::OrHash,
1650
+ commit_duration:
1651
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::OrHash,
1652
+ priority: Float,
1653
+ product:
1654
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Product::OrHash,
1655
+ rate_type:
1656
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RateType::OrSymbol,
1657
+ starting_at: Time,
1658
+ applicable_product_ids: T::Array[String],
1659
+ applicable_product_tags: T::Array[String],
1660
+ contract:
1661
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Contract::OrHash,
1662
+ description: String,
1663
+ ending_before: Time,
1664
+ invoice_amount:
1665
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::InvoiceAmount::OrHash,
1666
+ name: String,
1667
+ netsuite_sales_order_id: String,
1668
+ proration:
1669
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::OrSymbol,
1670
+ recurrence_frequency:
1671
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::OrSymbol,
1672
+ rollover_fraction: Float,
1673
+ specifiers:
1674
+ T::Array[
1675
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Specifier::OrHash
1676
+ ]
1677
+ ).returns(T.attached_class)
1678
+ end
1679
+ def self.new(
1680
+ id:,
1681
+ # The amount of commit to grant.
1682
+ access_amount:,
1683
+ # The amount of time the created commits will be valid for
1684
+ commit_duration:,
1685
+ # Will be passed down to the individual commits
1686
+ priority:,
1687
+ product:,
1688
+ # Whether the created commits will use the commit rate or list rate
1689
+ rate_type:,
1690
+ # Determines the start time for the first commit
1691
+ starting_at:,
1692
+ # Will be passed down to the individual commits
1693
+ applicable_product_ids: nil,
1694
+ # Will be passed down to the individual commits
1695
+ applicable_product_tags: nil,
1696
+ contract: nil,
1697
+ # Will be passed down to the individual commits
1698
+ description: nil,
1699
+ # Determines when the contract will stop creating recurring commits. Optional
1700
+ ending_before: nil,
1701
+ # The amount the customer should be billed for the commit. Not required.
1702
+ invoice_amount: nil,
1703
+ # Displayed on invoices. Will be passed through to the individual commits
1704
+ name: nil,
1705
+ # Will be passed down to the individual commits
1706
+ netsuite_sales_order_id: nil,
1707
+ # Determines whether the first and last commit will be prorated. If not provided,
1708
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1709
+ proration: nil,
1710
+ # The frequency at which the recurring commits will be created. If not provided: -
1711
+ # The commits will be created on the usage invoice frequency. If provided: - The
1712
+ # period defined in the duration will correspond to this frequency. - Commits will
1713
+ # be created aligned with the recurring commit's starting_at rather than the usage
1714
+ # invoice dates.
1715
+ recurrence_frequency: nil,
1716
+ # Will be passed down to the individual commits. This controls how much of an
1717
+ # individual unexpired commit will roll over upon contract transition. Must be
1718
+ # between 0 and 1.
1719
+ rollover_fraction: nil,
1720
+ # List of filters that determine what kind of customer usage draws down a commit
1721
+ # or credit. A customer's usage needs to meet the condition of at least one of the
1722
+ # specifiers to contribute to a commit's or credit's drawdown.
1723
+ specifiers: nil
1724
+ )
1725
+ end
1726
+
1727
+ sig do
1728
+ override.returns(
1729
+ {
1730
+ id: String,
1731
+ access_amount:
1732
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::AccessAmount,
1733
+ commit_duration:
1734
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration,
1735
+ priority: Float,
1736
+ product:
1737
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Product,
1738
+ rate_type:
1739
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RateType::TaggedSymbol,
1740
+ starting_at: Time,
1741
+ applicable_product_ids: T::Array[String],
1742
+ applicable_product_tags: T::Array[String],
1743
+ contract:
1744
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Contract,
1745
+ description: String,
1746
+ ending_before: Time,
1747
+ invoice_amount:
1748
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::InvoiceAmount,
1749
+ name: String,
1750
+ netsuite_sales_order_id: String,
1751
+ proration:
1752
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::TaggedSymbol,
1753
+ recurrence_frequency:
1754
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol,
1755
+ rollover_fraction: Float,
1756
+ specifiers:
1757
+ T::Array[
1758
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Specifier
1759
+ ]
1760
+ }
1761
+ )
1762
+ end
1763
+ def to_hash
1764
+ end
1765
+
1766
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
1767
+ OrHash =
1768
+ T.type_alias do
1769
+ T.any(
1770
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::AccessAmount,
1771
+ MetronomeSDK::Internal::AnyHash
1772
+ )
1773
+ end
1774
+
1775
+ sig { returns(String) }
1776
+ attr_accessor :credit_type_id
1777
+
1778
+ sig { returns(Float) }
1779
+ attr_accessor :unit_price
1780
+
1781
+ sig { returns(T.nilable(Float)) }
1782
+ attr_reader :quantity
1783
+
1784
+ sig { params(quantity: Float).void }
1785
+ attr_writer :quantity
1786
+
1787
+ # The amount of commit to grant.
1788
+ sig do
1789
+ params(
1790
+ credit_type_id: String,
1791
+ unit_price: Float,
1792
+ quantity: Float
1793
+ ).returns(T.attached_class)
1794
+ end
1795
+ def self.new(credit_type_id:, unit_price:, quantity: nil)
1796
+ end
1797
+
1798
+ sig do
1799
+ override.returns(
1800
+ { credit_type_id: String, unit_price: Float, quantity: Float }
1801
+ )
1802
+ end
1803
+ def to_hash
1804
+ end
1805
+ end
1806
+
1807
+ class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
1808
+ OrHash =
1809
+ T.type_alias do
1810
+ T.any(
1811
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration,
1812
+ MetronomeSDK::Internal::AnyHash
1813
+ )
1814
+ end
1815
+
1816
+ sig { returns(Float) }
1817
+ attr_accessor :value
1818
+
1819
+ sig do
1820
+ returns(
1821
+ T.nilable(
1822
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit::TaggedSymbol
1823
+ )
1824
+ )
1825
+ end
1826
+ attr_reader :unit
1827
+
1828
+ sig do
1829
+ params(
1830
+ unit:
1831
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit::OrSymbol
1832
+ ).void
1833
+ end
1834
+ attr_writer :unit
1835
+
1836
+ # The amount of time the created commits will be valid for
1837
+ sig do
1838
+ params(
1839
+ value: Float,
1840
+ unit:
1841
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit::OrSymbol
1842
+ ).returns(T.attached_class)
1843
+ end
1844
+ def self.new(value:, unit: nil)
1845
+ end
1846
+
1847
+ sig do
1848
+ override.returns(
1849
+ {
1850
+ value: Float,
1851
+ unit:
1852
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit::TaggedSymbol
1853
+ }
1854
+ )
1855
+ end
1856
+ def to_hash
1857
+ end
1858
+
1859
+ module Unit
1860
+ extend MetronomeSDK::Internal::Type::Enum
1861
+
1862
+ TaggedSymbol =
1863
+ T.type_alias do
1864
+ T.all(
1865
+ Symbol,
1866
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit
1867
+ )
1868
+ end
1869
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1870
+
1871
+ PERIODS =
1872
+ T.let(
1873
+ :PERIODS,
1874
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit::TaggedSymbol
1875
+ )
1876
+
1877
+ sig do
1878
+ override.returns(
1879
+ T::Array[
1880
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit::TaggedSymbol
1881
+ ]
1882
+ )
1883
+ end
1884
+ def self.values
1885
+ end
1886
+ end
1887
+ end
1888
+
1889
+ class Product < MetronomeSDK::Internal::Type::BaseModel
1890
+ OrHash =
1891
+ T.type_alias do
1892
+ T.any(
1893
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Product,
1894
+ MetronomeSDK::Internal::AnyHash
1895
+ )
1896
+ end
1897
+
1898
+ sig { returns(String) }
1899
+ attr_accessor :id
1900
+
1901
+ sig { returns(String) }
1902
+ attr_accessor :name
1903
+
1904
+ sig { params(id: String, name: String).returns(T.attached_class) }
1905
+ def self.new(id:, name:)
1906
+ end
1907
+
1908
+ sig { override.returns({ id: String, name: String }) }
1909
+ def to_hash
1910
+ end
1911
+ end
1912
+
1913
+ # Whether the created commits will use the commit rate or list rate
1914
+ module RateType
1915
+ extend MetronomeSDK::Internal::Type::Enum
1916
+
1917
+ TaggedSymbol =
1918
+ T.type_alias do
1919
+ T.all(
1920
+ Symbol,
1921
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RateType
1922
+ )
1923
+ end
1924
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1925
+
1926
+ COMMIT_RATE =
1927
+ T.let(
1928
+ :COMMIT_RATE,
1929
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RateType::TaggedSymbol
1930
+ )
1931
+ LIST_RATE =
1932
+ T.let(
1933
+ :LIST_RATE,
1934
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RateType::TaggedSymbol
1935
+ )
1936
+
1937
+ sig do
1938
+ override.returns(
1939
+ T::Array[
1940
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RateType::TaggedSymbol
1941
+ ]
1942
+ )
1943
+ end
1944
+ def self.values
1945
+ end
1946
+ end
1947
+
1948
+ class Contract < MetronomeSDK::Internal::Type::BaseModel
1949
+ OrHash =
1950
+ T.type_alias do
1951
+ T.any(
1952
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Contract,
1953
+ MetronomeSDK::Internal::AnyHash
1954
+ )
1955
+ end
1956
+
1957
+ sig { returns(String) }
1958
+ attr_accessor :id
1959
+
1960
+ sig { params(id: String).returns(T.attached_class) }
1961
+ def self.new(id:)
1962
+ end
1963
+
1964
+ sig { override.returns({ id: String }) }
1965
+ def to_hash
1966
+ end
1967
+ end
1968
+
1969
+ class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
1970
+ OrHash =
1971
+ T.type_alias do
1972
+ T.any(
1973
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::InvoiceAmount,
1974
+ MetronomeSDK::Internal::AnyHash
1975
+ )
1976
+ end
1977
+
1978
+ sig { returns(String) }
1979
+ attr_accessor :credit_type_id
1980
+
1981
+ sig { returns(Float) }
1982
+ attr_accessor :quantity
1983
+
1984
+ sig { returns(Float) }
1985
+ attr_accessor :unit_price
1986
+
1987
+ # The amount the customer should be billed for the commit. Not required.
1988
+ sig do
1989
+ params(
1990
+ credit_type_id: String,
1991
+ quantity: Float,
1992
+ unit_price: Float
1993
+ ).returns(T.attached_class)
1994
+ end
1995
+ def self.new(credit_type_id:, quantity:, unit_price:)
1996
+ end
1997
+
1998
+ sig do
1999
+ override.returns(
2000
+ { credit_type_id: String, quantity: Float, unit_price: Float }
2001
+ )
2002
+ end
2003
+ def to_hash
2004
+ end
2005
+ end
2006
+
2007
+ # Determines whether the first and last commit will be prorated. If not provided,
2008
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
2009
+ module Proration
2010
+ extend MetronomeSDK::Internal::Type::Enum
2011
+
2012
+ TaggedSymbol =
2013
+ T.type_alias do
2014
+ T.all(
2015
+ Symbol,
2016
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration
2017
+ )
2018
+ end
2019
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2020
+
2021
+ NONE =
2022
+ T.let(
2023
+ :NONE,
2024
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::TaggedSymbol
2025
+ )
2026
+ FIRST =
2027
+ T.let(
2028
+ :FIRST,
2029
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::TaggedSymbol
2030
+ )
2031
+ LAST =
2032
+ T.let(
2033
+ :LAST,
2034
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::TaggedSymbol
2035
+ )
2036
+ FIRST_AND_LAST =
2037
+ T.let(
2038
+ :FIRST_AND_LAST,
2039
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::TaggedSymbol
2040
+ )
2041
+
2042
+ sig do
2043
+ override.returns(
2044
+ T::Array[
2045
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::TaggedSymbol
2046
+ ]
2047
+ )
2048
+ end
2049
+ def self.values
2050
+ end
2051
+ end
2052
+
2053
+ # The frequency at which the recurring commits will be created. If not provided: -
2054
+ # The commits will be created on the usage invoice frequency. If provided: - The
2055
+ # period defined in the duration will correspond to this frequency. - Commits will
2056
+ # be created aligned with the recurring commit's starting_at rather than the usage
2057
+ # invoice dates.
2058
+ module RecurrenceFrequency
2059
+ extend MetronomeSDK::Internal::Type::Enum
2060
+
2061
+ TaggedSymbol =
2062
+ T.type_alias do
2063
+ T.all(
2064
+ Symbol,
2065
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency
2066
+ )
2067
+ end
2068
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2069
+
2070
+ MONTHLY =
2071
+ T.let(
2072
+ :MONTHLY,
2073
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol
2074
+ )
2075
+ QUARTERLY =
2076
+ T.let(
2077
+ :QUARTERLY,
2078
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol
2079
+ )
2080
+ ANNUAL =
2081
+ T.let(
2082
+ :ANNUAL,
2083
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol
2084
+ )
2085
+ WEEKLY =
2086
+ T.let(
2087
+ :WEEKLY,
2088
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol
2089
+ )
2090
+
2091
+ sig do
2092
+ override.returns(
2093
+ T::Array[
2094
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol
2095
+ ]
2096
+ )
2097
+ end
2098
+ def self.values
2099
+ end
2100
+ end
2101
+
2102
+ class Specifier < MetronomeSDK::Internal::Type::BaseModel
2103
+ OrHash =
2104
+ T.type_alias do
2105
+ T.any(
2106
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Specifier,
2107
+ MetronomeSDK::Internal::AnyHash
2108
+ )
2109
+ end
2110
+
2111
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
2112
+ attr_reader :presentation_group_values
2113
+
2114
+ sig do
2115
+ params(presentation_group_values: T::Hash[Symbol, String]).void
2116
+ end
2117
+ attr_writer :presentation_group_values
2118
+
2119
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
2120
+ attr_reader :pricing_group_values
2121
+
2122
+ sig { params(pricing_group_values: T::Hash[Symbol, String]).void }
2123
+ attr_writer :pricing_group_values
2124
+
2125
+ # If provided, the specifier will only apply to the product with the specified ID.
2126
+ sig { returns(T.nilable(String)) }
2127
+ attr_reader :product_id
2128
+
2129
+ sig { params(product_id: String).void }
2130
+ attr_writer :product_id
2131
+
2132
+ # If provided, the specifier will only apply to products with all the specified
2133
+ # tags.
2134
+ sig { returns(T.nilable(T::Array[String])) }
2135
+ attr_reader :product_tags
2136
+
2137
+ sig { params(product_tags: T::Array[String]).void }
2138
+ attr_writer :product_tags
2139
+
2140
+ sig do
2141
+ params(
2142
+ presentation_group_values: T::Hash[Symbol, String],
2143
+ pricing_group_values: T::Hash[Symbol, String],
2144
+ product_id: String,
2145
+ product_tags: T::Array[String]
2146
+ ).returns(T.attached_class)
2147
+ end
2148
+ def self.new(
2149
+ presentation_group_values: nil,
2150
+ pricing_group_values: nil,
2151
+ # If provided, the specifier will only apply to the product with the specified ID.
2152
+ product_id: nil,
2153
+ # If provided, the specifier will only apply to products with all the specified
2154
+ # tags.
2155
+ product_tags: nil
2156
+ )
2157
+ end
2158
+
2159
+ sig do
2160
+ override.returns(
2161
+ {
2162
+ presentation_group_values: T::Hash[Symbol, String],
2163
+ pricing_group_values: T::Hash[Symbol, String],
2164
+ product_id: String,
2165
+ product_tags: T::Array[String]
2166
+ }
2167
+ )
2168
+ end
2169
+ def to_hash
2170
+ end
2171
+ end
2172
+ end
2173
+
2174
+ class RecurringCredit < MetronomeSDK::Internal::Type::BaseModel
2175
+ OrHash =
2176
+ T.type_alias do
2177
+ T.any(
2178
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit,
2179
+ MetronomeSDK::Internal::AnyHash
2180
+ )
2181
+ end
2182
+
2183
+ sig { returns(String) }
2184
+ attr_accessor :id
2185
+
2186
+ # The amount of commit to grant.
2187
+ sig do
2188
+ returns(
2189
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::AccessAmount
2190
+ )
2191
+ end
2192
+ attr_reader :access_amount
2193
+
2194
+ sig do
2195
+ params(
2196
+ access_amount:
2197
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::AccessAmount::OrHash
2198
+ ).void
2199
+ end
2200
+ attr_writer :access_amount
2201
+
2202
+ # The amount of time the created commits will be valid for
2203
+ sig do
2204
+ returns(
2205
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration
2206
+ )
2207
+ end
2208
+ attr_reader :commit_duration
2209
+
2210
+ sig do
2211
+ params(
2212
+ commit_duration:
2213
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::OrHash
2214
+ ).void
2215
+ end
2216
+ attr_writer :commit_duration
2217
+
2218
+ # Will be passed down to the individual commits
2219
+ sig { returns(Float) }
2220
+ attr_accessor :priority
2221
+
2222
+ sig do
2223
+ returns(
2224
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Product
2225
+ )
2226
+ end
2227
+ attr_reader :product
2228
+
2229
+ sig do
2230
+ params(
2231
+ product:
2232
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Product::OrHash
2233
+ ).void
2234
+ end
2235
+ attr_writer :product
2236
+
2237
+ # Whether the created commits will use the commit rate or list rate
2238
+ sig do
2239
+ returns(
2240
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RateType::TaggedSymbol
2241
+ )
2242
+ end
2243
+ attr_accessor :rate_type
2244
+
2245
+ # Determines the start time for the first commit
2246
+ sig { returns(Time) }
2247
+ attr_accessor :starting_at
2248
+
2249
+ # Will be passed down to the individual commits
2250
+ sig { returns(T.nilable(T::Array[String])) }
2251
+ attr_reader :applicable_product_ids
2252
+
2253
+ sig { params(applicable_product_ids: T::Array[String]).void }
2254
+ attr_writer :applicable_product_ids
2255
+
2256
+ # Will be passed down to the individual commits
2257
+ sig { returns(T.nilable(T::Array[String])) }
2258
+ attr_reader :applicable_product_tags
2259
+
2260
+ sig { params(applicable_product_tags: T::Array[String]).void }
2261
+ attr_writer :applicable_product_tags
2262
+
2263
+ sig do
2264
+ returns(
2265
+ T.nilable(
2266
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Contract
2267
+ )
2268
+ )
2269
+ end
2270
+ attr_reader :contract
2271
+
2272
+ sig do
2273
+ params(
2274
+ contract:
2275
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Contract::OrHash
2276
+ ).void
2277
+ end
2278
+ attr_writer :contract
2279
+
2280
+ # Will be passed down to the individual commits
2281
+ sig { returns(T.nilable(String)) }
2282
+ attr_reader :description
2283
+
2284
+ sig { params(description: String).void }
2285
+ attr_writer :description
2286
+
2287
+ # Determines when the contract will stop creating recurring commits. Optional
2288
+ sig { returns(T.nilable(Time)) }
2289
+ attr_reader :ending_before
2290
+
2291
+ sig { params(ending_before: Time).void }
2292
+ attr_writer :ending_before
2293
+
2294
+ # Displayed on invoices. Will be passed through to the individual commits
2295
+ sig { returns(T.nilable(String)) }
2296
+ attr_reader :name
2297
+
2298
+ sig { params(name: String).void }
2299
+ attr_writer :name
2300
+
2301
+ # Will be passed down to the individual commits
2302
+ sig { returns(T.nilable(String)) }
2303
+ attr_reader :netsuite_sales_order_id
2304
+
2305
+ sig { params(netsuite_sales_order_id: String).void }
2306
+ attr_writer :netsuite_sales_order_id
2307
+
2308
+ # Determines whether the first and last commit will be prorated. If not provided,
2309
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
2310
+ sig do
2311
+ returns(
2312
+ T.nilable(
2313
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::TaggedSymbol
2314
+ )
2315
+ )
2316
+ end
2317
+ attr_reader :proration
2318
+
2319
+ sig do
2320
+ params(
2321
+ proration:
2322
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::OrSymbol
2323
+ ).void
2324
+ end
2325
+ attr_writer :proration
2326
+
2327
+ # The frequency at which the recurring commits will be created. If not provided: -
2328
+ # The commits will be created on the usage invoice frequency. If provided: - The
2329
+ # period defined in the duration will correspond to this frequency. - Commits will
2330
+ # be created aligned with the recurring commit's starting_at rather than the usage
2331
+ # invoice dates.
2332
+ sig do
2333
+ returns(
2334
+ T.nilable(
2335
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol
2336
+ )
2337
+ )
2338
+ end
2339
+ attr_reader :recurrence_frequency
2340
+
2341
+ sig do
2342
+ params(
2343
+ recurrence_frequency:
2344
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::OrSymbol
2345
+ ).void
2346
+ end
2347
+ attr_writer :recurrence_frequency
2348
+
2349
+ # Will be passed down to the individual commits. This controls how much of an
2350
+ # individual unexpired commit will roll over upon contract transition. Must be
2351
+ # between 0 and 1.
2352
+ sig { returns(T.nilable(Float)) }
2353
+ attr_reader :rollover_fraction
2354
+
2355
+ sig { params(rollover_fraction: Float).void }
2356
+ attr_writer :rollover_fraction
2357
+
2358
+ # List of filters that determine what kind of customer usage draws down a commit
2359
+ # or credit. A customer's usage needs to meet the condition of at least one of the
2360
+ # specifiers to contribute to a commit's or credit's drawdown.
2361
+ sig do
2362
+ returns(
2363
+ T.nilable(
2364
+ T::Array[
2365
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Specifier
2366
+ ]
2367
+ )
2368
+ )
2369
+ end
2370
+ attr_reader :specifiers
2371
+
2372
+ sig do
2373
+ params(
2374
+ specifiers:
2375
+ T::Array[
2376
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Specifier::OrHash
2377
+ ]
2378
+ ).void
2379
+ end
2380
+ attr_writer :specifiers
2381
+
2382
+ sig do
2383
+ params(
2384
+ id: String,
2385
+ access_amount:
2386
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::AccessAmount::OrHash,
2387
+ commit_duration:
2388
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::OrHash,
2389
+ priority: Float,
2390
+ product:
2391
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Product::OrHash,
2392
+ rate_type:
2393
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RateType::OrSymbol,
2394
+ starting_at: Time,
2395
+ applicable_product_ids: T::Array[String],
2396
+ applicable_product_tags: T::Array[String],
2397
+ contract:
2398
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Contract::OrHash,
2399
+ description: String,
2400
+ ending_before: Time,
2401
+ name: String,
2402
+ netsuite_sales_order_id: String,
2403
+ proration:
2404
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::OrSymbol,
2405
+ recurrence_frequency:
2406
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::OrSymbol,
2407
+ rollover_fraction: Float,
2408
+ specifiers:
2409
+ T::Array[
2410
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Specifier::OrHash
2411
+ ]
2412
+ ).returns(T.attached_class)
2413
+ end
2414
+ def self.new(
2415
+ id:,
2416
+ # The amount of commit to grant.
2417
+ access_amount:,
2418
+ # The amount of time the created commits will be valid for
2419
+ commit_duration:,
2420
+ # Will be passed down to the individual commits
2421
+ priority:,
2422
+ product:,
2423
+ # Whether the created commits will use the commit rate or list rate
2424
+ rate_type:,
2425
+ # Determines the start time for the first commit
2426
+ starting_at:,
2427
+ # Will be passed down to the individual commits
2428
+ applicable_product_ids: nil,
2429
+ # Will be passed down to the individual commits
2430
+ applicable_product_tags: nil,
2431
+ contract: nil,
2432
+ # Will be passed down to the individual commits
2433
+ description: nil,
2434
+ # Determines when the contract will stop creating recurring commits. Optional
2435
+ ending_before: nil,
2436
+ # Displayed on invoices. Will be passed through to the individual commits
2437
+ name: nil,
2438
+ # Will be passed down to the individual commits
2439
+ netsuite_sales_order_id: nil,
2440
+ # Determines whether the first and last commit will be prorated. If not provided,
2441
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
2442
+ proration: nil,
2443
+ # The frequency at which the recurring commits will be created. If not provided: -
2444
+ # The commits will be created on the usage invoice frequency. If provided: - The
2445
+ # period defined in the duration will correspond to this frequency. - Commits will
2446
+ # be created aligned with the recurring commit's starting_at rather than the usage
2447
+ # invoice dates.
2448
+ recurrence_frequency: nil,
2449
+ # Will be passed down to the individual commits. This controls how much of an
2450
+ # individual unexpired commit will roll over upon contract transition. Must be
2451
+ # between 0 and 1.
2452
+ rollover_fraction: nil,
2453
+ # List of filters that determine what kind of customer usage draws down a commit
2454
+ # or credit. A customer's usage needs to meet the condition of at least one of the
2455
+ # specifiers to contribute to a commit's or credit's drawdown.
2456
+ specifiers: nil
2457
+ )
2458
+ end
2459
+
2460
+ sig do
2461
+ override.returns(
2462
+ {
2463
+ id: String,
2464
+ access_amount:
2465
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::AccessAmount,
2466
+ commit_duration:
2467
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration,
2468
+ priority: Float,
2469
+ product:
2470
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Product,
2471
+ rate_type:
2472
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RateType::TaggedSymbol,
2473
+ starting_at: Time,
2474
+ applicable_product_ids: T::Array[String],
2475
+ applicable_product_tags: T::Array[String],
2476
+ contract:
2477
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Contract,
2478
+ description: String,
2479
+ ending_before: Time,
2480
+ name: String,
2481
+ netsuite_sales_order_id: String,
2482
+ proration:
2483
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::TaggedSymbol,
2484
+ recurrence_frequency:
2485
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol,
2486
+ rollover_fraction: Float,
2487
+ specifiers:
2488
+ T::Array[
2489
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Specifier
2490
+ ]
2491
+ }
2492
+ )
2493
+ end
2494
+ def to_hash
2495
+ end
2496
+
2497
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
2498
+ OrHash =
2499
+ T.type_alias do
2500
+ T.any(
2501
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::AccessAmount,
2502
+ MetronomeSDK::Internal::AnyHash
2503
+ )
2504
+ end
2505
+
2506
+ sig { returns(String) }
2507
+ attr_accessor :credit_type_id
2508
+
2509
+ sig { returns(Float) }
2510
+ attr_accessor :unit_price
2511
+
2512
+ sig { returns(T.nilable(Float)) }
2513
+ attr_reader :quantity
2514
+
2515
+ sig { params(quantity: Float).void }
2516
+ attr_writer :quantity
2517
+
2518
+ # The amount of commit to grant.
2519
+ sig do
2520
+ params(
2521
+ credit_type_id: String,
2522
+ unit_price: Float,
2523
+ quantity: Float
2524
+ ).returns(T.attached_class)
2525
+ end
2526
+ def self.new(credit_type_id:, unit_price:, quantity: nil)
2527
+ end
2528
+
2529
+ sig do
2530
+ override.returns(
2531
+ { credit_type_id: String, unit_price: Float, quantity: Float }
2532
+ )
2533
+ end
2534
+ def to_hash
2535
+ end
2536
+ end
2537
+
2538
+ class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
2539
+ OrHash =
2540
+ T.type_alias do
2541
+ T.any(
2542
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration,
2543
+ MetronomeSDK::Internal::AnyHash
2544
+ )
2545
+ end
2546
+
2547
+ sig { returns(Float) }
2548
+ attr_accessor :value
2549
+
2550
+ sig do
2551
+ returns(
2552
+ T.nilable(
2553
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit::TaggedSymbol
2554
+ )
2555
+ )
2556
+ end
2557
+ attr_reader :unit
2558
+
2559
+ sig do
2560
+ params(
2561
+ unit:
2562
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit::OrSymbol
2563
+ ).void
2564
+ end
2565
+ attr_writer :unit
2566
+
2567
+ # The amount of time the created commits will be valid for
2568
+ sig do
2569
+ params(
2570
+ value: Float,
2571
+ unit:
2572
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit::OrSymbol
2573
+ ).returns(T.attached_class)
2574
+ end
2575
+ def self.new(value:, unit: nil)
2576
+ end
2577
+
2578
+ sig do
2579
+ override.returns(
2580
+ {
2581
+ value: Float,
2582
+ unit:
2583
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit::TaggedSymbol
2584
+ }
2585
+ )
2586
+ end
2587
+ def to_hash
2588
+ end
2589
+
2590
+ module Unit
2591
+ extend MetronomeSDK::Internal::Type::Enum
2592
+
2593
+ TaggedSymbol =
2594
+ T.type_alias do
2595
+ T.all(
2596
+ Symbol,
2597
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit
2598
+ )
2599
+ end
2600
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2601
+
2602
+ PERIODS =
2603
+ T.let(
2604
+ :PERIODS,
2605
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit::TaggedSymbol
2606
+ )
2607
+
2608
+ sig do
2609
+ override.returns(
2610
+ T::Array[
2611
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit::TaggedSymbol
2612
+ ]
2613
+ )
2614
+ end
2615
+ def self.values
2616
+ end
2617
+ end
2618
+ end
2619
+
2620
+ class Product < MetronomeSDK::Internal::Type::BaseModel
2621
+ OrHash =
2622
+ T.type_alias do
2623
+ T.any(
2624
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Product,
2625
+ MetronomeSDK::Internal::AnyHash
2626
+ )
2627
+ end
2628
+
2629
+ sig { returns(String) }
2630
+ attr_accessor :id
2631
+
2632
+ sig { returns(String) }
2633
+ attr_accessor :name
2634
+
2635
+ sig { params(id: String, name: String).returns(T.attached_class) }
2636
+ def self.new(id:, name:)
2637
+ end
2638
+
2639
+ sig { override.returns({ id: String, name: String }) }
2640
+ def to_hash
2641
+ end
2642
+ end
2643
+
2644
+ # Whether the created commits will use the commit rate or list rate
2645
+ module RateType
2646
+ extend MetronomeSDK::Internal::Type::Enum
2647
+
2648
+ TaggedSymbol =
2649
+ T.type_alias do
2650
+ T.all(
2651
+ Symbol,
2652
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RateType
2653
+ )
2654
+ end
2655
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2656
+
2657
+ COMMIT_RATE =
2658
+ T.let(
2659
+ :COMMIT_RATE,
2660
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RateType::TaggedSymbol
2661
+ )
2662
+ LIST_RATE =
2663
+ T.let(
2664
+ :LIST_RATE,
2665
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RateType::TaggedSymbol
2666
+ )
2667
+
2668
+ sig do
2669
+ override.returns(
2670
+ T::Array[
2671
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RateType::TaggedSymbol
2672
+ ]
2673
+ )
2674
+ end
2675
+ def self.values
2676
+ end
2677
+ end
2678
+
2679
+ class Contract < MetronomeSDK::Internal::Type::BaseModel
2680
+ OrHash =
2681
+ T.type_alias do
2682
+ T.any(
2683
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Contract,
2684
+ MetronomeSDK::Internal::AnyHash
2685
+ )
2686
+ end
2687
+
2688
+ sig { returns(String) }
2689
+ attr_accessor :id
2690
+
2691
+ sig { params(id: String).returns(T.attached_class) }
2692
+ def self.new(id:)
2693
+ end
2694
+
2695
+ sig { override.returns({ id: String }) }
2696
+ def to_hash
2697
+ end
2698
+ end
2699
+
2700
+ # Determines whether the first and last commit will be prorated. If not provided,
2701
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
2702
+ module Proration
2703
+ extend MetronomeSDK::Internal::Type::Enum
2704
+
2705
+ TaggedSymbol =
2706
+ T.type_alias do
2707
+ T.all(
2708
+ Symbol,
2709
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration
2710
+ )
2711
+ end
2712
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2713
+
2714
+ NONE =
2715
+ T.let(
2716
+ :NONE,
2717
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::TaggedSymbol
2718
+ )
2719
+ FIRST =
2720
+ T.let(
2721
+ :FIRST,
2722
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::TaggedSymbol
2723
+ )
2724
+ LAST =
2725
+ T.let(
2726
+ :LAST,
2727
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::TaggedSymbol
2728
+ )
2729
+ FIRST_AND_LAST =
2730
+ T.let(
2731
+ :FIRST_AND_LAST,
2732
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::TaggedSymbol
2733
+ )
2734
+
2735
+ sig do
2736
+ override.returns(
2737
+ T::Array[
2738
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::TaggedSymbol
2739
+ ]
2740
+ )
2741
+ end
2742
+ def self.values
2743
+ end
2744
+ end
2745
+
2746
+ # The frequency at which the recurring commits will be created. If not provided: -
2747
+ # The commits will be created on the usage invoice frequency. If provided: - The
2748
+ # period defined in the duration will correspond to this frequency. - Commits will
2749
+ # be created aligned with the recurring commit's starting_at rather than the usage
2750
+ # invoice dates.
2751
+ module RecurrenceFrequency
2752
+ extend MetronomeSDK::Internal::Type::Enum
2753
+
2754
+ TaggedSymbol =
2755
+ T.type_alias do
2756
+ T.all(
2757
+ Symbol,
2758
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency
2759
+ )
2760
+ end
2761
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2762
+
2763
+ MONTHLY =
2764
+ T.let(
2765
+ :MONTHLY,
2766
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol
2767
+ )
2768
+ QUARTERLY =
2769
+ T.let(
2770
+ :QUARTERLY,
2771
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol
2772
+ )
2773
+ ANNUAL =
2774
+ T.let(
2775
+ :ANNUAL,
2776
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol
2777
+ )
2778
+ WEEKLY =
2779
+ T.let(
2780
+ :WEEKLY,
2781
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol
2782
+ )
2783
+
2784
+ sig do
2785
+ override.returns(
2786
+ T::Array[
2787
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol
2788
+ ]
2789
+ )
2790
+ end
2791
+ def self.values
2792
+ end
2793
+ end
2794
+
2795
+ class Specifier < MetronomeSDK::Internal::Type::BaseModel
2796
+ OrHash =
2797
+ T.type_alias do
2798
+ T.any(
2799
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Specifier,
2800
+ MetronomeSDK::Internal::AnyHash
2801
+ )
2802
+ end
2803
+
2804
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
2805
+ attr_reader :presentation_group_values
2806
+
2807
+ sig do
2808
+ params(presentation_group_values: T::Hash[Symbol, String]).void
2809
+ end
2810
+ attr_writer :presentation_group_values
2811
+
2812
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
2813
+ attr_reader :pricing_group_values
2814
+
2815
+ sig { params(pricing_group_values: T::Hash[Symbol, String]).void }
2816
+ attr_writer :pricing_group_values
2817
+
2818
+ # If provided, the specifier will only apply to the product with the specified ID.
2819
+ sig { returns(T.nilable(String)) }
2820
+ attr_reader :product_id
2821
+
2822
+ sig { params(product_id: String).void }
2823
+ attr_writer :product_id
2824
+
2825
+ # If provided, the specifier will only apply to products with all the specified
2826
+ # tags.
2827
+ sig { returns(T.nilable(T::Array[String])) }
2828
+ attr_reader :product_tags
2829
+
2830
+ sig { params(product_tags: T::Array[String]).void }
2831
+ attr_writer :product_tags
2832
+
2833
+ sig do
2834
+ params(
2835
+ presentation_group_values: T::Hash[Symbol, String],
2836
+ pricing_group_values: T::Hash[Symbol, String],
2837
+ product_id: String,
2838
+ product_tags: T::Array[String]
2839
+ ).returns(T.attached_class)
2840
+ end
2841
+ def self.new(
2842
+ presentation_group_values: nil,
2843
+ pricing_group_values: nil,
2844
+ # If provided, the specifier will only apply to the product with the specified ID.
2845
+ product_id: nil,
2846
+ # If provided, the specifier will only apply to products with all the specified
2847
+ # tags.
2848
+ product_tags: nil
2849
+ )
2850
+ end
2851
+
2852
+ sig do
2853
+ override.returns(
2854
+ {
2855
+ presentation_group_values: T::Hash[Symbol, String],
2856
+ pricing_group_values: T::Hash[Symbol, String],
2857
+ product_id: String,
2858
+ product_tags: T::Array[String]
2859
+ }
2860
+ )
2861
+ end
2862
+ def to_hash
2863
+ end
2864
+ end
2865
+ end
2866
+
2867
+ class ResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
2868
+ OrHash =
2869
+ T.type_alias do
2870
+ T.any(
2871
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty,
2872
+ MetronomeSDK::Internal::AnyHash
2873
+ )
2874
+ end
2875
+
2876
+ sig { returns(Float) }
2877
+ attr_accessor :fraction
2878
+
2879
+ sig { returns(String) }
2880
+ attr_accessor :netsuite_reseller_id
2881
+
2882
+ sig do
2883
+ returns(
2884
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType::TaggedSymbol
2885
+ )
2886
+ end
2887
+ attr_accessor :reseller_type
2888
+
2889
+ sig { returns(Time) }
2890
+ attr_accessor :starting_at
2891
+
2892
+ sig { returns(T.nilable(T::Array[String])) }
2893
+ attr_reader :applicable_product_ids
2894
+
2895
+ sig { params(applicable_product_ids: T::Array[String]).void }
2896
+ attr_writer :applicable_product_ids
2897
+
2898
+ sig { returns(T.nilable(T::Array[String])) }
2899
+ attr_reader :applicable_product_tags
2900
+
2901
+ sig { params(applicable_product_tags: T::Array[String]).void }
2902
+ attr_writer :applicable_product_tags
2903
+
2904
+ sig { returns(T.nilable(String)) }
2905
+ attr_reader :aws_account_number
2906
+
2907
+ sig { params(aws_account_number: String).void }
2908
+ attr_writer :aws_account_number
2909
+
2910
+ sig { returns(T.nilable(String)) }
2911
+ attr_reader :aws_offer_id
2912
+
2913
+ sig { params(aws_offer_id: String).void }
2914
+ attr_writer :aws_offer_id
2915
+
2916
+ sig { returns(T.nilable(String)) }
2917
+ attr_reader :aws_payer_reference_id
2918
+
2919
+ sig { params(aws_payer_reference_id: String).void }
2920
+ attr_writer :aws_payer_reference_id
2921
+
2922
+ sig { returns(T.nilable(Time)) }
2923
+ attr_reader :ending_before
2924
+
2925
+ sig { params(ending_before: Time).void }
2926
+ attr_writer :ending_before
2927
+
2928
+ sig { returns(T.nilable(String)) }
2929
+ attr_reader :gcp_account_id
2930
+
2931
+ sig { params(gcp_account_id: String).void }
2932
+ attr_writer :gcp_account_id
2933
+
2934
+ sig { returns(T.nilable(String)) }
2935
+ attr_reader :gcp_offer_id
2936
+
2937
+ sig { params(gcp_offer_id: String).void }
2938
+ attr_writer :gcp_offer_id
2939
+
2940
+ sig { returns(T.nilable(Float)) }
2941
+ attr_reader :reseller_contract_value
2942
+
2943
+ sig { params(reseller_contract_value: Float).void }
2944
+ attr_writer :reseller_contract_value
2945
+
2946
+ sig do
2947
+ params(
2948
+ fraction: Float,
2949
+ netsuite_reseller_id: String,
2950
+ reseller_type:
2951
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType::OrSymbol,
2952
+ starting_at: Time,
2953
+ applicable_product_ids: T::Array[String],
2954
+ applicable_product_tags: T::Array[String],
2955
+ aws_account_number: String,
2956
+ aws_offer_id: String,
2957
+ aws_payer_reference_id: String,
2958
+ ending_before: Time,
2959
+ gcp_account_id: String,
2960
+ gcp_offer_id: String,
2961
+ reseller_contract_value: Float
2962
+ ).returns(T.attached_class)
2963
+ end
2964
+ def self.new(
2965
+ fraction:,
2966
+ netsuite_reseller_id:,
2967
+ reseller_type:,
2968
+ starting_at:,
2969
+ applicable_product_ids: nil,
2970
+ applicable_product_tags: nil,
2971
+ aws_account_number: nil,
2972
+ aws_offer_id: nil,
2973
+ aws_payer_reference_id: nil,
2974
+ ending_before: nil,
2975
+ gcp_account_id: nil,
2976
+ gcp_offer_id: nil,
2977
+ reseller_contract_value: nil
2978
+ )
2979
+ end
2980
+
2981
+ sig do
2982
+ override.returns(
2983
+ {
2984
+ fraction: Float,
2985
+ netsuite_reseller_id: String,
2986
+ reseller_type:
2987
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType::TaggedSymbol,
2988
+ starting_at: Time,
2989
+ applicable_product_ids: T::Array[String],
2990
+ applicable_product_tags: T::Array[String],
2991
+ aws_account_number: String,
2992
+ aws_offer_id: String,
2993
+ aws_payer_reference_id: String,
2994
+ ending_before: Time,
2995
+ gcp_account_id: String,
2996
+ gcp_offer_id: String,
2997
+ reseller_contract_value: Float
2998
+ }
2999
+ )
3000
+ end
3001
+ def to_hash
3002
+ end
3003
+
3004
+ module ResellerType
3005
+ extend MetronomeSDK::Internal::Type::Enum
3006
+
3007
+ TaggedSymbol =
3008
+ T.type_alias do
3009
+ T.all(
3010
+ Symbol,
3011
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType
3012
+ )
3013
+ end
3014
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3015
+
3016
+ AWS =
3017
+ T.let(
3018
+ :AWS,
3019
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType::TaggedSymbol
3020
+ )
3021
+ AWS_PRO_SERVICE =
3022
+ T.let(
3023
+ :AWS_PRO_SERVICE,
3024
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType::TaggedSymbol
3025
+ )
3026
+ GCP =
3027
+ T.let(
3028
+ :GCP,
3029
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType::TaggedSymbol
3030
+ )
3031
+ GCP_PRO_SERVICE =
3032
+ T.let(
3033
+ :GCP_PRO_SERVICE,
3034
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType::TaggedSymbol
3035
+ )
3036
+
3037
+ sig do
3038
+ override.returns(
3039
+ T::Array[
3040
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType::TaggedSymbol
3041
+ ]
3042
+ )
3043
+ end
3044
+ def self.values
3045
+ end
3046
+ end
3047
+ end
3048
+
3049
+ # Determines which scheduled and commit charges to consolidate onto the Contract's
3050
+ # usage invoice. The charge's `timestamp` must match the usage invoice's
3051
+ # `ending_before` date for consolidation to occur. This field cannot be modified
3052
+ # after a Contract has been created. If this field is omitted, charges will appear
3053
+ # on a separate invoice from usage charges.
3054
+ module ScheduledChargesOnUsageInvoices
3055
+ extend MetronomeSDK::Internal::Type::Enum
3056
+
3057
+ TaggedSymbol =
3058
+ T.type_alias do
3059
+ T.all(
3060
+ Symbol,
3061
+ MetronomeSDK::ContractWithoutAmendments::ScheduledChargesOnUsageInvoices
3062
+ )
3063
+ end
3064
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3065
+
3066
+ ALL =
3067
+ T.let(
3068
+ :ALL,
3069
+ MetronomeSDK::ContractWithoutAmendments::ScheduledChargesOnUsageInvoices::TaggedSymbol
3070
+ )
3071
+
3072
+ sig do
3073
+ override.returns(
3074
+ T::Array[
3075
+ MetronomeSDK::ContractWithoutAmendments::ScheduledChargesOnUsageInvoices::TaggedSymbol
3076
+ ]
3077
+ )
3078
+ end
3079
+ def self.values
3080
+ end
3081
+ end
3082
+
3083
+ class SpendThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
3084
+ OrHash =
3085
+ T.type_alias do
3086
+ T.any(
3087
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration,
3088
+ MetronomeSDK::Internal::AnyHash
3089
+ )
3090
+ end
3091
+
3092
+ sig do
3093
+ returns(
3094
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::Commit
3095
+ )
3096
+ end
3097
+ attr_reader :commit
3098
+
3099
+ sig do
3100
+ params(
3101
+ commit:
3102
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::Commit::OrHash
3103
+ ).void
3104
+ end
3105
+ attr_writer :commit
3106
+
3107
+ # When set to false, the contract will not be evaluated against the
3108
+ # threshold_amount. Toggling to true will result an immediate evaluation,
3109
+ # regardless of prior state.
3110
+ sig { returns(T::Boolean) }
3111
+ attr_accessor :is_enabled
3112
+
3113
+ sig do
3114
+ returns(
3115
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig
3116
+ )
3117
+ end
3118
+ attr_reader :payment_gate_config
3119
+
3120
+ sig do
3121
+ params(
3122
+ payment_gate_config:
3123
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::OrHash
3124
+ ).void
3125
+ end
3126
+ attr_writer :payment_gate_config
3127
+
3128
+ # Specify the threshold amount for the contract. Each time the contract's usage
3129
+ # hits this amount, a threshold charge will be initiated.
3130
+ sig { returns(Float) }
3131
+ attr_accessor :threshold_amount
3132
+
3133
+ sig do
3134
+ params(
3135
+ commit:
3136
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::Commit::OrHash,
3137
+ is_enabled: T::Boolean,
3138
+ payment_gate_config:
3139
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::OrHash,
3140
+ threshold_amount: Float
3141
+ ).returns(T.attached_class)
3142
+ end
3143
+ def self.new(
3144
+ commit:,
3145
+ # When set to false, the contract will not be evaluated against the
3146
+ # threshold_amount. Toggling to true will result an immediate evaluation,
3147
+ # regardless of prior state.
3148
+ is_enabled:,
3149
+ payment_gate_config:,
3150
+ # Specify the threshold amount for the contract. Each time the contract's usage
3151
+ # hits this amount, a threshold charge will be initiated.
3152
+ threshold_amount:
3153
+ )
3154
+ end
3155
+
3156
+ sig do
3157
+ override.returns(
3158
+ {
3159
+ commit:
3160
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::Commit,
3161
+ is_enabled: T::Boolean,
3162
+ payment_gate_config:
3163
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig,
3164
+ threshold_amount: Float
3165
+ }
3166
+ )
3167
+ end
3168
+ def to_hash
3169
+ end
3170
+
3171
+ class Commit < MetronomeSDK::Internal::Type::BaseModel
3172
+ OrHash =
3173
+ T.type_alias do
3174
+ T.any(
3175
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::Commit,
3176
+ MetronomeSDK::Internal::AnyHash
3177
+ )
3178
+ end
3179
+
3180
+ # The commit product that will be used to generate the line item for commit
3181
+ # payment.
3182
+ sig { returns(String) }
3183
+ attr_accessor :product_id
3184
+
3185
+ sig { returns(T.nilable(String)) }
3186
+ attr_reader :description
3187
+
3188
+ sig { params(description: String).void }
3189
+ attr_writer :description
3190
+
3191
+ # Specify the name of the line item for the threshold charge. If left blank, it
3192
+ # will default to the commit product name.
3193
+ sig { returns(T.nilable(String)) }
3194
+ attr_reader :name
3195
+
3196
+ sig { params(name: String).void }
3197
+ attr_writer :name
3198
+
3199
+ sig do
3200
+ params(
3201
+ product_id: String,
3202
+ description: String,
3203
+ name: String
3204
+ ).returns(T.attached_class)
3205
+ end
3206
+ def self.new(
3207
+ # The commit product that will be used to generate the line item for commit
3208
+ # payment.
3209
+ product_id:,
3210
+ description: nil,
3211
+ # Specify the name of the line item for the threshold charge. If left blank, it
3212
+ # will default to the commit product name.
3213
+ name: nil
3214
+ )
3215
+ end
3216
+
3217
+ sig do
3218
+ override.returns(
3219
+ { product_id: String, description: String, name: String }
3220
+ )
3221
+ end
3222
+ def to_hash
3223
+ end
3224
+ end
3225
+
3226
+ class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
3227
+ OrHash =
3228
+ T.type_alias do
3229
+ T.any(
3230
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig,
3231
+ MetronomeSDK::Internal::AnyHash
3232
+ )
3233
+ end
3234
+
3235
+ # Gate access to the commit balance based on successful collection of payment.
3236
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
3237
+ # facilitate payment using your own payment integration. Select NONE if you do not
3238
+ # wish to payment gate the commit balance.
3239
+ sig do
3240
+ returns(
3241
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol
3242
+ )
3243
+ end
3244
+ attr_accessor :payment_gate_type
3245
+
3246
+ # Only applicable if using PRECALCULATED as your tax type.
3247
+ sig do
3248
+ returns(
3249
+ T.nilable(
3250
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig
3251
+ )
3252
+ )
3253
+ end
3254
+ attr_reader :precalculated_tax_config
3255
+
3256
+ sig do
3257
+ params(
3258
+ precalculated_tax_config:
3259
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig::OrHash
3260
+ ).void
3261
+ end
3262
+ attr_writer :precalculated_tax_config
3263
+
3264
+ # Only applicable if using STRIPE as your payment gate type.
3265
+ sig do
3266
+ returns(
3267
+ T.nilable(
3268
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig
3269
+ )
3270
+ )
3271
+ end
3272
+ attr_reader :stripe_config
3273
+
3274
+ sig do
3275
+ params(
3276
+ stripe_config:
3277
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::OrHash
3278
+ ).void
3279
+ end
3280
+ attr_writer :stripe_config
3281
+
3282
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
3283
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
3284
+ # will default to NONE.
3285
+ sig do
3286
+ returns(
3287
+ T.nilable(
3288
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
3289
+ )
3290
+ )
3291
+ end
3292
+ attr_reader :tax_type
3293
+
3294
+ sig do
3295
+ params(
3296
+ tax_type:
3297
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::OrSymbol
3298
+ ).void
3299
+ end
3300
+ attr_writer :tax_type
3301
+
3302
+ sig do
3303
+ params(
3304
+ payment_gate_type:
3305
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType::OrSymbol,
3306
+ precalculated_tax_config:
3307
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig::OrHash,
3308
+ stripe_config:
3309
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::OrHash,
3310
+ tax_type:
3311
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::OrSymbol
3312
+ ).returns(T.attached_class)
3313
+ end
3314
+ def self.new(
3315
+ # Gate access to the commit balance based on successful collection of payment.
3316
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
3317
+ # facilitate payment using your own payment integration. Select NONE if you do not
3318
+ # wish to payment gate the commit balance.
3319
+ payment_gate_type:,
3320
+ # Only applicable if using PRECALCULATED as your tax type.
3321
+ precalculated_tax_config: nil,
3322
+ # Only applicable if using STRIPE as your payment gate type.
3323
+ stripe_config: nil,
3324
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
3325
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
3326
+ # will default to NONE.
3327
+ tax_type: nil
3328
+ )
3329
+ end
3330
+
3331
+ sig do
3332
+ override.returns(
3333
+ {
3334
+ payment_gate_type:
3335
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol,
3336
+ precalculated_tax_config:
3337
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig,
3338
+ stripe_config:
3339
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig,
3340
+ tax_type:
3341
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
3342
+ }
3343
+ )
3344
+ end
3345
+ def to_hash
3346
+ end
3347
+
3348
+ # Gate access to the commit balance based on successful collection of payment.
3349
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
3350
+ # facilitate payment using your own payment integration. Select NONE if you do not
3351
+ # wish to payment gate the commit balance.
3352
+ module PaymentGateType
3353
+ extend MetronomeSDK::Internal::Type::Enum
3354
+
3355
+ TaggedSymbol =
3356
+ T.type_alias do
3357
+ T.all(
3358
+ Symbol,
3359
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType
3360
+ )
3361
+ end
3362
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3363
+
3364
+ NONE =
3365
+ T.let(
3366
+ :NONE,
3367
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol
3368
+ )
3369
+ STRIPE =
3370
+ T.let(
3371
+ :STRIPE,
3372
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol
3373
+ )
3374
+ EXTERNAL =
3375
+ T.let(
3376
+ :EXTERNAL,
3377
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol
3378
+ )
3379
+
3380
+ sig do
3381
+ override.returns(
3382
+ T::Array[
3383
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol
3384
+ ]
3385
+ )
3386
+ end
3387
+ def self.values
3388
+ end
3389
+ end
3390
+
3391
+ class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
3392
+ OrHash =
3393
+ T.type_alias do
3394
+ T.any(
3395
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig,
3396
+ MetronomeSDK::Internal::AnyHash
3397
+ )
3398
+ end
3399
+
3400
+ # Amount of tax to be applied. This should be in the same currency and
3401
+ # denomination as the commit's invoice schedule
3402
+ sig { returns(Float) }
3403
+ attr_accessor :tax_amount
3404
+
3405
+ # Name of the tax to be applied. This may be used in an invoice line item
3406
+ # description.
3407
+ sig { returns(T.nilable(String)) }
3408
+ attr_reader :tax_name
3409
+
3410
+ sig { params(tax_name: String).void }
3411
+ attr_writer :tax_name
3412
+
3413
+ # Only applicable if using PRECALCULATED as your tax type.
3414
+ sig do
3415
+ params(tax_amount: Float, tax_name: String).returns(
3416
+ T.attached_class
3417
+ )
3418
+ end
3419
+ def self.new(
3420
+ # Amount of tax to be applied. This should be in the same currency and
3421
+ # denomination as the commit's invoice schedule
3422
+ tax_amount:,
3423
+ # Name of the tax to be applied. This may be used in an invoice line item
3424
+ # description.
3425
+ tax_name: nil
3426
+ )
3427
+ end
3428
+
3429
+ sig { override.returns({ tax_amount: Float, tax_name: String }) }
3430
+ def to_hash
3431
+ end
3432
+ end
3433
+
3434
+ class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
3435
+ OrHash =
3436
+ T.type_alias do
3437
+ T.any(
3438
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig,
3439
+ MetronomeSDK::Internal::AnyHash
3440
+ )
3441
+ end
3442
+
3443
+ # If left blank, will default to INVOICE
3444
+ sig do
3445
+ returns(
3446
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol
3447
+ )
3448
+ end
3449
+ attr_accessor :payment_type
3450
+
3451
+ # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
3452
+ # your payment type.
3453
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
3454
+ attr_reader :invoice_metadata
3455
+
3456
+ sig { params(invoice_metadata: T::Hash[Symbol, String]).void }
3457
+ attr_writer :invoice_metadata
3458
+
3459
+ # Only applicable if using STRIPE as your payment gate type.
3460
+ sig do
3461
+ params(
3462
+ payment_type:
3463
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
3464
+ invoice_metadata: T::Hash[Symbol, String]
3465
+ ).returns(T.attached_class)
3466
+ end
3467
+ def self.new(
3468
+ # If left blank, will default to INVOICE
3469
+ payment_type:,
3470
+ # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
3471
+ # your payment type.
3472
+ invoice_metadata: nil
3473
+ )
3474
+ end
3475
+
3476
+ sig do
3477
+ override.returns(
3478
+ {
3479
+ payment_type:
3480
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol,
3481
+ invoice_metadata: T::Hash[Symbol, String]
3482
+ }
3483
+ )
3484
+ end
3485
+ def to_hash
3486
+ end
3487
+
3488
+ # If left blank, will default to INVOICE
3489
+ module PaymentType
3490
+ extend MetronomeSDK::Internal::Type::Enum
3491
+
3492
+ TaggedSymbol =
3493
+ T.type_alias do
3494
+ T.all(
3495
+ Symbol,
3496
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType
3497
+ )
3498
+ end
3499
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3500
+
3501
+ INVOICE =
3502
+ T.let(
3503
+ :INVOICE,
3504
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol
3505
+ )
3506
+ PAYMENT_INTENT =
3507
+ T.let(
3508
+ :PAYMENT_INTENT,
3509
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol
3510
+ )
3511
+
3512
+ sig do
3513
+ override.returns(
3514
+ T::Array[
3515
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol
3516
+ ]
3517
+ )
3518
+ end
3519
+ def self.values
3520
+ end
3521
+ end
3522
+ end
3523
+
3524
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
3525
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
3526
+ # will default to NONE.
3527
+ module TaxType
3528
+ extend MetronomeSDK::Internal::Type::Enum
3529
+
3530
+ TaggedSymbol =
3531
+ T.type_alias do
3532
+ T.all(
3533
+ Symbol,
3534
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType
3535
+ )
3536
+ end
3537
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3538
+
3539
+ NONE =
3540
+ T.let(
3541
+ :NONE,
3542
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
3543
+ )
3544
+ STRIPE =
3545
+ T.let(
3546
+ :STRIPE,
3547
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
3548
+ )
3549
+ ANROK =
3550
+ T.let(
3551
+ :ANROK,
3552
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
3553
+ )
3554
+ PRECALCULATED =
3555
+ T.let(
3556
+ :PRECALCULATED,
3557
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
3558
+ )
3559
+
3560
+ sig do
3561
+ override.returns(
3562
+ T::Array[
3563
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
3564
+ ]
3565
+ )
3566
+ end
3567
+ def self.values
3568
+ end
3569
+ end
3570
+ end
3571
+ end
3572
+
3573
+ class UsageFilter < MetronomeSDK::Internal::Type::BaseModel
3574
+ OrHash =
3575
+ T.type_alias do
3576
+ T.any(
3577
+ MetronomeSDK::ContractWithoutAmendments::UsageFilter,
3578
+ MetronomeSDK::Internal::AnyHash
3579
+ )
3580
+ end
3581
+
3582
+ sig { returns(T.nilable(MetronomeSDK::BaseUsageFilter)) }
3583
+ attr_reader :current
3584
+
3585
+ sig do
3586
+ params(current: T.nilable(MetronomeSDK::BaseUsageFilter::OrHash)).void
3587
+ end
3588
+ attr_writer :current
3589
+
3590
+ sig { returns(MetronomeSDK::BaseUsageFilter) }
3591
+ attr_reader :initial
3592
+
3593
+ sig { params(initial: MetronomeSDK::BaseUsageFilter::OrHash).void }
3594
+ attr_writer :initial
3595
+
3596
+ sig do
3597
+ returns(
3598
+ T::Array[
3599
+ MetronomeSDK::ContractWithoutAmendments::UsageFilter::Update
3600
+ ]
3601
+ )
3602
+ end
3603
+ attr_accessor :updates
3604
+
3605
+ sig do
3606
+ params(
3607
+ current: T.nilable(MetronomeSDK::BaseUsageFilter::OrHash),
3608
+ initial: MetronomeSDK::BaseUsageFilter::OrHash,
3609
+ updates:
3610
+ T::Array[
3611
+ MetronomeSDK::ContractWithoutAmendments::UsageFilter::Update::OrHash
3612
+ ]
3613
+ ).returns(T.attached_class)
3614
+ end
3615
+ def self.new(current:, initial:, updates:)
3616
+ end
3617
+
3618
+ sig do
3619
+ override.returns(
3620
+ {
3621
+ current: T.nilable(MetronomeSDK::BaseUsageFilter),
3622
+ initial: MetronomeSDK::BaseUsageFilter,
3623
+ updates:
3624
+ T::Array[
3625
+ MetronomeSDK::ContractWithoutAmendments::UsageFilter::Update
3626
+ ]
3627
+ }
3628
+ )
3629
+ end
3630
+ def to_hash
3631
+ end
3632
+
3633
+ class Update < MetronomeSDK::Internal::Type::BaseModel
3634
+ OrHash =
3635
+ T.type_alias do
3636
+ T.any(
3637
+ MetronomeSDK::ContractWithoutAmendments::UsageFilter::Update,
3638
+ MetronomeSDK::Internal::AnyHash
3639
+ )
3640
+ end
3641
+
3642
+ sig { returns(String) }
3643
+ attr_accessor :group_key
3644
+
3645
+ sig { returns(T::Array[String]) }
3646
+ attr_accessor :group_values
3647
+
3648
+ sig { returns(Time) }
3649
+ attr_accessor :starting_at
3650
+
3651
+ sig do
3652
+ params(
3653
+ group_key: String,
3654
+ group_values: T::Array[String],
3655
+ starting_at: Time
3656
+ ).returns(T.attached_class)
3657
+ end
3658
+ def self.new(group_key:, group_values:, starting_at:)
3659
+ end
3660
+
3661
+ sig do
3662
+ override.returns(
3663
+ {
3664
+ group_key: String,
3665
+ group_values: T::Array[String],
3666
+ starting_at: Time
3667
+ }
3668
+ )
3669
+ end
3670
+ def to_hash
3671
+ end
3672
+ end
3673
+ end
3674
+ end
3675
+ end
3676
+ end