metronome-sdk 0.3.0 → 1.0.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 (308) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +36 -0
  3. data/README.md +9 -9
  4. data/lib/metronome_sdk/internal/body_cursor_page.rb +86 -0
  5. data/lib/metronome_sdk/internal/cursor_page_without_limit.rb +86 -0
  6. data/lib/metronome_sdk/internal/transport/base_client.rb +1 -4
  7. data/lib/metronome_sdk/internal/transport/pooled_net_requester.rb +1 -9
  8. data/lib/metronome_sdk/internal/type/base_model.rb +6 -13
  9. data/lib/metronome_sdk/internal/type/union.rb +11 -0
  10. data/lib/metronome_sdk/internal/util.rb +1 -1
  11. data/lib/metronome_sdk/models/base_threshold_commit.rb +36 -0
  12. data/lib/metronome_sdk/models/commit.rb +26 -170
  13. data/lib/metronome_sdk/models/commit_hierarchy_configuration.rb +98 -0
  14. data/lib/metronome_sdk/models/commit_rate.rb +48 -0
  15. data/lib/metronome_sdk/models/commit_specifier.rb +42 -0
  16. data/lib/metronome_sdk/models/commit_specifier_input.rb +42 -0
  17. data/lib/metronome_sdk/models/contract.rb +404 -0
  18. data/lib/metronome_sdk/models/contract_v2.rb +2919 -0
  19. data/lib/metronome_sdk/models/contract_without_amendments.rb +36 -1126
  20. data/lib/metronome_sdk/models/credit.rb +9 -156
  21. data/lib/metronome_sdk/models/discount.rb +2 -1
  22. data/lib/metronome_sdk/models/hierarchy_configuration.rb +76 -0
  23. data/lib/metronome_sdk/models/override.rb +6 -101
  24. data/lib/metronome_sdk/models/override_tier.rb +21 -0
  25. data/lib/metronome_sdk/models/overwrite_rate.rb +82 -0
  26. data/lib/metronome_sdk/models/payment_gate_config.rb +149 -0
  27. data/lib/metronome_sdk/models/payment_gate_config_v2.rb +149 -0
  28. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +100 -0
  29. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +102 -0
  30. data/lib/metronome_sdk/models/pro_service.rb +2 -1
  31. data/lib/metronome_sdk/models/recurring_commit_subscription_config.rb +51 -0
  32. data/lib/metronome_sdk/models/scheduled_charge.rb +2 -1
  33. data/lib/metronome_sdk/models/spend_threshold_configuration.rb +44 -0
  34. data/lib/metronome_sdk/models/spend_threshold_configuration_v2.rb +44 -0
  35. data/lib/metronome_sdk/models/subscription.rb +227 -0
  36. data/lib/metronome_sdk/models/update_base_threshold_commit.rb +36 -0
  37. data/lib/metronome_sdk/models/v1/alert_create_params.rb +4 -6
  38. data/lib/metronome_sdk/models/v1/billable_metric_create_params.rb +1 -2
  39. data/lib/metronome_sdk/models/v1/billable_metric_list_response.rb +3 -3
  40. data/lib/metronome_sdk/models/v1/billable_metric_retrieve_response.rb +4 -7
  41. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +57 -411
  42. data/lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb +7 -16
  43. data/lib/metronome_sdk/models/v1/contract_create_params.rb +236 -1478
  44. data/lib/metronome_sdk/models/v1/contract_list_balances_response.rb +6 -23
  45. data/lib/metronome_sdk/models/v1/contract_list_response.rb +3 -1153
  46. data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_params.rb +2 -6
  47. data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rb +5 -50
  48. data/lib/metronome_sdk/models/v1/contract_retrieve_response.rb +3 -1154
  49. data/lib/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_params.rb +1 -3
  50. data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +2 -1
  51. data/lib/metronome_sdk/models/v1/contracts/product_list_response.rb +8 -1
  52. data/lib/metronome_sdk/models/v1/contracts/product_retrieve_response.rb +8 -1
  53. data/lib/metronome_sdk/models/v1/contracts/quantity_rounding.rb +1 -4
  54. data/lib/metronome_sdk/models/v1/contracts/rate_card_create_params.rb +4 -7
  55. data/lib/metronome_sdk/models/v1/contracts/rate_card_list_response.rb +10 -1
  56. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_params.rb +2 -6
  57. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rb +5 -50
  58. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rb +10 -1
  59. data/lib/metronome_sdk/models/v1/contracts/rate_card_update_params.rb +1 -3
  60. data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_params.rb +1 -3
  61. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +6 -61
  62. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +3 -49
  63. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rb +4 -51
  64. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_params.rb +2 -6
  65. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rb +5 -49
  66. data/lib/metronome_sdk/models/v1/credit_grant_list_entries_response.rb +103 -123
  67. data/lib/metronome_sdk/models/v1/credit_grant_list_response.rb +3 -5
  68. data/lib/metronome_sdk/models/v1/custom_field_list_keys_params.rb +1 -3
  69. data/lib/metronome_sdk/models/v1/custom_field_list_keys_response.rb +41 -58
  70. data/lib/metronome_sdk/models/v1/custom_field_set_values_params.rb +5 -1
  71. data/lib/metronome_sdk/models/v1/customer.rb +2 -1
  72. data/lib/metronome_sdk/models/v1/customer_create_params.rb +37 -11
  73. data/lib/metronome_sdk/models/v1/customer_detail.rb +2 -1
  74. data/lib/metronome_sdk/models/v1/customer_list_billable_metrics_response.rb +3 -3
  75. data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +1 -3
  76. data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rb +28 -0
  77. data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rb +128 -0
  78. data/lib/metronome_sdk/models/v1/customer_set_billing_configurations_params.rb +143 -0
  79. data/lib/metronome_sdk/models/v1/customers/alert_list_params.rb +1 -3
  80. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +30 -1
  81. data/lib/metronome_sdk/models/v1/customers/billing_config_create_params.rb +2 -0
  82. data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +2 -0
  83. data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +10 -60
  84. data/lib/metronome_sdk/models/v1/customers/credit_create_params.rb +6 -48
  85. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +8 -16
  86. data/lib/metronome_sdk/models/v1/customers/invoice.rb +61 -48
  87. data/lib/metronome_sdk/models/v1/customers/invoice_list_breakdowns_params.rb +1 -4
  88. data/lib/metronome_sdk/models/v1/customers/plan_add_params.rb +2 -6
  89. data/lib/metronome_sdk/models/v1/customers/plan_list_response.rb +2 -1
  90. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +4 -11
  91. data/lib/metronome_sdk/models/v1/plan_detail.rb +9 -5
  92. data/lib/metronome_sdk/models/v1/plan_list_charges_response.rb +2 -1
  93. data/lib/metronome_sdk/models/v1/plan_list_customers_response.rb +2 -1
  94. data/lib/metronome_sdk/models/v1/plan_list_response.rb +5 -1
  95. data/lib/metronome_sdk/models/v1/usage_ingest_params.rb +1 -4
  96. data/lib/metronome_sdk/models/v1/usage_list_params.rb +1 -3
  97. data/lib/metronome_sdk/models/v1/usage_list_response.rb +45 -62
  98. data/lib/metronome_sdk/models/v1/usage_search_response.rb +4 -7
  99. data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +29 -58
  100. data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +26 -49
  101. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +414 -2310
  102. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +337 -2424
  103. data/lib/metronome_sdk/models/v2/contract_list_response.rb +3 -4520
  104. data/lib/metronome_sdk/models/v2/contract_retrieve_response.rb +3 -4528
  105. data/lib/metronome_sdk/models.rb +38 -0
  106. data/lib/metronome_sdk/resources/v1/alerts.rb +72 -2
  107. data/lib/metronome_sdk/resources/v1/audit_logs.rb +39 -4
  108. data/lib/metronome_sdk/resources/v1/billable_metrics.rb +54 -4
  109. data/lib/metronome_sdk/resources/v1/contracts/products.rb +25 -6
  110. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rb +7 -2
  111. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +10 -2
  112. data/lib/metronome_sdk/resources/v1/contracts/rate_cards.rb +109 -10
  113. data/lib/metronome_sdk/resources/v1/contracts.rb +254 -18
  114. data/lib/metronome_sdk/resources/v1/credit_grants.rb +2 -1
  115. data/lib/metronome_sdk/resources/v1/custom_fields.rb +51 -14
  116. data/lib/metronome_sdk/resources/v1/customers/alerts.rb +103 -8
  117. data/lib/metronome_sdk/resources/v1/customers/commits.rb +119 -9
  118. data/lib/metronome_sdk/resources/v1/customers/credits.rb +104 -8
  119. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +124 -8
  120. data/lib/metronome_sdk/resources/v1/customers.rb +169 -12
  121. data/lib/metronome_sdk/resources/v1/dashboards.rb +29 -3
  122. data/lib/metronome_sdk/resources/v1/invoices.rb +23 -2
  123. data/lib/metronome_sdk/resources/v1/pricing_units.rb +6 -1
  124. data/lib/metronome_sdk/resources/v1/services.rb +6 -4
  125. data/lib/metronome_sdk/resources/v1/usage.rb +185 -12
  126. data/lib/metronome_sdk/resources/v2/contracts.rb +114 -18
  127. data/lib/metronome_sdk/version.rb +1 -1
  128. data/lib/metronome_sdk.rb +24 -3
  129. data/rbi/metronome_sdk/errors.rbi +2 -2
  130. data/rbi/metronome_sdk/internal/body_cursor_page.rbi +22 -0
  131. data/rbi/metronome_sdk/internal/cursor_page_without_limit.rbi +22 -0
  132. data/rbi/metronome_sdk/models/base_threshold_commit.rbi +58 -0
  133. data/rbi/metronome_sdk/models/commit.rbi +26 -348
  134. data/rbi/metronome_sdk/models/commit_hierarchy_configuration.rbi +280 -0
  135. data/rbi/metronome_sdk/models/commit_rate.rbi +85 -0
  136. data/rbi/metronome_sdk/models/commit_specifier.rbi +71 -0
  137. data/rbi/metronome_sdk/models/commit_specifier_input.rbi +74 -0
  138. data/rbi/metronome_sdk/models/contract.rbi +768 -0
  139. data/rbi/metronome_sdk/models/contract_v2.rbi +5822 -0
  140. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +184 -2507
  141. data/rbi/metronome_sdk/models/credit.rbi +10 -348
  142. data/rbi/metronome_sdk/models/discount.rbi +2 -0
  143. data/rbi/metronome_sdk/models/hierarchy_configuration.rbi +180 -0
  144. data/rbi/metronome_sdk/models/override.rbi +8 -193
  145. data/rbi/metronome_sdk/models/override_tier.rbi +29 -0
  146. data/rbi/metronome_sdk/models/overwrite_rate.rbi +137 -0
  147. data/rbi/metronome_sdk/models/payment_gate_config.rbi +312 -0
  148. data/rbi/metronome_sdk/models/payment_gate_config_v2.rbi +321 -0
  149. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +183 -0
  150. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +188 -0
  151. data/rbi/metronome_sdk/models/pro_service.rbi +2 -0
  152. data/rbi/metronome_sdk/models/recurring_commit_subscription_config.rbi +125 -0
  153. data/rbi/metronome_sdk/models/scheduled_charge.rbi +2 -0
  154. data/rbi/metronome_sdk/models/spend_threshold_configuration.rbi +76 -0
  155. data/rbi/metronome_sdk/models/spend_threshold_configuration_v2.rbi +78 -0
  156. data/rbi/metronome_sdk/models/subscription.rbi +460 -0
  157. data/rbi/metronome_sdk/models/update_base_threshold_commit.rbi +61 -0
  158. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +6 -3
  159. data/rbi/metronome_sdk/models/v1/billable_metric_list_response.rbi +2 -0
  160. data/rbi/metronome_sdk/models/v1/billable_metric_retrieve_response.rbi +2 -0
  161. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +44 -768
  162. data/rbi/metronome_sdk/models/v1/contract_create_historical_invoices_params.rbi +2 -0
  163. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +1550 -4079
  164. data/rbi/metronome_sdk/models/v1/contract_list_balances_response.rbi +8 -59
  165. data/rbi/metronome_sdk/models/v1/contract_list_response.rbi +5 -2420
  166. data/rbi/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbi +6 -129
  167. data/rbi/metronome_sdk/models/v1/contract_retrieve_response.rbi +4 -2419
  168. data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +2 -0
  169. data/rbi/metronome_sdk/models/v1/contracts/product_list_response.rbi +2 -0
  170. data/rbi/metronome_sdk/models/v1/contracts/product_retrieve_response.rbi +2 -0
  171. data/rbi/metronome_sdk/models/v1/contracts/rate_card_create_params.rbi +2 -0
  172. data/rbi/metronome_sdk/models/v1/contracts/rate_card_list_response.rbi +2 -0
  173. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbi +6 -129
  174. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rbi +2 -0
  175. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +4 -129
  176. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +4 -129
  177. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbi +4 -129
  178. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbi +6 -129
  179. data/rbi/metronome_sdk/models/v1/credit_grant_list_entries_response.rbi +147 -198
  180. data/rbi/metronome_sdk/models/v1/credit_grant_list_response.rbi +2 -0
  181. data/rbi/metronome_sdk/models/v1/custom_field_list_keys_response.rbi +117 -165
  182. data/rbi/metronome_sdk/models/v1/custom_field_set_values_params.rbi +8 -1
  183. data/rbi/metronome_sdk/models/v1/customer.rbi +2 -0
  184. data/rbi/metronome_sdk/models/v1/customer_create_params.rbi +88 -3
  185. data/rbi/metronome_sdk/models/v1/customer_detail.rbi +2 -0
  186. data/rbi/metronome_sdk/models/v1/customer_list_billable_metrics_response.rbi +2 -0
  187. data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rbi +51 -0
  188. data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbi +265 -0
  189. data/rbi/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbi +348 -0
  190. data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +60 -0
  191. data/rbi/metronome_sdk/models/v1/customers/billing_config_create_params.rbi +10 -0
  192. data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +10 -0
  193. data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +6 -90
  194. data/rbi/metronome_sdk/models/v1/customers/credit_create_params.rbi +6 -90
  195. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +6 -3
  196. data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +70 -10
  197. data/rbi/metronome_sdk/models/v1/customers/plan_list_response.rbi +2 -0
  198. data/rbi/metronome_sdk/models/v1/plan_detail.rbi +2 -0
  199. data/rbi/metronome_sdk/models/v1/plan_list_charges_response.rbi +2 -0
  200. data/rbi/metronome_sdk/models/v1/plan_list_customers_response.rbi +2 -0
  201. data/rbi/metronome_sdk/models/v1/plan_list_response.rbi +8 -1
  202. data/rbi/metronome_sdk/models/v1/usage_list_response.rbi +45 -86
  203. data/rbi/metronome_sdk/models/v1/usage_search_response.rbi +2 -0
  204. data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +56 -76
  205. data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +56 -76
  206. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +3419 -7270
  207. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1140 -6062
  208. data/rbi/metronome_sdk/models/v2/contract_list_response.rbi +5 -9867
  209. data/rbi/metronome_sdk/models/v2/contract_retrieve_response.rbi +6 -9866
  210. data/rbi/metronome_sdk/models.rbi +44 -0
  211. data/rbi/metronome_sdk/resources/v1/alerts.rbi +72 -2
  212. data/rbi/metronome_sdk/resources/v1/audit_logs.rbi +39 -4
  213. data/rbi/metronome_sdk/resources/v1/billable_metrics.rbi +54 -4
  214. data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +25 -5
  215. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rbi +7 -2
  216. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +10 -3
  217. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards.rbi +109 -9
  218. data/rbi/metronome_sdk/resources/v1/contracts.rbi +257 -16
  219. data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +5 -1
  220. data/rbi/metronome_sdk/resources/v1/custom_fields.rbi +57 -14
  221. data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +108 -5
  222. data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +119 -10
  223. data/rbi/metronome_sdk/resources/v1/customers/credits.rbi +104 -9
  224. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +123 -7
  225. data/rbi/metronome_sdk/resources/v1/customers.rbi +156 -11
  226. data/rbi/metronome_sdk/resources/v1/dashboards.rbi +29 -3
  227. data/rbi/metronome_sdk/resources/v1/invoices.rbi +23 -2
  228. data/rbi/metronome_sdk/resources/v1/pricing_units.rbi +6 -1
  229. data/rbi/metronome_sdk/resources/v1/services.rbi +6 -4
  230. data/rbi/metronome_sdk/resources/v1/usage.rbi +188 -12
  231. data/rbi/metronome_sdk/resources/v2/contracts.rbi +120 -23
  232. data/sig/metronome_sdk/internal/body_cursor_page.rbs +13 -0
  233. data/sig/metronome_sdk/internal/cursor_page_without_limit.rbs +13 -0
  234. data/sig/metronome_sdk/models/base_threshold_commit.rbs +26 -0
  235. data/sig/metronome_sdk/models/commit.rbs +17 -170
  236. data/sig/metronome_sdk/models/commit_hierarchy_configuration.rbs +117 -0
  237. data/sig/metronome_sdk/models/commit_rate.rbs +48 -0
  238. data/sig/metronome_sdk/models/commit_specifier.rbs +47 -0
  239. data/sig/metronome_sdk/models/commit_specifier_input.rbs +47 -0
  240. data/sig/metronome_sdk/models/contract.rbs +398 -0
  241. data/sig/metronome_sdk/models/contract_v2.rbs +2881 -0
  242. data/sig/metronome_sdk/models/contract_without_amendments.rbs +54 -976
  243. data/sig/metronome_sdk/models/credit.rbs +12 -170
  244. data/sig/metronome_sdk/models/hierarchy_configuration.rbs +71 -0
  245. data/sig/metronome_sdk/models/override.rbs +12 -101
  246. data/sig/metronome_sdk/models/override_tier.rbs +17 -0
  247. data/sig/metronome_sdk/models/overwrite_rate.rbs +78 -0
  248. data/sig/metronome_sdk/models/payment_gate_config.rbs +123 -0
  249. data/sig/metronome_sdk/models/payment_gate_config_v2.rbs +123 -0
  250. data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +82 -0
  251. data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +82 -0
  252. data/sig/metronome_sdk/models/recurring_commit_subscription_config.rbs +51 -0
  253. data/sig/metronome_sdk/models/spend_threshold_configuration.rbs +35 -0
  254. data/sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs +35 -0
  255. data/sig/metronome_sdk/models/subscription.rbs +215 -0
  256. data/sig/metronome_sdk/models/update_base_threshold_commit.rbs +28 -0
  257. data/sig/metronome_sdk/models/v1/alert_create_params.rbs +4 -2
  258. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +24 -340
  259. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +168 -1219
  260. data/sig/metronome_sdk/models/v1/contract_list_balances_response.rbs +4 -25
  261. data/sig/metronome_sdk/models/v1/contract_list_response.rbs +4 -1041
  262. data/sig/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbs +6 -54
  263. data/sig/metronome_sdk/models/v1/contract_retrieve_response.rbs +4 -1041
  264. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbs +6 -54
  265. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +6 -54
  266. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +6 -54
  267. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbs +6 -54
  268. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbs +6 -54
  269. data/sig/metronome_sdk/models/v1/credit_grant_list_entries_response.rbs +72 -94
  270. data/sig/metronome_sdk/models/v1/custom_field_list_keys_response.rbs +53 -75
  271. data/sig/metronome_sdk/models/v1/customer_create_params.rbs +31 -4
  272. data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rbs +32 -0
  273. data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbs +113 -0
  274. data/sig/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbs +133 -0
  275. data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +21 -0
  276. data/sig/metronome_sdk/models/v1/customers/billing_config_create_params.rbs +7 -1
  277. data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbs +6 -1
  278. data/sig/metronome_sdk/models/v1/customers/commit_create_params.rbs +6 -50
  279. data/sig/metronome_sdk/models/v1/customers/credit_create_params.rbs +6 -50
  280. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +4 -2
  281. data/sig/metronome_sdk/models/v1/usage_list_response.rbs +33 -55
  282. data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +19 -43
  283. data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +19 -43
  284. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +361 -1917
  285. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +242 -2252
  286. data/sig/metronome_sdk/models/v2/contract_list_response.rbs +4 -4426
  287. data/sig/metronome_sdk/models/v2/contract_retrieve_response.rbs +4 -4426
  288. data/sig/metronome_sdk/models.rbs +38 -0
  289. data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +1 -1
  290. data/sig/metronome_sdk/resources/v1/contracts.rbs +3 -3
  291. data/sig/metronome_sdk/resources/v1/credit_grants.rbs +1 -1
  292. data/sig/metronome_sdk/resources/v1/custom_fields.rbs +1 -1
  293. data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +2 -1
  294. data/sig/metronome_sdk/resources/v1/customers/commits.rbs +2 -2
  295. data/sig/metronome_sdk/resources/v1/customers/credits.rbs +2 -2
  296. data/sig/metronome_sdk/resources/v1/customers.rbs +11 -0
  297. data/sig/metronome_sdk/resources/v1/usage.rbs +1 -1
  298. data/sig/metronome_sdk/resources/v2/contracts.rbs +7 -4
  299. metadata +74 -11
  300. data/lib/metronome_sdk/models/v1/customers/alert_list_response.rb +0 -29
  301. data/lib/metronome_sdk/models/v1/customers/commit_list_response.rb +0 -26
  302. data/lib/metronome_sdk/models/v1/customers/credit_list_response.rb +0 -26
  303. data/rbi/metronome_sdk/models/v1/customers/alert_list_response.rbi +0 -46
  304. data/rbi/metronome_sdk/models/v1/customers/commit_list_response.rbi +0 -45
  305. data/rbi/metronome_sdk/models/v1/customers/credit_list_response.rbi +0 -45
  306. data/sig/metronome_sdk/models/v1/customers/alert_list_response.rbs +0 -29
  307. data/sig/metronome_sdk/models/v1/customers/commit_list_response.rbs +0 -26
  308. data/sig/metronome_sdk/models/v1/customers/credit_list_response.rbs +0 -26
