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

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 (417) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +56 -0
  3. data/README.md +1 -1
  4. data/lib/metronome_sdk/errors.rb +22 -0
  5. data/lib/metronome_sdk/internal/cursor_page.rb +1 -1
  6. data/lib/metronome_sdk/internal/transport/base_client.rb +10 -2
  7. data/lib/metronome_sdk/internal/type/array_of.rb +6 -1
  8. data/lib/metronome_sdk/internal/type/base_model.rb +82 -26
  9. data/lib/metronome_sdk/internal/type/boolean.rb +7 -1
  10. data/lib/metronome_sdk/internal/type/converter.rb +42 -34
  11. data/lib/metronome_sdk/internal/type/enum.rb +16 -5
  12. data/lib/metronome_sdk/internal/type/file_input.rb +6 -1
  13. data/lib/metronome_sdk/internal/type/hash_of.rb +6 -1
  14. data/lib/metronome_sdk/internal/type/union.rb +17 -9
  15. data/lib/metronome_sdk/internal/type/unknown.rb +7 -1
  16. data/lib/metronome_sdk/internal/util.rb +8 -9
  17. data/lib/metronome_sdk/models/base_usage_filter.rb +27 -0
  18. data/lib/metronome_sdk/models/commit.rb +1053 -0
  19. data/lib/metronome_sdk/models/contract_without_amendments.rb +2043 -0
  20. data/lib/metronome_sdk/models/credit.rb +677 -0
  21. data/lib/metronome_sdk/models/credit_type_data.rb +21 -0
  22. data/lib/metronome_sdk/models/discount.rb +68 -0
  23. data/lib/metronome_sdk/models/event_type_filter.rb +33 -0
  24. data/lib/metronome_sdk/models/id.rb +15 -0
  25. data/lib/metronome_sdk/models/override.rb +381 -0
  26. data/lib/metronome_sdk/models/pro_service.rb +73 -0
  27. data/lib/metronome_sdk/models/property_filter.rb +52 -0
  28. data/lib/metronome_sdk/models/rate.rb +101 -0
  29. data/lib/metronome_sdk/models/schedule_duration.rb +50 -0
  30. data/lib/metronome_sdk/models/schedule_point_in_time.rb +62 -0
  31. data/lib/metronome_sdk/models/scheduled_charge.rb +76 -0
  32. data/lib/metronome_sdk/models/tier.rb +21 -0
  33. data/lib/metronome_sdk/models/v1/alert_archive_response.rb +3 -14
  34. data/lib/metronome_sdk/models/v1/alert_create_params.rb +4 -1
  35. data/lib/metronome_sdk/models/v1/alert_create_response.rb +3 -14
  36. data/lib/metronome_sdk/models/v1/billable_metric_archive_params.rb +2 -8
  37. data/lib/metronome_sdk/models/v1/billable_metric_archive_response.rb +3 -14
  38. data/lib/metronome_sdk/models/v1/billable_metric_create_params.rb +6 -86
  39. data/lib/metronome_sdk/models/v1/billable_metric_create_response.rb +3 -14
  40. data/lib/metronome_sdk/models/v1/billable_metric_list_response.rb +6 -85
  41. data/lib/metronome_sdk/models/v1/billable_metric_retrieve_response.rb +8 -85
  42. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +312 -35
  43. data/lib/metronome_sdk/models/v1/contract_amend_response.rb +3 -14
  44. data/lib/metronome_sdk/models/v1/contract_archive_response.rb +3 -14
  45. data/lib/metronome_sdk/models/v1/contract_create_historical_invoices_response.rb +3 -1276
  46. data/lib/metronome_sdk/models/v1/contract_create_params.rb +792 -104
  47. data/lib/metronome_sdk/models/v1/contract_create_response.rb +3 -14
  48. data/lib/metronome_sdk/models/v1/contract_list_balances_params.rb +9 -1
  49. data/lib/metronome_sdk/models/v1/contract_list_balances_response.rb +5 -1645
  50. data/lib/metronome_sdk/models/v1/contract_list_response.rb +253 -10692
  51. data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rb +9 -295
  52. data/lib/metronome_sdk/models/v1/contract_retrieve_response.rb +254 -10721
  53. data/lib/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_response.rb +3 -1276
  54. data/lib/metronome_sdk/models/v1/contract_update_end_date_response.rb +3 -14
  55. data/lib/metronome_sdk/models/v1/contracts/product_archive_response.rb +3 -14
  56. data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +6 -97
  57. data/lib/metronome_sdk/models/v1/contracts/product_create_response.rb +3 -14
  58. data/lib/metronome_sdk/models/v1/contracts/product_list_item_state.rb +148 -0
  59. data/lib/metronome_sdk/models/v1/contracts/product_list_response.rb +12 -561
  60. data/lib/metronome_sdk/models/v1/contracts/product_retrieve_params.rb +2 -8
  61. data/lib/metronome_sdk/models/v1/contracts/product_retrieve_response.rb +14 -559
  62. data/lib/metronome_sdk/models/v1/contracts/product_update_params.rb +6 -97
  63. data/lib/metronome_sdk/models/v1/contracts/product_update_response.rb +3 -14
  64. data/lib/metronome_sdk/models/v1/contracts/quantity_conversion.rb +57 -0
  65. data/lib/metronome_sdk/models/v1/contracts/quantity_rounding.rb +45 -0
  66. data/lib/metronome_sdk/models/v1/contracts/rate_card_archive_params.rb +2 -8
  67. data/lib/metronome_sdk/models/v1/contracts/rate_card_archive_response.rb +3 -14
  68. data/lib/metronome_sdk/models/v1/contracts/rate_card_create_response.rb +3 -14
  69. data/lib/metronome_sdk/models/v1/contracts/rate_card_list_response.rb +6 -42
  70. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_params.rb +2 -8
  71. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rb +6 -159
  72. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rb +6 -42
  73. data/lib/metronome_sdk/models/v1/contracts/rate_card_update_response.rb +3 -14
  74. data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_set_response.rb +3 -14
  75. data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_response.rb +3 -14
  76. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +6 -44
  77. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_response.rb +3 -16
  78. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +6 -44
  79. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rb +9 -61
  80. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rb +6 -158
  81. data/lib/metronome_sdk/models/v1/credit_grant_create_params.rb +5 -77
  82. data/lib/metronome_sdk/models/v1/credit_grant_create_response.rb +3 -14
  83. data/lib/metronome_sdk/models/v1/credit_grant_edit_response.rb +3 -14
  84. data/lib/metronome_sdk/models/v1/credit_grant_list_entries_params.rb +20 -1
  85. data/lib/metronome_sdk/models/v1/credit_grant_list_entries_response.rb +11 -153
  86. data/lib/metronome_sdk/models/v1/credit_grant_list_response.rb +14 -175
  87. data/lib/metronome_sdk/models/v1/credit_grant_void_response.rb +3 -14
  88. data/lib/metronome_sdk/models/v1/credit_ledger_entry.rb +69 -0
  89. data/lib/metronome_sdk/models/v1/customer.rb +53 -0
  90. data/lib/metronome_sdk/models/v1/customer_archive_params.rb +2 -8
  91. data/lib/metronome_sdk/models/v1/customer_archive_response.rb +3 -14
  92. data/lib/metronome_sdk/models/v1/customer_create_response.rb +3 -50
  93. data/lib/metronome_sdk/models/v1/{customer_list_response.rb → customer_detail.rb} +14 -15
  94. data/lib/metronome_sdk/models/v1/customer_list_billable_metrics_response.rb +6 -86
  95. data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +115 -0
  96. data/lib/metronome_sdk/models/v1/customer_preview_events_response.rb +18 -0
  97. data/lib/metronome_sdk/models/v1/customer_retrieve_response.rb +3 -126
  98. data/lib/metronome_sdk/models/v1/customer_set_name_response.rb +3 -50
  99. data/lib/metronome_sdk/models/v1/customers/alert_list_response.rb +5 -276
  100. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_response.rb +3 -279
  101. data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +9 -1
  102. data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +8 -6
  103. data/lib/metronome_sdk/models/v1/customers/commit_create_response.rb +3 -14
  104. data/lib/metronome_sdk/models/v1/customers/commit_list_params.rb +9 -1
  105. data/lib/metronome_sdk/models/v1/customers/commit_list_response.rb +3 -1047
  106. data/lib/metronome_sdk/models/v1/customers/commit_update_end_date_response.rb +3 -14
  107. data/lib/metronome_sdk/models/v1/customers/credit_create_response.rb +3 -14
  108. data/lib/metronome_sdk/models/v1/customers/credit_list_params.rb +9 -1
  109. data/lib/metronome_sdk/models/v1/customers/credit_list_response.rb +3 -593
  110. data/lib/metronome_sdk/models/v1/customers/credit_update_end_date_response.rb +3 -14
  111. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +270 -0
  112. data/lib/metronome_sdk/models/v1/customers/{invoice_list_response.rb → invoice.rb} +119 -303
  113. data/lib/metronome_sdk/models/v1/customers/invoice_list_breakdowns_response.rb +2 -1271
  114. data/lib/metronome_sdk/models/v1/customers/invoice_retrieve_response.rb +3 -1276
  115. data/lib/metronome_sdk/models/v1/customers/plan_add_response.rb +3 -14
  116. data/lib/metronome_sdk/models/v1/customers/plan_list_response.rb +3 -21
  117. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +1 -0
  118. data/lib/metronome_sdk/models/v1/plan_detail.rb +200 -0
  119. data/lib/metronome_sdk/models/v1/plan_get_details_response.rb +3 -286
  120. data/lib/metronome_sdk/models/v1/plan_list_charges_response.rb +3 -20
  121. data/lib/metronome_sdk/models/v1/plan_list_customers_response.rb +3 -128
  122. data/lib/metronome_sdk/models/v1/rollover_amount_max_amount.rb +38 -0
  123. data/lib/metronome_sdk/models/v1/rollover_amount_max_percentage.rb +38 -0
  124. data/lib/metronome_sdk/models/v1/usage_search_params.rb +24 -0
  125. data/lib/metronome_sdk/models/v1/usage_search_response.rb +249 -0
  126. data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +11 -8
  127. data/lib/metronome_sdk/models/v2/contract_edit_commit_response.rb +3 -14
  128. data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +3 -2
  129. data/lib/metronome_sdk/models/v2/contract_edit_credit_response.rb +3 -14
  130. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +1127 -105
  131. data/lib/metronome_sdk/models/v2/contract_edit_response.rb +3 -14
  132. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +577 -643
  133. data/lib/metronome_sdk/models/v2/contract_list_response.rb +917 -746
  134. data/lib/metronome_sdk/models/v2/contract_retrieve_response.rb +917 -748
  135. data/lib/metronome_sdk/models.rb +36 -4
  136. data/lib/metronome_sdk/resources/v1/alerts.rb +1 -1
  137. data/lib/metronome_sdk/resources/v1/billable_metrics.rb +2 -2
  138. data/lib/metronome_sdk/resources/v1/contracts/products.rb +4 -4
  139. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +1 -1
  140. data/lib/metronome_sdk/resources/v1/contracts.rb +11 -5
  141. data/lib/metronome_sdk/resources/v1/credit_grants.rb +4 -2
  142. data/lib/metronome_sdk/resources/v1/customers/commits.rb +5 -3
  143. data/lib/metronome_sdk/resources/v1/customers/credits.rb +3 -1
  144. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +2 -2
  145. data/lib/metronome_sdk/resources/v1/customers.rb +40 -2
  146. data/lib/metronome_sdk/resources/v1/usage.rb +25 -0
  147. data/lib/metronome_sdk/resources/v2/contracts.rb +11 -9
  148. data/lib/metronome_sdk/version.rb +1 -1
  149. data/lib/metronome_sdk.rb +31 -2
  150. data/rbi/metronome_sdk/errors.rbi +16 -0
  151. data/rbi/metronome_sdk/internal/type/boolean.rbi +2 -0
  152. data/rbi/metronome_sdk/internal/type/converter.rbi +15 -15
  153. data/rbi/metronome_sdk/internal/type/union.rbi +5 -0
  154. data/rbi/metronome_sdk/internal/type/unknown.rbi +2 -0
  155. data/rbi/metronome_sdk/internal/util.rbi +2 -0
  156. data/rbi/metronome_sdk/models/base_usage_filter.rbi +46 -0
  157. data/rbi/metronome_sdk/models/commit.rbi +2046 -0
  158. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +4260 -0
  159. data/rbi/metronome_sdk/models/credit.rbi +1314 -0
  160. data/rbi/metronome_sdk/models/credit_type_data.rbi +26 -0
  161. data/rbi/metronome_sdk/models/discount.rbi +106 -0
  162. data/rbi/metronome_sdk/models/event_type_filter.rbi +57 -0
  163. data/rbi/metronome_sdk/models/id.rbi +23 -0
  164. data/rbi/metronome_sdk/models/override.rbi +675 -0
  165. data/rbi/metronome_sdk/models/pro_service.rbi +98 -0
  166. data/rbi/metronome_sdk/models/property_filter.rbi +88 -0
  167. data/rbi/metronome_sdk/models/rate.rbi +155 -0
  168. data/rbi/metronome_sdk/models/schedule_duration.rbi +89 -0
  169. data/rbi/metronome_sdk/models/schedule_point_in_time.rbi +121 -0
  170. data/rbi/metronome_sdk/models/scheduled_charge.rbi +119 -0
  171. data/rbi/metronome_sdk/models/tier.rbi +29 -0
  172. data/rbi/metronome_sdk/models/v1/alert_archive_response.rbi +4 -37
  173. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +6 -0
  174. data/rbi/metronome_sdk/models/v1/alert_create_response.rbi +4 -37
  175. data/rbi/metronome_sdk/models/v1/billable_metric_archive_params.rbi +6 -12
  176. data/rbi/metronome_sdk/models/v1/billable_metric_archive_response.rbi +4 -44
  177. data/rbi/metronome_sdk/models/v1/billable_metric_create_params.rbi +8 -177
  178. data/rbi/metronome_sdk/models/v1/billable_metric_create_response.rbi +4 -43
  179. data/rbi/metronome_sdk/models/v1/billable_metric_list_response.rbi +8 -177
  180. data/rbi/metronome_sdk/models/v1/billable_metric_retrieve_response.rbi +8 -175
  181. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +712 -68
  182. data/rbi/metronome_sdk/models/v1/contract_amend_response.rbi +4 -37
  183. data/rbi/metronome_sdk/models/v1/contract_archive_response.rbi +4 -39
  184. data/rbi/metronome_sdk/models/v1/contract_create_historical_invoices_response.rbi +3 -2595
  185. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +1738 -210
  186. data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +4 -37
  187. data/rbi/metronome_sdk/models/v1/contract_list_balances_params.rbi +11 -0
  188. data/rbi/metronome_sdk/models/v1/contract_list_balances_response.rbi +3 -3366
  189. data/rbi/metronome_sdk/models/v1/contract_list_response.rbi +375 -22523
  190. data/rbi/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbi +12 -632
  191. data/rbi/metronome_sdk/models/v1/contract_retrieve_response.rbi +375 -22523
  192. data/rbi/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_response.rbi +3 -2595
  193. data/rbi/metronome_sdk/models/v1/contract_update_end_date_response.rbi +4 -44
  194. data/rbi/metronome_sdk/models/v1/contracts/product_archive_response.rbi +4 -44
  195. data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +8 -209
  196. data/rbi/metronome_sdk/models/v1/contracts/product_create_response.rbi +4 -44
  197. data/rbi/metronome_sdk/models/v1/contracts/product_list_item_state.rbi +237 -0
  198. data/rbi/metronome_sdk/models/v1/contracts/product_list_response.rbi +76 -1143
  199. data/rbi/metronome_sdk/models/v1/contracts/product_retrieve_params.rbi +3 -9
  200. data/rbi/metronome_sdk/models/v1/contracts/product_retrieve_response.rbi +76 -1137
  201. data/rbi/metronome_sdk/models/v1/contracts/product_update_params.rbi +8 -209
  202. data/rbi/metronome_sdk/models/v1/contracts/product_update_response.rbi +4 -44
  203. data/rbi/metronome_sdk/models/v1/contracts/quantity_conversion.rbi +111 -0
  204. data/rbi/metronome_sdk/models/v1/contracts/quantity_rounding.rbi +94 -0
  205. data/rbi/metronome_sdk/models/v1/contracts/rate_card_archive_params.rbi +3 -9
  206. data/rbi/metronome_sdk/models/v1/contracts/rate_card_archive_response.rbi +4 -44
  207. data/rbi/metronome_sdk/models/v1/contracts/rate_card_create_response.rbi +4 -44
  208. data/rbi/metronome_sdk/models/v1/contracts/rate_card_list_response.rbi +8 -74
  209. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_params.rbi +3 -9
  210. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbi +8 -344
  211. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rbi +8 -74
  212. data/rbi/metronome_sdk/models/v1/contracts/rate_card_update_response.rbi +4 -44
  213. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/product_order_set_response.rbi +4 -44
  214. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_response.rbi +4 -44
  215. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +8 -108
  216. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_response.rbi +4 -45
  217. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +8 -108
  218. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbi +12 -149
  219. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbi +8 -344
  220. data/rbi/metronome_sdk/models/v1/credit_grant_create_params.rbi +8 -166
  221. data/rbi/metronome_sdk/models/v1/credit_grant_create_response.rbi +4 -41
  222. data/rbi/metronome_sdk/models/v1/credit_grant_edit_response.rbi +4 -39
  223. data/rbi/metronome_sdk/models/v1/credit_grant_list_entries_params.rbi +58 -0
  224. data/rbi/metronome_sdk/models/v1/credit_grant_list_entries_response.rbi +10 -231
  225. data/rbi/metronome_sdk/models/v1/credit_grant_list_response.rbi +14 -281
  226. data/rbi/metronome_sdk/models/v1/credit_grant_void_response.rbi +4 -39
  227. data/rbi/metronome_sdk/models/v1/credit_ledger_entry.rbi +90 -0
  228. data/rbi/metronome_sdk/models/v1/customer.rbi +74 -0
  229. data/rbi/metronome_sdk/models/v1/customer_archive_params.rbi +6 -12
  230. data/rbi/metronome_sdk/models/v1/customer_archive_response.rbi +4 -39
  231. data/rbi/metronome_sdk/models/v1/customer_create_response.rbi +6 -84
  232. data/rbi/metronome_sdk/models/v1/{customer_list_response.rbi → customer_detail.rbi} +19 -26
  233. data/rbi/metronome_sdk/models/v1/customer_list_billable_metrics_response.rbi +8 -177
  234. data/rbi/metronome_sdk/models/v1/customer_preview_events_params.rbi +214 -0
  235. data/rbi/metronome_sdk/models/v1/customer_preview_events_response.rbi +35 -0
  236. data/rbi/metronome_sdk/models/v1/customer_retrieve_response.rbi +6 -255
  237. data/rbi/metronome_sdk/models/v1/customer_set_name_response.rbi +6 -86
  238. data/rbi/metronome_sdk/models/v1/customers/alert_list_response.rbi +3 -623
  239. data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_response.rbi +4 -622
  240. data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +11 -0
  241. data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +12 -8
  242. data/rbi/metronome_sdk/models/v1/customers/commit_create_response.rbi +4 -44
  243. data/rbi/metronome_sdk/models/v1/customers/commit_list_params.rbi +11 -0
  244. data/rbi/metronome_sdk/models/v1/customers/commit_list_response.rbi +3 -2164
  245. data/rbi/metronome_sdk/models/v1/customers/commit_update_end_date_response.rbi +4 -44
  246. data/rbi/metronome_sdk/models/v1/customers/credit_create_response.rbi +4 -44
  247. data/rbi/metronome_sdk/models/v1/customers/credit_list_params.rbi +11 -0
  248. data/rbi/metronome_sdk/models/v1/customers/credit_list_response.rbi +3 -1224
  249. data/rbi/metronome_sdk/models/v1/customers/credit_update_end_date_response.rbi +4 -44
  250. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +572 -0
  251. data/rbi/metronome_sdk/models/v1/customers/{invoice_list_response.rbi → invoice.rbi} +182 -589
  252. data/rbi/metronome_sdk/models/v1/customers/invoice_list_breakdowns_response.rbi +4 -2561
  253. data/rbi/metronome_sdk/models/v1/customers/invoice_retrieve_response.rbi +6 -2612
  254. data/rbi/metronome_sdk/models/v1/customers/plan_add_response.rbi +4 -41
  255. data/rbi/metronome_sdk/models/v1/customers/plan_list_response.rbi +4 -39
  256. data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +5 -0
  257. data/rbi/metronome_sdk/models/v1/plan_detail.rbi +349 -0
  258. data/rbi/metronome_sdk/models/v1/plan_get_details_response.rbi +6 -560
  259. data/rbi/metronome_sdk/models/v1/plan_list_charges_response.rbi +4 -37
  260. data/rbi/metronome_sdk/models/v1/plan_list_customers_response.rbi +4 -248
  261. data/rbi/metronome_sdk/models/v1/rollover_amount_max_amount.rbi +79 -0
  262. data/rbi/metronome_sdk/models/v1/rollover_amount_max_percentage.rbi +80 -0
  263. data/rbi/metronome_sdk/models/v1/usage_search_params.rbi +48 -0
  264. data/rbi/metronome_sdk/models/v1/usage_search_response.rbi +438 -0
  265. data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +23 -23
  266. data/rbi/metronome_sdk/models/v2/contract_edit_commit_response.rbi +4 -41
  267. data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +11 -15
  268. data/rbi/metronome_sdk/models/v2/contract_edit_credit_response.rbi +4 -41
  269. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +2463 -206
  270. data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +4 -37
  271. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1381 -1550
  272. data/rbi/metronome_sdk/models/v2/contract_list_response.rbi +2017 -1466
  273. data/rbi/metronome_sdk/models/v2/contract_retrieve_response.rbi +2017 -1466
  274. data/rbi/metronome_sdk/models.rbi +32 -0
  275. data/rbi/metronome_sdk/resources/v1/alerts.rbi +3 -0
  276. data/rbi/metronome_sdk/resources/v1/billable_metrics.rbi +2 -6
  277. data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +4 -4
  278. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +1 -4
  279. data/rbi/metronome_sdk/resources/v1/contracts.rbi +13 -4
  280. data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +4 -0
  281. data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +9 -4
  282. data/rbi/metronome_sdk/resources/v1/customers/credits.rbi +3 -0
  283. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +1 -1
  284. data/rbi/metronome_sdk/resources/v1/customers.rbi +34 -3
  285. data/rbi/metronome_sdk/resources/v1/usage.rbi +17 -0
  286. data/rbi/metronome_sdk/resources/v2/contracts.rbi +24 -14
  287. data/sig/metronome_sdk/errors.rbs +9 -0
  288. data/sig/metronome_sdk/internal/type/converter.rbs +7 -1
  289. data/sig/metronome_sdk/models/base_usage_filter.rbs +28 -0
  290. data/sig/metronome_sdk/models/commit.rbs +1063 -0
  291. data/sig/metronome_sdk/models/contract_without_amendments.rbs +1828 -0
  292. data/sig/metronome_sdk/models/credit.rbs +686 -0
  293. data/sig/metronome_sdk/models/credit_type_data.rbs +15 -0
  294. data/sig/metronome_sdk/models/discount.rbs +63 -0
  295. data/sig/metronome_sdk/models/event_type_filter.rbs +26 -0
  296. data/sig/metronome_sdk/models/id.rbs +13 -0
  297. data/sig/metronome_sdk/models/override.rbs +399 -0
  298. data/sig/metronome_sdk/models/pro_service.rbs +61 -0
  299. data/sig/metronome_sdk/models/property_filter.rbs +41 -0
  300. data/sig/metronome_sdk/models/rate.rbs +94 -0
  301. data/sig/metronome_sdk/models/schedule_duration.rbs +56 -0
  302. data/sig/metronome_sdk/models/schedule_point_in_time.rbs +75 -0
  303. data/sig/metronome_sdk/models/scheduled_charge.rbs +70 -0
  304. data/sig/metronome_sdk/models/tier.rbs +17 -0
  305. data/sig/metronome_sdk/models/v1/alert_archive_response.rbs +4 -19
  306. data/sig/metronome_sdk/models/v1/alert_create_response.rbs +4 -19
  307. data/sig/metronome_sdk/models/v1/billable_metric_archive_params.rbs +4 -12
  308. data/sig/metronome_sdk/models/v1/billable_metric_archive_response.rbs +4 -19
  309. data/sig/metronome_sdk/models/v1/billable_metric_create_params.rbs +12 -73
  310. data/sig/metronome_sdk/models/v1/billable_metric_create_response.rbs +4 -19
  311. data/sig/metronome_sdk/models/v1/billable_metric_list_response.rbs +12 -73
  312. data/sig/metronome_sdk/models/v1/billable_metric_retrieve_response.rbs +12 -73
  313. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +291 -24
  314. data/sig/metronome_sdk/models/v1/contract_amend_response.rbs +4 -19
  315. data/sig/metronome_sdk/models/v1/contract_archive_response.rbs +4 -19
  316. data/sig/metronome_sdk/models/v1/contract_create_historical_invoices_response.rbs +4 -1291
  317. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +694 -84
  318. data/sig/metronome_sdk/models/v1/contract_create_response.rbs +4 -19
  319. data/sig/metronome_sdk/models/v1/contract_list_balances_params.rbs +7 -0
  320. data/sig/metronome_sdk/models/v1/contract_list_balances_response.rbs +1 -1642
  321. data/sig/metronome_sdk/models/v1/contract_list_response.rbs +188 -10437
  322. data/sig/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbs +15 -271
  323. data/sig/metronome_sdk/models/v1/contract_retrieve_response.rbs +188 -10437
  324. data/sig/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_response.rbs +4 -1291
  325. data/sig/metronome_sdk/models/v1/contract_update_end_date_response.rbs +4 -19
  326. data/sig/metronome_sdk/models/v1/contracts/product_archive_response.rbs +4 -21
  327. data/sig/metronome_sdk/models/v1/contracts/product_create_params.rbs +8 -82
  328. data/sig/metronome_sdk/models/v1/contracts/product_create_response.rbs +4 -21
  329. data/sig/metronome_sdk/models/v1/contracts/product_list_item_state.rbs +121 -0
  330. data/sig/metronome_sdk/models/v1/contracts/product_list_response.rbs +16 -466
  331. data/sig/metronome_sdk/models/v1/contracts/product_retrieve_params.rbs +4 -12
  332. data/sig/metronome_sdk/models/v1/contracts/product_retrieve_response.rbs +16 -466
  333. data/sig/metronome_sdk/models/v1/contracts/product_update_params.rbs +8 -82
  334. data/sig/metronome_sdk/models/v1/contracts/product_update_response.rbs +4 -21
  335. data/sig/metronome_sdk/models/v1/contracts/quantity_conversion.rbs +47 -0
  336. data/sig/metronome_sdk/models/v1/contracts/quantity_rounding.rbs +41 -0
  337. data/sig/metronome_sdk/models/v1/contracts/rate_card_archive_params.rbs +4 -12
  338. data/sig/metronome_sdk/models/v1/contracts/rate_card_archive_response.rbs +4 -21
  339. data/sig/metronome_sdk/models/v1/contracts/rate_card_create_response.rbs +4 -21
  340. data/sig/metronome_sdk/models/v1/contracts/rate_card_list_response.rbs +10 -34
  341. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_params.rbs +4 -12
  342. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbs +10 -144
  343. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rbs +10 -34
  344. data/sig/metronome_sdk/models/v1/contracts/rate_card_update_response.rbs +4 -21
  345. data/sig/metronome_sdk/models/v1/contracts/rate_cards/product_order_set_response.rbs +4 -21
  346. data/sig/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_response.rbs +4 -21
  347. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +12 -40
  348. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_response.rbs +4 -21
  349. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +12 -40
  350. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbs +18 -58
  351. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbs +10 -144
  352. data/sig/metronome_sdk/models/v1/credit_grant_create_params.rbs +2 -66
  353. data/sig/metronome_sdk/models/v1/credit_grant_create_response.rbs +4 -19
  354. data/sig/metronome_sdk/models/v1/credit_grant_edit_response.rbs +4 -19
  355. data/sig/metronome_sdk/models/v1/credit_grant_list_entries_params.rbs +20 -0
  356. data/sig/metronome_sdk/models/v1/credit_grant_list_entries_response.rbs +12 -118
  357. data/sig/metronome_sdk/models/v1/credit_grant_list_response.rbs +16 -140
  358. data/sig/metronome_sdk/models/v1/credit_grant_void_response.rbs +4 -19
  359. data/sig/metronome_sdk/models/v1/credit_ledger_entry.rbs +52 -0
  360. data/sig/metronome_sdk/models/v1/customer.rbs +44 -0
  361. data/sig/metronome_sdk/models/v1/customer_archive_params.rbs +4 -12
  362. data/sig/metronome_sdk/models/v1/customer_archive_response.rbs +4 -19
  363. data/sig/metronome_sdk/models/v1/customer_create_response.rbs +4 -48
  364. data/sig/metronome_sdk/models/v1/{customer_list_response.rbs → customer_detail.rbs} +17 -17
  365. data/sig/metronome_sdk/models/v1/customer_list_billable_metrics_response.rbs +12 -73
  366. data/sig/metronome_sdk/models/v1/customer_preview_events_params.rbs +105 -0
  367. data/sig/metronome_sdk/models/v1/customer_preview_events_response.rbs +16 -0
  368. data/sig/metronome_sdk/models/v1/customer_retrieve_response.rbs +4 -112
  369. data/sig/metronome_sdk/models/v1/customer_set_name_response.rbs +4 -48
  370. data/sig/metronome_sdk/models/v1/customers/alert_list_response.rbs +4 -243
  371. data/sig/metronome_sdk/models/v1/customers/alert_retrieve_response.rbs +4 -247
  372. data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbs +7 -0
  373. data/sig/metronome_sdk/models/v1/customers/commit_create_response.rbs +4 -21
  374. data/sig/metronome_sdk/models/v1/customers/commit_list_params.rbs +7 -0
  375. data/sig/metronome_sdk/models/v1/customers/commit_list_response.rbs +4 -1057
  376. data/sig/metronome_sdk/models/v1/customers/commit_update_end_date_response.rbs +4 -21
  377. data/sig/metronome_sdk/models/v1/customers/credit_create_response.rbs +4 -21
  378. data/sig/metronome_sdk/models/v1/customers/credit_list_params.rbs +7 -0
  379. data/sig/metronome_sdk/models/v1/customers/credit_list_response.rbs +4 -596
  380. data/sig/metronome_sdk/models/v1/customers/credit_update_end_date_response.rbs +4 -21
  381. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +234 -0
  382. data/sig/metronome_sdk/models/v1/customers/{invoice_list_response.rbs → invoice.rbs} +147 -305
  383. data/sig/metronome_sdk/models/v1/customers/invoice_list_breakdowns_response.rbs +8 -1278
  384. data/sig/metronome_sdk/models/v1/customers/invoice_retrieve_response.rbs +4 -1294
  385. data/sig/metronome_sdk/models/v1/customers/plan_add_response.rbs +4 -19
  386. data/sig/metronome_sdk/models/v1/customers/plan_list_response.rbs +4 -16
  387. data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +2 -1
  388. data/sig/metronome_sdk/models/v1/plan_detail.rbs +203 -0
  389. data/sig/metronome_sdk/models/v1/plan_get_details_response.rbs +4 -267
  390. data/sig/metronome_sdk/models/v1/plan_list_charges_response.rbs +4 -16
  391. data/sig/metronome_sdk/models/v1/plan_list_customers_response.rbs +4 -108
  392. data/sig/metronome_sdk/models/v1/rollover_amount_max_amount.rbs +37 -0
  393. data/sig/metronome_sdk/models/v1/rollover_amount_max_percentage.rbs +37 -0
  394. data/sig/metronome_sdk/models/v1/usage_search_params.rbs +26 -0
  395. data/sig/metronome_sdk/models/v1/usage_search_response.rbs +230 -0
  396. data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +4 -8
  397. data/sig/metronome_sdk/models/v2/contract_edit_commit_response.rbs +4 -19
  398. data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +4 -8
  399. data/sig/metronome_sdk/models/v2/contract_edit_credit_response.rbs +4 -19
  400. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +989 -77
  401. data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +4 -19
  402. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +510 -655
  403. data/sig/metronome_sdk/models/v2/contract_list_response.rbs +970 -809
  404. data/sig/metronome_sdk/models/v2/contract_retrieve_response.rbs +970 -809
  405. data/sig/metronome_sdk/models.rbs +32 -0
  406. data/sig/metronome_sdk/resources/v1/billable_metrics.rbs +2 -2
  407. data/sig/metronome_sdk/resources/v1/contracts/products.rbs +4 -4
  408. data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +1 -1
  409. data/sig/metronome_sdk/resources/v1/contracts.rbs +4 -1
  410. data/sig/metronome_sdk/resources/v1/credit_grants.rbs +1 -0
  411. data/sig/metronome_sdk/resources/v1/customers/commits.rbs +1 -0
  412. data/sig/metronome_sdk/resources/v1/customers/credits.rbs +1 -0
  413. data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +1 -1
  414. data/sig/metronome_sdk/resources/v1/customers.rbs +9 -1
  415. data/sig/metronome_sdk/resources/v1/usage.rbs +5 -0
  416. data/sig/metronome_sdk/resources/v2/contracts.rbs +3 -2
  417. metadata +97 -10