@@ -40,6 +40,7 @@ module MetronomeSDK
40
40
  -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Credit] }
41
41
 
42
42
  # @!attribute custom_fields
43
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
43
44
  #
44
45
  # @return [Hash{Symbol=>String}, nil]
45
46
  optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
@@ -49,9 +50,7 @@ module MetronomeSDK
49
50
  #
50
51
  # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::Discount>, nil]
51
52
  optional :discounts,
52
- -> {
53
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Discount]
54
- }
53
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Discount] }
55
54
 
56
55
  # @!attribute ending_before
57
56
  # exclusive contract end time
@@ -62,10 +61,7 @@ module MetronomeSDK
62
61
  # @!attribute hierarchy_configuration
63
62
  #
64
63
  # @return [MetronomeSDK::Models::V1::ContractCreateParams::HierarchyConfiguration, nil]
65
- optional :hierarchy_configuration,
66
- -> {
67
- MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration
68
- }
64
+ optional :hierarchy_configuration, -> { MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration }
69
65
 
70
66
  # @!attribute multiplier_override_prioritization
71
67
  # Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
@@ -97,15 +93,13 @@ module MetronomeSDK
97
93
  #
98
94
  # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::Override>, nil]
99
95
  optional :overrides,
100
- -> {
101
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Override]
102
- }
96
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Override] }
103
97
 
104
98
  # @!attribute prepaid_balance_threshold_configuration
105
99
  #
106
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration, nil]
100
+ # @return [MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration, nil]
107
101
  optional :prepaid_balance_threshold_configuration,
108
- -> { MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration }
102
+ -> { MetronomeSDK::PrepaidBalanceThresholdConfiguration }
109
103
 
110
104
  # @!attribute priority
111
105
  # Priority of the contract.
@@ -118,9 +112,7 @@ module MetronomeSDK
118
112
  #
119
113
  # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::ProfessionalService>, nil]
120
114
  optional :professional_services,
121
- -> {
122
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::ProfessionalService]
123
- }
115
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::ProfessionalService] }
124
116
 
125
117
  # @!attribute rate_card_alias
126
118
  # Selects the rate card linked to the specified alias as of the contract's start
@@ -138,26 +130,20 @@ module MetronomeSDK
138
130
  #
139
131
  # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit>, nil]
140
132
  optional :recurring_commits,
141
- -> {
142
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::RecurringCommit]
143
- }
133
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::RecurringCommit] }
144
134
 
145
135
  # @!attribute recurring_credits
146
136
  #
147
137
  # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit>, nil]
148
138
  optional :recurring_credits,
149
- -> {
150
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::RecurringCredit]
151
- }
139
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::RecurringCredit] }
152
140
 
153
141
  # @!attribute reseller_royalties
154
142
  # This field's availability is dependent on your client's configuration.
155
143
  #
156
144
  # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::ResellerRoyalty>, nil]
157
145
  optional :reseller_royalties,
158
- -> {
159
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::ResellerRoyalty]
160
- }
146
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::ResellerRoyalty] }
161
147
 
162
148
  # @!attribute salesforce_opportunity_id
163
149
  # This field's availability is dependent on your client's configuration.
@@ -169,9 +155,7 @@ module MetronomeSDK
169
155
  #
170
156
  # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::ScheduledCharge>, nil]
171
157
  optional :scheduled_charges,
172
- -> {
173
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::ScheduledCharge]
174
- }
158
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::ScheduledCharge] }
175
159
 
176
160
  # @!attribute scheduled_charges_on_usage_invoices
177
161
  # Determines which scheduled and commit charges to consolidate onto the Contract's
@@ -186,9 +170,8 @@ module MetronomeSDK
186
170
 
187
171
  # @!attribute spend_threshold_configuration
188
172
  #
189
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration, nil]
190
- optional :spend_threshold_configuration,
191
- -> { MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration }
173
+ # @return [MetronomeSDK::Models::SpendThresholdConfiguration, nil]
174
+ optional :spend_threshold_configuration, -> { MetronomeSDK::SpendThresholdConfiguration }
192
175
 
193
176
  # @!attribute subscriptions
194
177
  # Optional list of
@@ -197,9 +180,7 @@ module MetronomeSDK
197
180
  #
198
181
  # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::Subscription>, nil]
199
182
  optional :subscriptions,
200
- -> {
201
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Subscription]
202
- }
183
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Subscription] }
203
184
 
204
185
  # @!attribute total_contract_value
205
186
  # This field's availability is dependent on your client's configuration.
@@ -228,10 +209,7 @@ module MetronomeSDK
228
209
  # @!attribute usage_statement_schedule
229
210
  #
230
211
  # @return [MetronomeSDK::Models::V1::ContractCreateParams::UsageStatementSchedule, nil]
231
- optional :usage_statement_schedule,
232
- -> {
233
- MetronomeSDK::V1::ContractCreateParams::UsageStatementSchedule
234
- }
212
+ optional :usage_statement_schedule, -> { MetronomeSDK::V1::ContractCreateParams::UsageStatementSchedule }
235
213
 
236
214
  # @!method initialize(customer_id:, starting_at:, billing_provider_configuration: nil, commits: nil, credits: nil, custom_fields: nil, discounts: nil, ending_before: nil, hierarchy_configuration: nil, multiplier_override_prioritization: nil, name: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, overrides: nil, prepaid_balance_threshold_configuration: nil, priority: nil, professional_services: nil, rate_card_alias: nil, rate_card_id: nil, recurring_commits: nil, recurring_credits: nil, reseller_royalties: nil, salesforce_opportunity_id: nil, scheduled_charges: nil, scheduled_charges_on_usage_invoices: nil, spend_threshold_configuration: nil, subscriptions: nil, total_contract_value: nil, transition: nil, uniqueness_key: nil, usage_filter: nil, usage_statement_schedule: nil, request_options: {})
237
215
  # Some parameter documentations has been truncated, see
@@ -247,7 +225,7 @@ module MetronomeSDK
247
225
  #
248
226
  # @param credits [Array<MetronomeSDK::Models::V1::ContractCreateParams::Credit>]
249
227
  #
250
- # @param custom_fields [Hash{Symbol=>String}]
228
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
251
229
  #
252
230
  # @param discounts [Array<MetronomeSDK::Models::V1::ContractCreateParams::Discount>] This field's availability is dependent on your client's configuration.
253
231
  #
@@ -265,7 +243,7 @@ module MetronomeSDK
265
243
  #
266
244
  # @param overrides [Array<MetronomeSDK::Models::V1::ContractCreateParams::Override>]
267
245
  #
268
- # @param prepaid_balance_threshold_configuration [MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration]
246
+ # @param prepaid_balance_threshold_configuration [MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration]
269
247
  #
270
248
  # @param priority [Float] Priority of the contract.
271
249
  #
@@ -287,7 +265,7 @@ module MetronomeSDK
287
265
  #
288
266
  # @param scheduled_charges_on_usage_invoices [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::ScheduledChargesOnUsageInvoices] Determines which scheduled and commit charges to consolidate onto the Contract's
289
267
  #
290
- # @param spend_threshold_configuration [MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration]
268
+ # @param spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfiguration]
291
269
  #
292
270
  # @param subscriptions [Array<MetronomeSDK::Models::V1::ContractCreateParams::Subscription>] Optional list of [subscriptions](https://docs.metronome.com/manage-product-acces
293
271
  #
@@ -309,9 +287,7 @@ module MetronomeSDK
309
287
  #
310
288
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::BillingProviderConfiguration::BillingProvider, nil]
311
289
  optional :billing_provider,
312
- enum: -> {
313
- MetronomeSDK::V1::ContractCreateParams::BillingProviderConfiguration::BillingProvider
314
- }
290
+ enum: -> { MetronomeSDK::V1::ContractCreateParams::BillingProviderConfiguration::BillingProvider }
315
291
 
316
292
  # @!attribute billing_provider_configuration_id
317
293
  # The Metronome ID of the billing provider configuration. Use when a customer has
@@ -326,9 +302,7 @@ module MetronomeSDK
326
302
  #
327
303
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::BillingProviderConfiguration::DeliveryMethod, nil]
328
304
  optional :delivery_method,
329
- enum: -> {
330
- MetronomeSDK::V1::ContractCreateParams::BillingProviderConfiguration::DeliveryMethod
331
- }
305
+ enum: -> { MetronomeSDK::V1::ContractCreateParams::BillingProviderConfiguration::DeliveryMethod }
332
306
 
333
307
  # @!method initialize(billing_provider: nil, billing_provider_configuration_id: nil, delivery_method: nil)
334
308
  # Some parameter documentations has been truncated, see
@@ -418,6 +392,7 @@ module MetronomeSDK
418
392
  optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
419
393
 
420
394
  # @!attribute custom_fields
395
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
421
396
  #
422
397
  # @return [Hash{Symbol=>String}, nil]
423
398
  optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
@@ -431,9 +406,8 @@ module MetronomeSDK
431
406
  # @!attribute hierarchy_configuration
432
407
  # Optional configuration for commit hierarchy access control
433
408
  #
434
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration, nil]
435
- optional :hierarchy_configuration,
436
- -> { MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration }
409
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
410
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
437
411
 
438
412
  # @!attribute invoice_schedule
439
413
  # Required for "POSTPAID" commits: the true up invoice will be generated at this
@@ -460,10 +434,7 @@ module MetronomeSDK
460
434
  # optionally payment gate this commit
461
435
  #
462
436
  # @return [MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig, nil]
463
- optional :payment_gate_config,
464
- -> {
465
- MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig
466
- }
437
+ optional :payment_gate_config, -> { MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig }
467
438
 
468
439
  # @!attribute priority
469
440
  # If multiple commits are applicable, the one with the lower priority will apply
@@ -489,11 +460,8 @@ module MetronomeSDK
489
460
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
490
461
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
491
462
  #
492
- # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::Commit::Specifier>, nil]
493
- optional :specifiers,
494
- -> {
495
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Commit::Specifier]
496
- }
463
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
464
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
497
465
 
498
466
  # @!attribute temporary_id
499
467
  # A temporary ID for the commit that can be used to reference the commit for
@@ -518,11 +486,11 @@ module MetronomeSDK
518
486
  #
519
487
  # @param applicable_product_tags [Array<String>] Which tags the commit applies to. If applicable*product_ids, applicable_product*
520
488
  #
521
- # @param custom_fields [Hash{Symbol=>String}]
489
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
522
490
  #
523
491
  # @param description [String] Used only in UI/API. It is not exposed to end customers.
524
492
  #
525
- # @param hierarchy_configuration [MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration] Optional configuration for commit hierarchy access control
493
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for commit hierarchy access control
526
494
  #
527
495
  # @param invoice_schedule [MetronomeSDK::Models::V1::ContractCreateParams::Commit::InvoiceSchedule] Required for "POSTPAID" commits: the true up invoice will be generated at this t
528
496
  #
@@ -538,7 +506,7 @@ module MetronomeSDK
538
506
  #
539
507
  # @param rollover_fraction [Float] Fraction of unused segments that will be rolled over. Must be between 0 and 1.
540
508
  #
541
- # @param specifiers [Array<MetronomeSDK::Models::V1::ContractCreateParams::Commit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
509
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
542
510
  #
543
511
  # @param temporary_id [String] A temporary ID for the commit that can be used to reference the commit for commi
544
512
 
@@ -559,9 +527,7 @@ module MetronomeSDK
559
527
  #
560
528
  # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::Commit::AccessSchedule::ScheduleItem>]
561
529
  required :schedule_items,
562
- -> {
563
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Commit::AccessSchedule::ScheduleItem]
564
- }
530
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Commit::AccessSchedule::ScheduleItem] }
565
531
 
566
532
  # @!attribute credit_type_id
567
533
  # Defaults to USD (cents) if not passed
@@ -605,117 +571,6 @@ module MetronomeSDK
605
571
  end
606
572
  end
607
573
 
608
- # @see MetronomeSDK::Models::V1::ContractCreateParams::Commit#hierarchy_configuration
609
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
610
- # @!attribute child_access
611
- #
612
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
613
- required :child_access,
614
- union: -> {
615
- MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess
616
- }
617
-
618
- # @!method initialize(child_access:)
619
- # Optional configuration for commit hierarchy access control
620
- #
621
- # @param child_access [MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
622
-
623
- # @see MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration#child_access
624
- module ChildAccess
625
- extend MetronomeSDK::Internal::Type::Union
626
-
627
- variant -> {
628
- MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll
629
- }
630
-
631
- variant -> {
632
- MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone
633
- }
634
-
635
- variant -> {
636
- MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
637
- }
638
-
639
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
640
- # @!attribute type
641
- #
642
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
643
- required :type,
644
- enum: -> {
645
- MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type
646
- }
647
-
648
- # @!method initialize(type:)
649
- # @param type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
650
-
651
- # @see MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
652
- module Type
653
- extend MetronomeSDK::Internal::Type::Enum
654
-
655
- ALL = :ALL
656
-
657
- # @!method self.values
658
- # @return [Array<Symbol>]
659
- end
660
- end
661
-
662
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
663
- # @!attribute type
664
- #
665
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
666
- required :type,
667
- enum: -> {
668
- MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type
669
- }
670
-
671
- # @!method initialize(type:)
672
- # @param type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
673
-
674
- # @see MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
675
- module Type
676
- extend MetronomeSDK::Internal::Type::Enum
677
-
678
- NONE = :NONE
679
-
680
- # @!method self.values
681
- # @return [Array<Symbol>]
682
- end
683
- end
684
-
685
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
686
- # @!attribute contract_ids
687
- #
688
- # @return [Array<String>]
689
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
690
-
691
- # @!attribute type
692
- #
693
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
694
- required :type,
695
- enum: -> {
696
- MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type
697
- }
698
-
699
- # @!method initialize(contract_ids:, type:)
700
- # @param contract_ids [Array<String>]
701
- # @param type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
702
-
703
- # @see MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
704
- module Type
705
- extend MetronomeSDK::Internal::Type::Enum
706
-
707
- CONTRACT_IDS = :CONTRACT_IDS
708
-
709
- # @!method self.values
710
- # @return [Array<Symbol>]
711
- end
712
- end
713
-
714
- # @!method self.variants
715
- # @return [Array(MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
716
- end
717
- end
718
-
719
574
  # @see MetronomeSDK::Models::V1::ContractCreateParams::Commit#invoice_schedule
720
575
  class InvoiceSchedule < MetronomeSDK::Internal::Type::BaseModel
721
576
  # @!attribute credit_type_id
@@ -745,9 +600,7 @@ module MetronomeSDK
745
600
  #
746
601
  # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::Commit::InvoiceSchedule::ScheduleItem>, nil]
747
602
  optional :schedule_items,
748
- -> {
749
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Commit::InvoiceSchedule::ScheduleItem]
750
- }
603
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Commit::InvoiceSchedule::ScheduleItem] }
751
604
 
752
605
  # @!method initialize(credit_type_id: nil, do_not_invoice: nil, recurring_schedule: nil, schedule_items: nil)
753
606
  # Some parameter documentations has been truncated, see
@@ -773,9 +626,7 @@ module MetronomeSDK
773
626
  #
774
627
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::InvoiceSchedule::RecurringSchedule::AmountDistribution]
775
628
  required :amount_distribution,
776
- enum: -> {
777
- MetronomeSDK::V1::ContractCreateParams::Commit::InvoiceSchedule::RecurringSchedule::AmountDistribution
778
- }
629
+ enum: -> { MetronomeSDK::V1::ContractCreateParams::Commit::InvoiceSchedule::RecurringSchedule::AmountDistribution }
779
630
 
780
631
  # @!attribute ending_before
781
632
  # RFC 3339 timestamp (exclusive).
@@ -787,9 +638,7 @@ module MetronomeSDK
787
638
  #
788
639
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::InvoiceSchedule::RecurringSchedule::Frequency]
789
640
  required :frequency,
790
- enum: -> {
791
- MetronomeSDK::V1::ContractCreateParams::Commit::InvoiceSchedule::RecurringSchedule::Frequency
792
- }
641
+ enum: -> { MetronomeSDK::V1::ContractCreateParams::Commit::InvoiceSchedule::RecurringSchedule::Frequency }
793
642
 
794
643
  # @!attribute starting_at
795
644
  # RFC 3339 timestamp (inclusive).
@@ -926,18 +775,14 @@ module MetronomeSDK
926
775
  #
927
776
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig::PaymentGateType]
928
777
  required :payment_gate_type,
929
- enum: -> {
930
- MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::PaymentGateType
931
- }
778
+ enum: -> { MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::PaymentGateType }
932
779
 
933
780
  # @!attribute precalculated_tax_config
934
781
  # Only applicable if using PRECALCULATED as your tax type.
935
782
  #
936
783
  # @return [MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig, nil]
937
784
  optional :precalculated_tax_config,
938
- -> {
939
- MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig
940
- }
785
+ -> { MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig }
941
786
 
942
787
  # @!attribute stripe_config
943
788
  # Only applicable if using STRIPE as your payment gate type.
@@ -1022,9 +867,7 @@ module MetronomeSDK
1022
867
  #
1023
868
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig::PaymentType]
1024
869
  required :payment_type,
1025
- enum: -> {
1026
- MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig::PaymentType
1027
- }
870
+ enum: -> { MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig::PaymentType }
1028
871
 
1029
872
  # @!attribute invoice_metadata
1030
873
  # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
@@ -1101,44 +944,6 @@ module MetronomeSDK
1101
944
  # @!method self.values
1102
945
  # @return [Array<Symbol>]
1103
946
  end
1104
-
1105
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
1106
- # @!attribute presentation_group_values
1107
- #
1108
- # @return [Hash{Symbol=>String}, nil]
1109
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1110
-
1111
- # @!attribute pricing_group_values
1112
- #
1113
- # @return [Hash{Symbol=>String}, nil]
1114
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1115
-
1116
- # @!attribute product_id
1117
- # If provided, the specifier will only apply to the product with the specified ID.
1118
- #
1119
- # @return [String, nil]
1120
- optional :product_id, String
1121
-
1122
- # @!attribute product_tags
1123
- # If provided, the specifier will only apply to products with all the specified
1124
- # tags.
1125
- #
1126
- # @return [Array<String>, nil]
1127
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1128
-
1129
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
1130
- # Some parameter documentations has been truncated, see
1131
- # {MetronomeSDK::Models::V1::ContractCreateParams::Commit::Specifier} for more
1132
- # details.
1133
- #
1134
- # @param presentation_group_values [Hash{Symbol=>String}]
1135
- #
1136
- # @param pricing_group_values [Hash{Symbol=>String}]
1137
- #
1138
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
1139
- #
1140
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
1141
- end
1142
947
  end