@@ -0,0 +1,4260 @@
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
+ # Optional configuration for recurring commit/credit hierarchy access control
1540
+ sig do
1541
+ returns(
1542
+ T.nilable(
1543
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration
1544
+ )
1545
+ )
1546
+ end
1547
+ attr_reader :hierarchy_configuration
1548
+
1549
+ sig do
1550
+ params(
1551
+ hierarchy_configuration:
1552
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::OrHash
1553
+ ).void
1554
+ end
1555
+ attr_writer :hierarchy_configuration
1556
+
1557
+ # The amount the customer should be billed for the commit. Not required.
1558
+ sig do
1559
+ returns(
1560
+ T.nilable(
1561
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::InvoiceAmount
1562
+ )
1563
+ )
1564
+ end
1565
+ attr_reader :invoice_amount
1566
+
1567
+ sig do
1568
+ params(
1569
+ invoice_amount:
1570
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::InvoiceAmount::OrHash
1571
+ ).void
1572
+ end
1573
+ attr_writer :invoice_amount
1574
+
1575
+ # Displayed on invoices. Will be passed through to the individual commits
1576
+ sig { returns(T.nilable(String)) }
1577
+ attr_reader :name
1578
+
1579
+ sig { params(name: String).void }
1580
+ attr_writer :name
1581
+
1582
+ # Will be passed down to the individual commits
1583
+ sig { returns(T.nilable(String)) }
1584
+ attr_reader :netsuite_sales_order_id
1585
+
1586
+ sig { params(netsuite_sales_order_id: String).void }
1587
+ attr_writer :netsuite_sales_order_id
1588
+
1589
+ # Determines whether the first and last commit will be prorated. If not provided,
1590
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1591
+ sig do
1592
+ returns(
1593
+ T.nilable(
1594
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::TaggedSymbol
1595
+ )
1596
+ )
1597
+ end
1598
+ attr_reader :proration
1599
+
1600
+ sig do
1601
+ params(
1602
+ proration:
1603
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::OrSymbol
1604
+ ).void
1605
+ end
1606
+ attr_writer :proration
1607
+
1608
+ # The frequency at which the recurring commits will be created. If not provided: -
1609
+ # The commits will be created on the usage invoice frequency. If provided: - The
1610
+ # period defined in the duration will correspond to this frequency. - Commits will
1611
+ # be created aligned with the recurring commit's starting_at rather than the usage
1612
+ # invoice dates.
1613
+ sig do
1614
+ returns(
1615
+ T.nilable(
1616
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol
1617
+ )
1618
+ )
1619
+ end
1620
+ attr_reader :recurrence_frequency
1621
+
1622
+ sig do
1623
+ params(
1624
+ recurrence_frequency:
1625
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::OrSymbol
1626
+ ).void
1627
+ end
1628
+ attr_writer :recurrence_frequency
1629
+
1630
+ # Will be passed down to the individual commits. This controls how much of an
1631
+ # individual unexpired commit will roll over upon contract transition. Must be
1632
+ # between 0 and 1.
1633
+ sig { returns(T.nilable(Float)) }
1634
+ attr_reader :rollover_fraction
1635
+
1636
+ sig { params(rollover_fraction: Float).void }
1637
+ attr_writer :rollover_fraction
1638
+
1639
+ # List of filters that determine what kind of customer usage draws down a commit
1640
+ # or credit. A customer's usage needs to meet the condition of at least one of the
1641
+ # specifiers to contribute to a commit's or credit's drawdown.
1642
+ sig do
1643
+ returns(
1644
+ T.nilable(
1645
+ T::Array[
1646
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Specifier
1647
+ ]
1648
+ )
1649
+ )
1650
+ end
1651
+ attr_reader :specifiers
1652
+
1653
+ sig do
1654
+ params(
1655
+ specifiers:
1656
+ T::Array[
1657
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Specifier::OrHash
1658
+ ]
1659
+ ).void
1660
+ end
1661
+ attr_writer :specifiers
1662
+
1663
+ sig do
1664
+ params(
1665
+ id: String,
1666
+ access_amount:
1667
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::AccessAmount::OrHash,
1668
+ commit_duration:
1669
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::OrHash,
1670
+ priority: Float,
1671
+ product:
1672
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Product::OrHash,
1673
+ rate_type:
1674
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RateType::OrSymbol,
1675
+ starting_at: Time,
1676
+ applicable_product_ids: T::Array[String],
1677
+ applicable_product_tags: T::Array[String],
1678
+ contract:
1679
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Contract::OrHash,
1680
+ description: String,
1681
+ ending_before: Time,
1682
+ hierarchy_configuration:
1683
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::OrHash,
1684
+ invoice_amount:
1685
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::InvoiceAmount::OrHash,
1686
+ name: String,
1687
+ netsuite_sales_order_id: String,
1688
+ proration:
1689
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::OrSymbol,
1690
+ recurrence_frequency:
1691
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::OrSymbol,
1692
+ rollover_fraction: Float,
1693
+ specifiers:
1694
+ T::Array[
1695
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Specifier::OrHash
1696
+ ]
1697
+ ).returns(T.attached_class)
1698
+ end
1699
+ def self.new(
1700
+ id:,
1701
+ # The amount of commit to grant.
1702
+ access_amount:,
1703
+ # The amount of time the created commits will be valid for
1704
+ commit_duration:,
1705
+ # Will be passed down to the individual commits
1706
+ priority:,
1707
+ product:,
1708
+ # Whether the created commits will use the commit rate or list rate
1709
+ rate_type:,
1710
+ # Determines the start time for the first commit
1711
+ starting_at:,
1712
+ # Will be passed down to the individual commits
1713
+ applicable_product_ids: nil,
1714
+ # Will be passed down to the individual commits
1715
+ applicable_product_tags: nil,
1716
+ contract: nil,
1717
+ # Will be passed down to the individual commits
1718
+ description: nil,
1719
+ # Determines when the contract will stop creating recurring commits. Optional
1720
+ ending_before: nil,
1721
+ # Optional configuration for recurring commit/credit hierarchy access control
1722
+ hierarchy_configuration: nil,
1723
+ # The amount the customer should be billed for the commit. Not required.
1724
+ invoice_amount: nil,
1725
+ # Displayed on invoices. Will be passed through to the individual commits
1726
+ name: nil,
1727
+ # Will be passed down to the individual commits
1728
+ netsuite_sales_order_id: nil,
1729
+ # Determines whether the first and last commit will be prorated. If not provided,
1730
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1731
+ proration: nil,
1732
+ # The frequency at which the recurring commits will be created. If not provided: -
1733
+ # The commits will be created on the usage invoice frequency. If provided: - The
1734
+ # period defined in the duration will correspond to this frequency. - Commits will
1735
+ # be created aligned with the recurring commit's starting_at rather than the usage
1736
+ # invoice dates.
1737
+ recurrence_frequency: nil,
1738
+ # Will be passed down to the individual commits. This controls how much of an
1739
+ # individual unexpired commit will roll over upon contract transition. Must be
1740
+ # between 0 and 1.
1741
+ rollover_fraction: nil,
1742
+ # List of filters that determine what kind of customer usage draws down a commit
1743
+ # or credit. A customer's usage needs to meet the condition of at least one of the
1744
+ # specifiers to contribute to a commit's or credit's drawdown.
1745
+ specifiers: nil
1746
+ )
1747
+ end
1748
+
1749
+ sig do
1750
+ override.returns(
1751
+ {
1752
+ id: String,
1753
+ access_amount:
1754
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::AccessAmount,
1755
+ commit_duration:
1756
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration,
1757
+ priority: Float,
1758
+ product:
1759
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Product,
1760
+ rate_type:
1761
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RateType::TaggedSymbol,
1762
+ starting_at: Time,
1763
+ applicable_product_ids: T::Array[String],
1764
+ applicable_product_tags: T::Array[String],
1765
+ contract:
1766
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Contract,
1767
+ description: String,
1768
+ ending_before: Time,
1769
+ hierarchy_configuration:
1770
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration,
1771
+ invoice_amount:
1772
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::InvoiceAmount,
1773
+ name: String,
1774
+ netsuite_sales_order_id: String,
1775
+ proration:
1776
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::TaggedSymbol,
1777
+ recurrence_frequency:
1778
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol,
1779
+ rollover_fraction: Float,
1780
+ specifiers:
1781
+ T::Array[
1782
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Specifier
1783
+ ]
1784
+ }
1785
+ )
1786
+ end
1787
+ def to_hash
1788
+ end
1789
+
1790
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
1791
+ OrHash =
1792
+ T.type_alias do
1793
+ T.any(
1794
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::AccessAmount,
1795
+ MetronomeSDK::Internal::AnyHash
1796
+ )
1797
+ end
1798
+
1799
+ sig { returns(String) }
1800
+ attr_accessor :credit_type_id
1801
+
1802
+ sig { returns(Float) }
1803
+ attr_accessor :unit_price
1804
+
1805
+ sig { returns(T.nilable(Float)) }
1806
+ attr_reader :quantity
1807
+
1808
+ sig { params(quantity: Float).void }
1809
+ attr_writer :quantity
1810
+
1811
+ # The amount of commit to grant.
1812
+ sig do
1813
+ params(
1814
+ credit_type_id: String,
1815
+ unit_price: Float,
1816
+ quantity: Float
1817
+ ).returns(T.attached_class)
1818
+ end
1819
+ def self.new(credit_type_id:, unit_price:, quantity: nil)
1820
+ end
1821
+
1822
+ sig do
1823
+ override.returns(
1824
+ { credit_type_id: String, unit_price: Float, quantity: Float }
1825
+ )
1826
+ end
1827
+ def to_hash
1828
+ end
1829
+ end
1830
+
1831
+ class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
1832
+ OrHash =
1833
+ T.type_alias do
1834
+ T.any(
1835
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration,
1836
+ MetronomeSDK::Internal::AnyHash
1837
+ )
1838
+ end
1839
+
1840
+ sig { returns(Float) }
1841
+ attr_accessor :value
1842
+
1843
+ sig do
1844
+ returns(
1845
+ T.nilable(
1846
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit::TaggedSymbol
1847
+ )
1848
+ )
1849
+ end
1850
+ attr_reader :unit
1851
+
1852
+ sig do
1853
+ params(
1854
+ unit:
1855
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit::OrSymbol
1856
+ ).void
1857
+ end
1858
+ attr_writer :unit
1859
+
1860
+ # The amount of time the created commits will be valid for
1861
+ sig do
1862
+ params(
1863
+ value: Float,
1864
+ unit:
1865
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit::OrSymbol
1866
+ ).returns(T.attached_class)
1867
+ end
1868
+ def self.new(value:, unit: nil)
1869
+ end
1870
+
1871
+ sig do
1872
+ override.returns(
1873
+ {
1874
+ value: Float,
1875
+ unit:
1876
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit::TaggedSymbol
1877
+ }
1878
+ )
1879
+ end
1880
+ def to_hash
1881
+ end
1882
+
1883
+ module Unit
1884
+ extend MetronomeSDK::Internal::Type::Enum
1885
+
1886
+ TaggedSymbol =
1887
+ T.type_alias do
1888
+ T.all(
1889
+ Symbol,
1890
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit
1891
+ )
1892
+ end
1893
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1894
+
1895
+ PERIODS =
1896
+ T.let(
1897
+ :PERIODS,
1898
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit::TaggedSymbol
1899
+ )
1900
+
1901
+ sig do
1902
+ override.returns(
1903
+ T::Array[
1904
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit::TaggedSymbol
1905
+ ]
1906
+ )
1907
+ end
1908
+ def self.values
1909
+ end
1910
+ end
1911
+ end
1912
+
1913
+ class Product < MetronomeSDK::Internal::Type::BaseModel
1914
+ OrHash =
1915
+ T.type_alias do
1916
+ T.any(
1917
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Product,
1918
+ MetronomeSDK::Internal::AnyHash
1919
+ )
1920
+ end
1921
+
1922
+ sig { returns(String) }
1923
+ attr_accessor :id
1924
+
1925
+ sig { returns(String) }
1926
+ attr_accessor :name
1927
+
1928
+ sig { params(id: String, name: String).returns(T.attached_class) }
1929
+ def self.new(id:, name:)
1930
+ end
1931
+
1932
+ sig { override.returns({ id: String, name: String }) }
1933
+ def to_hash
1934
+ end
1935
+ end
1936
+
1937
+ # Whether the created commits will use the commit rate or list rate
1938
+ module RateType
1939
+ extend MetronomeSDK::Internal::Type::Enum
1940
+
1941
+ TaggedSymbol =
1942
+ T.type_alias do
1943
+ T.all(
1944
+ Symbol,
1945
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RateType
1946
+ )
1947
+ end
1948
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1949
+
1950
+ COMMIT_RATE =
1951
+ T.let(
1952
+ :COMMIT_RATE,
1953
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RateType::TaggedSymbol
1954
+ )
1955
+ LIST_RATE =
1956
+ T.let(
1957
+ :LIST_RATE,
1958
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RateType::TaggedSymbol
1959
+ )
1960
+
1961
+ sig do
1962
+ override.returns(
1963
+ T::Array[
1964
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RateType::TaggedSymbol
1965
+ ]
1966
+ )
1967
+ end
1968
+ def self.values
1969
+ end
1970
+ end
1971
+
1972
+ class Contract < MetronomeSDK::Internal::Type::BaseModel
1973
+ OrHash =
1974
+ T.type_alias do
1975
+ T.any(
1976
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Contract,
1977
+ MetronomeSDK::Internal::AnyHash
1978
+ )
1979
+ end
1980
+
1981
+ sig { returns(String) }
1982
+ attr_accessor :id
1983
+
1984
+ sig { params(id: String).returns(T.attached_class) }
1985
+ def self.new(id:)
1986
+ end
1987
+
1988
+ sig { override.returns({ id: String }) }
1989
+ def to_hash
1990
+ end
1991
+ end
1992
+
1993
+ class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
1994
+ OrHash =
1995
+ T.type_alias do
1996
+ T.any(
1997
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration,
1998
+ MetronomeSDK::Internal::AnyHash
1999
+ )
2000
+ end
2001
+
2002
+ sig do
2003
+ returns(
2004
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::Variants
2005
+ )
2006
+ end
2007
+ attr_accessor :child_access
2008
+
2009
+ # Optional configuration for recurring commit/credit hierarchy access control
2010
+ sig do
2011
+ params(
2012
+ child_access:
2013
+ T.any(
2014
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::OrHash,
2015
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::OrHash,
2016
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::OrHash
2017
+ )
2018
+ ).returns(T.attached_class)
2019
+ end
2020
+ def self.new(child_access:)
2021
+ end
2022
+
2023
+ sig do
2024
+ override.returns(
2025
+ {
2026
+ child_access:
2027
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::Variants
2028
+ }
2029
+ )
2030
+ end
2031
+ def to_hash
2032
+ end
2033
+
2034
+ module ChildAccess
2035
+ extend MetronomeSDK::Internal::Type::Union
2036
+
2037
+ Variants =
2038
+ T.type_alias do
2039
+ T.any(
2040
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll,
2041
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone,
2042
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
2043
+ )
2044
+ end
2045
+
2046
+ class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
2047
+ OrHash =
2048
+ T.type_alias do
2049
+ T.any(
2050
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll,
2051
+ MetronomeSDK::Internal::AnyHash
2052
+ )
2053
+ end
2054
+
2055
+ sig do
2056
+ returns(
2057
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::TaggedSymbol
2058
+ )
2059
+ end
2060
+ attr_accessor :type
2061
+
2062
+ sig do
2063
+ params(
2064
+ type:
2065
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::OrSymbol
2066
+ ).returns(T.attached_class)
2067
+ end
2068
+ def self.new(type:)
2069
+ end
2070
+
2071
+ sig do
2072
+ override.returns(
2073
+ {
2074
+ type:
2075
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::TaggedSymbol
2076
+ }
2077
+ )
2078
+ end
2079
+ def to_hash
2080
+ end
2081
+
2082
+ module Type
2083
+ extend MetronomeSDK::Internal::Type::Enum
2084
+
2085
+ TaggedSymbol =
2086
+ T.type_alias do
2087
+ T.all(
2088
+ Symbol,
2089
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type
2090
+ )
2091
+ end
2092
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2093
+
2094
+ ALL =
2095
+ T.let(
2096
+ :ALL,
2097
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::TaggedSymbol
2098
+ )
2099
+
2100
+ sig do
2101
+ override.returns(
2102
+ T::Array[
2103
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::TaggedSymbol
2104
+ ]
2105
+ )
2106
+ end
2107
+ def self.values
2108
+ end
2109
+ end
2110
+ end
2111
+
2112
+ class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
2113
+ OrHash =
2114
+ T.type_alias do
2115
+ T.any(
2116
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone,
2117
+ MetronomeSDK::Internal::AnyHash
2118
+ )
2119
+ end
2120
+
2121
+ sig do
2122
+ returns(
2123
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::TaggedSymbol
2124
+ )
2125
+ end
2126
+ attr_accessor :type
2127
+
2128
+ sig do
2129
+ params(
2130
+ type:
2131
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::OrSymbol
2132
+ ).returns(T.attached_class)
2133
+ end
2134
+ def self.new(type:)
2135
+ end
2136
+
2137
+ sig do
2138
+ override.returns(
2139
+ {
2140
+ type:
2141
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::TaggedSymbol
2142
+ }
2143
+ )
2144
+ end
2145
+ def to_hash
2146
+ end
2147
+
2148
+ module Type
2149
+ extend MetronomeSDK::Internal::Type::Enum
2150
+
2151
+ TaggedSymbol =
2152
+ T.type_alias do
2153
+ T.all(
2154
+ Symbol,
2155
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type
2156
+ )
2157
+ end
2158
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2159
+
2160
+ NONE =
2161
+ T.let(
2162
+ :NONE,
2163
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::TaggedSymbol
2164
+ )
2165
+
2166
+ sig do
2167
+ override.returns(
2168
+ T::Array[
2169
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::TaggedSymbol
2170
+ ]
2171
+ )
2172
+ end
2173
+ def self.values
2174
+ end
2175
+ end
2176
+ end
2177
+
2178
+ class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
2179
+ OrHash =
2180
+ T.type_alias do
2181
+ T.any(
2182
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs,
2183
+ MetronomeSDK::Internal::AnyHash
2184
+ )
2185
+ end
2186
+
2187
+ sig { returns(T::Array[String]) }
2188
+ attr_accessor :contract_ids
2189
+
2190
+ sig do
2191
+ returns(
2192
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::TaggedSymbol
2193
+ )
2194
+ end
2195
+ attr_accessor :type
2196
+
2197
+ sig do
2198
+ params(
2199
+ contract_ids: T::Array[String],
2200
+ type:
2201
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::OrSymbol
2202
+ ).returns(T.attached_class)
2203
+ end
2204
+ def self.new(contract_ids:, type:)
2205
+ end
2206
+
2207
+ sig do
2208
+ override.returns(
2209
+ {
2210
+ contract_ids: T::Array[String],
2211
+ type:
2212
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::TaggedSymbol
2213
+ }
2214
+ )
2215
+ end
2216
+ def to_hash
2217
+ end
2218
+
2219
+ module Type
2220
+ extend MetronomeSDK::Internal::Type::Enum
2221
+
2222
+ TaggedSymbol =
2223
+ T.type_alias do
2224
+ T.all(
2225
+ Symbol,
2226
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type
2227
+ )
2228
+ end
2229
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2230
+
2231
+ CONTRACT_IDS =
2232
+ T.let(
2233
+ :CONTRACT_IDS,
2234
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::TaggedSymbol
2235
+ )
2236
+
2237
+ sig do
2238
+ override.returns(
2239
+ T::Array[
2240
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::TaggedSymbol
2241
+ ]
2242
+ )
2243
+ end
2244
+ def self.values
2245
+ end
2246
+ end
2247
+ end
2248
+
2249
+ sig do
2250
+ override.returns(
2251
+ T::Array[
2252
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::Variants
2253
+ ]
2254
+ )
2255
+ end
2256
+ def self.variants
2257
+ end
2258
+ end
2259
+ end
2260
+
2261
+ class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
2262
+ OrHash =
2263
+ T.type_alias do
2264
+ T.any(
2265
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::InvoiceAmount,
2266
+ MetronomeSDK::Internal::AnyHash
2267
+ )
2268
+ end
2269
+
2270
+ sig { returns(String) }
2271
+ attr_accessor :credit_type_id
2272
+
2273
+ sig { returns(Float) }
2274
+ attr_accessor :quantity
2275
+
2276
+ sig { returns(Float) }
2277
+ attr_accessor :unit_price
2278
+
2279
+ # The amount the customer should be billed for the commit. Not required.
2280
+ sig do
2281
+ params(
2282
+ credit_type_id: String,
2283
+ quantity: Float,
2284
+ unit_price: Float
2285
+ ).returns(T.attached_class)
2286
+ end
2287
+ def self.new(credit_type_id:, quantity:, unit_price:)
2288
+ end
2289
+
2290
+ sig do
2291
+ override.returns(
2292
+ { credit_type_id: String, quantity: Float, unit_price: Float }
2293
+ )
2294
+ end
2295
+ def to_hash
2296
+ end
2297
+ end
2298
+
2299
+ # Determines whether the first and last commit will be prorated. If not provided,
2300
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
2301
+ module Proration
2302
+ extend MetronomeSDK::Internal::Type::Enum
2303
+
2304
+ TaggedSymbol =
2305
+ T.type_alias do
2306
+ T.all(
2307
+ Symbol,
2308
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration
2309
+ )
2310
+ end
2311
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2312
+
2313
+ NONE =
2314
+ T.let(
2315
+ :NONE,
2316
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::TaggedSymbol
2317
+ )
2318
+ FIRST =
2319
+ T.let(
2320
+ :FIRST,
2321
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::TaggedSymbol
2322
+ )
2323
+ LAST =
2324
+ T.let(
2325
+ :LAST,
2326
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::TaggedSymbol
2327
+ )
2328
+ FIRST_AND_LAST =
2329
+ T.let(
2330
+ :FIRST_AND_LAST,
2331
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::TaggedSymbol
2332
+ )
2333
+
2334
+ sig do
2335
+ override.returns(
2336
+ T::Array[
2337
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::TaggedSymbol
2338
+ ]
2339
+ )
2340
+ end
2341
+ def self.values
2342
+ end
2343
+ end
2344
+
2345
+ # The frequency at which the recurring commits will be created. If not provided: -
2346
+ # The commits will be created on the usage invoice frequency. If provided: - The
2347
+ # period defined in the duration will correspond to this frequency. - Commits will
2348
+ # be created aligned with the recurring commit's starting_at rather than the usage
2349
+ # invoice dates.
2350
+ module RecurrenceFrequency
2351
+ extend MetronomeSDK::Internal::Type::Enum
2352
+
2353
+ TaggedSymbol =
2354
+ T.type_alias do
2355
+ T.all(
2356
+ Symbol,
2357
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency
2358
+ )
2359
+ end
2360
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2361
+
2362
+ MONTHLY =
2363
+ T.let(
2364
+ :MONTHLY,
2365
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol
2366
+ )
2367
+ QUARTERLY =
2368
+ T.let(
2369
+ :QUARTERLY,
2370
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol
2371
+ )
2372
+ ANNUAL =
2373
+ T.let(
2374
+ :ANNUAL,
2375
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol
2376
+ )
2377
+ WEEKLY =
2378
+ T.let(
2379
+ :WEEKLY,
2380
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol
2381
+ )
2382
+
2383
+ sig do
2384
+ override.returns(
2385
+ T::Array[
2386
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol
2387
+ ]
2388
+ )
2389
+ end
2390
+ def self.values
2391
+ end
2392
+ end
2393
+
2394
+ class Specifier < MetronomeSDK::Internal::Type::BaseModel
2395
+ OrHash =
2396
+ T.type_alias do
2397
+ T.any(
2398
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Specifier,
2399
+ MetronomeSDK::Internal::AnyHash
2400
+ )
2401
+ end
2402
+
2403
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
2404
+ attr_reader :presentation_group_values
2405
+
2406
+ sig do
2407
+ params(presentation_group_values: T::Hash[Symbol, String]).void
2408
+ end
2409
+ attr_writer :presentation_group_values
2410
+
2411
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
2412
+ attr_reader :pricing_group_values
2413
+
2414
+ sig { params(pricing_group_values: T::Hash[Symbol, String]).void }
2415
+ attr_writer :pricing_group_values
2416
+
2417
+ # If provided, the specifier will only apply to the product with the specified ID.
2418
+ sig { returns(T.nilable(String)) }
2419
+ attr_reader :product_id
2420
+
2421
+ sig { params(product_id: String).void }
2422
+ attr_writer :product_id
2423
+
2424
+ # If provided, the specifier will only apply to products with all the specified
2425
+ # tags.
2426
+ sig { returns(T.nilable(T::Array[String])) }
2427
+ attr_reader :product_tags
2428
+
2429
+ sig { params(product_tags: T::Array[String]).void }
2430
+ attr_writer :product_tags
2431
+
2432
+ sig do
2433
+ params(
2434
+ presentation_group_values: T::Hash[Symbol, String],
2435
+ pricing_group_values: T::Hash[Symbol, String],
2436
+ product_id: String,
2437
+ product_tags: T::Array[String]
2438
+ ).returns(T.attached_class)
2439
+ end
2440
+ def self.new(
2441
+ presentation_group_values: nil,
2442
+ pricing_group_values: nil,
2443
+ # If provided, the specifier will only apply to the product with the specified ID.
2444
+ product_id: nil,
2445
+ # If provided, the specifier will only apply to products with all the specified
2446
+ # tags.
2447
+ product_tags: nil
2448
+ )
2449
+ end
2450
+
2451
+ sig do
2452
+ override.returns(
2453
+ {
2454
+ presentation_group_values: T::Hash[Symbol, String],
2455
+ pricing_group_values: T::Hash[Symbol, String],
2456
+ product_id: String,
2457
+ product_tags: T::Array[String]
2458
+ }
2459
+ )
2460
+ end
2461
+ def to_hash
2462
+ end
2463
+ end
2464
+ end
2465
+
2466
+ class RecurringCredit < MetronomeSDK::Internal::Type::BaseModel
2467
+ OrHash =
2468
+ T.type_alias do
2469
+ T.any(
2470
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit,
2471
+ MetronomeSDK::Internal::AnyHash
2472
+ )
2473
+ end
2474
+
2475
+ sig { returns(String) }
2476
+ attr_accessor :id
2477
+
2478
+ # The amount of commit to grant.
2479
+ sig do
2480
+ returns(
2481
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::AccessAmount
2482
+ )
2483
+ end
2484
+ attr_reader :access_amount
2485
+
2486
+ sig do
2487
+ params(
2488
+ access_amount:
2489
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::AccessAmount::OrHash
2490
+ ).void
2491
+ end
2492
+ attr_writer :access_amount
2493
+
2494
+ # The amount of time the created commits will be valid for
2495
+ sig do
2496
+ returns(
2497
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration
2498
+ )
2499
+ end
2500
+ attr_reader :commit_duration
2501
+
2502
+ sig do
2503
+ params(
2504
+ commit_duration:
2505
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::OrHash
2506
+ ).void
2507
+ end
2508
+ attr_writer :commit_duration
2509
+
2510
+ # Will be passed down to the individual commits
2511
+ sig { returns(Float) }
2512
+ attr_accessor :priority
2513
+
2514
+ sig do
2515
+ returns(
2516
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Product
2517
+ )
2518
+ end
2519
+ attr_reader :product
2520
+
2521
+ sig do
2522
+ params(
2523
+ product:
2524
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Product::OrHash
2525
+ ).void
2526
+ end
2527
+ attr_writer :product
2528
+
2529
+ # Whether the created commits will use the commit rate or list rate
2530
+ sig do
2531
+ returns(
2532
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RateType::TaggedSymbol
2533
+ )
2534
+ end
2535
+ attr_accessor :rate_type
2536
+
2537
+ # Determines the start time for the first commit
2538
+ sig { returns(Time) }
2539
+ attr_accessor :starting_at
2540
+
2541
+ # Will be passed down to the individual commits
2542
+ sig { returns(T.nilable(T::Array[String])) }
2543
+ attr_reader :applicable_product_ids
2544
+
2545
+ sig { params(applicable_product_ids: T::Array[String]).void }
2546
+ attr_writer :applicable_product_ids
2547
+
2548
+ # Will be passed down to the individual commits
2549
+ sig { returns(T.nilable(T::Array[String])) }
2550
+ attr_reader :applicable_product_tags
2551
+
2552
+ sig { params(applicable_product_tags: T::Array[String]).void }
2553
+ attr_writer :applicable_product_tags
2554
+
2555
+ sig do
2556
+ returns(
2557
+ T.nilable(
2558
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Contract
2559
+ )
2560
+ )
2561
+ end
2562
+ attr_reader :contract
2563
+
2564
+ sig do
2565
+ params(
2566
+ contract:
2567
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Contract::OrHash
2568
+ ).void
2569
+ end
2570
+ attr_writer :contract
2571
+
2572
+ # Will be passed down to the individual commits
2573
+ sig { returns(T.nilable(String)) }
2574
+ attr_reader :description
2575
+
2576
+ sig { params(description: String).void }
2577
+ attr_writer :description
2578
+
2579
+ # Determines when the contract will stop creating recurring commits. Optional
2580
+ sig { returns(T.nilable(Time)) }
2581
+ attr_reader :ending_before
2582
+
2583
+ sig { params(ending_before: Time).void }
2584
+ attr_writer :ending_before
2585
+
2586
+ # Optional configuration for recurring commit/credit hierarchy access control
2587
+ sig do
2588
+ returns(
2589
+ T.nilable(
2590
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration
2591
+ )
2592
+ )
2593
+ end
2594
+ attr_reader :hierarchy_configuration
2595
+
2596
+ sig do
2597
+ params(
2598
+ hierarchy_configuration:
2599
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::OrHash
2600
+ ).void
2601
+ end
2602
+ attr_writer :hierarchy_configuration
2603
+
2604
+ # Displayed on invoices. Will be passed through to the individual commits
2605
+ sig { returns(T.nilable(String)) }
2606
+ attr_reader :name
2607
+
2608
+ sig { params(name: String).void }
2609
+ attr_writer :name
2610
+
2611
+ # Will be passed down to the individual commits
2612
+ sig { returns(T.nilable(String)) }
2613
+ attr_reader :netsuite_sales_order_id
2614
+
2615
+ sig { params(netsuite_sales_order_id: String).void }
2616
+ attr_writer :netsuite_sales_order_id
2617
+
2618
+ # Determines whether the first and last commit will be prorated. If not provided,
2619
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
2620
+ sig do
2621
+ returns(
2622
+ T.nilable(
2623
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::TaggedSymbol
2624
+ )
2625
+ )
2626
+ end
2627
+ attr_reader :proration
2628
+
2629
+ sig do
2630
+ params(
2631
+ proration:
2632
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::OrSymbol
2633
+ ).void
2634
+ end
2635
+ attr_writer :proration
2636
+
2637
+ # The frequency at which the recurring commits will be created. If not provided: -
2638
+ # The commits will be created on the usage invoice frequency. If provided: - The
2639
+ # period defined in the duration will correspond to this frequency. - Commits will
2640
+ # be created aligned with the recurring commit's starting_at rather than the usage
2641
+ # invoice dates.
2642
+ sig do
2643
+ returns(
2644
+ T.nilable(
2645
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol
2646
+ )
2647
+ )
2648
+ end
2649
+ attr_reader :recurrence_frequency
2650
+
2651
+ sig do
2652
+ params(
2653
+ recurrence_frequency:
2654
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::OrSymbol
2655
+ ).void
2656
+ end
2657
+ attr_writer :recurrence_frequency
2658
+
2659
+ # Will be passed down to the individual commits. This controls how much of an
2660
+ # individual unexpired commit will roll over upon contract transition. Must be
2661
+ # between 0 and 1.
2662
+ sig { returns(T.nilable(Float)) }
2663
+ attr_reader :rollover_fraction
2664
+
2665
+ sig { params(rollover_fraction: Float).void }
2666
+ attr_writer :rollover_fraction
2667
+
2668
+ # List of filters that determine what kind of customer usage draws down a commit
2669
+ # or credit. A customer's usage needs to meet the condition of at least one of the
2670
+ # specifiers to contribute to a commit's or credit's drawdown.
2671
+ sig do
2672
+ returns(
2673
+ T.nilable(
2674
+ T::Array[
2675
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Specifier
2676
+ ]
2677
+ )
2678
+ )
2679
+ end
2680
+ attr_reader :specifiers
2681
+
2682
+ sig do
2683
+ params(
2684
+ specifiers:
2685
+ T::Array[
2686
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Specifier::OrHash
2687
+ ]
2688
+ ).void
2689
+ end
2690
+ attr_writer :specifiers
2691
+
2692
+ sig do
2693
+ params(
2694
+ id: String,
2695
+ access_amount:
2696
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::AccessAmount::OrHash,
2697
+ commit_duration:
2698
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::OrHash,
2699
+ priority: Float,
2700
+ product:
2701
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Product::OrHash,
2702
+ rate_type:
2703
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RateType::OrSymbol,
2704
+ starting_at: Time,
2705
+ applicable_product_ids: T::Array[String],
2706
+ applicable_product_tags: T::Array[String],
2707
+ contract:
2708
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Contract::OrHash,
2709
+ description: String,
2710
+ ending_before: Time,
2711
+ hierarchy_configuration:
2712
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::OrHash,
2713
+ name: String,
2714
+ netsuite_sales_order_id: String,
2715
+ proration:
2716
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::OrSymbol,
2717
+ recurrence_frequency:
2718
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::OrSymbol,
2719
+ rollover_fraction: Float,
2720
+ specifiers:
2721
+ T::Array[
2722
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Specifier::OrHash
2723
+ ]
2724
+ ).returns(T.attached_class)
2725
+ end
2726
+ def self.new(
2727
+ id:,
2728
+ # The amount of commit to grant.
2729
+ access_amount:,
2730
+ # The amount of time the created commits will be valid for
2731
+ commit_duration:,
2732
+ # Will be passed down to the individual commits
2733
+ priority:,
2734
+ product:,
2735
+ # Whether the created commits will use the commit rate or list rate
2736
+ rate_type:,
2737
+ # Determines the start time for the first commit
2738
+ starting_at:,
2739
+ # Will be passed down to the individual commits
2740
+ applicable_product_ids: nil,
2741
+ # Will be passed down to the individual commits
2742
+ applicable_product_tags: nil,
2743
+ contract: nil,
2744
+ # Will be passed down to the individual commits
2745
+ description: nil,
2746
+ # Determines when the contract will stop creating recurring commits. Optional
2747
+ ending_before: nil,
2748
+ # Optional configuration for recurring commit/credit hierarchy access control
2749
+ hierarchy_configuration: nil,
2750
+ # Displayed on invoices. Will be passed through to the individual commits
2751
+ name: nil,
2752
+ # Will be passed down to the individual commits
2753
+ netsuite_sales_order_id: nil,
2754
+ # Determines whether the first and last commit will be prorated. If not provided,
2755
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
2756
+ proration: nil,
2757
+ # The frequency at which the recurring commits will be created. If not provided: -
2758
+ # The commits will be created on the usage invoice frequency. If provided: - The
2759
+ # period defined in the duration will correspond to this frequency. - Commits will
2760
+ # be created aligned with the recurring commit's starting_at rather than the usage
2761
+ # invoice dates.
2762
+ recurrence_frequency: nil,
2763
+ # Will be passed down to the individual commits. This controls how much of an
2764
+ # individual unexpired commit will roll over upon contract transition. Must be
2765
+ # between 0 and 1.
2766
+ rollover_fraction: nil,
2767
+ # List of filters that determine what kind of customer usage draws down a commit
2768
+ # or credit. A customer's usage needs to meet the condition of at least one of the
2769
+ # specifiers to contribute to a commit's or credit's drawdown.
2770
+ specifiers: nil
2771
+ )
2772
+ end
2773
+
2774
+ sig do
2775
+ override.returns(
2776
+ {
2777
+ id: String,
2778
+ access_amount:
2779
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::AccessAmount,
2780
+ commit_duration:
2781
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration,
2782
+ priority: Float,
2783
+ product:
2784
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Product,
2785
+ rate_type:
2786
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RateType::TaggedSymbol,
2787
+ starting_at: Time,
2788
+ applicable_product_ids: T::Array[String],
2789
+ applicable_product_tags: T::Array[String],
2790
+ contract:
2791
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Contract,
2792
+ description: String,
2793
+ ending_before: Time,
2794
+ hierarchy_configuration:
2795
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration,
2796
+ name: String,
2797
+ netsuite_sales_order_id: String,
2798
+ proration:
2799
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::TaggedSymbol,
2800
+ recurrence_frequency:
2801
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol,
2802
+ rollover_fraction: Float,
2803
+ specifiers:
2804
+ T::Array[
2805
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Specifier
2806
+ ]
2807
+ }
2808
+ )
2809
+ end
2810
+ def to_hash
2811
+ end
2812
+
2813
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
2814
+ OrHash =
2815
+ T.type_alias do
2816
+ T.any(
2817
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::AccessAmount,
2818
+ MetronomeSDK::Internal::AnyHash
2819
+ )
2820
+ end
2821
+
2822
+ sig { returns(String) }
2823
+ attr_accessor :credit_type_id
2824
+
2825
+ sig { returns(Float) }
2826
+ attr_accessor :unit_price
2827
+
2828
+ sig { returns(T.nilable(Float)) }
2829
+ attr_reader :quantity
2830
+
2831
+ sig { params(quantity: Float).void }
2832
+ attr_writer :quantity
2833
+
2834
+ # The amount of commit to grant.
2835
+ sig do
2836
+ params(
2837
+ credit_type_id: String,
2838
+ unit_price: Float,
2839
+ quantity: Float
2840
+ ).returns(T.attached_class)
2841
+ end
2842
+ def self.new(credit_type_id:, unit_price:, quantity: nil)
2843
+ end
2844
+
2845
+ sig do
2846
+ override.returns(
2847
+ { credit_type_id: String, unit_price: Float, quantity: Float }
2848
+ )
2849
+ end
2850
+ def to_hash
2851
+ end
2852
+ end
2853
+
2854
+ class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
2855
+ OrHash =
2856
+ T.type_alias do
2857
+ T.any(
2858
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration,
2859
+ MetronomeSDK::Internal::AnyHash
2860
+ )
2861
+ end
2862
+
2863
+ sig { returns(Float) }
2864
+ attr_accessor :value
2865
+
2866
+ sig do
2867
+ returns(
2868
+ T.nilable(
2869
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit::TaggedSymbol
2870
+ )
2871
+ )
2872
+ end
2873
+ attr_reader :unit
2874
+
2875
+ sig do
2876
+ params(
2877
+ unit:
2878
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit::OrSymbol
2879
+ ).void
2880
+ end
2881
+ attr_writer :unit
2882
+
2883
+ # The amount of time the created commits will be valid for
2884
+ sig do
2885
+ params(
2886
+ value: Float,
2887
+ unit:
2888
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit::OrSymbol
2889
+ ).returns(T.attached_class)
2890
+ end
2891
+ def self.new(value:, unit: nil)
2892
+ end
2893
+
2894
+ sig do
2895
+ override.returns(
2896
+ {
2897
+ value: Float,
2898
+ unit:
2899
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit::TaggedSymbol
2900
+ }
2901
+ )
2902
+ end
2903
+ def to_hash
2904
+ end
2905
+
2906
+ module Unit
2907
+ extend MetronomeSDK::Internal::Type::Enum
2908
+
2909
+ TaggedSymbol =
2910
+ T.type_alias do
2911
+ T.all(
2912
+ Symbol,
2913
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit
2914
+ )
2915
+ end
2916
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2917
+
2918
+ PERIODS =
2919
+ T.let(
2920
+ :PERIODS,
2921
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit::TaggedSymbol
2922
+ )
2923
+
2924
+ sig do
2925
+ override.returns(
2926
+ T::Array[
2927
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit::TaggedSymbol
2928
+ ]
2929
+ )
2930
+ end
2931
+ def self.values
2932
+ end
2933
+ end
2934
+ end
2935
+
2936
+ class Product < MetronomeSDK::Internal::Type::BaseModel
2937
+ OrHash =
2938
+ T.type_alias do
2939
+ T.any(
2940
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Product,
2941
+ MetronomeSDK::Internal::AnyHash
2942
+ )
2943
+ end
2944
+
2945
+ sig { returns(String) }
2946
+ attr_accessor :id
2947
+
2948
+ sig { returns(String) }
2949
+ attr_accessor :name
2950
+
2951
+ sig { params(id: String, name: String).returns(T.attached_class) }
2952
+ def self.new(id:, name:)
2953
+ end
2954
+
2955
+ sig { override.returns({ id: String, name: String }) }
2956
+ def to_hash
2957
+ end
2958
+ end
2959
+
2960
+ # Whether the created commits will use the commit rate or list rate
2961
+ module RateType
2962
+ extend MetronomeSDK::Internal::Type::Enum
2963
+
2964
+ TaggedSymbol =
2965
+ T.type_alias do
2966
+ T.all(
2967
+ Symbol,
2968
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RateType
2969
+ )
2970
+ end
2971
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2972
+
2973
+ COMMIT_RATE =
2974
+ T.let(
2975
+ :COMMIT_RATE,
2976
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RateType::TaggedSymbol
2977
+ )
2978
+ LIST_RATE =
2979
+ T.let(
2980
+ :LIST_RATE,
2981
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RateType::TaggedSymbol
2982
+ )
2983
+
2984
+ sig do
2985
+ override.returns(
2986
+ T::Array[
2987
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RateType::TaggedSymbol
2988
+ ]
2989
+ )
2990
+ end
2991
+ def self.values
2992
+ end
2993
+ end
2994
+
2995
+ class Contract < MetronomeSDK::Internal::Type::BaseModel
2996
+ OrHash =
2997
+ T.type_alias do
2998
+ T.any(
2999
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Contract,
3000
+ MetronomeSDK::Internal::AnyHash
3001
+ )
3002
+ end
3003
+
3004
+ sig { returns(String) }
3005
+ attr_accessor :id
3006
+
3007
+ sig { params(id: String).returns(T.attached_class) }
3008
+ def self.new(id:)
3009
+ end
3010
+
3011
+ sig { override.returns({ id: String }) }
3012
+ def to_hash
3013
+ end
3014
+ end
3015
+
3016
+ class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
3017
+ OrHash =
3018
+ T.type_alias do
3019
+ T.any(
3020
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration,
3021
+ MetronomeSDK::Internal::AnyHash
3022
+ )
3023
+ end
3024
+
3025
+ sig do
3026
+ returns(
3027
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::Variants
3028
+ )
3029
+ end
3030
+ attr_accessor :child_access
3031
+
3032
+ # Optional configuration for recurring commit/credit hierarchy access control
3033
+ sig do
3034
+ params(
3035
+ child_access:
3036
+ T.any(
3037
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::OrHash,
3038
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::OrHash,
3039
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::OrHash
3040
+ )
3041
+ ).returns(T.attached_class)
3042
+ end
3043
+ def self.new(child_access:)
3044
+ end
3045
+
3046
+ sig do
3047
+ override.returns(
3048
+ {
3049
+ child_access:
3050
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::Variants
3051
+ }
3052
+ )
3053
+ end
3054
+ def to_hash
3055
+ end
3056
+
3057
+ module ChildAccess
3058
+ extend MetronomeSDK::Internal::Type::Union
3059
+
3060
+ Variants =
3061
+ T.type_alias do
3062
+ T.any(
3063
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll,
3064
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone,
3065
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
3066
+ )
3067
+ end
3068
+
3069
+ class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
3070
+ OrHash =
3071
+ T.type_alias do
3072
+ T.any(
3073
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll,
3074
+ MetronomeSDK::Internal::AnyHash
3075
+ )
3076
+ end
3077
+
3078
+ sig do
3079
+ returns(
3080
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::TaggedSymbol
3081
+ )
3082
+ end
3083
+ attr_accessor :type
3084
+
3085
+ sig do
3086
+ params(
3087
+ type:
3088
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::OrSymbol
3089
+ ).returns(T.attached_class)
3090
+ end
3091
+ def self.new(type:)
3092
+ end
3093
+
3094
+ sig do
3095
+ override.returns(
3096
+ {
3097
+ type:
3098
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::TaggedSymbol
3099
+ }
3100
+ )
3101
+ end
3102
+ def to_hash
3103
+ end
3104
+
3105
+ module Type
3106
+ extend MetronomeSDK::Internal::Type::Enum
3107
+
3108
+ TaggedSymbol =
3109
+ T.type_alias do
3110
+ T.all(
3111
+ Symbol,
3112
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type
3113
+ )
3114
+ end
3115
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3116
+
3117
+ ALL =
3118
+ T.let(
3119
+ :ALL,
3120
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::TaggedSymbol
3121
+ )
3122
+
3123
+ sig do
3124
+ override.returns(
3125
+ T::Array[
3126
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::TaggedSymbol
3127
+ ]
3128
+ )
3129
+ end
3130
+ def self.values
3131
+ end
3132
+ end
3133
+ end
3134
+
3135
+ class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
3136
+ OrHash =
3137
+ T.type_alias do
3138
+ T.any(
3139
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone,
3140
+ MetronomeSDK::Internal::AnyHash
3141
+ )
3142
+ end
3143
+
3144
+ sig do
3145
+ returns(
3146
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::TaggedSymbol
3147
+ )
3148
+ end
3149
+ attr_accessor :type
3150
+
3151
+ sig do
3152
+ params(
3153
+ type:
3154
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::OrSymbol
3155
+ ).returns(T.attached_class)
3156
+ end
3157
+ def self.new(type:)
3158
+ end
3159
+
3160
+ sig do
3161
+ override.returns(
3162
+ {
3163
+ type:
3164
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::TaggedSymbol
3165
+ }
3166
+ )
3167
+ end
3168
+ def to_hash
3169
+ end
3170
+
3171
+ module Type
3172
+ extend MetronomeSDK::Internal::Type::Enum
3173
+
3174
+ TaggedSymbol =
3175
+ T.type_alias do
3176
+ T.all(
3177
+ Symbol,
3178
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type
3179
+ )
3180
+ end
3181
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3182
+
3183
+ NONE =
3184
+ T.let(
3185
+ :NONE,
3186
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::TaggedSymbol
3187
+ )
3188
+
3189
+ sig do
3190
+ override.returns(
3191
+ T::Array[
3192
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::TaggedSymbol
3193
+ ]
3194
+ )
3195
+ end
3196
+ def self.values
3197
+ end
3198
+ end
3199
+ end
3200
+
3201
+ class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
3202
+ OrHash =
3203
+ T.type_alias do
3204
+ T.any(
3205
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs,
3206
+ MetronomeSDK::Internal::AnyHash
3207
+ )
3208
+ end
3209
+
3210
+ sig { returns(T::Array[String]) }
3211
+ attr_accessor :contract_ids
3212
+
3213
+ sig do
3214
+ returns(
3215
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::TaggedSymbol
3216
+ )
3217
+ end
3218
+ attr_accessor :type
3219
+
3220
+ sig do
3221
+ params(
3222
+ contract_ids: T::Array[String],
3223
+ type:
3224
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::OrSymbol
3225
+ ).returns(T.attached_class)
3226
+ end
3227
+ def self.new(contract_ids:, type:)
3228
+ end
3229
+
3230
+ sig do
3231
+ override.returns(
3232
+ {
3233
+ contract_ids: T::Array[String],
3234
+ type:
3235
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::TaggedSymbol
3236
+ }
3237
+ )
3238
+ end
3239
+ def to_hash
3240
+ end
3241
+
3242
+ module Type
3243
+ extend MetronomeSDK::Internal::Type::Enum
3244
+
3245
+ TaggedSymbol =
3246
+ T.type_alias do
3247
+ T.all(
3248
+ Symbol,
3249
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type
3250
+ )
3251
+ end
3252
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3253
+
3254
+ CONTRACT_IDS =
3255
+ T.let(
3256
+ :CONTRACT_IDS,
3257
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::TaggedSymbol
3258
+ )
3259
+
3260
+ sig do
3261
+ override.returns(
3262
+ T::Array[
3263
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::TaggedSymbol
3264
+ ]
3265
+ )
3266
+ end
3267
+ def self.values
3268
+ end
3269
+ end
3270
+ end
3271
+
3272
+ sig do
3273
+ override.returns(
3274
+ T::Array[
3275
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::Variants
3276
+ ]
3277
+ )
3278
+ end
3279
+ def self.variants
3280
+ end
3281
+ end
3282
+ end
3283
+
3284
+ # Determines whether the first and last commit will be prorated. If not provided,
3285
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
3286
+ module Proration
3287
+ extend MetronomeSDK::Internal::Type::Enum
3288
+
3289
+ TaggedSymbol =
3290
+ T.type_alias do
3291
+ T.all(
3292
+ Symbol,
3293
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration
3294
+ )
3295
+ end
3296
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3297
+
3298
+ NONE =
3299
+ T.let(
3300
+ :NONE,
3301
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::TaggedSymbol
3302
+ )
3303
+ FIRST =
3304
+ T.let(
3305
+ :FIRST,
3306
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::TaggedSymbol
3307
+ )
3308
+ LAST =
3309
+ T.let(
3310
+ :LAST,
3311
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::TaggedSymbol
3312
+ )
3313
+ FIRST_AND_LAST =
3314
+ T.let(
3315
+ :FIRST_AND_LAST,
3316
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::TaggedSymbol
3317
+ )
3318
+
3319
+ sig do
3320
+ override.returns(
3321
+ T::Array[
3322
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::TaggedSymbol
3323
+ ]
3324
+ )
3325
+ end
3326
+ def self.values
3327
+ end
3328
+ end
3329
+
3330
+ # The frequency at which the recurring commits will be created. If not provided: -
3331
+ # The commits will be created on the usage invoice frequency. If provided: - The
3332
+ # period defined in the duration will correspond to this frequency. - Commits will
3333
+ # be created aligned with the recurring commit's starting_at rather than the usage
3334
+ # invoice dates.
3335
+ module RecurrenceFrequency
3336
+ extend MetronomeSDK::Internal::Type::Enum
3337
+
3338
+ TaggedSymbol =
3339
+ T.type_alias do
3340
+ T.all(
3341
+ Symbol,
3342
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency
3343
+ )
3344
+ end
3345
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3346
+
3347
+ MONTHLY =
3348
+ T.let(
3349
+ :MONTHLY,
3350
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol
3351
+ )
3352
+ QUARTERLY =
3353
+ T.let(
3354
+ :QUARTERLY,
3355
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol
3356
+ )
3357
+ ANNUAL =
3358
+ T.let(
3359
+ :ANNUAL,
3360
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol
3361
+ )
3362
+ WEEKLY =
3363
+ T.let(
3364
+ :WEEKLY,
3365
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol
3366
+ )
3367
+
3368
+ sig do
3369
+ override.returns(
3370
+ T::Array[
3371
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol
3372
+ ]
3373
+ )
3374
+ end
3375
+ def self.values
3376
+ end
3377
+ end
3378
+
3379
+ class Specifier < MetronomeSDK::Internal::Type::BaseModel
3380
+ OrHash =
3381
+ T.type_alias do
3382
+ T.any(
3383
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Specifier,
3384
+ MetronomeSDK::Internal::AnyHash
3385
+ )
3386
+ end
3387
+
3388
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
3389
+ attr_reader :presentation_group_values
3390
+
3391
+ sig do
3392
+ params(presentation_group_values: T::Hash[Symbol, String]).void
3393
+ end
3394
+ attr_writer :presentation_group_values
3395
+
3396
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
3397
+ attr_reader :pricing_group_values
3398
+
3399
+ sig { params(pricing_group_values: T::Hash[Symbol, String]).void }
3400
+ attr_writer :pricing_group_values
3401
+
3402
+ # If provided, the specifier will only apply to the product with the specified ID.
3403
+ sig { returns(T.nilable(String)) }
3404
+ attr_reader :product_id
3405
+
3406
+ sig { params(product_id: String).void }
3407
+ attr_writer :product_id
3408
+
3409
+ # If provided, the specifier will only apply to products with all the specified
3410
+ # tags.
3411
+ sig { returns(T.nilable(T::Array[String])) }
3412
+ attr_reader :product_tags
3413
+
3414
+ sig { params(product_tags: T::Array[String]).void }
3415
+ attr_writer :product_tags
3416
+
3417
+ sig do
3418
+ params(
3419
+ presentation_group_values: T::Hash[Symbol, String],
3420
+ pricing_group_values: T::Hash[Symbol, String],
3421
+ product_id: String,
3422
+ product_tags: T::Array[String]
3423
+ ).returns(T.attached_class)
3424
+ end
3425
+ def self.new(
3426
+ presentation_group_values: nil,
3427
+ pricing_group_values: nil,
3428
+ # If provided, the specifier will only apply to the product with the specified ID.
3429
+ product_id: nil,
3430
+ # If provided, the specifier will only apply to products with all the specified
3431
+ # tags.
3432
+ product_tags: nil
3433
+ )
3434
+ end
3435
+
3436
+ sig do
3437
+ override.returns(
3438
+ {
3439
+ presentation_group_values: T::Hash[Symbol, String],
3440
+ pricing_group_values: T::Hash[Symbol, String],
3441
+ product_id: String,
3442
+ product_tags: T::Array[String]
3443
+ }
3444
+ )
3445
+ end
3446
+ def to_hash
3447
+ end
3448
+ end
3449
+ end
3450
+
3451
+ class ResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
3452
+ OrHash =
3453
+ T.type_alias do
3454
+ T.any(
3455
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty,
3456
+ MetronomeSDK::Internal::AnyHash
3457
+ )
3458
+ end
3459
+
3460
+ sig { returns(Float) }
3461
+ attr_accessor :fraction
3462
+
3463
+ sig { returns(String) }
3464
+ attr_accessor :netsuite_reseller_id
3465
+
3466
+ sig do
3467
+ returns(
3468
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType::TaggedSymbol
3469
+ )
3470
+ end
3471
+ attr_accessor :reseller_type
3472
+
3473
+ sig { returns(Time) }
3474
+ attr_accessor :starting_at
3475
+
3476
+ sig { returns(T.nilable(T::Array[String])) }
3477
+ attr_reader :applicable_product_ids
3478
+
3479
+ sig { params(applicable_product_ids: T::Array[String]).void }
3480
+ attr_writer :applicable_product_ids
3481
+
3482
+ sig { returns(T.nilable(T::Array[String])) }
3483
+ attr_reader :applicable_product_tags
3484
+
3485
+ sig { params(applicable_product_tags: T::Array[String]).void }
3486
+ attr_writer :applicable_product_tags
3487
+
3488
+ sig { returns(T.nilable(String)) }
3489
+ attr_reader :aws_account_number
3490
+
3491
+ sig { params(aws_account_number: String).void }
3492
+ attr_writer :aws_account_number
3493
+
3494
+ sig { returns(T.nilable(String)) }
3495
+ attr_reader :aws_offer_id
3496
+
3497
+ sig { params(aws_offer_id: String).void }
3498
+ attr_writer :aws_offer_id
3499
+
3500
+ sig { returns(T.nilable(String)) }
3501
+ attr_reader :aws_payer_reference_id
3502
+
3503
+ sig { params(aws_payer_reference_id: String).void }
3504
+ attr_writer :aws_payer_reference_id
3505
+
3506
+ sig { returns(T.nilable(Time)) }
3507
+ attr_reader :ending_before
3508
+
3509
+ sig { params(ending_before: Time).void }
3510
+ attr_writer :ending_before
3511
+
3512
+ sig { returns(T.nilable(String)) }
3513
+ attr_reader :gcp_account_id
3514
+
3515
+ sig { params(gcp_account_id: String).void }
3516
+ attr_writer :gcp_account_id
3517
+
3518
+ sig { returns(T.nilable(String)) }
3519
+ attr_reader :gcp_offer_id
3520
+
3521
+ sig { params(gcp_offer_id: String).void }
3522
+ attr_writer :gcp_offer_id
3523
+
3524
+ sig { returns(T.nilable(Float)) }
3525
+ attr_reader :reseller_contract_value
3526
+
3527
+ sig { params(reseller_contract_value: Float).void }
3528
+ attr_writer :reseller_contract_value
3529
+
3530
+ sig do
3531
+ params(
3532
+ fraction: Float,
3533
+ netsuite_reseller_id: String,
3534
+ reseller_type:
3535
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType::OrSymbol,
3536
+ starting_at: Time,
3537
+ applicable_product_ids: T::Array[String],
3538
+ applicable_product_tags: T::Array[String],
3539
+ aws_account_number: String,
3540
+ aws_offer_id: String,
3541
+ aws_payer_reference_id: String,
3542
+ ending_before: Time,
3543
+ gcp_account_id: String,
3544
+ gcp_offer_id: String,
3545
+ reseller_contract_value: Float
3546
+ ).returns(T.attached_class)
3547
+ end
3548
+ def self.new(
3549
+ fraction:,
3550
+ netsuite_reseller_id:,
3551
+ reseller_type:,
3552
+ starting_at:,
3553
+ applicable_product_ids: nil,
3554
+ applicable_product_tags: nil,
3555
+ aws_account_number: nil,
3556
+ aws_offer_id: nil,
3557
+ aws_payer_reference_id: nil,
3558
+ ending_before: nil,
3559
+ gcp_account_id: nil,
3560
+ gcp_offer_id: nil,
3561
+ reseller_contract_value: nil
3562
+ )
3563
+ end
3564
+
3565
+ sig do
3566
+ override.returns(
3567
+ {
3568
+ fraction: Float,
3569
+ netsuite_reseller_id: String,
3570
+ reseller_type:
3571
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType::TaggedSymbol,
3572
+ starting_at: Time,
3573
+ applicable_product_ids: T::Array[String],
3574
+ applicable_product_tags: T::Array[String],
3575
+ aws_account_number: String,
3576
+ aws_offer_id: String,
3577
+ aws_payer_reference_id: String,
3578
+ ending_before: Time,
3579
+ gcp_account_id: String,
3580
+ gcp_offer_id: String,
3581
+ reseller_contract_value: Float
3582
+ }
3583
+ )
3584
+ end
3585
+ def to_hash
3586
+ end
3587
+
3588
+ module ResellerType
3589
+ extend MetronomeSDK::Internal::Type::Enum
3590
+
3591
+ TaggedSymbol =
3592
+ T.type_alias do
3593
+ T.all(
3594
+ Symbol,
3595
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType
3596
+ )
3597
+ end
3598
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3599
+
3600
+ AWS =
3601
+ T.let(
3602
+ :AWS,
3603
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType::TaggedSymbol
3604
+ )
3605
+ AWS_PRO_SERVICE =
3606
+ T.let(
3607
+ :AWS_PRO_SERVICE,
3608
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType::TaggedSymbol
3609
+ )
3610
+ GCP =
3611
+ T.let(
3612
+ :GCP,
3613
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType::TaggedSymbol
3614
+ )
3615
+ GCP_PRO_SERVICE =
3616
+ T.let(
3617
+ :GCP_PRO_SERVICE,
3618
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType::TaggedSymbol
3619
+ )
3620
+
3621
+ sig do
3622
+ override.returns(
3623
+ T::Array[
3624
+ MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType::TaggedSymbol
3625
+ ]
3626
+ )
3627
+ end
3628
+ def self.values
3629
+ end
3630
+ end
3631
+ end
3632
+
3633
+ # Determines which scheduled and commit charges to consolidate onto the Contract's
3634
+ # usage invoice. The charge's `timestamp` must match the usage invoice's
3635
+ # `ending_before` date for consolidation to occur. This field cannot be modified
3636
+ # after a Contract has been created. If this field is omitted, charges will appear
3637
+ # on a separate invoice from usage charges.
3638
+ module ScheduledChargesOnUsageInvoices
3639
+ extend MetronomeSDK::Internal::Type::Enum
3640
+
3641
+ TaggedSymbol =
3642
+ T.type_alias do
3643
+ T.all(
3644
+ Symbol,
3645
+ MetronomeSDK::ContractWithoutAmendments::ScheduledChargesOnUsageInvoices
3646
+ )
3647
+ end
3648
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3649
+
3650
+ ALL =
3651
+ T.let(
3652
+ :ALL,
3653
+ MetronomeSDK::ContractWithoutAmendments::ScheduledChargesOnUsageInvoices::TaggedSymbol
3654
+ )
3655
+
3656
+ sig do
3657
+ override.returns(
3658
+ T::Array[
3659
+ MetronomeSDK::ContractWithoutAmendments::ScheduledChargesOnUsageInvoices::TaggedSymbol
3660
+ ]
3661
+ )
3662
+ end
3663
+ def self.values
3664
+ end
3665
+ end
3666
+
3667
+ class SpendThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
3668
+ OrHash =
3669
+ T.type_alias do
3670
+ T.any(
3671
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration,
3672
+ MetronomeSDK::Internal::AnyHash
3673
+ )
3674
+ end
3675
+
3676
+ sig do
3677
+ returns(
3678
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::Commit
3679
+ )
3680
+ end
3681
+ attr_reader :commit
3682
+
3683
+ sig do
3684
+ params(
3685
+ commit:
3686
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::Commit::OrHash
3687
+ ).void
3688
+ end
3689
+ attr_writer :commit
3690
+
3691
+ # When set to false, the contract will not be evaluated against the
3692
+ # threshold_amount. Toggling to true will result an immediate evaluation,
3693
+ # regardless of prior state.
3694
+ sig { returns(T::Boolean) }
3695
+ attr_accessor :is_enabled
3696
+
3697
+ sig do
3698
+ returns(
3699
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig
3700
+ )
3701
+ end
3702
+ attr_reader :payment_gate_config
3703
+
3704
+ sig do
3705
+ params(
3706
+ payment_gate_config:
3707
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::OrHash
3708
+ ).void
3709
+ end
3710
+ attr_writer :payment_gate_config
3711
+
3712
+ # Specify the threshold amount for the contract. Each time the contract's usage
3713
+ # hits this amount, a threshold charge will be initiated.
3714
+ sig { returns(Float) }
3715
+ attr_accessor :threshold_amount
3716
+
3717
+ sig do
3718
+ params(
3719
+ commit:
3720
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::Commit::OrHash,
3721
+ is_enabled: T::Boolean,
3722
+ payment_gate_config:
3723
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::OrHash,
3724
+ threshold_amount: Float
3725
+ ).returns(T.attached_class)
3726
+ end
3727
+ def self.new(
3728
+ commit:,
3729
+ # When set to false, the contract will not be evaluated against the
3730
+ # threshold_amount. Toggling to true will result an immediate evaluation,
3731
+ # regardless of prior state.
3732
+ is_enabled:,
3733
+ payment_gate_config:,
3734
+ # Specify the threshold amount for the contract. Each time the contract's usage
3735
+ # hits this amount, a threshold charge will be initiated.
3736
+ threshold_amount:
3737
+ )
3738
+ end
3739
+
3740
+ sig do
3741
+ override.returns(
3742
+ {
3743
+ commit:
3744
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::Commit,
3745
+ is_enabled: T::Boolean,
3746
+ payment_gate_config:
3747
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig,
3748
+ threshold_amount: Float
3749
+ }
3750
+ )
3751
+ end
3752
+ def to_hash
3753
+ end
3754
+
3755
+ class Commit < MetronomeSDK::Internal::Type::BaseModel
3756
+ OrHash =
3757
+ T.type_alias do
3758
+ T.any(
3759
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::Commit,
3760
+ MetronomeSDK::Internal::AnyHash
3761
+ )
3762
+ end
3763
+
3764
+ # The commit product that will be used to generate the line item for commit
3765
+ # payment.
3766
+ sig { returns(String) }
3767
+ attr_accessor :product_id
3768
+
3769
+ sig { returns(T.nilable(String)) }
3770
+ attr_reader :description
3771
+
3772
+ sig { params(description: String).void }
3773
+ attr_writer :description
3774
+
3775
+ # Specify the name of the line item for the threshold charge. If left blank, it
3776
+ # will default to the commit product name.
3777
+ sig { returns(T.nilable(String)) }
3778
+ attr_reader :name
3779
+
3780
+ sig { params(name: String).void }
3781
+ attr_writer :name
3782
+
3783
+ sig do
3784
+ params(
3785
+ product_id: String,
3786
+ description: String,
3787
+ name: String
3788
+ ).returns(T.attached_class)
3789
+ end
3790
+ def self.new(
3791
+ # The commit product that will be used to generate the line item for commit
3792
+ # payment.
3793
+ product_id:,
3794
+ description: nil,
3795
+ # Specify the name of the line item for the threshold charge. If left blank, it
3796
+ # will default to the commit product name.
3797
+ name: nil
3798
+ )
3799
+ end
3800
+
3801
+ sig do
3802
+ override.returns(
3803
+ { product_id: String, description: String, name: String }
3804
+ )
3805
+ end
3806
+ def to_hash
3807
+ end
3808
+ end
3809
+
3810
+ class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
3811
+ OrHash =
3812
+ T.type_alias do
3813
+ T.any(
3814
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig,
3815
+ MetronomeSDK::Internal::AnyHash
3816
+ )
3817
+ end
3818
+
3819
+ # Gate access to the commit balance based on successful collection of payment.
3820
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
3821
+ # facilitate payment using your own payment integration. Select NONE if you do not
3822
+ # wish to payment gate the commit balance.
3823
+ sig do
3824
+ returns(
3825
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol
3826
+ )
3827
+ end
3828
+ attr_accessor :payment_gate_type
3829
+
3830
+ # Only applicable if using PRECALCULATED as your tax type.
3831
+ sig do
3832
+ returns(
3833
+ T.nilable(
3834
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig
3835
+ )
3836
+ )
3837
+ end
3838
+ attr_reader :precalculated_tax_config
3839
+
3840
+ sig do
3841
+ params(
3842
+ precalculated_tax_config:
3843
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig::OrHash
3844
+ ).void
3845
+ end
3846
+ attr_writer :precalculated_tax_config
3847
+
3848
+ # Only applicable if using STRIPE as your payment gate type.
3849
+ sig do
3850
+ returns(
3851
+ T.nilable(
3852
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig
3853
+ )
3854
+ )
3855
+ end
3856
+ attr_reader :stripe_config
3857
+
3858
+ sig do
3859
+ params(
3860
+ stripe_config:
3861
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::OrHash
3862
+ ).void
3863
+ end
3864
+ attr_writer :stripe_config
3865
+
3866
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
3867
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
3868
+ # will default to NONE.
3869
+ sig do
3870
+ returns(
3871
+ T.nilable(
3872
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
3873
+ )
3874
+ )
3875
+ end
3876
+ attr_reader :tax_type
3877
+
3878
+ sig do
3879
+ params(
3880
+ tax_type:
3881
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::OrSymbol
3882
+ ).void
3883
+ end
3884
+ attr_writer :tax_type
3885
+
3886
+ sig do
3887
+ params(
3888
+ payment_gate_type:
3889
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType::OrSymbol,
3890
+ precalculated_tax_config:
3891
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig::OrHash,
3892
+ stripe_config:
3893
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::OrHash,
3894
+ tax_type:
3895
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::OrSymbol
3896
+ ).returns(T.attached_class)
3897
+ end
3898
+ def self.new(
3899
+ # Gate access to the commit balance based on successful collection of payment.
3900
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
3901
+ # facilitate payment using your own payment integration. Select NONE if you do not
3902
+ # wish to payment gate the commit balance.
3903
+ payment_gate_type:,
3904
+ # Only applicable if using PRECALCULATED as your tax type.
3905
+ precalculated_tax_config: nil,
3906
+ # Only applicable if using STRIPE as your payment gate type.
3907
+ stripe_config: nil,
3908
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
3909
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
3910
+ # will default to NONE.
3911
+ tax_type: nil
3912
+ )
3913
+ end
3914
+
3915
+ sig do
3916
+ override.returns(
3917
+ {
3918
+ payment_gate_type:
3919
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol,
3920
+ precalculated_tax_config:
3921
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig,
3922
+ stripe_config:
3923
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig,
3924
+ tax_type:
3925
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
3926
+ }
3927
+ )
3928
+ end
3929
+ def to_hash
3930
+ end
3931
+
3932
+ # Gate access to the commit balance based on successful collection of payment.
3933
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
3934
+ # facilitate payment using your own payment integration. Select NONE if you do not
3935
+ # wish to payment gate the commit balance.
3936
+ module PaymentGateType
3937
+ extend MetronomeSDK::Internal::Type::Enum
3938
+
3939
+ TaggedSymbol =
3940
+ T.type_alias do
3941
+ T.all(
3942
+ Symbol,
3943
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType
3944
+ )
3945
+ end
3946
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3947
+
3948
+ NONE =
3949
+ T.let(
3950
+ :NONE,
3951
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol
3952
+ )
3953
+ STRIPE =
3954
+ T.let(
3955
+ :STRIPE,
3956
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol
3957
+ )
3958
+ EXTERNAL =
3959
+ T.let(
3960
+ :EXTERNAL,
3961
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol
3962
+ )
3963
+
3964
+ sig do
3965
+ override.returns(
3966
+ T::Array[
3967
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType::TaggedSymbol
3968
+ ]
3969
+ )
3970
+ end
3971
+ def self.values
3972
+ end
3973
+ end
3974
+
3975
+ class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
3976
+ OrHash =
3977
+ T.type_alias do
3978
+ T.any(
3979
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig,
3980
+ MetronomeSDK::Internal::AnyHash
3981
+ )
3982
+ end
3983
+
3984
+ # Amount of tax to be applied. This should be in the same currency and
3985
+ # denomination as the commit's invoice schedule
3986
+ sig { returns(Float) }
3987
+ attr_accessor :tax_amount
3988
+
3989
+ # Name of the tax to be applied. This may be used in an invoice line item
3990
+ # description.
3991
+ sig { returns(T.nilable(String)) }
3992
+ attr_reader :tax_name
3993
+
3994
+ sig { params(tax_name: String).void }
3995
+ attr_writer :tax_name
3996
+
3997
+ # Only applicable if using PRECALCULATED as your tax type.
3998
+ sig do
3999
+ params(tax_amount: Float, tax_name: String).returns(
4000
+ T.attached_class
4001
+ )
4002
+ end
4003
+ def self.new(
4004
+ # Amount of tax to be applied. This should be in the same currency and
4005
+ # denomination as the commit's invoice schedule
4006
+ tax_amount:,
4007
+ # Name of the tax to be applied. This may be used in an invoice line item
4008
+ # description.
4009
+ tax_name: nil
4010
+ )
4011
+ end
4012
+
4013
+ sig { override.returns({ tax_amount: Float, tax_name: String }) }
4014
+ def to_hash
4015
+ end
4016
+ end
4017
+
4018
+ class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
4019
+ OrHash =
4020
+ T.type_alias do
4021
+ T.any(
4022
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig,
4023
+ MetronomeSDK::Internal::AnyHash
4024
+ )
4025
+ end
4026
+
4027
+ # If left blank, will default to INVOICE
4028
+ sig do
4029
+ returns(
4030
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol
4031
+ )
4032
+ end
4033
+ attr_accessor :payment_type
4034
+
4035
+ # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
4036
+ # your payment type.
4037
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
4038
+ attr_reader :invoice_metadata
4039
+
4040
+ sig { params(invoice_metadata: T::Hash[Symbol, String]).void }
4041
+ attr_writer :invoice_metadata
4042
+
4043
+ # Only applicable if using STRIPE as your payment gate type.
4044
+ sig do
4045
+ params(
4046
+ payment_type:
4047
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
4048
+ invoice_metadata: T::Hash[Symbol, String]
4049
+ ).returns(T.attached_class)
4050
+ end
4051
+ def self.new(
4052
+ # If left blank, will default to INVOICE
4053
+ payment_type:,
4054
+ # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
4055
+ # your payment type.
4056
+ invoice_metadata: nil
4057
+ )
4058
+ end
4059
+
4060
+ sig do
4061
+ override.returns(
4062
+ {
4063
+ payment_type:
4064
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol,
4065
+ invoice_metadata: T::Hash[Symbol, String]
4066
+ }
4067
+ )
4068
+ end
4069
+ def to_hash
4070
+ end
4071
+
4072
+ # If left blank, will default to INVOICE
4073
+ module PaymentType
4074
+ extend MetronomeSDK::Internal::Type::Enum
4075
+
4076
+ TaggedSymbol =
4077
+ T.type_alias do
4078
+ T.all(
4079
+ Symbol,
4080
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType
4081
+ )
4082
+ end
4083
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
4084
+
4085
+ INVOICE =
4086
+ T.let(
4087
+ :INVOICE,
4088
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol
4089
+ )
4090
+ PAYMENT_INTENT =
4091
+ T.let(
4092
+ :PAYMENT_INTENT,
4093
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol
4094
+ )
4095
+
4096
+ sig do
4097
+ override.returns(
4098
+ T::Array[
4099
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol
4100
+ ]
4101
+ )
4102
+ end
4103
+ def self.values
4104
+ end
4105
+ end
4106
+ end
4107
+
4108
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
4109
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
4110
+ # will default to NONE.
4111
+ module TaxType
4112
+ extend MetronomeSDK::Internal::Type::Enum
4113
+
4114
+ TaggedSymbol =
4115
+ T.type_alias do
4116
+ T.all(
4117
+ Symbol,
4118
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType
4119
+ )
4120
+ end
4121
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
4122
+
4123
+ NONE =
4124
+ T.let(
4125
+ :NONE,
4126
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
4127
+ )
4128
+ STRIPE =
4129
+ T.let(
4130
+ :STRIPE,
4131
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
4132
+ )
4133
+ ANROK =
4134
+ T.let(
4135
+ :ANROK,
4136
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
4137
+ )
4138
+ PRECALCULATED =
4139
+ T.let(
4140
+ :PRECALCULATED,
4141
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
4142
+ )
4143
+
4144
+ sig do
4145
+ override.returns(
4146
+ T::Array[
4147
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
4148
+ ]
4149
+ )
4150
+ end
4151
+ def self.values
4152
+ end
4153
+ end
4154
+ end
4155
+ end
4156
+
4157
+ class UsageFilter < MetronomeSDK::Internal::Type::BaseModel
4158
+ OrHash =
4159
+ T.type_alias do
4160
+ T.any(
4161
+ MetronomeSDK::ContractWithoutAmendments::UsageFilter,
4162
+ MetronomeSDK::Internal::AnyHash
4163
+ )
4164
+ end
4165
+
4166
+ sig { returns(T.nilable(MetronomeSDK::BaseUsageFilter)) }
4167
+ attr_reader :current
4168
+
4169
+ sig do
4170
+ params(current: T.nilable(MetronomeSDK::BaseUsageFilter::OrHash)).void
4171
+ end
4172
+ attr_writer :current
4173
+
4174
+ sig { returns(MetronomeSDK::BaseUsageFilter) }
4175
+ attr_reader :initial
4176
+
4177
+ sig { params(initial: MetronomeSDK::BaseUsageFilter::OrHash).void }
4178
+ attr_writer :initial
4179
+
4180
+ sig do
4181
+ returns(
4182
+ T::Array[
4183
+ MetronomeSDK::ContractWithoutAmendments::UsageFilter::Update
4184
+ ]
4185
+ )
4186
+ end
4187
+ attr_accessor :updates
4188
+
4189
+ sig do
4190
+ params(
4191
+ current: T.nilable(MetronomeSDK::BaseUsageFilter::OrHash),
4192
+ initial: MetronomeSDK::BaseUsageFilter::OrHash,
4193
+ updates:
4194
+ T::Array[
4195
+ MetronomeSDK::ContractWithoutAmendments::UsageFilter::Update::OrHash
4196
+ ]
4197
+ ).returns(T.attached_class)
4198
+ end
4199
+ def self.new(current:, initial:, updates:)
4200
+ end
4201
+
4202
+ sig do
4203
+ override.returns(
4204
+ {
4205
+ current: T.nilable(MetronomeSDK::BaseUsageFilter),
4206
+ initial: MetronomeSDK::BaseUsageFilter,
4207
+ updates:
4208
+ T::Array[
4209
+ MetronomeSDK::ContractWithoutAmendments::UsageFilter::Update
4210
+ ]
4211
+ }
4212
+ )
4213
+ end
4214
+ def to_hash
4215
+ end
4216
+
4217
+ class Update < MetronomeSDK::Internal::Type::BaseModel
4218
+ OrHash =
4219
+ T.type_alias do
4220
+ T.any(
4221
+ MetronomeSDK::ContractWithoutAmendments::UsageFilter::Update,
4222
+ MetronomeSDK::Internal::AnyHash
4223
+ )
4224
+ end
4225
+
4226
+ sig { returns(String) }
4227
+ attr_accessor :group_key
4228
+
4229
+ sig { returns(T::Array[String]) }
4230
+ attr_accessor :group_values
4231
+
4232
+ sig { returns(Time) }
4233
+ attr_accessor :starting_at
4234
+
4235
+ sig do
4236
+ params(
4237
+ group_key: String,
4238
+ group_values: T::Array[String],
4239
+ starting_at: Time
4240
+ ).returns(T.attached_class)
4241
+ end
4242
+ def self.new(group_key:, group_values:, starting_at:)
4243
+ end
4244
+
4245
+ sig do
4246
+ override.returns(
4247
+ {
4248
+ group_key: String,
4249
+ group_values: T::Array[String],
4250
+ starting_at: Time
4251
+ }
4252
+ )
4253
+ end
4254
+ def to_hash
4255
+ end
4256
+ end
4257
+ end
4258
+ end
4259
+ end
4260
+ end