1143
948
 
1144
949
  class Credit < MetronomeSDK::Internal::Type::BaseModel
@@ -1168,6 +973,7 @@ module MetronomeSDK
1168
973
  optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1169
974
 
1170
975
  # @!attribute custom_fields
976
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1171
977
  #
1172
978
  # @return [Hash{Symbol=>String}, nil]
1173
979
  optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
@@ -1181,9 +987,8 @@ module MetronomeSDK
1181
987
  # @!attribute hierarchy_configuration
1182
988
  # Optional configuration for credit hierarchy access control
1183
989
  #
1184
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration, nil]
1185
- optional :hierarchy_configuration,
1186
- -> { MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration }
990
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
991
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
1187
992
 
1188
993
  # @!attribute name
1189
994
  # displayed on invoices
@@ -1215,11 +1020,8 @@ module MetronomeSDK
1215
1020
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
1216
1021
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
1217
1022
  #
1218
- # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::Credit::Specifier>, nil]
1219
- optional :specifiers,
1220
- -> {
1221
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Credit::Specifier]
1222
- }
1023
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
1024
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
1223
1025
 
1224
1026
  # @!method initialize(access_schedule:, product_id:, applicable_product_ids: nil, applicable_product_tags: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, specifiers: nil)
1225
1027
  # Some parameter documentations has been truncated, see
@@ -1233,11 +1035,11 @@ module MetronomeSDK
1233
1035
  #
1234
1036
  # @param applicable_product_tags [Array<String>] Which tags the credit applies to. If both applicable*product_ids and applicable*
1235
1037
  #
1236
- # @param custom_fields [Hash{Symbol=>String}]
1038
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1237
1039
  #
1238
1040
  # @param description [String] Used only in UI/API. It is not exposed to end customers.
1239
1041
  #
1240
- # @param hierarchy_configuration [MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration] Optional configuration for credit hierarchy access control
1042
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for credit hierarchy access control
1241
1043
  #
1242
1044
  # @param name [String] displayed on invoices
1243
1045
  #
@@ -1247,7 +1049,7 @@ module MetronomeSDK
1247
1049
  #
1248
1050
  # @param rate_type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Credit::RateType]
1249
1051
  #
1250
- # @param specifiers [Array<MetronomeSDK::Models::V1::ContractCreateParams::Credit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
1052
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
1251
1053
 
1252
1054
  # @see MetronomeSDK::Models::V1::ContractCreateParams::Credit#access_schedule
1253
1055
  class AccessSchedule < MetronomeSDK::Internal::Type::BaseModel
@@ -1255,9 +1057,7 @@ module MetronomeSDK
1255
1057
  #
1256
1058
  # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::Credit::AccessSchedule::ScheduleItem>]
1257
1059
  required :schedule_items,
1258
- -> {
1259
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Credit::AccessSchedule::ScheduleItem]
1260
- }
1060
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Credit::AccessSchedule::ScheduleItem] }
1261
1061
 
1262
1062
  # @!attribute credit_type_id
1263
1063
  # Defaults to USD (cents) if not passed
@@ -1299,117 +1099,6 @@ module MetronomeSDK
1299
1099
  end
1300
1100
  end
1301
1101
 
1302
- # @see MetronomeSDK::Models::V1::ContractCreateParams::Credit#hierarchy_configuration
1303
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
1304
- # @!attribute child_access
1305
- #
1306
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
1307
- required :child_access,
1308
- union: -> {
1309
- MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess
1310
- }
1311
-
1312
- # @!method initialize(child_access:)
1313
- # Optional configuration for credit hierarchy access control
1314
- #
1315
- # @param child_access [MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
1316
-
1317
- # @see MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration#child_access
1318
- module ChildAccess
1319
- extend MetronomeSDK::Internal::Type::Union
1320
-
1321
- variant -> {
1322
- MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll
1323
- }
1324
-
1325
- variant -> {
1326
- MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone
1327
- }
1328
-
1329
- variant -> {
1330
- MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
1331
- }
1332
-
1333
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
1334
- # @!attribute type
1335
- #
1336
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
1337
- required :type,
1338
- enum: -> {
1339
- MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type
1340
- }
1341
-
1342
- # @!method initialize(type:)
1343
- # @param type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
1344
-
1345
- # @see MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
1346
- module Type
1347
- extend MetronomeSDK::Internal::Type::Enum
1348
-
1349
- ALL = :ALL
1350
-
1351
- # @!method self.values
1352
- # @return [Array<Symbol>]
1353
- end
1354
- end
1355
-
1356
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
1357
- # @!attribute type
1358
- #
1359
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
1360
- required :type,
1361
- enum: -> {
1362
- MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type
1363
- }
1364
-
1365
- # @!method initialize(type:)
1366
- # @param type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
1367
-
1368
- # @see MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
1369
- module Type
1370
- extend MetronomeSDK::Internal::Type::Enum
1371
-
1372
- NONE = :NONE
1373
-
1374
- # @!method self.values
1375
- # @return [Array<Symbol>]
1376
- end
1377
- end
1378
-
1379
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
1380
- # @!attribute contract_ids
1381
- #
1382
- # @return [Array<String>]
1383
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1384
-
1385
- # @!attribute type
1386
- #
1387
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
1388
- required :type,
1389
- enum: -> {
1390
- MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type
1391
- }
1392
-
1393
- # @!method initialize(contract_ids:, type:)
1394
- # @param contract_ids [Array<String>]
1395
- # @param type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
1396
-
1397
- # @see MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
1398
- module Type
1399
- extend MetronomeSDK::Internal::Type::Enum
1400
-
1401
- CONTRACT_IDS = :CONTRACT_IDS
1402
-
1403
- # @!method self.values
1404
- # @return [Array<Symbol>]
1405
- end
1406
- end
1407
-
1408
- # @!method self.variants
1409
- # @return [Array(MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
1410
- end
1411
- end
1412
-
1413
1102
  # @see MetronomeSDK::Models::V1::ContractCreateParams::Credit#rate_type
1414
1103
  module RateType
1415
1104
  extend MetronomeSDK::Internal::Type::Enum
@@ -1420,44 +1109,6 @@ module MetronomeSDK
1420
1109
  # @!method self.values
1421
1110
  # @return [Array<Symbol>]
1422
1111
  end
1423
-
1424
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
1425
- # @!attribute presentation_group_values
1426
- #
1427
- # @return [Hash{Symbol=>String}, nil]
1428
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1429
-
1430
- # @!attribute pricing_group_values
1431
- #
1432
- # @return [Hash{Symbol=>String}, nil]
1433
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1434
-
1435
- # @!attribute product_id
1436
- # If provided, the specifier will only apply to the product with the specified ID.
1437
- #
1438
- # @return [String, nil]
1439
- optional :product_id, String
1440
-
1441
- # @!attribute product_tags
1442
- # If provided, the specifier will only apply to products with all the specified
1443
- # tags.
1444
- #
1445
- # @return [Array<String>, nil]
1446
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1447
-
1448
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
1449
- # Some parameter documentations has been truncated, see
1450
- # {MetronomeSDK::Models::V1::ContractCreateParams::Credit::Specifier} for more
1451
- # details.
1452
- #
1453
- # @param presentation_group_values [Hash{Symbol=>String}]
1454
- #
1455
- # @param pricing_group_values [Hash{Symbol=>String}]
1456
- #
1457
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
1458
- #
1459
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
1460
- end
1461
1112
  end
1462
1113
 
1463
1114
  class Discount < MetronomeSDK::Internal::Type::BaseModel
@@ -1473,6 +1124,7 @@ module MetronomeSDK
1473
1124
  required :schedule, -> { MetronomeSDK::V1::ContractCreateParams::Discount::Schedule }
1474
1125
 
1475
1126
  # @!attribute custom_fields
1127
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1476
1128
  #
1477
1129
  # @return [Hash{Symbol=>String}, nil]
1478
1130
  optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
@@ -1494,7 +1146,7 @@ module MetronomeSDK
1494
1146
  #
1495
1147
  # @param schedule [MetronomeSDK::Models::V1::ContractCreateParams::Discount::Schedule] Must provide either schedule_items or recurring_schedule.
1496
1148
  #
1497
- # @param custom_fields [Hash{Symbol=>String}]
1149
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1498
1150
  #
1499
1151
  # @param name [String] displayed on invoices
1500
1152
  #
@@ -1529,9 +1181,7 @@ module MetronomeSDK
1529
1181
  #
1530
1182
  # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::Discount::Schedule::ScheduleItem>, nil]
1531
1183
  optional :schedule_items,
1532
- -> {
1533
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Discount::Schedule::ScheduleItem]
1534
- }
1184
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Discount::Schedule::ScheduleItem] }
1535
1185
 
1536
1186
  # @!method initialize(credit_type_id: nil, do_not_invoice: nil, recurring_schedule: nil, schedule_items: nil)
1537
1187
  # Some parameter documentations has been truncated, see
@@ -1554,9 +1204,7 @@ module MetronomeSDK
1554
1204
  #
1555
1205
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Discount::Schedule::RecurringSchedule::AmountDistribution]
1556
1206
  required :amount_distribution,
1557
- enum: -> {
1558
- MetronomeSDK::V1::ContractCreateParams::Discount::Schedule::RecurringSchedule::AmountDistribution
1559
- }
1207
+ enum: -> { MetronomeSDK::V1::ContractCreateParams::Discount::Schedule::RecurringSchedule::AmountDistribution }
1560
1208
 
1561
1209
  # @!attribute ending_before
1562
1210
  # RFC 3339 timestamp (exclusive).
@@ -1568,9 +1216,7 @@ module MetronomeSDK
1568
1216
  #
1569
1217
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Discount::Schedule::RecurringSchedule::Frequency]
1570
1218
  required :frequency,
1571
- enum: -> {
1572
- MetronomeSDK::V1::ContractCreateParams::Discount::Schedule::RecurringSchedule::Frequency
1573
- }
1219
+ enum: -> { MetronomeSDK::V1::ContractCreateParams::Discount::Schedule::RecurringSchedule::Frequency }
1574
1220
 
1575
1221
  # @!attribute starting_at
1576
1222
  # RFC 3339 timestamp (inclusive).
@@ -1785,9 +1431,7 @@ module MetronomeSDK
1785
1431
  #
1786
1432
  # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::Override::OverrideSpecifier>, nil]
1787
1433
  optional :override_specifiers,
1788
- -> {
1789
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier]
1790
- }
1434
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier] }
1791
1435
 
1792
1436
  # @!attribute overwrite_rate
1793
1437
  # Required for OVERWRITE type.
@@ -1824,9 +1468,7 @@ module MetronomeSDK
1824
1468
  #
1825
1469
  # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::Override::Tier>, nil]
1826
1470
  optional :tiers,
1827
- -> {
1828
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Override::Tier]
1829
- }
1471
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::Override::Tier] }
1830
1472
 
1831
1473
  # @!attribute type
1832
1474
  # Overwrites are prioritized over multipliers and tiered overrides.
@@ -1869,14 +1511,12 @@ module MetronomeSDK
1869
1511
  #
1870
1512
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency, nil]
1871
1513
  optional :billing_frequency,
1872
- enum: -> {
1873
- MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency
1874
- }
1514
+ enum: -> { MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency }
1875
1515
 
1876
1516
  # @!attribute commit_ids
1877
1517
  # Can only be used for commit specific overrides. Must be used in conjunction with
1878
- # one of product_id, product_tags, pricing_group_values, or
1879
- # presentation_group_values. If provided, the override will only apply to the
1518
+ # one of `product_id`, `product_tags`, `pricing_group_values`, or
1519
+ # `presentation_group_values`. If provided, the override will only apply to the
1880
1520
  # specified commits. If not provided, the override will apply to all commits.
1881
1521
  #
1882
1522
  # @return [Array<String>, nil]
@@ -1911,18 +1551,18 @@ module MetronomeSDK
1911
1551
 
1912
1552
  # @!attribute recurring_commit_ids
1913
1553
  # Can only be used for commit specific overrides. Must be used in conjunction with
1914
- # one of product_id, product_tags, pricing_group_values, or
1915
- # presentation_group_values. If provided, the override will only apply to commits
1916
- # created by the specified recurring commit ids.
1554
+ # one of `product_id`, `product_tags`, `pricing_group_values`, or
1555
+ # `presentation_group_values`. If provided, the override will only apply to
1556
+ # commits created by the specified recurring commit ids.
1917
1557
  #
1918
1558
  # @return [Array<String>, nil]
1919
1559
  optional :recurring_commit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1920
1560
 
1921
1561
  # @!attribute recurring_credit_ids
1922
1562
  # Can only be used for commit specific overrides. Must be used in conjunction with
1923
- # one of product_id, product_tags, pricing_group_values, or
1924
- # presentation_group_values. If provided, the override will only apply to credits
1925
- # created by the specified recurring credit ids.
1563
+ # one of `product_id`, `product_tags`, `pricing_group_values`, or
1564
+ # `presentation_group_values`. If provided, the override will only apply to
1565
+ # credits created by the specified recurring credit ids.
1926
1566
  #
1927
1567
  # @return [Array<String>, nil]
1928
1568
  optional :recurring_credit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
@@ -2090,479 +1730,142 @@ module MetronomeSDK
2090
1730
  end
2091
1731
  end
2092
1732
 
2093
- class PrepaidBalanceThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
2094
- # @!attribute commit
1733
+ class ProfessionalService < MetronomeSDK::Internal::Type::BaseModel
1734
+ # @!attribute max_amount
1735
+ # Maximum amount for the term.
2095
1736
  #
2096
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::Commit]
2097
- required :commit,
2098
- -> { MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::Commit }
1737
+ # @return [Float]
1738
+ required :max_amount, Float
2099
1739
 
2100
- # @!attribute is_enabled
2101
- # When set to false, the contract will not be evaluated against the
2102
- # threshold_amount. Toggling to true will result an immediate evaluation,
2103
- # regardless of prior state.
1740
+ # @!attribute product_id
2104
1741
  #
2105
- # @return [Boolean]
2106
- required :is_enabled, MetronomeSDK::Internal::Type::Boolean
1742
+ # @return [String]
1743
+ required :product_id, String
2107
1744
 
2108
- # @!attribute payment_gate_config
1745
+ # @!attribute quantity
1746
+ # Quantity for the charge. Will be multiplied by unit_price to determine the
1747
+ # amount.
2109
1748
  #
2110
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig]
2111
- required :payment_gate_config,
2112
- -> {
2113
- MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig
2114
- }
1749
+ # @return [Float]
1750
+ required :quantity, Float
2115
1751
 
2116
- # @!attribute recharge_to_amount
2117
- # Specify the amount the balance should be recharged to.
1752
+ # @!attribute unit_price
1753
+ # Unit price for the charge. Will be multiplied by quantity to determine the
1754
+ # amount and must be specified.
2118
1755
  #
2119
1756
  # @return [Float]
2120
- required :recharge_to_amount, Float
1757
+ required :unit_price, Float
2121
1758
 
2122
- # @!attribute threshold_amount
2123
- # Specify the threshold amount for the contract. Each time the contract's prepaid
2124
- # balance lowers to this amount, a threshold charge will be initiated.
1759
+ # @!attribute custom_fields
1760
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2125
1761
  #
2126
- # @return [Float]
2127
- required :threshold_amount, Float
1762
+ # @return [Hash{Symbol=>String}, nil]
1763
+ optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
1764
+
1765
+ # @!attribute description
1766
+ #
1767
+ # @return [String, nil]
1768
+ optional :description, String
2128
1769
 
2129
- # @!attribute custom_credit_type_id
2130
- # If provided, the threshold, recharge-to amount, and the resulting threshold
2131
- # commit amount will be in terms of this credit type instead of the fiat currency.
1770
+ # @!attribute netsuite_sales_order_id
1771
+ # This field's availability is dependent on your client's configuration.
2132
1772
  #
2133
1773
  # @return [String, nil]
2134
- optional :custom_credit_type_id, String
1774
+ optional :netsuite_sales_order_id, String
2135
1775
 
2136
- # @!method initialize(commit:, is_enabled:, payment_gate_config:, recharge_to_amount:, threshold_amount:, custom_credit_type_id: nil)
1776
+ # @!method initialize(max_amount:, product_id:, quantity:, unit_price:, custom_fields: nil, description: nil, netsuite_sales_order_id: nil)
2137
1777
  # Some parameter documentations has been truncated, see
2138
- # {MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration}
2139
- # for more details.
1778
+ # {MetronomeSDK::Models::V1::ContractCreateParams::ProfessionalService} for more
1779
+ # details.
2140
1780
  #
2141
- # @param commit [MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::Commit]
1781
+ # @param max_amount [Float] Maximum amount for the term.
2142
1782
  #
2143
- # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
1783
+ # @param product_id [String]
2144
1784
  #
2145
- # @param payment_gate_config [MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig]
1785
+ # @param quantity [Float] Quantity for the charge. Will be multiplied by unit_price to determine the amoun
2146
1786
  #
2147
- # @param recharge_to_amount [Float] Specify the amount the balance should be recharged to.
1787
+ # @param unit_price [Float] Unit price for the charge. Will be multiplied by quantity to determine the amoun
2148
1788
  #
2149
- # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's prepaid
1789
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2150
1790
  #
2151
- # @param custom_credit_type_id [String] If provided, the threshold, recharge-to amount, and the resulting threshold comm
2152
-
2153
- # @see MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration#commit
2154
- class Commit < MetronomeSDK::Internal::Type::BaseModel
2155
- # @!attribute product_id
2156
- # The commit product that will be used to generate the line item for commit
2157
- # payment.
2158
- #
2159
- # @return [String]
2160
- required :product_id, String
1791
+ # @param description [String]
1792
+ #
1793
+ # @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
1794
+ end
2161
1795
 
2162
- # @!attribute applicable_product_ids
2163
- # Which products the threshold commit applies to. If applicable_product_ids,
2164
- # applicable_product_tags or specifiers are not provided, the commit applies to
2165
- # all products.
2166
- #
2167
- # @return [Array<String>, nil]
2168
- optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1796
+ class RecurringCommit < MetronomeSDK::Internal::Type::BaseModel
1797
+ # @!attribute access_amount
1798
+ # The amount of commit to grant.
1799
+ #
1800
+ # @return [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::AccessAmount]
1801
+ required :access_amount, -> { MetronomeSDK::V1::ContractCreateParams::RecurringCommit::AccessAmount }
2169
1802
 
2170
- # @!attribute applicable_product_tags
2171
- # Which tags the threshold commit applies to. If applicable_product_ids,
2172
- # applicable_product_tags or specifiers are not provided, the commit applies to
2173
- # all products.
2174
- #
2175
- # @return [Array<String>, nil]
2176
- optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1803
+ # @!attribute commit_duration
1804
+ # Defines the length of the access schedule for each created commit/credit. The
1805
+ # value represents the number of units. Unit defaults to "PERIODS", where the
1806
+ # length of a period is determined by the recurrence_frequency.
1807
+ #
1808
+ # @return [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::CommitDuration]
1809
+ required :commit_duration, -> { MetronomeSDK::V1::ContractCreateParams::RecurringCommit::CommitDuration }
2177
1810
 
2178
- # @!attribute description
2179
- #
2180
- # @return [String, nil]
2181
- optional :description, String
1811
+ # @!attribute priority
1812
+ # Will be passed down to the individual commits
1813
+ #
1814
+ # @return [Float]
1815
+ required :priority, Float
2182
1816
 
2183
- # @!attribute name
2184
- # Specify the name of the line item for the threshold charge. If left blank, it
2185
- # will default to the commit product name.
2186
- #
2187
- # @return [String, nil]
2188
- optional :name, String
1817
+ # @!attribute product_id
1818
+ #
1819
+ # @return [String]
1820
+ required :product_id, String
2189
1821
 
2190
- # @!attribute specifiers
2191
- # List of filters that determine what kind of customer usage draws down a commit
2192
- # or credit. A customer's usage needs to meet the condition of at least one of the
2193
- # specifiers to contribute to a commit's or credit's drawdown. This field cannot
2194
- # be used together with `applicable_product_ids` or `applicable_product_tags`.
2195
- #
2196
- # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::Commit::Specifier>, nil]
2197
- optional :specifiers,
2198
- -> {
2199
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::Commit::Specifier]
2200
- }
1822
+ # @!attribute starting_at
1823
+ # determines the start time for the first commit
1824
+ #
1825
+ # @return [Time]
1826
+ required :starting_at, Time
2201
1827
 
2202
- # @!method initialize(product_id:, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, name: nil, specifiers: nil)
2203
- # Some parameter documentations has been truncated, see
2204
- # {MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::Commit}
2205
- # for more details.
2206
- #
2207
- # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
2208
- #
2209
- # @param applicable_product_ids [Array<String>] Which products the threshold commit applies to. If applicable_product_ids, appli
2210
- #
2211
- # @param applicable_product_tags [Array<String>] Which tags the threshold commit applies to. If applicable_product_ids, applicabl
2212
- #
2213
- # @param description [String]
2214
- #
2215
- # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
2216
- #
2217
- # @param specifiers [Array<MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::Commit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
1828
+ # @!attribute applicable_product_ids
1829
+ # Will be passed down to the individual commits
1830
+ #
1831
+ # @return [Array<String>, nil]
1832
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
2218
1833
 
2219
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
2220
- # @!attribute presentation_group_values
2221
- #
2222
- # @return [Hash{Symbol=>String}, nil]
2223
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1834
+ # @!attribute applicable_product_tags
1835
+ # Will be passed down to the individual commits
1836
+ #
1837
+ # @return [Array<String>, nil]
1838
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
2224
1839
 
2225
- # @!attribute pricing_group_values
2226
- #
2227
- # @return [Hash{Symbol=>String}, nil]
2228
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1840
+ # @!attribute description
1841
+ # Will be passed down to the individual commits
1842
+ #
1843
+ # @return [String, nil]
1844
+ optional :description, String
2229
1845
 
2230
- # @!attribute product_id
2231
- # If provided, the specifier will only apply to the product with the specified ID.
2232
- #
2233
- # @return [String, nil]
2234
- optional :product_id, String
1846
+ # @!attribute ending_before
1847
+ # Determines when the contract will stop creating recurring commits. optional
1848
+ #
1849
+ # @return [Time, nil]
1850
+ optional :ending_before, Time
2235
1851
 
2236
- # @!attribute product_tags
2237
- # If provided, the specifier will only apply to products with all the specified
2238
- # tags.
2239
- #
2240
- # @return [Array<String>, nil]
2241
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1852
+ # @!attribute hierarchy_configuration
1853
+ # Optional configuration for recurring commit/credit hierarchy access control
1854
+ #
1855
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
1856
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
2242
1857
 
2243
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
2244
- # Some parameter documentations has been truncated, see
2245
- # {MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::Commit::Specifier}
2246
- # for more details.
2247
- #
2248
- # @param presentation_group_values [Hash{Symbol=>String}]
2249
- #
2250
- # @param pricing_group_values [Hash{Symbol=>String}]
2251
- #
2252
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
2253
- #
2254
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
2255
- end
2256
- end
1858
+ # @!attribute invoice_amount
1859
+ # The amount the customer should be billed for the commit. Not required.
1860
+ #
1861
+ # @return [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::InvoiceAmount, nil]
1862
+ optional :invoice_amount, -> { MetronomeSDK::V1::ContractCreateParams::RecurringCommit::InvoiceAmount }
2257
1863
 
2258
- # @see MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration#payment_gate_config
2259
- class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
2260
- # @!attribute payment_gate_type
2261
- # Gate access to the commit balance based on successful collection of payment.
2262
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
2263
- # facilitate payment using your own payment integration. Select NONE if you do not
2264
- # wish to payment gate the commit balance.
2265
- #
2266
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType]
2267
- required :payment_gate_type,
2268
- enum: -> {
2269
- MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType
2270
- }
2271
-
2272
- # @!attribute precalculated_tax_config
2273
- # Only applicable if using PRECALCULATED as your tax type.
2274
- #
2275
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
2276
- optional :precalculated_tax_config,
2277
- -> {
2278
- MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig
2279
- }
2280
-
2281
- # @!attribute stripe_config
2282
- # Only applicable if using STRIPE as your payment gate type.
2283
- #
2284
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
2285
- optional :stripe_config,
2286
- -> {
2287
- MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig
2288
- }
2289
-
2290
- # @!attribute tax_type
2291
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
2292
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
2293
- # will default to NONE.
2294
- #
2295
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType, nil]
2296
- optional :tax_type,
2297
- enum: -> {
2298
- MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType
2299
- }
2300
-
2301
- # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
2302
- # Some parameter documentations has been truncated, see
2303
- # {MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig}
2304
- # for more details.
2305
- #
2306
- # @param payment_gate_type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
2307
- #
2308
- # @param precalculated_tax_config [MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
2309
- #
2310
- # @param stripe_config [MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gate type.
2311
- #
2312
- # @param tax_type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
2313
-
2314
- # Gate access to the commit balance based on successful collection of payment.
2315
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
2316
- # facilitate payment using your own payment integration. Select NONE if you do not
2317
- # wish to payment gate the commit balance.
2318
- #
2319
- # @see MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig#payment_gate_type
2320
- module PaymentGateType
2321
- extend MetronomeSDK::Internal::Type::Enum
2322
-
2323
- NONE = :NONE
2324
- STRIPE = :STRIPE
2325
- EXTERNAL = :EXTERNAL
2326
-
2327
- # @!method self.values
2328
- # @return [Array<Symbol>]
2329
- end
2330
-
2331
- # @see MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
2332
- class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
2333
- # @!attribute tax_amount
2334
- # Amount of tax to be applied. This should be in the same currency and
2335
- # denomination as the commit's invoice schedule
2336
- #
2337
- # @return [Float]
2338
- required :tax_amount, Float
2339
-
2340
- # @!attribute tax_name
2341
- # Name of the tax to be applied. This may be used in an invoice line item
2342
- # description.
2343
- #
2344
- # @return [String, nil]
2345
- optional :tax_name, String
2346
-
2347
- # @!method initialize(tax_amount:, tax_name: nil)
2348
- # Some parameter documentations has been truncated, see
2349
- # {MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
2350
- # for more details.
2351
- #
2352
- # Only applicable if using PRECALCULATED as your tax type.
2353
- #
2354
- # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
2355
- #
2356
- # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
2357
- end
2358
-
2359
- # @see MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig#stripe_config
2360
- class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
2361
- # @!attribute payment_type
2362
- # If left blank, will default to INVOICE
2363
- #
2364
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
2365
- required :payment_type,
2366
- enum: -> {
2367
- MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType
2368
- }
2369
-
2370
- # @!attribute invoice_metadata
2371
- # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
2372
- # your payment type.
2373
- #
2374
- # @return [Hash{Symbol=>String}, nil]
2375
- optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
2376
-
2377
- # @!method initialize(payment_type:, invoice_metadata: nil)
2378
- # Some parameter documentations has been truncated, see
2379
- # {MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig}
2380
- # for more details.
2381
- #
2382
- # Only applicable if using STRIPE as your payment gate type.
2383
- #
2384
- # @param payment_type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
2385
- #
2386
- # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
2387
-
2388
- # If left blank, will default to INVOICE
2389
- #
2390
- # @see MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
2391
- module PaymentType
2392
- extend MetronomeSDK::Internal::Type::Enum
2393
-
2394
- INVOICE = :INVOICE
2395
- PAYMENT_INTENT = :PAYMENT_INTENT
2396
-
2397
- # @!method self.values
2398
- # @return [Array<Symbol>]
2399
- end
2400
- end
2401
-
2402
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
2403
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
2404
- # will default to NONE.
2405
- #
2406
- # @see MetronomeSDK::Models::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig#tax_type
2407
- module TaxType
2408
- extend MetronomeSDK::Internal::Type::Enum
2409
-
2410
- NONE = :NONE
2411
- STRIPE = :STRIPE
2412
- ANROK = :ANROK
2413
- PRECALCULATED = :PRECALCULATED
2414
-
2415
- # @!method self.values
2416
- # @return [Array<Symbol>]
2417
- end
2418
- end
2419
- end
2420
-
2421
- class ProfessionalService < MetronomeSDK::Internal::Type::BaseModel
2422
- # @!attribute max_amount
2423
- # Maximum amount for the term.
2424
- #
2425
- # @return [Float]
2426
- required :max_amount, Float
2427
-
2428
- # @!attribute product_id
2429
- #
2430
- # @return [String]
2431
- required :product_id, String
2432
-
2433
- # @!attribute quantity
2434
- # Quantity for the charge. Will be multiplied by unit_price to determine the
2435
- # amount.
2436
- #
2437
- # @return [Float]
2438
- required :quantity, Float
2439
-
2440
- # @!attribute unit_price
2441
- # Unit price for the charge. Will be multiplied by quantity to determine the
2442
- # amount and must be specified.
2443
- #
2444
- # @return [Float]
2445
- required :unit_price, Float
2446
-
2447
- # @!attribute custom_fields
2448
- #
2449
- # @return [Hash{Symbol=>String}, nil]
2450
- optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
2451
-
2452
- # @!attribute description
2453
- #
2454
- # @return [String, nil]
2455
- optional :description, String
2456
-
2457
- # @!attribute netsuite_sales_order_id
2458
- # This field's availability is dependent on your client's configuration.
2459
- #
2460
- # @return [String, nil]
2461
- optional :netsuite_sales_order_id, String
2462
-
2463
- # @!method initialize(max_amount:, product_id:, quantity:, unit_price:, custom_fields: nil, description: nil, netsuite_sales_order_id: nil)
2464
- # Some parameter documentations has been truncated, see
2465
- # {MetronomeSDK::Models::V1::ContractCreateParams::ProfessionalService} for more
2466
- # details.
2467
- #
2468
- # @param max_amount [Float] Maximum amount for the term.
2469
- #
2470
- # @param product_id [String]
2471
- #
2472
- # @param quantity [Float] Quantity for the charge. Will be multiplied by unit_price to determine the amoun
2473
- #
2474
- # @param unit_price [Float] Unit price for the charge. Will be multiplied by quantity to determine the amoun
2475
- #
2476
- # @param custom_fields [Hash{Symbol=>String}]
2477
- #
2478
- # @param description [String]
2479
- #
2480
- # @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
2481
- end
2482
-
2483
- class RecurringCommit < MetronomeSDK::Internal::Type::BaseModel
2484
- # @!attribute access_amount
2485
- # The amount of commit to grant.
2486
- #
2487
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::AccessAmount]
2488
- required :access_amount,
2489
- -> {
2490
- MetronomeSDK::V1::ContractCreateParams::RecurringCommit::AccessAmount
2491
- }
2492
-
2493
- # @!attribute commit_duration
2494
- # Defines the length of the access schedule for each created commit/credit. The
2495
- # value represents the number of units. Unit defaults to "PERIODS", where the
2496
- # length of a period is determined by the recurrence_frequency.
2497
- #
2498
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::CommitDuration]
2499
- required :commit_duration,
2500
- -> {
2501
- MetronomeSDK::V1::ContractCreateParams::RecurringCommit::CommitDuration
2502
- }
2503
-
2504
- # @!attribute priority
2505
- # Will be passed down to the individual commits
2506
- #
2507
- # @return [Float]
2508
- required :priority, Float
2509
-
2510
- # @!attribute product_id
2511
- #
2512
- # @return [String]
2513
- required :product_id, String
2514
-
2515
- # @!attribute starting_at
2516
- # determines the start time for the first commit
2517
- #
2518
- # @return [Time]
2519
- required :starting_at, Time
2520
-
2521
- # @!attribute applicable_product_ids
2522
- # Will be passed down to the individual commits
2523
- #
2524
- # @return [Array<String>, nil]
2525
- optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
2526
-
2527
- # @!attribute applicable_product_tags
2528
- # Will be passed down to the individual commits
2529
- #
2530
- # @return [Array<String>, nil]
2531
- optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
2532
-
2533
- # @!attribute description
2534
- # Will be passed down to the individual commits
2535
- #
2536
- # @return [String, nil]
2537
- optional :description, String
2538
-
2539
- # @!attribute ending_before
2540
- # Determines when the contract will stop creating recurring commits. optional
2541
- #
2542
- # @return [Time, nil]
2543
- optional :ending_before, Time
2544
-
2545
- # @!attribute hierarchy_configuration
2546
- # Optional configuration for recurring commit/credit hierarchy access control
2547
- #
2548
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration, nil]
2549
- optional :hierarchy_configuration,
2550
- -> { MetronomeSDK::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration }
2551
-
2552
- # @!attribute invoice_amount
2553
- # The amount the customer should be billed for the commit. Not required.
2554
- #
2555
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::InvoiceAmount, nil]
2556
- optional :invoice_amount,
2557
- -> {
2558
- MetronomeSDK::V1::ContractCreateParams::RecurringCommit::InvoiceAmount
2559
- }
2560
-
2561
- # @!attribute name
2562
- # displayed on invoices. will be passed through to the individual commits
2563
- #
2564
- # @return [String, nil]
2565
- optional :name, String
1864
+ # @!attribute name
1865
+ # displayed on invoices. will be passed through to the individual commits
1866
+ #
1867
+ # @return [String, nil]
1868
+ optional :name, String
2566
1869
 
2567
1870
  # @!attribute netsuite_sales_order_id
2568
1871
  # Will be passed down to the individual commits
@@ -2608,11 +1911,8 @@ module MetronomeSDK
2608
1911
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
2609
1912
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
2610
1913
  #
2611
- # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::Specifier>, nil]
2612
- optional :specifiers,
2613
- -> {
2614
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::RecurringCommit::Specifier]
2615
- }
1914
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
1915
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
2616
1916
 
2617
1917
  # @!attribute subscription_config
2618
1918
  # Attach a subscription to the recurring commit/credit.
@@ -2651,7 +1951,7 @@ module MetronomeSDK
2651
1951
  #
2652
1952
  # @param ending_before [Time] Determines when the contract will stop creating recurring commits. optional
2653
1953
  #
2654
- # @param hierarchy_configuration [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration] Optional configuration for recurring commit/credit hierarchy access control
1954
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring commit/credit hierarchy access control
2655
1955
  #
2656
1956
  # @param invoice_amount [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::InvoiceAmount] The amount the customer should be billed for the commit. Not required.
2657
1957
  #
@@ -2667,7 +1967,7 @@ module MetronomeSDK
2667
1967
  #
2668
1968
  # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
2669
1969
  #
2670
- # @param specifiers [Array<MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
1970
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
2671
1971
  #
2672
1972
  # @param subscription_config [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig] Attach a subscription to the recurring commit/credit.
2673
1973
  #
@@ -2716,10 +2016,7 @@ module MetronomeSDK
2716
2016
  # @!attribute unit
2717
2017
  #
2718
2018
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::CommitDuration::Unit, nil]
2719
- optional :unit,
2720
- enum: -> {
2721
- MetronomeSDK::V1::ContractCreateParams::RecurringCommit::CommitDuration::Unit
2722
- }
2019
+ optional :unit, enum: -> { MetronomeSDK::V1::ContractCreateParams::RecurringCommit::CommitDuration::Unit }
2723
2020
 
2724
2021
  # @!method initialize(value:, unit: nil)
2725
2022
  # Defines the length of the access schedule for each created commit/credit. The
@@ -2740,117 +2037,6 @@ module MetronomeSDK
2740
2037
  end
2741
2038
  end
2742
2039
 
2743
- # @see MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit#hierarchy_configuration
2744
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
2745
- # @!attribute child_access
2746
- #
2747
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
2748
- required :child_access,
2749
- union: -> {
2750
- MetronomeSDK::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess
2751
- }
2752
-
2753
- # @!method initialize(child_access:)
2754
- # Optional configuration for recurring commit/credit hierarchy access control
2755
- #
2756
- # @param child_access [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
2757
-
2758
- # @see MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration#child_access
2759
- module ChildAccess
2760
- extend MetronomeSDK::Internal::Type::Union
2761
-
2762
- variant -> {
2763
- MetronomeSDK::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll
2764
- }
2765
-
2766
- variant -> {
2767
- MetronomeSDK::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone
2768
- }
2769
-
2770
- variant -> {
2771
- MetronomeSDK::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
2772
- }
2773
-
2774
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
2775
- # @!attribute type
2776
- #
2777
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
2778
- required :type,
2779
- enum: -> {
2780
- MetronomeSDK::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type
2781
- }
2782
-
2783
- # @!method initialize(type:)
2784
- # @param type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
2785
-
2786
- # @see MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
2787
- module Type
2788
- extend MetronomeSDK::Internal::Type::Enum
2789
-
2790
- ALL = :ALL
2791
-
2792
- # @!method self.values
2793
- # @return [Array<Symbol>]
2794
- end
2795
- end
2796
-
2797
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
2798
- # @!attribute type
2799
- #
2800
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
2801
- required :type,
2802
- enum: -> {
2803
- MetronomeSDK::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type
2804
- }
2805
-
2806
- # @!method initialize(type:)
2807
- # @param type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
2808
-
2809
- # @see MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
2810
- module Type
2811
- extend MetronomeSDK::Internal::Type::Enum
2812
-
2813
- NONE = :NONE
2814
-
2815
- # @!method self.values
2816
- # @return [Array<Symbol>]
2817
- end
2818
- end
2819
-
2820
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
2821
- # @!attribute contract_ids
2822
- #
2823
- # @return [Array<String>]
2824
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
2825
-
2826
- # @!attribute type
2827
- #
2828
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
2829
- required :type,
2830
- enum: -> {
2831
- MetronomeSDK::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type
2832
- }
2833
-
2834
- # @!method initialize(contract_ids:, type:)
2835
- # @param contract_ids [Array<String>]
2836
- # @param type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
2837
-
2838
- # @see MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
2839
- module Type
2840
- extend MetronomeSDK::Internal::Type::Enum
2841
-
2842
- CONTRACT_IDS = :CONTRACT_IDS
2843
-
2844
- # @!method self.values
2845
- # @return [Array<Symbol>]
2846
- end
2847
- end
2848
-
2849
- # @!method self.variants
2850
- # @return [Array(MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
2851
- end
2852
- end
2853
-
2854
2040
  # @see MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit#invoice_amount
2855
2041
  class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
2856
2042
  # @!attribute credit_type_id
@@ -2918,48 +2104,10 @@ module MetronomeSDK
2918
2104
  MONTHLY = :MONTHLY
2919
2105
  QUARTERLY = :QUARTERLY
2920
2106
  ANNUAL = :ANNUAL
2921
- WEEKLY = :WEEKLY
2922
-
2923
- # @!method self.values
2924
- # @return [Array<Symbol>]
2925
- end
2926
-
2927
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
2928
- # @!attribute presentation_group_values
2929
- #
2930
- # @return [Hash{Symbol=>String}, nil]
2931
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
2932
-
2933
- # @!attribute pricing_group_values
2934
- #
2935
- # @return [Hash{Symbol=>String}, nil]
2936
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
2937
-
2938
- # @!attribute product_id
2939
- # If provided, the specifier will only apply to the product with the specified ID.
2940
- #
2941
- # @return [String, nil]
2942
- optional :product_id, String
2943
-
2944
- # @!attribute product_tags
2945
- # If provided, the specifier will only apply to products with all the specified
2946
- # tags.
2947
- #
2948
- # @return [Array<String>, nil]
2949
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
2107
+ WEEKLY = :WEEKLY
2950
2108
 
2951
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
2952
- # Some parameter documentations has been truncated, see
2953
- # {MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::Specifier} for
2954
- # more details.
2955
- #
2956
- # @param presentation_group_values [Hash{Symbol=>String}]
2957
- #
2958
- # @param pricing_group_values [Hash{Symbol=>String}]
2959
- #
2960
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
2961
- #
2962
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
2109
+ # @!method self.values
2110
+ # @return [Array<Symbol>]
2963
2111
  end
2964
2112
 
2965
2113
  # @see MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit#subscription_config
@@ -2968,9 +2116,7 @@ module MetronomeSDK
2968
2116
  #
2969
2117
  # @return [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig]
2970
2118
  required :apply_seat_increase_config,
2971
- -> {
2972
- MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig
2973
- }
2119
+ -> { MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig }
2974
2120
 
2975
2121
  # @!attribute subscription_id
2976
2122
  # ID of the subscription to configure on the recurring commit/credit.
@@ -2983,9 +2129,7 @@ module MetronomeSDK
2983
2129
  #
2984
2130
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation, nil]
2985
2131
  optional :allocation,
2986
- enum: -> {
2987
- MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation
2988
- }
2132
+ enum: -> { MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation }
2989
2133
 
2990
2134
  # @!method initialize(apply_seat_increase_config:, subscription_id:, allocation: nil)
2991
2135
  # Attach a subscription to the recurring commit/credit.
@@ -3014,6 +2158,7 @@ module MetronomeSDK
3014
2158
  module Allocation
3015
2159
  extend MetronomeSDK::Internal::Type::Enum
3016
2160
 
2161
+ INDIVIDUAL = :INDIVIDUAL
3017
2162
  POOLED = :POOLED
3018
2163
 
3019
2164
  # @!method self.values
@@ -3027,10 +2172,7 @@ module MetronomeSDK
3027
2172
  # The amount of commit to grant.
3028
2173
  #
3029
2174
  # @return [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::AccessAmount]
3030
- required :access_amount,
3031
- -> {
3032
- MetronomeSDK::V1::ContractCreateParams::RecurringCredit::AccessAmount
3033
- }
2175
+ required :access_amount, -> { MetronomeSDK::V1::ContractCreateParams::RecurringCredit::AccessAmount }
3034
2176
 
3035
2177
  # @!attribute commit_duration
3036
2178
  # Defines the length of the access schedule for each created commit/credit. The
@@ -3038,10 +2180,7 @@ module MetronomeSDK
3038
2180
  # length of a period is determined by the recurrence_frequency.
3039
2181
  #
3040
2182
  # @return [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::CommitDuration]
3041
- required :commit_duration,
3042
- -> {
3043
- MetronomeSDK::V1::ContractCreateParams::RecurringCredit::CommitDuration
3044
- }
2183
+ required :commit_duration, -> { MetronomeSDK::V1::ContractCreateParams::RecurringCredit::CommitDuration }
3045
2184
 
3046
2185
  # @!attribute priority
3047
2186
  # Will be passed down to the individual commits
@@ -3087,9 +2226,8 @@ module MetronomeSDK
3087
2226
  # @!attribute hierarchy_configuration
3088
2227
  # Optional configuration for recurring commit/credit hierarchy access control
3089
2228
  #
3090
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration, nil]
3091
- optional :hierarchy_configuration,
3092
- -> { MetronomeSDK::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration }
2229
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
2230
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
3093
2231
 
3094
2232
  # @!attribute name
3095
2233
  # displayed on invoices. will be passed through to the individual commits
@@ -3141,11 +2279,8 @@ module MetronomeSDK
3141
2279
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
3142
2280
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
3143
2281
  #
3144
- # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::Specifier>, nil]
3145
- optional :specifiers,
3146
- -> {
3147
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::RecurringCredit::Specifier]
3148
- }
2282
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
2283
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
3149
2284
 
3150
2285
  # @!attribute subscription_config
3151
2286
  # Attach a subscription to the recurring commit/credit.
@@ -3184,7 +2319,7 @@ module MetronomeSDK
3184
2319
  #
3185
2320
  # @param ending_before [Time] Determines when the contract will stop creating recurring commits. optional
3186
2321
  #
3187
- # @param hierarchy_configuration [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration] Optional configuration for recurring commit/credit hierarchy access control
2322
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring commit/credit hierarchy access control
3188
2323
  #
3189
2324
  # @param name [String] displayed on invoices. will be passed through to the individual commits
3190
2325
  #
@@ -3198,7 +2333,7 @@ module MetronomeSDK
3198
2333
  #
3199
2334
  # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
3200
2335
  #
3201
- # @param specifiers [Array<MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
2336
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
3202
2337
  #
3203
2338
  # @param subscription_config [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig] Attach a subscription to the recurring commit/credit.
3204
2339
  #
@@ -3247,10 +2382,7 @@ module MetronomeSDK
3247
2382
  # @!attribute unit
3248
2383
  #
3249
2384
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::CommitDuration::Unit, nil]
3250
- optional :unit,
3251
- enum: -> {
3252
- MetronomeSDK::V1::ContractCreateParams::RecurringCredit::CommitDuration::Unit
3253
- }
2385
+ optional :unit, enum: -> { MetronomeSDK::V1::ContractCreateParams::RecurringCredit::CommitDuration::Unit }
3254
2386
 
3255
2387
  # @!method initialize(value:, unit: nil)
3256
2388
  # Defines the length of the access schedule for each created commit/credit. The
@@ -3271,117 +2403,6 @@ module MetronomeSDK
3271
2403
  end
3272
2404
  end
3273
2405
 
3274
- # @see MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit#hierarchy_configuration
3275
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
3276
- # @!attribute child_access
3277
- #
3278
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
3279
- required :child_access,
3280
- union: -> {
3281
- MetronomeSDK::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess
3282
- }
3283
-
3284
- # @!method initialize(child_access:)
3285
- # Optional configuration for recurring commit/credit hierarchy access control
3286
- #
3287
- # @param child_access [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
3288
-
3289
- # @see MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration#child_access
3290
- module ChildAccess
3291
- extend MetronomeSDK::Internal::Type::Union
3292
-
3293
- variant -> {
3294
- MetronomeSDK::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll
3295
- }
3296
-
3297
- variant -> {
3298
- MetronomeSDK::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone
3299
- }
3300
-
3301
- variant -> {
3302
- MetronomeSDK::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
3303
- }
3304
-
3305
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
3306
- # @!attribute type
3307
- #
3308
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
3309
- required :type,
3310
- enum: -> {
3311
- MetronomeSDK::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type
3312
- }
3313
-
3314
- # @!method initialize(type:)
3315
- # @param type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
3316
-
3317
- # @see MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
3318
- module Type
3319
- extend MetronomeSDK::Internal::Type::Enum
3320
-
3321
- ALL = :ALL
3322
-
3323
- # @!method self.values
3324
- # @return [Array<Symbol>]
3325
- end
3326
- end
3327
-
3328
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
3329
- # @!attribute type
3330
- #
3331
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
3332
- required :type,
3333
- enum: -> {
3334
- MetronomeSDK::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type
3335
- }
3336
-
3337
- # @!method initialize(type:)
3338
- # @param type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
3339
-
3340
- # @see MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
3341
- module Type
3342
- extend MetronomeSDK::Internal::Type::Enum
3343
-
3344
- NONE = :NONE
3345
-
3346
- # @!method self.values
3347
- # @return [Array<Symbol>]
3348
- end
3349
- end
3350
-
3351
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
3352
- # @!attribute contract_ids
3353
- #
3354
- # @return [Array<String>]
3355
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
3356
-
3357
- # @!attribute type
3358
- #
3359
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
3360
- required :type,
3361
- enum: -> {
3362
- MetronomeSDK::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type
3363
- }
3364
-
3365
- # @!method initialize(contract_ids:, type:)
3366
- # @param contract_ids [Array<String>]
3367
- # @param type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
3368
-
3369
- # @see MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
3370
- module Type
3371
- extend MetronomeSDK::Internal::Type::Enum
3372
-
3373
- CONTRACT_IDS = :CONTRACT_IDS
3374
-
3375
- # @!method self.values
3376
- # @return [Array<Symbol>]
3377
- end
3378
- end
3379
-
3380
- # @!method self.variants
3381
- # @return [Array(MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
3382
- end
3383
- end
3384
-
3385
2406
  # Determines whether the first and last commit will be prorated. If not provided,
3386
2407
  # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
3387
2408
  #
@@ -3430,53 +2451,13 @@ module MetronomeSDK
3430
2451
  # @return [Array<Symbol>]
3431
2452
  end
3432
2453
 
3433
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
3434
- # @!attribute presentation_group_values
3435
- #
3436
- # @return [Hash{Symbol=>String}, nil]
3437
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
3438
-
3439
- # @!attribute pricing_group_values
3440
- #
3441
- # @return [Hash{Symbol=>String}, nil]
3442
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
3443
-
3444
- # @!attribute product_id
3445
- # If provided, the specifier will only apply to the product with the specified ID.
3446
- #
3447
- # @return [String, nil]
3448
- optional :product_id, String
3449
-
3450
- # @!attribute product_tags
3451
- # If provided, the specifier will only apply to products with all the specified
3452
- # tags.
3453
- #
3454
- # @return [Array<String>, nil]
3455
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
3456
-
3457
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
3458
- # Some parameter documentations has been truncated, see
3459
- # {MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::Specifier} for
3460
- # more details.
3461
- #
3462
- # @param presentation_group_values [Hash{Symbol=>String}]
3463
- #
3464
- # @param pricing_group_values [Hash{Symbol=>String}]
3465
- #
3466
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
3467
- #
3468
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
3469
- end
3470
-
3471
2454
  # @see MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit#subscription_config
3472
2455
  class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
3473
2456
  # @!attribute apply_seat_increase_config
3474
2457
  #
3475
2458
  # @return [MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig]
3476
2459
  required :apply_seat_increase_config,
3477
- -> {
3478
- MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig
3479
- }
2460
+ -> { MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig }
3480
2461
 
3481
2462
  # @!attribute subscription_id
3482
2463
  # ID of the subscription to configure on the recurring commit/credit.
@@ -3489,9 +2470,7 @@ module MetronomeSDK
3489
2470
  #
3490
2471
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation, nil]
3491
2472
  optional :allocation,
3492
- enum: -> {
3493
- MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation
3494
- }
2473
+ enum: -> { MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation }
3495
2474
 
3496
2475
  # @!method initialize(apply_seat_increase_config:, subscription_id:, allocation: nil)
3497
2476
  # Attach a subscription to the recurring commit/credit.
@@ -3520,6 +2499,7 @@ module MetronomeSDK
3520
2499
  module Allocation
3521
2500
  extend MetronomeSDK::Internal::Type::Enum
3522
2501
 
2502
+ INDIVIDUAL = :INDIVIDUAL
3523
2503
  POOLED = :POOLED
3524
2504
 
3525
2505
  # @!method self.values
@@ -3670,6 +2650,7 @@ module MetronomeSDK
3670
2650
  required :schedule, -> { MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule }
3671
2651
 
3672
2652
  # @!attribute custom_fields
2653
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
3673
2654
  #
3674
2655
  # @return [Hash{Symbol=>String}, nil]
3675
2656
  optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
@@ -3691,7 +2672,7 @@ module MetronomeSDK
3691
2672
  #
3692
2673
  # @param schedule [MetronomeSDK::Models::V1::ContractCreateParams::ScheduledCharge::Schedule] Must provide either schedule_items or recurring_schedule.
3693
2674
  #
3694
- # @param custom_fields [Hash{Symbol=>String}]
2675
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
3695
2676
  #
3696
2677
  # @param name [String] displayed on invoices
3697
2678
  #
@@ -3719,18 +2700,14 @@ module MetronomeSDK
3719
2700
  #
3720
2701
  # @return [MetronomeSDK::Models::V1::ContractCreateParams::ScheduledCharge::Schedule::RecurringSchedule, nil]
3721
2702
  optional :recurring_schedule,
3722
- -> {
3723
- MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule::RecurringSchedule
3724
- }
2703
+ -> { MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule::RecurringSchedule }
3725
2704
 
3726
2705
  # @!attribute schedule_items
3727
2706
  # Either provide amount or provide both unit_price and quantity.
3728
2707
  #
3729
2708
  # @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::ScheduledCharge::Schedule::ScheduleItem>, nil]
3730
2709
  optional :schedule_items,
3731
- -> {
3732
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule::ScheduleItem]
3733
- }
2710
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule::ScheduleItem] }
3734
2711
 
3735
2712
  # @!method initialize(credit_type_id: nil, do_not_invoice: nil, recurring_schedule: nil, schedule_items: nil)
3736
2713
  # Some parameter documentations has been truncated, see
@@ -3753,9 +2730,7 @@ module MetronomeSDK
3753
2730
  #
3754
2731
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::ScheduledCharge::Schedule::RecurringSchedule::AmountDistribution]
3755
2732
  required :amount_distribution,
3756
- enum: -> {
3757
- MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule::RecurringSchedule::AmountDistribution
3758
- }
2733
+ enum: -> { MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule::RecurringSchedule::AmountDistribution }
3759
2734
 
3760
2735
  # @!attribute ending_before
3761
2736
  # RFC 3339 timestamp (exclusive).
@@ -3767,9 +2742,7 @@ module MetronomeSDK
3767
2742
  #
3768
2743
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::ScheduledCharge::Schedule::RecurringSchedule::Frequency]
3769
2744
  required :frequency,
3770
- enum: -> {
3771
- MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule::RecurringSchedule::Frequency
3772
- }
2745
+ enum: -> { MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule::RecurringSchedule::Frequency }
3773
2746
 
3774
2747
  # @!attribute starting_at
3775
2748
  # RFC 3339 timestamp (inclusive).
@@ -3911,244 +2884,6 @@ module MetronomeSDK
3911
2884
  # @return [Array<Symbol>]
3912
2885
  end
3913
2886
 
3914
- class SpendThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
3915
- # @!attribute commit
3916
- #
3917
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::Commit]
3918
- required :commit, -> { MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::Commit }
3919
-
3920
- # @!attribute is_enabled
3921
- # When set to false, the contract will not be evaluated against the
3922
- # threshold_amount. Toggling to true will result an immediate evaluation,
3923
- # regardless of prior state.
3924
- #
3925
- # @return [Boolean]
3926
- required :is_enabled, MetronomeSDK::Internal::Type::Boolean
3927
-
3928
- # @!attribute payment_gate_config
3929
- #
3930
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig]
3931
- required :payment_gate_config,
3932
- -> {
3933
- MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig
3934
- }
3935
-
3936
- # @!attribute threshold_amount
3937
- # Specify the threshold amount for the contract. Each time the contract's usage
3938
- # hits this amount, a threshold charge will be initiated.
3939
- #
3940
- # @return [Float]
3941
- required :threshold_amount, Float
3942
-
3943
- # @!method initialize(commit:, is_enabled:, payment_gate_config:, threshold_amount:)
3944
- # Some parameter documentations has been truncated, see
3945
- # {MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration}
3946
- # for more details.
3947
- #
3948
- # @param commit [MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::Commit]
3949
- #
3950
- # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
3951
- #
3952
- # @param payment_gate_config [MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig]
3953
- #
3954
- # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's usage hi
3955
-
3956
- # @see MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration#commit
3957
- class Commit < MetronomeSDK::Internal::Type::BaseModel
3958
- # @!attribute product_id
3959
- # The commit product that will be used to generate the line item for commit
3960
- # payment.
3961
- #
3962
- # @return [String]
3963
- required :product_id, String
3964
-
3965
- # @!attribute description
3966
- #
3967
- # @return [String, nil]
3968
- optional :description, String
3969
-
3970
- # @!attribute name
3971
- # Specify the name of the line item for the threshold charge. If left blank, it
3972
- # will default to the commit product name.
3973
- #
3974
- # @return [String, nil]
3975
- optional :name, String
3976
-
3977
- # @!method initialize(product_id:, description: nil, name: nil)
3978
- # Some parameter documentations has been truncated, see
3979
- # {MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::Commit}
3980
- # for more details.
3981
- #
3982
- # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
3983
- #
3984
- # @param description [String]
3985
- #
3986
- # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
3987
- end
3988
-
3989
- # @see MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration#payment_gate_config
3990
- class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
3991
- # @!attribute payment_gate_type
3992
- # Gate access to the commit balance based on successful collection of payment.
3993
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
3994
- # facilitate payment using your own payment integration. Select NONE if you do not
3995
- # wish to payment gate the commit balance.
3996
- #
3997
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType]
3998
- required :payment_gate_type,
3999
- enum: -> {
4000
- MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType
4001
- }
4002
-
4003
- # @!attribute precalculated_tax_config
4004
- # Only applicable if using PRECALCULATED as your tax type.
4005
- #
4006
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
4007
- optional :precalculated_tax_config,
4008
- -> {
4009
- MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig
4010
- }
4011
-
4012
- # @!attribute stripe_config
4013
- # Only applicable if using STRIPE as your payment gate type.
4014
- #
4015
- # @return [MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
4016
- optional :stripe_config,
4017
- -> {
4018
- MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig
4019
- }
4020
-
4021
- # @!attribute tax_type
4022
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
4023
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
4024
- # will default to NONE.
4025
- #
4026
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::TaxType, nil]
4027
- optional :tax_type,
4028
- enum: -> {
4029
- MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::TaxType
4030
- }
4031
-
4032
- # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
4033
- # Some parameter documentations has been truncated, see
4034
- # {MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig}
4035
- # for more details.
4036
- #
4037
- # @param payment_gate_type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
4038
- #
4039
- # @param precalculated_tax_config [MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
4040
- #
4041
- # @param stripe_config [MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gate type.
4042
- #
4043
- # @param tax_type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
4044
-
4045
- # Gate access to the commit balance based on successful collection of payment.
4046
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
4047
- # facilitate payment using your own payment integration. Select NONE if you do not
4048
- # wish to payment gate the commit balance.
4049
- #
4050
- # @see MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig#payment_gate_type
4051
- module PaymentGateType
4052
- extend MetronomeSDK::Internal::Type::Enum
4053
-
4054
- NONE = :NONE
4055
- STRIPE = :STRIPE
4056
- EXTERNAL = :EXTERNAL
4057
-
4058
- # @!method self.values
4059
- # @return [Array<Symbol>]
4060
- end
4061
-
4062
- # @see MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
4063
- class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
4064
- # @!attribute tax_amount
4065
- # Amount of tax to be applied. This should be in the same currency and
4066
- # denomination as the commit's invoice schedule
4067
- #
4068
- # @return [Float]
4069
- required :tax_amount, Float
4070
-
4071
- # @!attribute tax_name
4072
- # Name of the tax to be applied. This may be used in an invoice line item
4073
- # description.
4074
- #
4075
- # @return [String, nil]
4076
- optional :tax_name, String
4077
-
4078
- # @!method initialize(tax_amount:, tax_name: nil)
4079
- # Some parameter documentations has been truncated, see
4080
- # {MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
4081
- # for more details.
4082
- #
4083
- # Only applicable if using PRECALCULATED as your tax type.
4084
- #
4085
- # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
4086
- #
4087
- # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
4088
- end
4089
-
4090
- # @see MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig#stripe_config
4091
- class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
4092
- # @!attribute payment_type
4093
- # If left blank, will default to INVOICE
4094
- #
4095
- # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
4096
- required :payment_type,
4097
- enum: -> {
4098
- MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType
4099
- }
4100
-
4101
- # @!attribute invoice_metadata
4102
- # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
4103
- # your payment type.
4104
- #
4105
- # @return [Hash{Symbol=>String}, nil]
4106
- optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
4107
-
4108
- # @!method initialize(payment_type:, invoice_metadata: nil)
4109
- # Some parameter documentations has been truncated, see
4110
- # {MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig}
4111
- # for more details.
4112
- #
4113
- # Only applicable if using STRIPE as your payment gate type.
4114
- #
4115
- # @param payment_type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
4116
- #
4117
- # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
4118
-
4119
- # If left blank, will default to INVOICE
4120
- #
4121
- # @see MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
4122
- module PaymentType
4123
- extend MetronomeSDK::Internal::Type::Enum
4124
-
4125
- INVOICE = :INVOICE
4126
- PAYMENT_INTENT = :PAYMENT_INTENT
4127
-
4128
- # @!method self.values
4129
- # @return [Array<Symbol>]
4130
- end
4131
- end
4132
-
4133
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
4134
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
4135
- # will default to NONE.
4136
- #
4137
- # @see MetronomeSDK::Models::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig#tax_type
4138
- module TaxType
4139
- extend MetronomeSDK::Internal::Type::Enum
4140
-
4141
- NONE = :NONE
4142
- STRIPE = :STRIPE
4143
- ANROK = :ANROK
4144
- PRECALCULATED = :PRECALCULATED
4145
-
4146
- # @!method self.values
4147
- # @return [Array<Symbol>]
4148
- end
4149
- end
4150
- end
4151
-
4152
2887
  class Subscription < MetronomeSDK::Internal::Type::BaseModel
4153
2888
  # @!attribute collection_schedule
4154
2889
  #
@@ -4156,12 +2891,6 @@ module MetronomeSDK
4156
2891
  required :collection_schedule,
4157
2892
  enum: -> { MetronomeSDK::V1::ContractCreateParams::Subscription::CollectionSchedule }
4158
2893
 
4159
- # @!attribute initial_quantity
4160
- # The initial quantity for the subscription. It must be non-negative value.
4161
- #
4162
- # @return [Float]
4163
- required :initial_quantity, Float
4164
-
4165
2894
  # @!attribute proration
4166
2895
  #
4167
2896
  # @return [MetronomeSDK::Models::V1::ContractCreateParams::Subscription::Proration]
@@ -4170,12 +2899,10 @@ module MetronomeSDK
4170
2899
  # @!attribute subscription_rate
4171
2900
  #
4172
2901
  # @return [MetronomeSDK::Models::V1::ContractCreateParams::Subscription::SubscriptionRate]
4173
- required :subscription_rate,
4174
- -> {
4175
- MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate
4176
- }
2902
+ required :subscription_rate, -> { MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate }
4177
2903
 
4178
2904
  # @!attribute custom_fields
2905
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
4179
2906
  #
4180
2907
  # @return [Hash{Symbol=>String}, nil]
4181
2908
  optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
@@ -4192,11 +2919,28 @@ module MetronomeSDK
4192
2919
  # @return [Time, nil]
4193
2920
  optional :ending_before, Time
4194
2921
 
2922
+ # @!attribute initial_quantity
2923
+ # The initial quantity for the subscription. It must be non-negative value.
2924
+ # Required if quantity_management_mode is QUANTITY_ONLY.
2925
+ #
2926
+ # @return [Float, nil]
2927
+ optional :initial_quantity, Float
2928
+
4195
2929
  # @!attribute name
4196
2930
  #
4197
2931
  # @return [String, nil]
4198
2932
  optional :name, String
4199
2933
 
2934
+ # @!attribute quantity_management_mode
2935
+ # Determines how the subscription's quantity is controlled. Defaults to
2936
+ # QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
2937
+ # directly on the subscription. `initial_quantity` must be provided with this
2938
+ # option. Compatible with recurring commits/credits that use POOLED allocation.
2939
+ #
2940
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Subscription::QuantityManagementMode, nil]
2941
+ optional :quantity_management_mode,
2942
+ enum: -> { MetronomeSDK::V1::ContractCreateParams::Subscription::QuantityManagementMode }
2943
+
4200
2944
  # @!attribute starting_at
4201
2945
  # Inclusive start time for the subscription. If not provided, defaults to contract
4202
2946
  # start date
@@ -4211,26 +2955,28 @@ module MetronomeSDK
4211
2955
  # @return [String, nil]
4212
2956
  optional :temporary_id, String
4213
2957
 
4214
- # @!method initialize(collection_schedule:, initial_quantity:, proration:, subscription_rate:, custom_fields: nil, description: nil, ending_before: nil, name: nil, starting_at: nil, temporary_id: nil)
2958
+ # @!method initialize(collection_schedule:, proration:, subscription_rate:, custom_fields: nil, description: nil, ending_before: nil, initial_quantity: nil, name: nil, quantity_management_mode: nil, starting_at: nil, temporary_id: nil)
4215
2959
  # Some parameter documentations has been truncated, see
4216
2960
  # {MetronomeSDK::Models::V1::ContractCreateParams::Subscription} for more details.
4217
2961
  #
4218
2962
  # @param collection_schedule [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Subscription::CollectionSchedule]
4219
2963
  #
4220
- # @param initial_quantity [Float] The initial quantity for the subscription. It must be non-negative value.
4221
- #
4222
2964
  # @param proration [MetronomeSDK::Models::V1::ContractCreateParams::Subscription::Proration]
4223
2965
  #
4224
2966
  # @param subscription_rate [MetronomeSDK::Models::V1::ContractCreateParams::Subscription::SubscriptionRate]
4225
2967
  #
4226
- # @param custom_fields [Hash{Symbol=>String}]
2968
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
4227
2969
  #
4228
2970
  # @param description [String]
4229
2971
  #
4230
2972
  # @param ending_before [Time] Exclusive end time for the subscription. If not provided, subscription inherits
4231
2973
  #
2974
+ # @param initial_quantity [Float] The initial quantity for the subscription. It must be non-negative value. Requir
2975
+ #
4232
2976
  # @param name [String]
4233
2977
  #
2978
+ # @param quantity_management_mode [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Subscription::QuantityManagementMode] Determines how the subscription's quantity is controlled. Defaults to QUANTITY_O
2979
+ #
4234
2980
  # @param starting_at [Time] Inclusive start time for the subscription. If not provided, defaults to contract
4235
2981
  #
4236
2982
  # @param temporary_id [String] A temporary ID used to reference the subscription in recurring commit/credit sub
@@ -4257,9 +3003,7 @@ module MetronomeSDK
4257
3003
  #
4258
3004
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Subscription::Proration::InvoiceBehavior, nil]
4259
3005
  optional :invoice_behavior,
4260
- enum: -> {
4261
- MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::InvoiceBehavior
4262
- }
3006
+ enum: -> { MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::InvoiceBehavior }
4263
3007
 
4264
3008
  # @!attribute is_prorated
4265
3009
  # Indicates if the partial period will be prorated or charged a full amount.
@@ -4302,9 +3046,7 @@ module MetronomeSDK
4302
3046
  #
4303
3047
  # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Subscription::SubscriptionRate::BillingFrequency]
4304
3048
  required :billing_frequency,
4305
- enum: -> {
4306
- MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate::BillingFrequency
4307
- }
3049
+ enum: -> { MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate::BillingFrequency }
4308
3050
 
4309
3051
  # @!attribute product_id
4310
3052
  # Must be subscription type product
@@ -4337,6 +3079,22 @@ module MetronomeSDK
4337
3079
  # @return [Array<Symbol>]
4338
3080
  end
4339
3081
  end
3082
+
3083
+ # Determines how the subscription's quantity is controlled. Defaults to
3084
+ # QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
3085
+ # directly on the subscription. `initial_quantity` must be provided with this
3086
+ # option. Compatible with recurring commits/credits that use POOLED allocation.
3087
+ #
3088
+ # @see MetronomeSDK::Models::V1::ContractCreateParams::Subscription#quantity_management_mode
3089
+ module QuantityManagementMode
3090
+ extend MetronomeSDK::Internal::Type::Enum
3091
+
3092
+ SEAT_BASED = :SEAT_BASED
3093
+ QUANTITY_ONLY = :QUANTITY_ONLY
3094
+
3095
+ # @!method self.values
3096
+ # @return [Array<Symbol>]
3097
+ end
4340
3098
  end
4341
3099
 
4342
3100
  class Transition < MetronomeSDK::Internal::Type::BaseModel