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
@@ -36,70 +36,55 @@ module MetronomeSDK
36
36
  #
37
37
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddDiscount>, nil]
38
38
  optional :add_discounts,
39
- -> {
40
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddDiscount]
41
- }
39
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddDiscount] }
42
40
 
43
41
  # @!attribute add_overrides
44
42
  #
45
43
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddOverride>, nil]
46
44
  optional :add_overrides,
47
- -> {
48
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddOverride]
49
- }
45
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddOverride] }
50
46
 
51
47
  # @!attribute add_prepaid_balance_threshold_configuration
52
48
  #
53
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration, nil]
49
+ # @return [MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2, nil]
54
50
  optional :add_prepaid_balance_threshold_configuration,
55
- -> { MetronomeSDK::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration }
51
+ -> { MetronomeSDK::PrepaidBalanceThresholdConfigurationV2 }
56
52
 
57
53
  # @!attribute add_professional_services
58
54
  # This field's availability is dependent on your client's configuration.
59
55
  #
60
56
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddProfessionalService>, nil]
61
57
  optional :add_professional_services,
62
- -> {
63
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddProfessionalService]
64
- }
58
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddProfessionalService] }
65
59
 
66
60
  # @!attribute add_recurring_commits
67
61
  #
68
62
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit>, nil]
69
63
  optional :add_recurring_commits,
70
- -> {
71
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddRecurringCommit]
72
- }
64
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddRecurringCommit] }
73
65
 
74
66
  # @!attribute add_recurring_credits
75
67
  #
76
68
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit>, nil]
77
69
  optional :add_recurring_credits,
78
- -> {
79
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddRecurringCredit]
80
- }
70
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddRecurringCredit] }
81
71
 
82
72
  # @!attribute add_reseller_royalties
83
73
  #
84
74
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddResellerRoyalty>, nil]
85
75
  optional :add_reseller_royalties,
86
- -> {
87
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddResellerRoyalty]
88
- }
76
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddResellerRoyalty] }
89
77
 
90
78
  # @!attribute add_scheduled_charges
91
79
  #
92
80
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddScheduledCharge>, nil]
93
81
  optional :add_scheduled_charges,
94
- -> {
95
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddScheduledCharge]
96
- }
82
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddScheduledCharge] }
97
83
 
98
84
  # @!attribute add_spend_threshold_configuration
99
85
  #
100
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration, nil]
101
- optional :add_spend_threshold_configuration,
102
- -> { MetronomeSDK::V2::ContractEditParams::AddSpendThresholdConfiguration }
86
+ # @return [MetronomeSDK::Models::SpendThresholdConfigurationV2, nil]
87
+ optional :add_spend_threshold_configuration, -> { MetronomeSDK::SpendThresholdConfigurationV2 }
103
88
 
104
89
  # @!attribute add_subscriptions
105
90
  # Optional list of
@@ -108,9 +93,7 @@ module MetronomeSDK
108
93
  #
109
94
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddSubscription>, nil]
110
95
  optional :add_subscriptions,
111
- -> {
112
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddSubscription]
113
- }
96
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddSubscription] }
114
97
 
115
98
  # @!attribute allow_contract_ending_before_finalized_invoice
116
99
  # If true, allows setting the contract end date earlier than the end_timestamp of
@@ -126,44 +109,40 @@ module MetronomeSDK
126
109
  #
127
110
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::ArchiveCommit>, nil]
128
111
  optional :archive_commits,
129
- -> {
130
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::ArchiveCommit]
131
- }
112
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::ArchiveCommit] }
132
113
 
133
114
  # @!attribute archive_credits
134
115
  # IDs of credits to archive
135
116
  #
136
117
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::ArchiveCredit>, nil]
137
118
  optional :archive_credits,
138
- -> {
139
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::ArchiveCredit]
140
- }
119
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::ArchiveCredit] }
141
120
 
142
121
  # @!attribute archive_scheduled_charges
143
122
  # IDs of scheduled charges to archive
144
123
  #
145
124
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::ArchiveScheduledCharge>, nil]
146
125
  optional :archive_scheduled_charges,
147
- -> {
148
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::ArchiveScheduledCharge]
149
- }
126
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::ArchiveScheduledCharge] }
150
127
 
151
128
  # @!attribute remove_overrides
152
129
  # IDs of overrides to remove
153
130
  #
154
131
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::RemoveOverride>, nil]
155
132
  optional :remove_overrides,
156
- -> {
157
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::RemoveOverride]
158
- }
133
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::RemoveOverride] }
134
+
135
+ # @!attribute uniqueness_key
136
+ # Optional uniqueness key to prevent duplicate contract edits.
137
+ #
138
+ # @return [String, nil]
139
+ optional :uniqueness_key, String
159
140
 
160
141
  # @!attribute update_commits
161
142
  #
162
143
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit>, nil]
163
144
  optional :update_commits,
164
- -> {
165
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCommit]
166
- }
145
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCommit] }
167
146
 
168
147
  # @!attribute update_contract_end_date
169
148
  # RFC 3339 timestamp indicating when the contract will end (exclusive).
@@ -182,9 +161,7 @@ module MetronomeSDK
182
161
  #
183
162
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit>, nil]
184
163
  optional :update_credits,
185
- -> {
186
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCredit]
187
- }
164
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCredit] }
188
165
 
189
166
  # @!attribute update_prepaid_balance_threshold_configuration
190
167
  #
@@ -199,9 +176,7 @@ module MetronomeSDK
199
176
  #
200
177
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCommit>, nil]
201
178
  optional :update_recurring_commits,
202
- -> {
203
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit]
204
- }
179
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit] }
205
180
 
206
181
  # @!attribute update_recurring_credits
207
182
  # Edits to these recurring credits will only affect credits whose access schedules
@@ -210,17 +185,13 @@ module MetronomeSDK
210
185
  #
211
186
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCredit>, nil]
212
187
  optional :update_recurring_credits,
213
- -> {
214
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit]
215
- }
188
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit] }
216
189
 
217
190
  # @!attribute update_scheduled_charges
218
191
  #
219
192
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateScheduledCharge>, nil]
220
193
  optional :update_scheduled_charges,
221
- -> {
222
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateScheduledCharge]
223
- }
194
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateScheduledCharge] }
224
195
 
225
196
  # @!attribute update_spend_threshold_configuration
226
197
  #
@@ -233,11 +204,9 @@ module MetronomeSDK
233
204
  #
234
205
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateSubscription>, nil]
235
206
  optional :update_subscriptions,
236
- -> {
237
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateSubscription]
238
- }
207
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateSubscription] }
239
208
 
240
- # @!method initialize(contract_id:, customer_id:, add_commits: nil, add_credits: nil, add_discounts: nil, add_overrides: nil, add_prepaid_balance_threshold_configuration: nil, add_professional_services: nil, add_recurring_commits: nil, add_recurring_credits: nil, add_reseller_royalties: nil, add_scheduled_charges: nil, add_spend_threshold_configuration: nil, add_subscriptions: nil, allow_contract_ending_before_finalized_invoice: nil, archive_commits: nil, archive_credits: nil, archive_scheduled_charges: nil, remove_overrides: nil, update_commits: nil, update_contract_end_date: nil, update_contract_name: nil, update_credits: nil, update_prepaid_balance_threshold_configuration: nil, update_recurring_commits: nil, update_recurring_credits: nil, update_scheduled_charges: nil, update_spend_threshold_configuration: nil, update_subscriptions: nil, request_options: {})
209
+ # @!method initialize(contract_id:, customer_id:, add_commits: nil, add_credits: nil, add_discounts: nil, add_overrides: nil, add_prepaid_balance_threshold_configuration: nil, add_professional_services: nil, add_recurring_commits: nil, add_recurring_credits: nil, add_reseller_royalties: nil, add_scheduled_charges: nil, add_spend_threshold_configuration: nil, add_subscriptions: nil, allow_contract_ending_before_finalized_invoice: nil, archive_commits: nil, archive_credits: nil, archive_scheduled_charges: nil, remove_overrides: nil, uniqueness_key: nil, update_commits: nil, update_contract_end_date: nil, update_contract_name: nil, update_credits: nil, update_prepaid_balance_threshold_configuration: nil, update_recurring_commits: nil, update_recurring_credits: nil, update_scheduled_charges: nil, update_spend_threshold_configuration: nil, update_subscriptions: nil, request_options: {})
241
210
  # Some parameter documentations has been truncated, see
242
211
  # {MetronomeSDK::Models::V2::ContractEditParams} for more details.
243
212
  #
@@ -253,7 +222,7 @@ module MetronomeSDK
253
222
  #
254
223
  # @param add_overrides [Array<MetronomeSDK::Models::V2::ContractEditParams::AddOverride>]
255
224
  #
256
- # @param add_prepaid_balance_threshold_configuration [MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration]
225
+ # @param add_prepaid_balance_threshold_configuration [MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2]
257
226
  #
258
227
  # @param add_professional_services [Array<MetronomeSDK::Models::V2::ContractEditParams::AddProfessionalService>] This field's availability is dependent on your client's configuration.
259
228
  #
@@ -265,7 +234,7 @@ module MetronomeSDK
265
234
  #
266
235
  # @param add_scheduled_charges [Array<MetronomeSDK::Models::V2::ContractEditParams::AddScheduledCharge>]
267
236
  #
268
- # @param add_spend_threshold_configuration [MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration]
237
+ # @param add_spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfigurationV2]
269
238
  #
270
239
  # @param add_subscriptions [Array<MetronomeSDK::Models::V2::ContractEditParams::AddSubscription>] Optional list of [subscriptions](https://docs.metronome.com/manage-product-acces
271
240
  #
@@ -279,6 +248,8 @@ module MetronomeSDK
279
248
  #
280
249
  # @param remove_overrides [Array<MetronomeSDK::Models::V2::ContractEditParams::RemoveOverride>] IDs of overrides to remove
281
250
  #
251
+ # @param uniqueness_key [String] Optional uniqueness key to prevent duplicate contract edits.
252
+ #
282
253
  # @param update_commits [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit>]
283
254
  #
284
255
  # @param update_contract_end_date [Time, nil] RFC 3339 timestamp indicating when the contract will end (exclusive).
@@ -343,6 +314,7 @@ module MetronomeSDK
343
314
  optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
344
315
 
345
316
  # @!attribute custom_fields
317
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
346
318
  #
347
319
  # @return [Hash{Symbol=>String}, nil]
348
320
  optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
@@ -356,9 +328,8 @@ module MetronomeSDK
356
328
  # @!attribute hierarchy_configuration
357
329
  # Optional configuration for commit hierarchy access control
358
330
  #
359
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration, nil]
360
- optional :hierarchy_configuration,
361
- -> { MetronomeSDK::V2::ContractEditParams::AddCommit::HierarchyConfiguration }
331
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
332
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
362
333
 
363
334
  # @!attribute invoice_schedule
364
335
  # Required for "POSTPAID" commits: the true up invoice will be generated at this
@@ -385,10 +356,7 @@ module MetronomeSDK
385
356
  # optionally payment gate this commit
386
357
  #
387
358
  # @return [MetronomeSDK::Models::V2::ContractEditParams::AddCommit::PaymentGateConfig, nil]
388
- optional :payment_gate_config,
389
- -> {
390
- MetronomeSDK::V2::ContractEditParams::AddCommit::PaymentGateConfig
391
- }
359
+ optional :payment_gate_config, -> { MetronomeSDK::V2::ContractEditParams::AddCommit::PaymentGateConfig }
392
360
 
393
361
  # @!attribute priority
394
362
  # If multiple commits are applicable, the one with the lower priority will apply
@@ -416,11 +384,8 @@ module MetronomeSDK
416
384
  # Instead, to target usage by product or product tag, pass those values in the
417
385
  # body of `specifiers`.
418
386
  #
419
- # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddCommit::Specifier>, nil]
420
- optional :specifiers,
421
- -> {
422
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddCommit::Specifier]
423
- }
387
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
388
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
424
389
 
425
390
  # @!attribute temporary_id
426
391
  # A temporary ID for the commit that can be used to reference the commit for
@@ -445,11 +410,11 @@ module MetronomeSDK
445
410
  #
446
411
  # @param applicable_product_tags [Array<String>] Which tags the commit applies to. If applicable*product_ids, applicable_product*
447
412
  #
448
- # @param custom_fields [Hash{Symbol=>String}]
413
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
449
414
  #
450
415
  # @param description [String] Used only in UI/API. It is not exposed to end customers.
451
416
  #
452
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration] Optional configuration for commit hierarchy access control
417
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for commit hierarchy access control
453
418
  #
454
419
  # @param invoice_schedule [MetronomeSDK::Models::V2::ContractEditParams::AddCommit::InvoiceSchedule] Required for "POSTPAID" commits: the true up invoice will be generated at this t
455
420
  #
@@ -465,7 +430,7 @@ module MetronomeSDK
465
430
  #
466
431
  # @param rollover_fraction [Float] Fraction of unused segments that will be rolled over. Must be between 0 and 1.
467
432
  #
468
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractEditParams::AddCommit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
433
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
469
434
  #
470
435
  # @param temporary_id [String] A temporary ID for the commit that can be used to reference the commit for commi
471
436
 
@@ -486,9 +451,7 @@ module MetronomeSDK
486
451
  #
487
452
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddCommit::AccessSchedule::ScheduleItem>]
488
453
  required :schedule_items,
489
- -> {
490
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddCommit::AccessSchedule::ScheduleItem]
491
- }
454
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddCommit::AccessSchedule::ScheduleItem] }
492
455
 
493
456
  # @!attribute credit_type_id
494
457
  #
@@ -530,117 +493,6 @@ module MetronomeSDK
530
493
  end
531
494
  end
532
495
 
533
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddCommit#hierarchy_configuration
534
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
535
- # @!attribute child_access
536
- #
537
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
538
- required :child_access,
539
- union: -> {
540
- MetronomeSDK::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess
541
- }
542
-
543
- # @!method initialize(child_access:)
544
- # Optional configuration for commit hierarchy access control
545
- #
546
- # @param child_access [MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
547
-
548
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration#child_access
549
- module ChildAccess
550
- extend MetronomeSDK::Internal::Type::Union
551
-
552
- variant -> {
553
- MetronomeSDK::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll
554
- }
555
-
556
- variant -> {
557
- MetronomeSDK::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone
558
- }
559
-
560
- variant -> {
561
- MetronomeSDK::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
562
- }
563
-
564
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
565
- # @!attribute type
566
- #
567
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
568
- required :type,
569
- enum: -> {
570
- MetronomeSDK::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type
571
- }
572
-
573
- # @!method initialize(type:)
574
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
575
-
576
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
577
- module Type
578
- extend MetronomeSDK::Internal::Type::Enum
579
-
580
- ALL = :ALL
581
-
582
- # @!method self.values
583
- # @return [Array<Symbol>]
584
- end
585
- end
586
-
587
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
588
- # @!attribute type
589
- #
590
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
591
- required :type,
592
- enum: -> {
593
- MetronomeSDK::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type
594
- }
595
-
596
- # @!method initialize(type:)
597
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
598
-
599
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
600
- module Type
601
- extend MetronomeSDK::Internal::Type::Enum
602
-
603
- NONE = :NONE
604
-
605
- # @!method self.values
606
- # @return [Array<Symbol>]
607
- end
608
- end
609
-
610
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
611
- # @!attribute contract_ids
612
- #
613
- # @return [Array<String>]
614
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
615
-
616
- # @!attribute type
617
- #
618
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
619
- required :type,
620
- enum: -> {
621
- MetronomeSDK::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type
622
- }
623
-
624
- # @!method initialize(contract_ids:, type:)
625
- # @param contract_ids [Array<String>]
626
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
627
-
628
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
629
- module Type
630
- extend MetronomeSDK::Internal::Type::Enum
631
-
632
- CONTRACT_IDS = :CONTRACT_IDS
633
-
634
- # @!method self.values
635
- # @return [Array<Symbol>]
636
- end
637
- end
638
-
639
- # @!method self.variants
640
- # @return [Array(MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
641
- end
642
- end
643
-
644
496
  # @see MetronomeSDK::Models::V2::ContractEditParams::AddCommit#invoice_schedule
645
497
  class InvoiceSchedule < MetronomeSDK::Internal::Type::BaseModel
646
498
  # @!attribute credit_type_id
@@ -663,18 +515,14 @@ module MetronomeSDK
663
515
  #
664
516
  # @return [MetronomeSDK::Models::V2::ContractEditParams::AddCommit::InvoiceSchedule::RecurringSchedule, nil]
665
517
  optional :recurring_schedule,
666
- -> {
667
- MetronomeSDK::V2::ContractEditParams::AddCommit::InvoiceSchedule::RecurringSchedule
668
- }
518
+ -> { MetronomeSDK::V2::ContractEditParams::AddCommit::InvoiceSchedule::RecurringSchedule }
669
519
 
670
520
  # @!attribute schedule_items
671
521
  # Either provide amount or provide both unit_price and quantity.
672
522
  #
673
523
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddCommit::InvoiceSchedule::ScheduleItem>, nil]
674
524
  optional :schedule_items,
675
- -> {
676
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddCommit::InvoiceSchedule::ScheduleItem]
677
- }
525
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddCommit::InvoiceSchedule::ScheduleItem] }
678
526
 
679
527
  # @!method initialize(credit_type_id: nil, do_not_invoice: nil, recurring_schedule: nil, schedule_items: nil)
680
528
  # Some parameter documentations has been truncated, see
@@ -700,9 +548,7 @@ module MetronomeSDK
700
548
  #
701
549
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::InvoiceSchedule::RecurringSchedule::AmountDistribution]
702
550
  required :amount_distribution,
703
- enum: -> {
704
- MetronomeSDK::V2::ContractEditParams::AddCommit::InvoiceSchedule::RecurringSchedule::AmountDistribution
705
- }
551
+ enum: -> { MetronomeSDK::V2::ContractEditParams::AddCommit::InvoiceSchedule::RecurringSchedule::AmountDistribution }
706
552
 
707
553
  # @!attribute ending_before
708
554
  # RFC 3339 timestamp (exclusive).
@@ -714,9 +560,7 @@ module MetronomeSDK
714
560
  #
715
561
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::InvoiceSchedule::RecurringSchedule::Frequency]
716
562
  required :frequency,
717
- enum: -> {
718
- MetronomeSDK::V2::ContractEditParams::AddCommit::InvoiceSchedule::RecurringSchedule::Frequency
719
- }
563
+ enum: -> { MetronomeSDK::V2::ContractEditParams::AddCommit::InvoiceSchedule::RecurringSchedule::Frequency }
720
564
 
721
565
  # @!attribute starting_at
722
566
  # RFC 3339 timestamp (inclusive).
@@ -854,18 +698,14 @@ module MetronomeSDK
854
698
  #
855
699
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::PaymentGateConfig::PaymentGateType]
856
700
  required :payment_gate_type,
857
- enum: -> {
858
- MetronomeSDK::V2::ContractEditParams::AddCommit::PaymentGateConfig::PaymentGateType
859
- }
701
+ enum: -> { MetronomeSDK::V2::ContractEditParams::AddCommit::PaymentGateConfig::PaymentGateType }
860
702
 
861
703
  # @!attribute precalculated_tax_config
862
704
  # Only applicable if using PRECALCULATED as your tax type.
863
705
  #
864
706
  # @return [MetronomeSDK::Models::V2::ContractEditParams::AddCommit::PaymentGateConfig::PrecalculatedTaxConfig, nil]
865
707
  optional :precalculated_tax_config,
866
- -> {
867
- MetronomeSDK::V2::ContractEditParams::AddCommit::PaymentGateConfig::PrecalculatedTaxConfig
868
- }
708
+ -> { MetronomeSDK::V2::ContractEditParams::AddCommit::PaymentGateConfig::PrecalculatedTaxConfig }
869
709
 
870
710
  # @!attribute stripe_config
871
711
  # Only applicable if using STRIPE as your payment gateway type.
@@ -950,9 +790,7 @@ module MetronomeSDK
950
790
  #
951
791
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::PaymentGateConfig::StripeConfig::PaymentType]
952
792
  required :payment_type,
953
- enum: -> {
954
- MetronomeSDK::V2::ContractEditParams::AddCommit::PaymentGateConfig::StripeConfig::PaymentType
955
- }
793
+ enum: -> { MetronomeSDK::V2::ContractEditParams::AddCommit::PaymentGateConfig::StripeConfig::PaymentType }
956
794
 
957
795
  # @!attribute invoice_metadata
958
796
  # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
@@ -1029,44 +867,6 @@ module MetronomeSDK
1029
867
  # @!method self.values
1030
868
  # @return [Array<Symbol>]
1031
869
  end
1032
-
1033
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
1034
- # @!attribute presentation_group_values
1035
- #
1036
- # @return [Hash{Symbol=>String}, nil]
1037
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1038
-
1039
- # @!attribute pricing_group_values
1040
- #
1041
- # @return [Hash{Symbol=>String}, nil]
1042
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1043
-
1044
- # @!attribute product_id
1045
- # If provided, the specifier will only apply to the product with the specified ID.
1046
- #
1047
- # @return [String, nil]
1048
- optional :product_id, String
1049
-
1050
- # @!attribute product_tags
1051
- # If provided, the specifier will only apply to products with all the specified
1052
- # tags.
1053
- #
1054
- # @return [Array<String>, nil]
1055
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1056
-
1057
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
1058
- # Some parameter documentations has been truncated, see
1059
- # {MetronomeSDK::Models::V2::ContractEditParams::AddCommit::Specifier} for more
1060
- # details.
1061
- #
1062
- # @param presentation_group_values [Hash{Symbol=>String}]
1063
- #
1064
- # @param pricing_group_values [Hash{Symbol=>String}]
1065
- #
1066
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
1067
- #
1068
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
1069
- end
1070
870
  end
1071
871
 
1072
872
  class AddCredit < MetronomeSDK::Internal::Type::BaseModel
@@ -1096,6 +896,7 @@ module MetronomeSDK
1096
896
  optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1097
897
 
1098
898
  # @!attribute custom_fields
899
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1099
900
  #
1100
901
  # @return [Hash{Symbol=>String}, nil]
1101
902
  optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
@@ -1109,9 +910,8 @@ module MetronomeSDK
1109
910
  # @!attribute hierarchy_configuration
1110
911
  # Optional configuration for credit hierarchy access control
1111
912
  #
1112
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration, nil]
1113
- optional :hierarchy_configuration,
1114
- -> { MetronomeSDK::V2::ContractEditParams::AddCredit::HierarchyConfiguration }
913
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
914
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
1115
915
 
1116
916
  # @!attribute name
1117
917
  # displayed on invoices
@@ -1145,11 +945,8 @@ module MetronomeSDK
1145
945
  # Instead, to target usage by product or product tag, pass those values in the
1146
946
  # body of `specifiers`.
1147
947
  #
1148
- # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddCredit::Specifier>, nil]
1149
- optional :specifiers,
1150
- -> {
1151
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddCredit::Specifier]
1152
- }
948
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
949
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
1153
950
 
1154
951
  # @!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)
1155
952
  # Some parameter documentations has been truncated, see
@@ -1163,11 +960,11 @@ module MetronomeSDK
1163
960
  #
1164
961
  # @param applicable_product_tags [Array<String>] Which tags the credit applies to. If both applicable*product_ids and applicable*
1165
962
  #
1166
- # @param custom_fields [Hash{Symbol=>String}]
963
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1167
964
  #
1168
965
  # @param description [String] Used only in UI/API. It is not exposed to end customers.
1169
966
  #
1170
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration] Optional configuration for credit hierarchy access control
967
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for credit hierarchy access control
1171
968
  #
1172
969
  # @param name [String] displayed on invoices
1173
970
  #
@@ -1177,7 +974,7 @@ module MetronomeSDK
1177
974
  #
1178
975
  # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCredit::RateType]
1179
976
  #
1180
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractEditParams::AddCredit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
977
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
1181
978
 
1182
979
  # @see MetronomeSDK::Models::V2::ContractEditParams::AddCredit#access_schedule
1183
980
  class AccessSchedule < MetronomeSDK::Internal::Type::BaseModel
@@ -1185,9 +982,7 @@ module MetronomeSDK
1185
982
  #
1186
983
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddCredit::AccessSchedule::ScheduleItem>]
1187
984
  required :schedule_items,
1188
- -> {
1189
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddCredit::AccessSchedule::ScheduleItem]
1190
- }
985
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddCredit::AccessSchedule::ScheduleItem] }
1191
986
 
1192
987
  # @!attribute credit_type_id
1193
988
  #
@@ -1227,117 +1022,6 @@ module MetronomeSDK
1227
1022
  end
1228
1023
  end
1229
1024
 
1230
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddCredit#hierarchy_configuration
1231
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
1232
- # @!attribute child_access
1233
- #
1234
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
1235
- required :child_access,
1236
- union: -> {
1237
- MetronomeSDK::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess
1238
- }
1239
-
1240
- # @!method initialize(child_access:)
1241
- # Optional configuration for credit hierarchy access control
1242
- #
1243
- # @param child_access [MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
1244
-
1245
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration#child_access
1246
- module ChildAccess
1247
- extend MetronomeSDK::Internal::Type::Union
1248
-
1249
- variant -> {
1250
- MetronomeSDK::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll
1251
- }
1252
-
1253
- variant -> {
1254
- MetronomeSDK::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone
1255
- }
1256
-
1257
- variant -> {
1258
- MetronomeSDK::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
1259
- }
1260
-
1261
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
1262
- # @!attribute type
1263
- #
1264
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
1265
- required :type,
1266
- enum: -> {
1267
- MetronomeSDK::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type
1268
- }
1269
-
1270
- # @!method initialize(type:)
1271
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
1272
-
1273
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
1274
- module Type
1275
- extend MetronomeSDK::Internal::Type::Enum
1276
-
1277
- ALL = :ALL
1278
-
1279
- # @!method self.values
1280
- # @return [Array<Symbol>]
1281
- end
1282
- end
1283
-
1284
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
1285
- # @!attribute type
1286
- #
1287
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
1288
- required :type,
1289
- enum: -> {
1290
- MetronomeSDK::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type
1291
- }
1292
-
1293
- # @!method initialize(type:)
1294
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
1295
-
1296
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
1297
- module Type
1298
- extend MetronomeSDK::Internal::Type::Enum
1299
-
1300
- NONE = :NONE
1301
-
1302
- # @!method self.values
1303
- # @return [Array<Symbol>]
1304
- end
1305
- end
1306
-
1307
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
1308
- # @!attribute contract_ids
1309
- #
1310
- # @return [Array<String>]
1311
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1312
-
1313
- # @!attribute type
1314
- #
1315
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
1316
- required :type,
1317
- enum: -> {
1318
- MetronomeSDK::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type
1319
- }
1320
-
1321
- # @!method initialize(contract_ids:, type:)
1322
- # @param contract_ids [Array<String>]
1323
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
1324
-
1325
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
1326
- module Type
1327
- extend MetronomeSDK::Internal::Type::Enum
1328
-
1329
- CONTRACT_IDS = :CONTRACT_IDS
1330
-
1331
- # @!method self.values
1332
- # @return [Array<Symbol>]
1333
- end
1334
- end
1335
-
1336
- # @!method self.variants
1337
- # @return [Array(MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
1338
- end
1339
- end
1340
-
1341
1025
  # @see MetronomeSDK::Models::V2::ContractEditParams::AddCredit#rate_type
1342
1026
  module RateType
1343
1027
  extend MetronomeSDK::Internal::Type::Enum
@@ -1348,44 +1032,6 @@ module MetronomeSDK
1348
1032
  # @!method self.values
1349
1033
  # @return [Array<Symbol>]
1350
1034
  end
1351
-
1352
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
1353
- # @!attribute presentation_group_values
1354
- #
1355
- # @return [Hash{Symbol=>String}, nil]
1356
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1357
-
1358
- # @!attribute pricing_group_values
1359
- #
1360
- # @return [Hash{Symbol=>String}, nil]
1361
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1362
-
1363
- # @!attribute product_id
1364
- # If provided, the specifier will only apply to the product with the specified ID.
1365
- #
1366
- # @return [String, nil]
1367
- optional :product_id, String
1368
-
1369
- # @!attribute product_tags
1370
- # If provided, the specifier will only apply to products with all the specified
1371
- # tags.
1372
- #
1373
- # @return [Array<String>, nil]
1374
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1375
-
1376
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
1377
- # Some parameter documentations has been truncated, see
1378
- # {MetronomeSDK::Models::V2::ContractEditParams::AddCredit::Specifier} for more
1379
- # details.
1380
- #
1381
- # @param presentation_group_values [Hash{Symbol=>String}]
1382
- #
1383
- # @param pricing_group_values [Hash{Symbol=>String}]
1384
- #
1385
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
1386
- #
1387
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
1388
- end
1389
1035
  end
1390
1036
 
1391
1037
  class AddDiscount < MetronomeSDK::Internal::Type::BaseModel
@@ -1401,6 +1047,7 @@ module MetronomeSDK
1401
1047
  required :schedule, -> { MetronomeSDK::V2::ContractEditParams::AddDiscount::Schedule }
1402
1048
 
1403
1049
  # @!attribute custom_fields
1050
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1404
1051
  #
1405
1052
  # @return [Hash{Symbol=>String}, nil]
1406
1053
  optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
@@ -1422,7 +1069,7 @@ module MetronomeSDK
1422
1069
  #
1423
1070
  # @param schedule [MetronomeSDK::Models::V2::ContractEditParams::AddDiscount::Schedule] Must provide either schedule_items or recurring_schedule.
1424
1071
  #
1425
- # @param custom_fields [Hash{Symbol=>String}]
1072
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1426
1073
  #
1427
1074
  # @param name [String] displayed on invoices
1428
1075
  #
@@ -1457,9 +1104,7 @@ module MetronomeSDK
1457
1104
  #
1458
1105
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddDiscount::Schedule::ScheduleItem>, nil]
1459
1106
  optional :schedule_items,
1460
- -> {
1461
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddDiscount::Schedule::ScheduleItem]
1462
- }
1107
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddDiscount::Schedule::ScheduleItem] }
1463
1108
 
1464
1109
  # @!method initialize(credit_type_id: nil, do_not_invoice: nil, recurring_schedule: nil, schedule_items: nil)
1465
1110
  # Some parameter documentations has been truncated, see
@@ -1482,9 +1127,7 @@ module MetronomeSDK
1482
1127
  #
1483
1128
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddDiscount::Schedule::RecurringSchedule::AmountDistribution]
1484
1129
  required :amount_distribution,
1485
- enum: -> {
1486
- MetronomeSDK::V2::ContractEditParams::AddDiscount::Schedule::RecurringSchedule::AmountDistribution
1487
- }
1130
+ enum: -> { MetronomeSDK::V2::ContractEditParams::AddDiscount::Schedule::RecurringSchedule::AmountDistribution }
1488
1131
 
1489
1132
  # @!attribute ending_before
1490
1133
  # RFC 3339 timestamp (exclusive).
@@ -1496,9 +1139,7 @@ module MetronomeSDK
1496
1139
  #
1497
1140
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddDiscount::Schedule::RecurringSchedule::Frequency]
1498
1141
  required :frequency,
1499
- enum: -> {
1500
- MetronomeSDK::V2::ContractEditParams::AddDiscount::Schedule::RecurringSchedule::Frequency
1501
- }
1142
+ enum: -> { MetronomeSDK::V2::ContractEditParams::AddDiscount::Schedule::RecurringSchedule::Frequency }
1502
1143
 
1503
1144
  # @!attribute starting_at
1504
1145
  # RFC 3339 timestamp (inclusive).
@@ -1671,9 +1312,7 @@ module MetronomeSDK
1671
1312
  #
1672
1313
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddOverride::OverrideSpecifier>, nil]
1673
1314
  optional :override_specifiers,
1674
- -> {
1675
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddOverride::OverrideSpecifier]
1676
- }
1315
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddOverride::OverrideSpecifier] }
1677
1316
 
1678
1317
  # @!attribute overwrite_rate
1679
1318
  # Required for OVERWRITE type.
@@ -1709,9 +1348,7 @@ module MetronomeSDK
1709
1348
  #
1710
1349
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddOverride::Tier>, nil]
1711
1350
  optional :tiers,
1712
- -> {
1713
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddOverride::Tier]
1714
- }
1351
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddOverride::Tier] }
1715
1352
 
1716
1353
  # @!attribute type
1717
1354
  # Overwrites are prioritized over multipliers and tiered overrides.
@@ -1754,9 +1391,7 @@ module MetronomeSDK
1754
1391
  #
1755
1392
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddOverride::OverrideSpecifier::BillingFrequency, nil]
1756
1393
  optional :billing_frequency,
1757
- enum: -> {
1758
- MetronomeSDK::V2::ContractEditParams::AddOverride::OverrideSpecifier::BillingFrequency
1759
- }
1394
+ enum: -> { MetronomeSDK::V2::ContractEditParams::AddOverride::OverrideSpecifier::BillingFrequency }
1760
1395
 
1761
1396
  # @!attribute commit_ids
1762
1397
  # If provided, the override will only apply to the specified commits. Can only be
@@ -1975,477 +1610,136 @@ module MetronomeSDK
1975
1610
  end
1976
1611
  end
1977
1612
 
1978
- class AddPrepaidBalanceThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
1979
- # @!attribute commit
1613
+ class AddProfessionalService < MetronomeSDK::Internal::Type::BaseModel
1614
+ # @!attribute max_amount
1615
+ # Maximum amount for the term.
1980
1616
  #
1981
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::Commit]
1982
- required :commit,
1983
- -> {
1984
- MetronomeSDK::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::Commit
1985
- }
1617
+ # @return [Float]
1618
+ required :max_amount, Float
1986
1619
 
1987
- # @!attribute is_enabled
1988
- # When set to false, the contract will not be evaluated against the
1989
- # threshold_amount. Toggling to true will result an immediate evaluation,
1990
- # regardless of prior state.
1620
+ # @!attribute product_id
1991
1621
  #
1992
- # @return [Boolean]
1993
- required :is_enabled, MetronomeSDK::Internal::Type::Boolean
1622
+ # @return [String]
1623
+ required :product_id, String
1994
1624
 
1995
- # @!attribute payment_gate_config
1625
+ # @!attribute quantity
1626
+ # Quantity for the charge. Will be multiplied by unit_price to determine the
1627
+ # amount.
1996
1628
  #
1997
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig]
1998
- required :payment_gate_config,
1999
- -> {
2000
- MetronomeSDK::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig
2001
- }
1629
+ # @return [Float]
1630
+ required :quantity, Float
2002
1631
 
2003
- # @!attribute recharge_to_amount
2004
- # Specify the amount the balance should be recharged to.
1632
+ # @!attribute unit_price
1633
+ # Unit price for the charge. Will be multiplied by quantity to determine the
1634
+ # amount and must be specified.
2005
1635
  #
2006
1636
  # @return [Float]
2007
- required :recharge_to_amount, Float
1637
+ required :unit_price, Float
2008
1638
 
2009
- # @!attribute threshold_amount
2010
- # Specify the threshold amount for the contract. Each time the contract's balance
2011
- # lowers to this amount, a threshold charge will be initiated.
1639
+ # @!attribute custom_fields
1640
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2012
1641
  #
2013
- # @return [Float]
2014
- required :threshold_amount, Float
1642
+ # @return [Hash{Symbol=>String}, nil]
1643
+ optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
2015
1644
 
2016
- # @!attribute custom_credit_type_id
2017
- # If provided, the threshold, recharge-to amount, and the resulting threshold
2018
- # commit amount will be in terms of this credit type instead of the fiat currency.
1645
+ # @!attribute description
1646
+ #
1647
+ # @return [String, nil]
1648
+ optional :description, String
1649
+
1650
+ # @!attribute netsuite_sales_order_id
1651
+ # This field's availability is dependent on your client's configuration.
2019
1652
  #
2020
1653
  # @return [String, nil]
2021
- optional :custom_credit_type_id, String
1654
+ optional :netsuite_sales_order_id, String
2022
1655
 
2023
- # @!method initialize(commit:, is_enabled:, payment_gate_config:, recharge_to_amount:, threshold_amount:, custom_credit_type_id: nil)
1656
+ # @!method initialize(max_amount:, product_id:, quantity:, unit_price:, custom_fields: nil, description: nil, netsuite_sales_order_id: nil)
2024
1657
  # Some parameter documentations has been truncated, see
2025
- # {MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration}
2026
- # for more details.
1658
+ # {MetronomeSDK::Models::V2::ContractEditParams::AddProfessionalService} for more
1659
+ # details.
1660
+ #
1661
+ # @param max_amount [Float] Maximum amount for the term.
2027
1662
  #
2028
- # @param commit [MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::Commit]
1663
+ # @param product_id [String]
2029
1664
  #
2030
- # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
1665
+ # @param quantity [Float] Quantity for the charge. Will be multiplied by unit_price to determine the amoun
2031
1666
  #
2032
- # @param payment_gate_config [MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig]
1667
+ # @param unit_price [Float] Unit price for the charge. Will be multiplied by quantity to determine the amoun
2033
1668
  #
2034
- # @param recharge_to_amount [Float] Specify the amount the balance should be recharged to.
1669
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2035
1670
  #
2036
- # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's balance
1671
+ # @param description [String]
2037
1672
  #
2038
- # @param custom_credit_type_id [String] If provided, the threshold, recharge-to amount, and the resulting threshold comm
1673
+ # @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
1674
+ end
2039
1675
 
2040
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration#commit
2041
- class Commit < MetronomeSDK::Internal::Type::BaseModel
2042
- # @!attribute product_id
2043
- # The commit product that will be used to generate the line item for commit
2044
- # payment.
2045
- #
2046
- # @return [String]
2047
- required :product_id, String
1676
+ class AddRecurringCommit < MetronomeSDK::Internal::Type::BaseModel
1677
+ # @!attribute access_amount
1678
+ # The amount of commit to grant.
1679
+ #
1680
+ # @return [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::AccessAmount]
1681
+ required :access_amount, -> { MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::AccessAmount }
2048
1682
 
2049
- # @!attribute applicable_product_ids
2050
- # Which products the threshold commit applies to. If applicable_product_ids,
2051
- # applicable_product_tags or specifiers are not provided, the commit applies to
2052
- # all products.
2053
- #
2054
- # @return [Array<String>, nil]
2055
- optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1683
+ # @!attribute commit_duration
1684
+ # Defines the length of the access schedule for each created commit/credit. The
1685
+ # value represents the number of units. Unit defaults to "PERIODS", where the
1686
+ # length of a period is determined by the recurrence_frequency.
1687
+ #
1688
+ # @return [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::CommitDuration]
1689
+ required :commit_duration, -> { MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::CommitDuration }
2056
1690
 
2057
- # @!attribute applicable_product_tags
2058
- # Which tags the threshold commit applies to. If applicable_product_ids,
2059
- # applicable_product_tags or specifiers are not provided, the commit applies to
2060
- # all products.
2061
- #
2062
- # @return [Array<String>, nil]
2063
- optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1691
+ # @!attribute priority
1692
+ # Will be passed down to the individual commits
1693
+ #
1694
+ # @return [Float]
1695
+ required :priority, Float
2064
1696
 
2065
- # @!attribute description
2066
- #
2067
- # @return [String, nil]
2068
- optional :description, String
1697
+ # @!attribute product_id
1698
+ #
1699
+ # @return [String]
1700
+ required :product_id, String
2069
1701
 
2070
- # @!attribute name
2071
- # Specify the name of the line item for the threshold charge. If left blank, it
2072
- # will default to the commit product name.
2073
- #
2074
- # @return [String, nil]
2075
- optional :name, String
1702
+ # @!attribute starting_at
1703
+ # determines the start time for the first commit
1704
+ #
1705
+ # @return [Time]
1706
+ required :starting_at, Time
2076
1707
 
2077
- # @!attribute specifiers
2078
- # List of filters that determine what kind of customer usage draws down a commit
2079
- # or credit. A customer's usage needs to meet the condition of at least one of the
2080
- # specifiers to contribute to a commit's or credit's drawdown. This field cannot
2081
- # be used together with `applicable_product_ids` or `applicable_product_tags`.
2082
- # Instead, to target usage by product or product tag, pass those values in the
2083
- # body of `specifiers`.
2084
- #
2085
- # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::Commit::Specifier>, nil]
2086
- optional :specifiers,
2087
- -> {
2088
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::Commit::Specifier]
2089
- }
1708
+ # @!attribute applicable_product_ids
1709
+ # Will be passed down to the individual commits
1710
+ #
1711
+ # @return [Array<String>, nil]
1712
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
2090
1713
 
2091
- # @!method initialize(product_id:, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, name: nil, specifiers: nil)
2092
- # Some parameter documentations has been truncated, see
2093
- # {MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::Commit}
2094
- # for more details.
2095
- #
2096
- # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
2097
- #
2098
- # @param applicable_product_ids [Array<String>] Which products the threshold commit applies to. If applicable_product_ids, appli
2099
- #
2100
- # @param applicable_product_tags [Array<String>] Which tags the threshold commit applies to. If applicable_product_ids, applicabl
2101
- #
2102
- # @param description [String]
2103
- #
2104
- # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
2105
- #
2106
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::Commit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
1714
+ # @!attribute applicable_product_tags
1715
+ # Will be passed down to the individual commits
1716
+ #
1717
+ # @return [Array<String>, nil]
1718
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
2107
1719
 
2108
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
2109
- # @!attribute presentation_group_values
2110
- #
2111
- # @return [Hash{Symbol=>String}, nil]
2112
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1720
+ # @!attribute description
1721
+ # Will be passed down to the individual commits
1722
+ #
1723
+ # @return [String, nil]
1724
+ optional :description, String
2113
1725
 
2114
- # @!attribute pricing_group_values
2115
- #
2116
- # @return [Hash{Symbol=>String}, nil]
2117
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1726
+ # @!attribute ending_before
1727
+ # Determines when the contract will stop creating recurring commits. optional
1728
+ #
1729
+ # @return [Time, nil]
1730
+ optional :ending_before, Time
2118
1731
 
2119
- # @!attribute product_id
2120
- # If provided, the specifier will only apply to the product with the specified ID.
2121
- #
2122
- # @return [String, nil]
2123
- optional :product_id, String
2124
-
2125
- # @!attribute product_tags
2126
- # If provided, the specifier will only apply to products with all the specified
2127
- # tags.
2128
- #
2129
- # @return [Array<String>, nil]
2130
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
2131
-
2132
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
2133
- # Some parameter documentations has been truncated, see
2134
- # {MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::Commit::Specifier}
2135
- # for more details.
2136
- #
2137
- # @param presentation_group_values [Hash{Symbol=>String}]
2138
- #
2139
- # @param pricing_group_values [Hash{Symbol=>String}]
2140
- #
2141
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
2142
- #
2143
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
2144
- end
2145
- end
2146
-
2147
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration#payment_gate_config
2148
- class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
2149
- # @!attribute payment_gate_type
2150
- # Gate access to the commit balance based on successful collection of payment.
2151
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
2152
- # facilitate payment using your own payment integration. Select NONE if you do not
2153
- # wish to payment gate the commit balance.
2154
- #
2155
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType]
2156
- required :payment_gate_type,
2157
- enum: -> {
2158
- MetronomeSDK::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType
2159
- }
2160
-
2161
- # @!attribute precalculated_tax_config
2162
- # Only applicable if using PRECALCULATED as your tax type.
2163
- #
2164
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
2165
- optional :precalculated_tax_config,
2166
- -> {
2167
- MetronomeSDK::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig
2168
- }
2169
-
2170
- # @!attribute stripe_config
2171
- # Only applicable if using STRIPE as your payment gateway type.
2172
- #
2173
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
2174
- optional :stripe_config,
2175
- -> {
2176
- MetronomeSDK::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig
2177
- }
2178
-
2179
- # @!attribute tax_type
2180
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
2181
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
2182
- # will default to NONE.
2183
- #
2184
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType, nil]
2185
- optional :tax_type,
2186
- enum: -> {
2187
- MetronomeSDK::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType
2188
- }
2189
-
2190
- # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
2191
- # Some parameter documentations has been truncated, see
2192
- # {MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig}
2193
- # for more details.
2194
- #
2195
- # @param payment_gate_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
2196
- #
2197
- # @param precalculated_tax_config [MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
2198
- #
2199
- # @param stripe_config [MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gateway type.
2200
- #
2201
- # @param tax_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
2202
-
2203
- # Gate access to the commit balance based on successful collection of payment.
2204
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
2205
- # facilitate payment using your own payment integration. Select NONE if you do not
2206
- # wish to payment gate the commit balance.
2207
- #
2208
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig#payment_gate_type
2209
- module PaymentGateType
2210
- extend MetronomeSDK::Internal::Type::Enum
2211
-
2212
- NONE = :NONE
2213
- STRIPE = :STRIPE
2214
- EXTERNAL = :EXTERNAL
2215
-
2216
- # @!method self.values
2217
- # @return [Array<Symbol>]
2218
- end
2219
-
2220
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
2221
- class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
2222
- # @!attribute tax_amount
2223
- # Amount of tax to be applied. This should be in the same currency and
2224
- # denomination as the commit's invoice schedule
2225
- #
2226
- # @return [Float]
2227
- required :tax_amount, Float
2228
-
2229
- # @!attribute tax_name
2230
- # Name of the tax to be applied. This may be used in an invoice line item
2231
- # description.
2232
- #
2233
- # @return [String, nil]
2234
- optional :tax_name, String
2235
-
2236
- # @!method initialize(tax_amount:, tax_name: nil)
2237
- # Some parameter documentations has been truncated, see
2238
- # {MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
2239
- # for more details.
2240
- #
2241
- # Only applicable if using PRECALCULATED as your tax type.
2242
- #
2243
- # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
2244
- #
2245
- # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
2246
- end
2247
-
2248
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig#stripe_config
2249
- class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
2250
- # @!attribute payment_type
2251
- # If left blank, will default to INVOICE
2252
- #
2253
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
2254
- required :payment_type,
2255
- enum: -> {
2256
- MetronomeSDK::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType
2257
- }
2258
-
2259
- # @!attribute invoice_metadata
2260
- # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
2261
- # your payment type.
2262
- #
2263
- # @return [Hash{Symbol=>String}, nil]
2264
- optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
2265
-
2266
- # @!method initialize(payment_type:, invoice_metadata: nil)
2267
- # Some parameter documentations has been truncated, see
2268
- # {MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig}
2269
- # for more details.
2270
- #
2271
- # Only applicable if using STRIPE as your payment gateway type.
2272
- #
2273
- # @param payment_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
2274
- #
2275
- # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
2276
-
2277
- # If left blank, will default to INVOICE
2278
- #
2279
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
2280
- module PaymentType
2281
- extend MetronomeSDK::Internal::Type::Enum
2282
-
2283
- INVOICE = :INVOICE
2284
- PAYMENT_INTENT = :PAYMENT_INTENT
2285
-
2286
- # @!method self.values
2287
- # @return [Array<Symbol>]
2288
- end
2289
- end
2290
-
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
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig#tax_type
2296
- module TaxType
2297
- extend MetronomeSDK::Internal::Type::Enum
2298
-
2299
- NONE = :NONE
2300
- STRIPE = :STRIPE
2301
- ANROK = :ANROK
2302
- PRECALCULATED = :PRECALCULATED
2303
-
2304
- # @!method self.values
2305
- # @return [Array<Symbol>]
2306
- end
2307
- end
2308
- end
2309
-
2310
- class AddProfessionalService < MetronomeSDK::Internal::Type::BaseModel
2311
- # @!attribute max_amount
2312
- # Maximum amount for the term.
2313
- #
2314
- # @return [Float]
2315
- required :max_amount, Float
2316
-
2317
- # @!attribute product_id
2318
- #
2319
- # @return [String]
2320
- required :product_id, String
2321
-
2322
- # @!attribute quantity
2323
- # Quantity for the charge. Will be multiplied by unit_price to determine the
2324
- # amount.
2325
- #
2326
- # @return [Float]
2327
- required :quantity, Float
2328
-
2329
- # @!attribute unit_price
2330
- # Unit price for the charge. Will be multiplied by quantity to determine the
2331
- # amount and must be specified.
2332
- #
2333
- # @return [Float]
2334
- required :unit_price, Float
2335
-
2336
- # @!attribute custom_fields
2337
- #
2338
- # @return [Hash{Symbol=>String}, nil]
2339
- optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
2340
-
2341
- # @!attribute description
2342
- #
2343
- # @return [String, nil]
2344
- optional :description, String
2345
-
2346
- # @!attribute netsuite_sales_order_id
2347
- # This field's availability is dependent on your client's configuration.
2348
- #
2349
- # @return [String, nil]
2350
- optional :netsuite_sales_order_id, String
2351
-
2352
- # @!method initialize(max_amount:, product_id:, quantity:, unit_price:, custom_fields: nil, description: nil, netsuite_sales_order_id: nil)
2353
- # Some parameter documentations has been truncated, see
2354
- # {MetronomeSDK::Models::V2::ContractEditParams::AddProfessionalService} for more
2355
- # details.
2356
- #
2357
- # @param max_amount [Float] Maximum amount for the term.
2358
- #
2359
- # @param product_id [String]
2360
- #
2361
- # @param quantity [Float] Quantity for the charge. Will be multiplied by unit_price to determine the amoun
2362
- #
2363
- # @param unit_price [Float] Unit price for the charge. Will be multiplied by quantity to determine the amoun
2364
- #
2365
- # @param custom_fields [Hash{Symbol=>String}]
2366
- #
2367
- # @param description [String]
2368
- #
2369
- # @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
2370
- end
2371
-
2372
- class AddRecurringCommit < MetronomeSDK::Internal::Type::BaseModel
2373
- # @!attribute access_amount
2374
- # The amount of commit to grant.
2375
- #
2376
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::AccessAmount]
2377
- required :access_amount,
2378
- -> {
2379
- MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::AccessAmount
2380
- }
2381
-
2382
- # @!attribute commit_duration
2383
- # Defines the length of the access schedule for each created commit/credit. The
2384
- # value represents the number of units. Unit defaults to "PERIODS", where the
2385
- # length of a period is determined by the recurrence_frequency.
2386
- #
2387
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::CommitDuration]
2388
- required :commit_duration,
2389
- -> {
2390
- MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::CommitDuration
2391
- }
2392
-
2393
- # @!attribute priority
2394
- # Will be passed down to the individual commits
2395
- #
2396
- # @return [Float]
2397
- required :priority, Float
2398
-
2399
- # @!attribute product_id
2400
- #
2401
- # @return [String]
2402
- required :product_id, String
2403
-
2404
- # @!attribute starting_at
2405
- # determines the start time for the first commit
2406
- #
2407
- # @return [Time]
2408
- required :starting_at, Time
2409
-
2410
- # @!attribute applicable_product_ids
2411
- # Will be passed down to the individual commits
2412
- #
2413
- # @return [Array<String>, nil]
2414
- optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
2415
-
2416
- # @!attribute applicable_product_tags
2417
- # Will be passed down to the individual commits
2418
- #
2419
- # @return [Array<String>, nil]
2420
- optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
2421
-
2422
- # @!attribute description
2423
- # Will be passed down to the individual commits
2424
- #
2425
- # @return [String, nil]
2426
- optional :description, String
2427
-
2428
- # @!attribute ending_before
2429
- # Determines when the contract will stop creating recurring commits. optional
2430
- #
2431
- # @return [Time, nil]
2432
- optional :ending_before, Time
2433
-
2434
- # @!attribute hierarchy_configuration
2435
- # Optional configuration for recurring credit hierarchy access control
2436
- #
2437
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration, nil]
2438
- optional :hierarchy_configuration,
2439
- -> { MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration }
1732
+ # @!attribute hierarchy_configuration
1733
+ # Optional configuration for recurring credit hierarchy access control
1734
+ #
1735
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
1736
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
2440
1737
 
2441
1738
  # @!attribute invoice_amount
2442
1739
  # The amount the customer should be billed for the commit. Not required.
2443
1740
  #
2444
1741
  # @return [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::InvoiceAmount, nil]
2445
- optional :invoice_amount,
2446
- -> {
2447
- MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::InvoiceAmount
2448
- }
1742
+ optional :invoice_amount, -> { MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::InvoiceAmount }
2449
1743
 
2450
1744
  # @!attribute name
2451
1745
  # displayed on invoices. will be passed through to the individual commits
@@ -2464,10 +1758,7 @@ module MetronomeSDK
2464
1758
  # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
2465
1759
  #
2466
1760
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::Proration, nil]
2467
- optional :proration,
2468
- enum: -> {
2469
- MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::Proration
2470
- }
1761
+ optional :proration, enum: -> { MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::Proration }
2471
1762
 
2472
1763
  # @!attribute rate_type
2473
1764
  # Whether the created commits will use the commit rate or list rate
@@ -2502,11 +1793,8 @@ module MetronomeSDK
2502
1793
  # Instead, to target usage by product or product tag, pass those values in the
2503
1794
  # body of `specifiers`.
2504
1795
  #
2505
- # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::Specifier>, nil]
2506
- optional :specifiers,
2507
- -> {
2508
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::Specifier]
2509
- }
1796
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
1797
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
2510
1798
 
2511
1799
  # @!attribute subscription_config
2512
1800
  # Attach a subscription to the recurring commit/credit.
@@ -2545,7 +1833,7 @@ module MetronomeSDK
2545
1833
  #
2546
1834
  # @param ending_before [Time] Determines when the contract will stop creating recurring commits. optional
2547
1835
  #
2548
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
1836
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
2549
1837
  #
2550
1838
  # @param invoice_amount [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::InvoiceAmount] The amount the customer should be billed for the commit. Not required.
2551
1839
  #
@@ -2561,7 +1849,7 @@ module MetronomeSDK
2561
1849
  #
2562
1850
  # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
2563
1851
  #
2564
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
1852
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
2565
1853
  #
2566
1854
  # @param subscription_config [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig] Attach a subscription to the recurring commit/credit.
2567
1855
  #
@@ -2611,9 +1899,7 @@ module MetronomeSDK
2611
1899
  #
2612
1900
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::CommitDuration::Unit, nil]
2613
1901
  optional :unit,
2614
- enum: -> {
2615
- MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::CommitDuration::Unit
2616
- }
1902
+ enum: -> { MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::CommitDuration::Unit }
2617
1903
 
2618
1904
  # @!method initialize(value:, unit: nil)
2619
1905
  # Defines the length of the access schedule for each created commit/credit. The
@@ -2634,117 +1920,6 @@ module MetronomeSDK
2634
1920
  end
2635
1921
  end
2636
1922
 
2637
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit#hierarchy_configuration
2638
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
2639
- # @!attribute child_access
2640
- #
2641
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
2642
- required :child_access,
2643
- union: -> {
2644
- MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess
2645
- }
2646
-
2647
- # @!method initialize(child_access:)
2648
- # Optional configuration for recurring credit hierarchy access control
2649
- #
2650
- # @param child_access [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
2651
-
2652
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration#child_access
2653
- module ChildAccess
2654
- extend MetronomeSDK::Internal::Type::Union
2655
-
2656
- variant -> {
2657
- MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll
2658
- }
2659
-
2660
- variant -> {
2661
- MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone
2662
- }
2663
-
2664
- variant -> {
2665
- MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
2666
- }
2667
-
2668
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
2669
- # @!attribute type
2670
- #
2671
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
2672
- required :type,
2673
- enum: -> {
2674
- MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type
2675
- }
2676
-
2677
- # @!method initialize(type:)
2678
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
2679
-
2680
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
2681
- module Type
2682
- extend MetronomeSDK::Internal::Type::Enum
2683
-
2684
- ALL = :ALL
2685
-
2686
- # @!method self.values
2687
- # @return [Array<Symbol>]
2688
- end
2689
- end
2690
-
2691
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
2692
- # @!attribute type
2693
- #
2694
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
2695
- required :type,
2696
- enum: -> {
2697
- MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type
2698
- }
2699
-
2700
- # @!method initialize(type:)
2701
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
2702
-
2703
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
2704
- module Type
2705
- extend MetronomeSDK::Internal::Type::Enum
2706
-
2707
- NONE = :NONE
2708
-
2709
- # @!method self.values
2710
- # @return [Array<Symbol>]
2711
- end
2712
- end
2713
-
2714
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
2715
- # @!attribute contract_ids
2716
- #
2717
- # @return [Array<String>]
2718
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
2719
-
2720
- # @!attribute type
2721
- #
2722
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
2723
- required :type,
2724
- enum: -> {
2725
- MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type
2726
- }
2727
-
2728
- # @!method initialize(contract_ids:, type:)
2729
- # @param contract_ids [Array<String>]
2730
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
2731
-
2732
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
2733
- module Type
2734
- extend MetronomeSDK::Internal::Type::Enum
2735
-
2736
- CONTRACT_IDS = :CONTRACT_IDS
2737
-
2738
- # @!method self.values
2739
- # @return [Array<Symbol>]
2740
- end
2741
- end
2742
-
2743
- # @!method self.variants
2744
- # @return [Array(MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
2745
- end
2746
- end
2747
-
2748
1923
  # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit#invoice_amount
2749
1924
  class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
2750
1925
  # @!attribute credit_type_id
@@ -2818,53 +1993,13 @@ module MetronomeSDK
2818
1993
  # @return [Array<Symbol>]
2819
1994
  end
2820
1995
 
2821
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
2822
- # @!attribute presentation_group_values
2823
- #
2824
- # @return [Hash{Symbol=>String}, nil]
2825
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
2826
-
2827
- # @!attribute pricing_group_values
2828
- #
2829
- # @return [Hash{Symbol=>String}, nil]
2830
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
2831
-
2832
- # @!attribute product_id
2833
- # If provided, the specifier will only apply to the product with the specified ID.
2834
- #
2835
- # @return [String, nil]
2836
- optional :product_id, String
2837
-
2838
- # @!attribute product_tags
2839
- # If provided, the specifier will only apply to products with all the specified
2840
- # tags.
2841
- #
2842
- # @return [Array<String>, nil]
2843
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
2844
-
2845
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
2846
- # Some parameter documentations has been truncated, see
2847
- # {MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::Specifier}
2848
- # for more details.
2849
- #
2850
- # @param presentation_group_values [Hash{Symbol=>String}]
2851
- #
2852
- # @param pricing_group_values [Hash{Symbol=>String}]
2853
- #
2854
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
2855
- #
2856
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
2857
- end
2858
-
2859
1996
  # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit#subscription_config
2860
1997
  class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
2861
1998
  # @!attribute apply_seat_increase_config
2862
1999
  #
2863
2000
  # @return [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig]
2864
2001
  required :apply_seat_increase_config,
2865
- -> {
2866
- MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig
2867
- }
2002
+ -> { MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig }
2868
2003
 
2869
2004
  # @!attribute subscription_id
2870
2005
  # ID of the subscription to configure on the recurring commit/credit.
@@ -2877,9 +2012,7 @@ module MetronomeSDK
2877
2012
  #
2878
2013
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation, nil]
2879
2014
  optional :allocation,
2880
- enum: -> {
2881
- MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation
2882
- }
2015
+ enum: -> { MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation }
2883
2016
 
2884
2017
  # @!method initialize(apply_seat_increase_config:, subscription_id:, allocation: nil)
2885
2018
  # Attach a subscription to the recurring commit/credit.
@@ -2909,6 +2042,7 @@ module MetronomeSDK
2909
2042
  extend MetronomeSDK::Internal::Type::Enum
2910
2043
 
2911
2044
  POOLED = :POOLED
2045
+ INDIVIDUAL = :INDIVIDUAL
2912
2046
 
2913
2047
  # @!method self.values
2914
2048
  # @return [Array<Symbol>]
@@ -2921,10 +2055,7 @@ module MetronomeSDK
2921
2055
  # The amount of commit to grant.
2922
2056
  #
2923
2057
  # @return [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::AccessAmount]
2924
- required :access_amount,
2925
- -> {
2926
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::AccessAmount
2927
- }
2058
+ required :access_amount, -> { MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::AccessAmount }
2928
2059
 
2929
2060
  # @!attribute commit_duration
2930
2061
  # Defines the length of the access schedule for each created commit/credit. The
@@ -2932,10 +2063,7 @@ module MetronomeSDK
2932
2063
  # length of a period is determined by the recurrence_frequency.
2933
2064
  #
2934
2065
  # @return [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::CommitDuration]
2935
- required :commit_duration,
2936
- -> {
2937
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::CommitDuration
2938
- }
2066
+ required :commit_duration, -> { MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::CommitDuration }
2939
2067
 
2940
2068
  # @!attribute priority
2941
2069
  # Will be passed down to the individual commits
@@ -2981,9 +2109,8 @@ module MetronomeSDK
2981
2109
  # @!attribute hierarchy_configuration
2982
2110
  # Optional configuration for recurring credit hierarchy access control
2983
2111
  #
2984
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration, nil]
2985
- optional :hierarchy_configuration,
2986
- -> { MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration }
2112
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
2113
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
2987
2114
 
2988
2115
  # @!attribute name
2989
2116
  # displayed on invoices. will be passed through to the individual commits
@@ -3002,10 +2129,7 @@ module MetronomeSDK
3002
2129
  # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
3003
2130
  #
3004
2131
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::Proration, nil]
3005
- optional :proration,
3006
- enum: -> {
3007
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::Proration
3008
- }
2132
+ optional :proration, enum: -> { MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::Proration }
3009
2133
 
3010
2134
  # @!attribute rate_type
3011
2135
  # Whether the created commits will use the commit rate or list rate
@@ -3040,11 +2164,8 @@ module MetronomeSDK
3040
2164
  # Instead, to target usage by product or product tag, pass those values in the
3041
2165
  # body of `specifiers`.
3042
2166
  #
3043
- # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::Specifier>, nil]
3044
- optional :specifiers,
3045
- -> {
3046
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::Specifier]
3047
- }
2167
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
2168
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
3048
2169
 
3049
2170
  # @!attribute subscription_config
3050
2171
  # Attach a subscription to the recurring commit/credit.
@@ -3083,7 +2204,7 @@ module MetronomeSDK
3083
2204
  #
3084
2205
  # @param ending_before [Time] Determines when the contract will stop creating recurring commits. optional
3085
2206
  #
3086
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
2207
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
3087
2208
  #
3088
2209
  # @param name [String] displayed on invoices. will be passed through to the individual commits
3089
2210
  #
@@ -3097,7 +2218,7 @@ module MetronomeSDK
3097
2218
  #
3098
2219
  # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
3099
2220
  #
3100
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
2221
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
3101
2222
  #
3102
2223
  # @param subscription_config [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig] Attach a subscription to the recurring commit/credit.
3103
2224
  #
@@ -3147,9 +2268,7 @@ module MetronomeSDK
3147
2268
  #
3148
2269
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::CommitDuration::Unit, nil]
3149
2270
  optional :unit,
3150
- enum: -> {
3151
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::CommitDuration::Unit
3152
- }
2271
+ enum: -> { MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::CommitDuration::Unit }
3153
2272
 
3154
2273
  # @!method initialize(value:, unit: nil)
3155
2274
  # Defines the length of the access schedule for each created commit/credit. The
@@ -3170,117 +2289,6 @@ module MetronomeSDK
3170
2289
  end
3171
2290
  end
3172
2291
 
3173
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit#hierarchy_configuration
3174
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
3175
- # @!attribute child_access
3176
- #
3177
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
3178
- required :child_access,
3179
- union: -> {
3180
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess
3181
- }
3182
-
3183
- # @!method initialize(child_access:)
3184
- # Optional configuration for recurring credit hierarchy access control
3185
- #
3186
- # @param child_access [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
3187
-
3188
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration#child_access
3189
- module ChildAccess
3190
- extend MetronomeSDK::Internal::Type::Union
3191
-
3192
- variant -> {
3193
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll
3194
- }
3195
-
3196
- variant -> {
3197
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone
3198
- }
3199
-
3200
- variant -> {
3201
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
3202
- }
3203
-
3204
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
3205
- # @!attribute type
3206
- #
3207
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
3208
- required :type,
3209
- enum: -> {
3210
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type
3211
- }
3212
-
3213
- # @!method initialize(type:)
3214
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
3215
-
3216
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
3217
- module Type
3218
- extend MetronomeSDK::Internal::Type::Enum
3219
-
3220
- ALL = :ALL
3221
-
3222
- # @!method self.values
3223
- # @return [Array<Symbol>]
3224
- end
3225
- end
3226
-
3227
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
3228
- # @!attribute type
3229
- #
3230
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
3231
- required :type,
3232
- enum: -> {
3233
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type
3234
- }
3235
-
3236
- # @!method initialize(type:)
3237
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
3238
-
3239
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
3240
- module Type
3241
- extend MetronomeSDK::Internal::Type::Enum
3242
-
3243
- NONE = :NONE
3244
-
3245
- # @!method self.values
3246
- # @return [Array<Symbol>]
3247
- end
3248
- end
3249
-
3250
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
3251
- # @!attribute contract_ids
3252
- #
3253
- # @return [Array<String>]
3254
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
3255
-
3256
- # @!attribute type
3257
- #
3258
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
3259
- required :type,
3260
- enum: -> {
3261
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type
3262
- }
3263
-
3264
- # @!method initialize(contract_ids:, type:)
3265
- # @param contract_ids [Array<String>]
3266
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
3267
-
3268
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
3269
- module Type
3270
- extend MetronomeSDK::Internal::Type::Enum
3271
-
3272
- CONTRACT_IDS = :CONTRACT_IDS
3273
-
3274
- # @!method self.values
3275
- # @return [Array<Symbol>]
3276
- end
3277
- end
3278
-
3279
- # @!method self.variants
3280
- # @return [Array(MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
3281
- end
3282
- end
3283
-
3284
2292
  # Determines whether the first and last commit will be prorated. If not provided,
3285
2293
  # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
3286
2294
  #
@@ -3320,51 +2328,13 @@ module MetronomeSDK
3320
2328
  module RecurrenceFrequency
3321
2329
  extend MetronomeSDK::Internal::Type::Enum
3322
2330
 
3323
- MONTHLY = :MONTHLY
3324
- QUARTERLY = :QUARTERLY
3325
- ANNUAL = :ANNUAL
3326
- WEEKLY = :WEEKLY
3327
-
3328
- # @!method self.values
3329
- # @return [Array<Symbol>]
3330
- end
3331
-
3332
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
3333
- # @!attribute presentation_group_values
3334
- #
3335
- # @return [Hash{Symbol=>String}, nil]
3336
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
3337
-
3338
- # @!attribute pricing_group_values
3339
- #
3340
- # @return [Hash{Symbol=>String}, nil]
3341
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
3342
-
3343
- # @!attribute product_id
3344
- # If provided, the specifier will only apply to the product with the specified ID.
3345
- #
3346
- # @return [String, nil]
3347
- optional :product_id, String
3348
-
3349
- # @!attribute product_tags
3350
- # If provided, the specifier will only apply to products with all the specified
3351
- # tags.
3352
- #
3353
- # @return [Array<String>, nil]
3354
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
3355
-
3356
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
3357
- # Some parameter documentations has been truncated, see
3358
- # {MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::Specifier}
3359
- # for more details.
3360
- #
3361
- # @param presentation_group_values [Hash{Symbol=>String}]
3362
- #
3363
- # @param pricing_group_values [Hash{Symbol=>String}]
3364
- #
3365
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
3366
- #
3367
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
2331
+ MONTHLY = :MONTHLY
2332
+ QUARTERLY = :QUARTERLY
2333
+ ANNUAL = :ANNUAL
2334
+ WEEKLY = :WEEKLY
2335
+
2336
+ # @!method self.values
2337
+ # @return [Array<Symbol>]
3368
2338
  end
3369
2339
 
3370
2340
  # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit#subscription_config
@@ -3373,9 +2343,7 @@ module MetronomeSDK
3373
2343
  #
3374
2344
  # @return [MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig]
3375
2345
  required :apply_seat_increase_config,
3376
- -> {
3377
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig
3378
- }
2346
+ -> { MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig }
3379
2347
 
3380
2348
  # @!attribute subscription_id
3381
2349
  # ID of the subscription to configure on the recurring commit/credit.
@@ -3388,9 +2356,7 @@ module MetronomeSDK
3388
2356
  #
3389
2357
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation, nil]
3390
2358
  optional :allocation,
3391
- enum: -> {
3392
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation
3393
- }
2359
+ enum: -> { MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation }
3394
2360
 
3395
2361
  # @!method initialize(apply_seat_increase_config:, subscription_id:, allocation: nil)
3396
2362
  # Attach a subscription to the recurring commit/credit.
@@ -3420,6 +2386,7 @@ module MetronomeSDK
3420
2386
  extend MetronomeSDK::Internal::Type::Enum
3421
2387
 
3422
2388
  POOLED = :POOLED
2389
+ INDIVIDUAL = :INDIVIDUAL
3423
2390
 
3424
2391
  # @!method self.values
3425
2392
  # @return [Array<Symbol>]
@@ -3570,6 +2537,7 @@ module MetronomeSDK
3570
2537
  required :schedule, -> { MetronomeSDK::V2::ContractEditParams::AddScheduledCharge::Schedule }
3571
2538
 
3572
2539
  # @!attribute custom_fields
2540
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
3573
2541
  #
3574
2542
  # @return [Hash{Symbol=>String}, nil]
3575
2543
  optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
@@ -3591,7 +2559,7 @@ module MetronomeSDK
3591
2559
  #
3592
2560
  # @param schedule [MetronomeSDK::Models::V2::ContractEditParams::AddScheduledCharge::Schedule] Must provide either schedule_items or recurring_schedule.
3593
2561
  #
3594
- # @param custom_fields [Hash{Symbol=>String}]
2562
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
3595
2563
  #
3596
2564
  # @param name [String] displayed on invoices
3597
2565
  #
@@ -3619,18 +2587,14 @@ module MetronomeSDK
3619
2587
  #
3620
2588
  # @return [MetronomeSDK::Models::V2::ContractEditParams::AddScheduledCharge::Schedule::RecurringSchedule, nil]
3621
2589
  optional :recurring_schedule,
3622
- -> {
3623
- MetronomeSDK::V2::ContractEditParams::AddScheduledCharge::Schedule::RecurringSchedule
3624
- }
2590
+ -> { MetronomeSDK::V2::ContractEditParams::AddScheduledCharge::Schedule::RecurringSchedule }
3625
2591
 
3626
2592
  # @!attribute schedule_items
3627
2593
  # Either provide amount or provide both unit_price and quantity.
3628
2594
  #
3629
2595
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddScheduledCharge::Schedule::ScheduleItem>, nil]
3630
2596
  optional :schedule_items,
3631
- -> {
3632
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddScheduledCharge::Schedule::ScheduleItem]
3633
- }
2597
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddScheduledCharge::Schedule::ScheduleItem] }
3634
2598
 
3635
2599
  # @!method initialize(credit_type_id: nil, do_not_invoice: nil, recurring_schedule: nil, schedule_items: nil)
3636
2600
  # Some parameter documentations has been truncated, see
@@ -3653,9 +2617,7 @@ module MetronomeSDK
3653
2617
  #
3654
2618
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddScheduledCharge::Schedule::RecurringSchedule::AmountDistribution]
3655
2619
  required :amount_distribution,
3656
- enum: -> {
3657
- MetronomeSDK::V2::ContractEditParams::AddScheduledCharge::Schedule::RecurringSchedule::AmountDistribution
3658
- }
2620
+ enum: -> { MetronomeSDK::V2::ContractEditParams::AddScheduledCharge::Schedule::RecurringSchedule::AmountDistribution }
3659
2621
 
3660
2622
  # @!attribute ending_before
3661
2623
  # RFC 3339 timestamp (exclusive).
@@ -3667,9 +2629,7 @@ module MetronomeSDK
3667
2629
  #
3668
2630
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddScheduledCharge::Schedule::RecurringSchedule::Frequency]
3669
2631
  required :frequency,
3670
- enum: -> {
3671
- MetronomeSDK::V2::ContractEditParams::AddScheduledCharge::Schedule::RecurringSchedule::Frequency
3672
- }
2632
+ enum: -> { MetronomeSDK::V2::ContractEditParams::AddScheduledCharge::Schedule::RecurringSchedule::Frequency }
3673
2633
 
3674
2634
  # @!attribute starting_at
3675
2635
  # RFC 3339 timestamp (inclusive).
@@ -3798,247 +2758,6 @@ module MetronomeSDK
3798
2758
  end
3799
2759
  end
3800
2760
 
3801
- class AddSpendThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
3802
- # @!attribute commit
3803
- #
3804
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::Commit]
3805
- required :commit,
3806
- -> {
3807
- MetronomeSDK::V2::ContractEditParams::AddSpendThresholdConfiguration::Commit
3808
- }
3809
-
3810
- # @!attribute is_enabled
3811
- # When set to false, the contract will not be evaluated against the
3812
- # threshold_amount. Toggling to true will result an immediate evaluation,
3813
- # regardless of prior state.
3814
- #
3815
- # @return [Boolean]
3816
- required :is_enabled, MetronomeSDK::Internal::Type::Boolean
3817
-
3818
- # @!attribute payment_gate_config
3819
- #
3820
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig]
3821
- required :payment_gate_config,
3822
- -> {
3823
- MetronomeSDK::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig
3824
- }
3825
-
3826
- # @!attribute threshold_amount
3827
- # Specify the threshold amount for the contract. Each time the contract's usage
3828
- # hits this amount, a threshold charge will be initiated.
3829
- #
3830
- # @return [Float]
3831
- required :threshold_amount, Float
3832
-
3833
- # @!method initialize(commit:, is_enabled:, payment_gate_config:, threshold_amount:)
3834
- # Some parameter documentations has been truncated, see
3835
- # {MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration}
3836
- # for more details.
3837
- #
3838
- # @param commit [MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::Commit]
3839
- #
3840
- # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
3841
- #
3842
- # @param payment_gate_config [MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig]
3843
- #
3844
- # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's usage hi
3845
-
3846
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration#commit
3847
- class Commit < MetronomeSDK::Internal::Type::BaseModel
3848
- # @!attribute product_id
3849
- # The commit product that will be used to generate the line item for commit
3850
- # payment.
3851
- #
3852
- # @return [String]
3853
- required :product_id, String
3854
-
3855
- # @!attribute description
3856
- #
3857
- # @return [String, nil]
3858
- optional :description, String
3859
-
3860
- # @!attribute name
3861
- # Specify the name of the line item for the threshold charge. If left blank, it
3862
- # will default to the commit product name.
3863
- #
3864
- # @return [String, nil]
3865
- optional :name, String
3866
-
3867
- # @!method initialize(product_id:, description: nil, name: nil)
3868
- # Some parameter documentations has been truncated, see
3869
- # {MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::Commit}
3870
- # for more details.
3871
- #
3872
- # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
3873
- #
3874
- # @param description [String]
3875
- #
3876
- # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
3877
- end
3878
-
3879
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration#payment_gate_config
3880
- class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
3881
- # @!attribute payment_gate_type
3882
- # Gate access to the commit balance based on successful collection of payment.
3883
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
3884
- # facilitate payment using your own payment integration. Select NONE if you do not
3885
- # wish to payment gate the commit balance.
3886
- #
3887
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::PaymentGateType]
3888
- required :payment_gate_type,
3889
- enum: -> {
3890
- MetronomeSDK::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::PaymentGateType
3891
- }
3892
-
3893
- # @!attribute precalculated_tax_config
3894
- # Only applicable if using PRECALCULATED as your tax type.
3895
- #
3896
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
3897
- optional :precalculated_tax_config,
3898
- -> {
3899
- MetronomeSDK::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig
3900
- }
3901
-
3902
- # @!attribute stripe_config
3903
- # Only applicable if using STRIPE as your payment gateway type.
3904
- #
3905
- # @return [MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
3906
- optional :stripe_config,
3907
- -> {
3908
- MetronomeSDK::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig
3909
- }
3910
-
3911
- # @!attribute tax_type
3912
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
3913
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
3914
- # will default to NONE.
3915
- #
3916
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::TaxType, nil]
3917
- optional :tax_type,
3918
- enum: -> {
3919
- MetronomeSDK::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::TaxType
3920
- }
3921
-
3922
- # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
3923
- # Some parameter documentations has been truncated, see
3924
- # {MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig}
3925
- # for more details.
3926
- #
3927
- # @param payment_gate_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
3928
- #
3929
- # @param precalculated_tax_config [MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
3930
- #
3931
- # @param stripe_config [MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gateway type.
3932
- #
3933
- # @param tax_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
3934
-
3935
- # Gate access to the commit balance based on successful collection of payment.
3936
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
3937
- # facilitate payment using your own payment integration. Select NONE if you do not
3938
- # wish to payment gate the commit balance.
3939
- #
3940
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig#payment_gate_type
3941
- module PaymentGateType
3942
- extend MetronomeSDK::Internal::Type::Enum
3943
-
3944
- NONE = :NONE
3945
- STRIPE = :STRIPE
3946
- EXTERNAL = :EXTERNAL
3947
-
3948
- # @!method self.values
3949
- # @return [Array<Symbol>]
3950
- end
3951
-
3952
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
3953
- class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
3954
- # @!attribute tax_amount
3955
- # Amount of tax to be applied. This should be in the same currency and
3956
- # denomination as the commit's invoice schedule
3957
- #
3958
- # @return [Float]
3959
- required :tax_amount, Float
3960
-
3961
- # @!attribute tax_name
3962
- # Name of the tax to be applied. This may be used in an invoice line item
3963
- # description.
3964
- #
3965
- # @return [String, nil]
3966
- optional :tax_name, String
3967
-
3968
- # @!method initialize(tax_amount:, tax_name: nil)
3969
- # Some parameter documentations has been truncated, see
3970
- # {MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
3971
- # for more details.
3972
- #
3973
- # Only applicable if using PRECALCULATED as your tax type.
3974
- #
3975
- # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
3976
- #
3977
- # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
3978
- end
3979
-
3980
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig#stripe_config
3981
- class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
3982
- # @!attribute payment_type
3983
- # If left blank, will default to INVOICE
3984
- #
3985
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
3986
- required :payment_type,
3987
- enum: -> {
3988
- MetronomeSDK::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType
3989
- }
3990
-
3991
- # @!attribute invoice_metadata
3992
- # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
3993
- # your payment type.
3994
- #
3995
- # @return [Hash{Symbol=>String}, nil]
3996
- optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
3997
-
3998
- # @!method initialize(payment_type:, invoice_metadata: nil)
3999
- # Some parameter documentations has been truncated, see
4000
- # {MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig}
4001
- # for more details.
4002
- #
4003
- # Only applicable if using STRIPE as your payment gateway type.
4004
- #
4005
- # @param payment_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
4006
- #
4007
- # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
4008
-
4009
- # If left blank, will default to INVOICE
4010
- #
4011
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
4012
- module PaymentType
4013
- extend MetronomeSDK::Internal::Type::Enum
4014
-
4015
- INVOICE = :INVOICE
4016
- PAYMENT_INTENT = :PAYMENT_INTENT
4017
-
4018
- # @!method self.values
4019
- # @return [Array<Symbol>]
4020
- end
4021
- end
4022
-
4023
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
4024
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
4025
- # will default to NONE.
4026
- #
4027
- # @see MetronomeSDK::Models::V2::ContractEditParams::AddSpendThresholdConfiguration::PaymentGateConfig#tax_type
4028
- module TaxType
4029
- extend MetronomeSDK::Internal::Type::Enum
4030
-
4031
- NONE = :NONE
4032
- STRIPE = :STRIPE
4033
- ANROK = :ANROK
4034
- PRECALCULATED = :PRECALCULATED
4035
-
4036
- # @!method self.values
4037
- # @return [Array<Symbol>]
4038
- end
4039
- end
4040
- end
4041
-
4042
2761
  class AddSubscription < MetronomeSDK::Internal::Type::BaseModel
4043
2762
  # @!attribute collection_schedule
4044
2763
  #
@@ -4046,11 +2765,6 @@ module MetronomeSDK
4046
2765
  required :collection_schedule,
4047
2766
  enum: -> { MetronomeSDK::V2::ContractEditParams::AddSubscription::CollectionSchedule }
4048
2767
 
4049
- # @!attribute initial_quantity
4050
- #
4051
- # @return [Float]
4052
- required :initial_quantity, Float
4053
-
4054
2768
  # @!attribute proration
4055
2769
  #
4056
2770
  # @return [MetronomeSDK::Models::V2::ContractEditParams::AddSubscription::Proration]
@@ -4063,6 +2777,7 @@ module MetronomeSDK
4063
2777
  -> { MetronomeSDK::V2::ContractEditParams::AddSubscription::SubscriptionRate }
4064
2778
 
4065
2779
  # @!attribute custom_fields
2780
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
4066
2781
  #
4067
2782
  # @return [Hash{Symbol=>String}, nil]
4068
2783
  optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
@@ -4079,11 +2794,28 @@ module MetronomeSDK
4079
2794
  # @return [Time, nil]
4080
2795
  optional :ending_before, Time
4081
2796
 
2797
+ # @!attribute initial_quantity
2798
+ # The initial quantity for the subscription. It must be non-negative value.
2799
+ # Required if quantity_management_mode is QUANTITY_ONLY.
2800
+ #
2801
+ # @return [Float, nil]
2802
+ optional :initial_quantity, Float
2803
+
4082
2804
  # @!attribute name
4083
2805
  #
4084
2806
  # @return [String, nil]
4085
2807
  optional :name, String
4086
2808
 
2809
+ # @!attribute quantity_management_mode
2810
+ # Determines how the subscription's quantity is controlled. Defaults to
2811
+ # QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
2812
+ # directly on the subscription. `initial_quantity` must be provided with this
2813
+ # option. Compatible with recurring commits/credits that use POOLED allocation.
2814
+ #
2815
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSubscription::QuantityManagementMode, nil]
2816
+ optional :quantity_management_mode,
2817
+ enum: -> { MetronomeSDK::V2::ContractEditParams::AddSubscription::QuantityManagementMode }
2818
+
4087
2819
  # @!attribute starting_at
4088
2820
  # Inclusive start time for the subscription. If not provided, defaults to contract
4089
2821
  # start date
@@ -4098,27 +2830,29 @@ module MetronomeSDK
4098
2830
  # @return [String, nil]
4099
2831
  optional :temporary_id, String
4100
2832
 
4101
- # @!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)
2833
+ # @!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)
4102
2834
  # Some parameter documentations has been truncated, see
4103
2835
  # {MetronomeSDK::Models::V2::ContractEditParams::AddSubscription} for more
4104
2836
  # details.
4105
2837
  #
4106
2838
  # @param collection_schedule [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSubscription::CollectionSchedule]
4107
2839
  #
4108
- # @param initial_quantity [Float]
4109
- #
4110
2840
  # @param proration [MetronomeSDK::Models::V2::ContractEditParams::AddSubscription::Proration]
4111
2841
  #
4112
2842
  # @param subscription_rate [MetronomeSDK::Models::V2::ContractEditParams::AddSubscription::SubscriptionRate]
4113
2843
  #
4114
- # @param custom_fields [Hash{Symbol=>String}]
2844
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
4115
2845
  #
4116
2846
  # @param description [String]
4117
2847
  #
4118
2848
  # @param ending_before [Time] Exclusive end time for the subscription. If not provided, subscription inherits
4119
2849
  #
2850
+ # @param initial_quantity [Float] The initial quantity for the subscription. It must be non-negative value. Requir
2851
+ #
4120
2852
  # @param name [String]
4121
2853
  #
2854
+ # @param quantity_management_mode [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSubscription::QuantityManagementMode] Determines how the subscription's quantity is controlled. Defaults to QUANTITY_O
2855
+ #
4122
2856
  # @param starting_at [Time] Inclusive start time for the subscription. If not provided, defaults to contract
4123
2857
  #
4124
2858
  # @param temporary_id [String] A temporary ID used to reference the subscription in recurring commit/credit sub
@@ -4145,9 +2879,7 @@ module MetronomeSDK
4145
2879
  #
4146
2880
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSubscription::Proration::InvoiceBehavior, nil]
4147
2881
  optional :invoice_behavior,
4148
- enum: -> {
4149
- MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::InvoiceBehavior
4150
- }
2882
+ enum: -> { MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::InvoiceBehavior }
4151
2883
 
4152
2884
  # @!attribute is_prorated
4153
2885
  # Indicates if the partial period will be prorated or charged a full amount.
@@ -4190,9 +2922,7 @@ module MetronomeSDK
4190
2922
  #
4191
2923
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSubscription::SubscriptionRate::BillingFrequency]
4192
2924
  required :billing_frequency,
4193
- enum: -> {
4194
- MetronomeSDK::V2::ContractEditParams::AddSubscription::SubscriptionRate::BillingFrequency
4195
- }
2925
+ enum: -> { MetronomeSDK::V2::ContractEditParams::AddSubscription::SubscriptionRate::BillingFrequency }
4196
2926
 
4197
2927
  # @!attribute product_id
4198
2928
  # Must be subscription type product
@@ -4225,6 +2955,22 @@ module MetronomeSDK
4225
2955
  # @return [Array<Symbol>]
4226
2956
  end
4227
2957
  end
2958
+
2959
+ # Determines how the subscription's quantity is controlled. Defaults to
2960
+ # QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
2961
+ # directly on the subscription. `initial_quantity` must be provided with this
2962
+ # option. Compatible with recurring commits/credits that use POOLED allocation.
2963
+ #
2964
+ # @see MetronomeSDK::Models::V2::ContractEditParams::AddSubscription#quantity_management_mode
2965
+ module QuantityManagementMode
2966
+ extend MetronomeSDK::Internal::Type::Enum
2967
+
2968
+ SEAT_BASED = :SEAT_BASED
2969
+ QUANTITY_ONLY = :QUANTITY_ONLY
2970
+
2971
+ # @!method self.values
2972
+ # @return [Array<Symbol>]
2973
+ end
4228
2974
  end
4229
2975
 
4230
2976
  class ArchiveCommit < MetronomeSDK::Internal::Type::BaseModel
@@ -4297,17 +3043,13 @@ module MetronomeSDK
4297
3043
  # @!attribute hierarchy_configuration
4298
3044
  # Optional configuration for commit hierarchy access control
4299
3045
  #
4300
- # @return [MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration, nil]
4301
- optional :hierarchy_configuration,
4302
- -> { MetronomeSDK::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration }
3046
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
3047
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
4303
3048
 
4304
3049
  # @!attribute invoice_schedule
4305
3050
  #
4306
3051
  # @return [MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::InvoiceSchedule, nil]
4307
- optional :invoice_schedule,
4308
- -> {
4309
- MetronomeSDK::V2::ContractEditParams::UpdateCommit::InvoiceSchedule
4310
- }
3052
+ optional :invoice_schedule, -> { MetronomeSDK::V2::ContractEditParams::UpdateCommit::InvoiceSchedule }
4311
3053
 
4312
3054
  # @!attribute netsuite_sales_order_id
4313
3055
  #
@@ -4324,12 +3066,20 @@ module MetronomeSDK
4324
3066
  # @return [String, nil]
4325
3067
  optional :product_id, String
4326
3068
 
3069
+ # @!attribute rate_type
3070
+ # If provided, updates the commit to use the specified rate type for current and
3071
+ # future invoices. Previously finalized invoices will need to be voided and
3072
+ # regenerated to reflect the rate type change.
3073
+ #
3074
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::RateType, nil]
3075
+ optional :rate_type, enum: -> { MetronomeSDK::V2::ContractEditParams::UpdateCommit::RateType }
3076
+
4327
3077
  # @!attribute rollover_fraction
4328
3078
  #
4329
3079
  # @return [Float, nil]
4330
3080
  optional :rollover_fraction, Float, nil?: true
4331
3081
 
4332
- # @!method initialize(commit_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, hierarchy_configuration: nil, invoice_schedule: nil, netsuite_sales_order_id: nil, priority: nil, product_id: nil, rollover_fraction: nil)
3082
+ # @!method initialize(commit_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, hierarchy_configuration: nil, invoice_schedule: nil, netsuite_sales_order_id: nil, priority: nil, product_id: nil, rate_type: nil, rollover_fraction: nil)
4333
3083
  # Some parameter documentations has been truncated, see
4334
3084
  # {MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit} for more details.
4335
3085
  #
@@ -4341,7 +3091,7 @@ module MetronomeSDK
4341
3091
  #
4342
3092
  # @param applicable_product_tags [Array<String>, nil] Which tags the commit applies to. If applicable*product_ids, applicable_product*
4343
3093
  #
4344
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration] Optional configuration for commit hierarchy access control
3094
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for commit hierarchy access control
4345
3095
  #
4346
3096
  # @param invoice_schedule [MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::InvoiceSchedule]
4347
3097
  #
@@ -4351,6 +3101,8 @@ module MetronomeSDK
4351
3101
  #
4352
3102
  # @param product_id [String]
4353
3103
  #
3104
+ # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::RateType] If provided, updates the commit to use the specified rate type for current and f
3105
+ #
4354
3106
  # @param rollover_fraction [Float, nil]
4355
3107
 
4356
3108
  # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit#access_schedule
@@ -4359,25 +3111,19 @@ module MetronomeSDK
4359
3111
  #
4360
3112
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::AccessSchedule::AddScheduleItem>, nil]
4361
3113
  optional :add_schedule_items,
4362
- -> {
4363
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCommit::AccessSchedule::AddScheduleItem]
4364
- }
3114
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCommit::AccessSchedule::AddScheduleItem] }
4365
3115
 
4366
3116
  # @!attribute remove_schedule_items
4367
3117
  #
4368
3118
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::AccessSchedule::RemoveScheduleItem>, nil]
4369
3119
  optional :remove_schedule_items,
4370
- -> {
4371
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCommit::AccessSchedule::RemoveScheduleItem]
4372
- }
3120
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCommit::AccessSchedule::RemoveScheduleItem] }
4373
3121
 
4374
3122
  # @!attribute update_schedule_items
4375
3123
  #
4376
3124
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::AccessSchedule::UpdateScheduleItem>, nil]
4377
3125
  optional :update_schedule_items,
4378
- -> {
4379
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCommit::AccessSchedule::UpdateScheduleItem]
4380
- }
3126
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCommit::AccessSchedule::UpdateScheduleItem] }
4381
3127
 
4382
3128
  # @!method initialize(add_schedule_items: nil, remove_schedule_items: nil, update_schedule_items: nil)
4383
3129
  # @param add_schedule_items [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::AccessSchedule::AddScheduleItem>]
@@ -4417,142 +3163,31 @@ module MetronomeSDK
4417
3163
  end
4418
3164
 
4419
3165
  class UpdateScheduleItem < MetronomeSDK::Internal::Type::BaseModel
4420
- # @!attribute id
4421
- #
4422
- # @return [String]
4423
- required :id, String
4424
-
4425
- # @!attribute amount
4426
- #
4427
- # @return [Float, nil]
4428
- optional :amount, Float
4429
-
4430
- # @!attribute ending_before
4431
- #
4432
- # @return [Time, nil]
4433
- optional :ending_before, Time
4434
-
4435
- # @!attribute starting_at
4436
- #
4437
- # @return [Time, nil]
4438
- optional :starting_at, Time
4439
-
4440
- # @!method initialize(id:, amount: nil, ending_before: nil, starting_at: nil)
4441
- # @param id [String]
4442
- # @param amount [Float]
4443
- # @param ending_before [Time]
4444
- # @param starting_at [Time]
4445
- end
4446
- end
4447
-
4448
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit#hierarchy_configuration
4449
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
4450
- # @!attribute child_access
4451
- #
4452
- # @return [MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
4453
- required :child_access,
4454
- union: -> {
4455
- MetronomeSDK::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess
4456
- }
4457
-
4458
- # @!method initialize(child_access:)
4459
- # Optional configuration for commit hierarchy access control
4460
- #
4461
- # @param child_access [MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
4462
-
4463
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration#child_access
4464
- module ChildAccess
4465
- extend MetronomeSDK::Internal::Type::Union
4466
-
4467
- variant -> {
4468
- MetronomeSDK::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll
4469
- }
4470
-
4471
- variant -> {
4472
- MetronomeSDK::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone
4473
- }
4474
-
4475
- variant -> {
4476
- MetronomeSDK::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
4477
- }
4478
-
4479
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
4480
- # @!attribute type
4481
- #
4482
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
4483
- required :type,
4484
- enum: -> {
4485
- MetronomeSDK::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type
4486
- }
4487
-
4488
- # @!method initialize(type:)
4489
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
4490
-
4491
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
4492
- module Type
4493
- extend MetronomeSDK::Internal::Type::Enum
4494
-
4495
- ALL = :ALL
4496
-
4497
- # @!method self.values
4498
- # @return [Array<Symbol>]
4499
- end
4500
- end
4501
-
4502
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
4503
- # @!attribute type
4504
- #
4505
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
4506
- required :type,
4507
- enum: -> {
4508
- MetronomeSDK::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type
4509
- }
4510
-
4511
- # @!method initialize(type:)
4512
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
4513
-
4514
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
4515
- module Type
4516
- extend MetronomeSDK::Internal::Type::Enum
3166
+ # @!attribute id
3167
+ #
3168
+ # @return [String]
3169
+ required :id, String
4517
3170
 
4518
- NONE = :NONE
3171
+ # @!attribute amount
3172
+ #
3173
+ # @return [Float, nil]
3174
+ optional :amount, Float
4519
3175
 
4520
- # @!method self.values
4521
- # @return [Array<Symbol>]
4522
- end
4523
- end
3176
+ # @!attribute ending_before
3177
+ #
3178
+ # @return [Time, nil]
3179
+ optional :ending_before, Time
4524
3180
 
4525
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
4526
- # @!attribute contract_ids
4527
- #
4528
- # @return [Array<String>]
4529
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
4530
-
4531
- # @!attribute type
4532
- #
4533
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
4534
- required :type,
4535
- enum: -> {
4536
- MetronomeSDK::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type
4537
- }
4538
-
4539
- # @!method initialize(contract_ids:, type:)
4540
- # @param contract_ids [Array<String>]
4541
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
4542
-
4543
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
4544
- module Type
4545
- extend MetronomeSDK::Internal::Type::Enum
4546
-
4547
- CONTRACT_IDS = :CONTRACT_IDS
4548
-
4549
- # @!method self.values
4550
- # @return [Array<Symbol>]
4551
- end
4552
- end
3181
+ # @!attribute starting_at
3182
+ #
3183
+ # @return [Time, nil]
3184
+ optional :starting_at, Time
4553
3185
 
4554
- # @!method self.variants
4555
- # @return [Array(MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
3186
+ # @!method initialize(id:, amount: nil, ending_before: nil, starting_at: nil)
3187
+ # @param id [String]
3188
+ # @param amount [Float]
3189
+ # @param ending_before [Time]
3190
+ # @param starting_at [Time]
4556
3191
  end
4557
3192
  end
4558
3193
 
@@ -4562,25 +3197,19 @@ module MetronomeSDK
4562
3197
  #
4563
3198
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::InvoiceSchedule::AddScheduleItem>, nil]
4564
3199
  optional :add_schedule_items,
4565
- -> {
4566
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCommit::InvoiceSchedule::AddScheduleItem]
4567
- }
3200
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCommit::InvoiceSchedule::AddScheduleItem] }
4568
3201
 
4569
3202
  # @!attribute remove_schedule_items
4570
3203
  #
4571
3204
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::InvoiceSchedule::RemoveScheduleItem>, nil]
4572
3205
  optional :remove_schedule_items,
4573
- -> {
4574
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCommit::InvoiceSchedule::RemoveScheduleItem]
4575
- }
3206
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCommit::InvoiceSchedule::RemoveScheduleItem] }
4576
3207
 
4577
3208
  # @!attribute update_schedule_items
4578
3209
  #
4579
3210
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::InvoiceSchedule::UpdateScheduleItem>, nil]
4580
3211
  optional :update_schedule_items,
4581
- -> {
4582
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCommit::InvoiceSchedule::UpdateScheduleItem]
4583
- }
3212
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCommit::InvoiceSchedule::UpdateScheduleItem] }
4584
3213
 
4585
3214
  # @!method initialize(add_schedule_items: nil, remove_schedule_items: nil, update_schedule_items: nil)
4586
3215
  # @param add_schedule_items [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit::InvoiceSchedule::AddScheduleItem>]
@@ -4659,6 +3288,21 @@ module MetronomeSDK
4659
3288
  # @param unit_price [Float]
4660
3289
  end
4661
3290
  end
3291
+
3292
+ # If provided, updates the commit to use the specified rate type for current and
3293
+ # future invoices. Previously finalized invoices will need to be voided and
3294
+ # regenerated to reflect the rate type change.
3295
+ #
3296
+ # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit#rate_type
3297
+ module RateType
3298
+ extend MetronomeSDK::Internal::Type::Enum
3299
+
3300
+ LIST_RATE = :LIST_RATE
3301
+ COMMIT_RATE = :COMMIT_RATE
3302
+
3303
+ # @!method self.values
3304
+ # @return [Array<Symbol>]
3305
+ end
4662
3306
  end
4663
3307
 
4664
3308
  class UpdateCredit < MetronomeSDK::Internal::Type::BaseModel
@@ -4691,9 +3335,8 @@ module MetronomeSDK
4691
3335
  # @!attribute hierarchy_configuration
4692
3336
  # Optional configuration for commit hierarchy access control
4693
3337
  #
4694
- # @return [MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration, nil]
4695
- optional :hierarchy_configuration,
4696
- -> { MetronomeSDK::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration }
3338
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
3339
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
4697
3340
 
4698
3341
  # @!attribute netsuite_sales_order_id
4699
3342
  #
@@ -4710,7 +3353,15 @@ module MetronomeSDK
4710
3353
  # @return [String, nil]
4711
3354
  optional :product_id, String
4712
3355
 
4713
- # @!method initialize(credit_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, hierarchy_configuration: nil, netsuite_sales_order_id: nil, priority: nil, product_id: nil)
3356
+ # @!attribute rate_type
3357
+ # If provided, updates the credit to use the specified rate type for current and
3358
+ # future invoices. Previously finalized invoices will need to be voided and
3359
+ # regenerated to reflect the rate type change.
3360
+ #
3361
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::RateType, nil]
3362
+ optional :rate_type, enum: -> { MetronomeSDK::V2::ContractEditParams::UpdateCredit::RateType }
3363
+
3364
+ # @!method initialize(credit_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, hierarchy_configuration: nil, netsuite_sales_order_id: nil, priority: nil, product_id: nil, rate_type: nil)
4714
3365
  # Some parameter documentations has been truncated, see
4715
3366
  # {MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit} for more details.
4716
3367
  #
@@ -4722,13 +3373,15 @@ module MetronomeSDK
4722
3373
  #
4723
3374
  # @param applicable_product_tags [Array<String>, nil] Which tags the commit applies to. If applicable*product_ids, applicable_product*
4724
3375
  #
4725
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration] Optional configuration for commit hierarchy access control
3376
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for commit hierarchy access control
4726
3377
  #
4727
3378
  # @param netsuite_sales_order_id [String, nil]
4728
3379
  #
4729
3380
  # @param priority [Float, nil]
4730
3381
  #
4731
3382
  # @param product_id [String]
3383
+ #
3384
+ # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::RateType] If provided, updates the credit to use the specified rate type for current and f
4732
3385
 
4733
3386
  # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit#access_schedule
4734
3387
  class AccessSchedule < MetronomeSDK::Internal::Type::BaseModel
@@ -4736,25 +3389,19 @@ module MetronomeSDK
4736
3389
  #
4737
3390
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::AccessSchedule::AddScheduleItem>, nil]
4738
3391
  optional :add_schedule_items,
4739
- -> {
4740
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCredit::AccessSchedule::AddScheduleItem]
4741
- }
3392
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCredit::AccessSchedule::AddScheduleItem] }
4742
3393
 
4743
3394
  # @!attribute remove_schedule_items
4744
3395
  #
4745
3396
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::AccessSchedule::RemoveScheduleItem>, nil]
4746
3397
  optional :remove_schedule_items,
4747
- -> {
4748
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCredit::AccessSchedule::RemoveScheduleItem]
4749
- }
3398
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCredit::AccessSchedule::RemoveScheduleItem] }
4750
3399
 
4751
3400
  # @!attribute update_schedule_items
4752
3401
  #
4753
3402
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::AccessSchedule::UpdateScheduleItem>, nil]
4754
3403
  optional :update_schedule_items,
4755
- -> {
4756
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCredit::AccessSchedule::UpdateScheduleItem]
4757
- }
3404
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateCredit::AccessSchedule::UpdateScheduleItem] }
4758
3405
 
4759
3406
  # @!method initialize(add_schedule_items: nil, remove_schedule_items: nil, update_schedule_items: nil)
4760
3407
  # @param add_schedule_items [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::AccessSchedule::AddScheduleItem>]
@@ -4822,115 +3469,19 @@ module MetronomeSDK
4822
3469
  end
4823
3470
  end
4824
3471
 
4825
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit#hierarchy_configuration
4826
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
4827
- # @!attribute child_access
4828
- #
4829
- # @return [MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
4830
- required :child_access,
4831
- union: -> {
4832
- MetronomeSDK::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess
4833
- }
4834
-
4835
- # @!method initialize(child_access:)
4836
- # Optional configuration for commit hierarchy access control
4837
- #
4838
- # @param child_access [MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
4839
-
4840
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration#child_access
4841
- module ChildAccess
4842
- extend MetronomeSDK::Internal::Type::Union
4843
-
4844
- variant -> {
4845
- MetronomeSDK::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll
4846
- }
4847
-
4848
- variant -> {
4849
- MetronomeSDK::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone
4850
- }
4851
-
4852
- variant -> {
4853
- MetronomeSDK::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
4854
- }
4855
-
4856
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
4857
- # @!attribute type
4858
- #
4859
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
4860
- required :type,
4861
- enum: -> {
4862
- MetronomeSDK::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type
4863
- }
4864
-
4865
- # @!method initialize(type:)
4866
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
4867
-
4868
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
4869
- module Type
4870
- extend MetronomeSDK::Internal::Type::Enum
4871
-
4872
- ALL = :ALL
4873
-
4874
- # @!method self.values
4875
- # @return [Array<Symbol>]
4876
- end
4877
- end
4878
-
4879
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
4880
- # @!attribute type
4881
- #
4882
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
4883
- required :type,
4884
- enum: -> {
4885
- MetronomeSDK::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type
4886
- }
4887
-
4888
- # @!method initialize(type:)
4889
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
4890
-
4891
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
4892
- module Type
4893
- extend MetronomeSDK::Internal::Type::Enum
4894
-
4895
- NONE = :NONE
4896
-
4897
- # @!method self.values
4898
- # @return [Array<Symbol>]
4899
- end
4900
- end
3472
+ # If provided, updates the credit to use the specified rate type for current and
3473
+ # future invoices. Previously finalized invoices will need to be voided and
3474
+ # regenerated to reflect the rate type change.
3475
+ #
3476
+ # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit#rate_type
3477
+ module RateType
3478
+ extend MetronomeSDK::Internal::Type::Enum
4901
3479
 
4902
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
4903
- # @!attribute contract_ids
4904
- #
4905
- # @return [Array<String>]
4906
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
4907
-
4908
- # @!attribute type
4909
- #
4910
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
4911
- required :type,
4912
- enum: -> {
4913
- MetronomeSDK::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type
4914
- }
4915
-
4916
- # @!method initialize(contract_ids:, type:)
4917
- # @param contract_ids [Array<String>]
4918
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
4919
-
4920
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
4921
- module Type
4922
- extend MetronomeSDK::Internal::Type::Enum
4923
-
4924
- CONTRACT_IDS = :CONTRACT_IDS
4925
-
4926
- # @!method self.values
4927
- # @return [Array<Symbol>]
4928
- end
4929
- end
3480
+ LIST_RATE = :LIST_RATE
3481
+ COMMIT_RATE = :COMMIT_RATE
4930
3482
 
4931
- # @!method self.variants
4932
- # @return [Array(MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
4933
- end
3483
+ # @!method self.values
3484
+ # @return [Array<Symbol>]
4934
3485
  end
4935
3486
  end
4936
3487
 
@@ -4939,330 +3490,98 @@ module MetronomeSDK
4939
3490
  #
4940
3491
  # @return [MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::Commit, nil]
4941
3492
  optional :commit,
4942
- -> {
4943
- MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::Commit
4944
- }
3493
+ -> { MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::Commit }
4945
3494
 
4946
3495
  # @!attribute custom_credit_type_id
4947
3496
  # If provided, the threshold, recharge-to amount, and the resulting threshold
4948
- # commit amount will be in terms of this credit type instead of the fiat currency.
4949
- #
4950
- # @return [String, nil]
4951
- optional :custom_credit_type_id, String, nil?: true
4952
-
4953
- # @!attribute is_enabled
4954
- # When set to false, the contract will not be evaluated against the
4955
- # threshold_amount. Toggling to true will result an immediate evaluation,
4956
- # regardless of prior state.
4957
- #
4958
- # @return [Boolean, nil]
4959
- optional :is_enabled, MetronomeSDK::Internal::Type::Boolean
4960
-
4961
- # @!attribute payment_gate_config
4962
- #
4963
- # @return [MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig, nil]
4964
- optional :payment_gate_config,
4965
- -> {
4966
- MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig
4967
- }
4968
-
4969
- # @!attribute recharge_to_amount
4970
- # Specify the amount the balance should be recharged to.
4971
- #
4972
- # @return [Float, nil]
4973
- optional :recharge_to_amount, Float
4974
-
4975
- # @!attribute threshold_amount
4976
- # Specify the threshold amount for the contract. Each time the contract's balance
4977
- # lowers to this amount, a threshold charge will be initiated.
4978
- #
4979
- # @return [Float, nil]
4980
- optional :threshold_amount, Float
4981
-
4982
- # @!method initialize(commit: nil, custom_credit_type_id: nil, is_enabled: nil, payment_gate_config: nil, recharge_to_amount: nil, threshold_amount: nil)
4983
- # Some parameter documentations has been truncated, see
4984
- # {MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration}
4985
- # for more details.
4986
- #
4987
- # @param commit [MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::Commit]
4988
- #
4989
- # @param custom_credit_type_id [String, nil] If provided, the threshold, recharge-to amount, and the resulting threshold comm
4990
- #
4991
- # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
4992
- #
4993
- # @param payment_gate_config [MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig]
4994
- #
4995
- # @param recharge_to_amount [Float] Specify the amount the balance should be recharged to.
4996
- #
4997
- # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's balance
4998
-
4999
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration#commit
5000
- class Commit < MetronomeSDK::Internal::Type::BaseModel
5001
- # @!attribute applicable_product_ids
5002
- # Which products the threshold commit applies to. If both applicable_product_ids
5003
- # and applicable_product_tags are not provided, the commit applies to all
5004
- # products.
5005
- #
5006
- # @return [Array<String>, nil]
5007
- optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
5008
-
5009
- # @!attribute applicable_product_tags
5010
- # Which tags the threshold commit applies to. If both applicable_product_ids and
5011
- # applicable_product_tags are not provided, the commit applies to all products.
5012
- #
5013
- # @return [Array<String>, nil]
5014
- optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
5015
-
5016
- # @!attribute description
5017
- #
5018
- # @return [String, nil]
5019
- optional :description, String
5020
-
5021
- # @!attribute name
5022
- # Specify the name of the line item for the threshold charge. If left blank, it
5023
- # will default to the commit product name.
5024
- #
5025
- # @return [String, nil]
5026
- optional :name, String
5027
-
5028
- # @!attribute product_id
5029
- # The commit product that will be used to generate the line item for commit
5030
- # payment.
5031
- #
5032
- # @return [String, nil]
5033
- optional :product_id, String
5034
-
5035
- # @!attribute specifiers
5036
- # List of filters that determine what kind of customer usage draws down a commit
5037
- # or credit. A customer's usage needs to meet the condition of at least one of the
5038
- # specifiers to contribute to a commit's or credit's drawdown. This field cannot
5039
- # be used together with `applicable_product_ids` or `applicable_product_tags`.
5040
- # Instead, to target usage by product or product tag, pass those values in the
5041
- # body of `specifiers`.
5042
- #
5043
- # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::Commit::Specifier>, nil]
5044
- optional :specifiers,
5045
- -> {
5046
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::Commit::Specifier]
5047
- },
5048
- nil?: true
5049
-
5050
- # @!method initialize(applicable_product_ids: nil, applicable_product_tags: nil, description: nil, name: nil, product_id: nil, specifiers: nil)
5051
- # Some parameter documentations has been truncated, see
5052
- # {MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::Commit}
5053
- # for more details.
5054
- #
5055
- # @param applicable_product_ids [Array<String>, nil] Which products the threshold commit applies to. If both applicable_product_ids a
5056
- #
5057
- # @param applicable_product_tags [Array<String>, nil] Which tags the threshold commit applies to. If both applicable_product_ids and a
5058
- #
5059
- # @param description [String]
5060
- #
5061
- # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
5062
- #
5063
- # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
5064
- #
5065
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::Commit::Specifier>, nil] List of filters that determine what kind of customer usage draws down a commit o
5066
-
5067
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
5068
- # @!attribute presentation_group_values
5069
- #
5070
- # @return [Hash{Symbol=>String}, nil]
5071
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
5072
-
5073
- # @!attribute pricing_group_values
5074
- #
5075
- # @return [Hash{Symbol=>String}, nil]
5076
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
5077
-
5078
- # @!attribute product_id
5079
- # If provided, the specifier will only apply to the product with the specified ID.
5080
- #
5081
- # @return [String, nil]
5082
- optional :product_id, String
5083
-
5084
- # @!attribute product_tags
5085
- # If provided, the specifier will only apply to products with all the specified
5086
- # tags.
5087
- #
5088
- # @return [Array<String>, nil]
5089
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
5090
-
5091
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
5092
- # Some parameter documentations has been truncated, see
5093
- # {MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::Commit::Specifier}
5094
- # for more details.
5095
- #
5096
- # @param presentation_group_values [Hash{Symbol=>String}]
5097
- #
5098
- # @param pricing_group_values [Hash{Symbol=>String}]
5099
- #
5100
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
5101
- #
5102
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
5103
- end
5104
- end
5105
-
5106
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration#payment_gate_config
5107
- class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
5108
- # @!attribute payment_gate_type
5109
- # Gate access to the commit balance based on successful collection of payment.
5110
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
5111
- # facilitate payment using your own payment integration. Select NONE if you do not
5112
- # wish to payment gate the commit balance.
5113
- #
5114
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType]
5115
- required :payment_gate_type,
5116
- enum: -> {
5117
- MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType
5118
- }
5119
-
5120
- # @!attribute precalculated_tax_config
5121
- # Only applicable if using PRECALCULATED as your tax type.
5122
- #
5123
- # @return [MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
5124
- optional :precalculated_tax_config,
5125
- -> {
5126
- MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig
5127
- }
5128
-
5129
- # @!attribute stripe_config
5130
- # Only applicable if using STRIPE as your payment gateway type.
5131
- #
5132
- # @return [MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
5133
- optional :stripe_config,
5134
- -> {
5135
- MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig
5136
- }
5137
-
5138
- # @!attribute tax_type
5139
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
5140
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
5141
- # will default to NONE.
5142
- #
5143
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType, nil]
5144
- optional :tax_type,
5145
- enum: -> {
5146
- MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType
5147
- }
5148
-
5149
- # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
5150
- # Some parameter documentations has been truncated, see
5151
- # {MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig}
5152
- # for more details.
5153
- #
5154
- # @param payment_gate_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
5155
- #
5156
- # @param precalculated_tax_config [MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
5157
- #
5158
- # @param stripe_config [MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gateway type.
5159
- #
5160
- # @param tax_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
5161
-
5162
- # Gate access to the commit balance based on successful collection of payment.
5163
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
5164
- # facilitate payment using your own payment integration. Select NONE if you do not
5165
- # wish to payment gate the commit balance.
5166
- #
5167
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig#payment_gate_type
5168
- module PaymentGateType
5169
- extend MetronomeSDK::Internal::Type::Enum
5170
-
5171
- NONE = :NONE
5172
- STRIPE = :STRIPE
5173
- EXTERNAL = :EXTERNAL
5174
-
5175
- # @!method self.values
5176
- # @return [Array<Symbol>]
5177
- end
5178
-
5179
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
5180
- class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
5181
- # @!attribute tax_amount
5182
- # Amount of tax to be applied. This should be in the same currency and
5183
- # denomination as the commit's invoice schedule
5184
- #
5185
- # @return [Float]
5186
- required :tax_amount, Float
5187
-
5188
- # @!attribute tax_name
5189
- # Name of the tax to be applied. This may be used in an invoice line item
5190
- # description.
5191
- #
5192
- # @return [String, nil]
5193
- optional :tax_name, String
5194
-
5195
- # @!method initialize(tax_amount:, tax_name: nil)
5196
- # Some parameter documentations has been truncated, see
5197
- # {MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
5198
- # for more details.
5199
- #
5200
- # Only applicable if using PRECALCULATED as your tax type.
5201
- #
5202
- # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
5203
- #
5204
- # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
5205
- end
3497
+ # commit amount will be in terms of this credit type instead of the fiat currency.
3498
+ #
3499
+ # @return [String, nil]
3500
+ optional :custom_credit_type_id, String, nil?: true
5206
3501
 
5207
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig#stripe_config
5208
- class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
5209
- # @!attribute payment_type
5210
- # If left blank, will default to INVOICE
5211
- #
5212
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
5213
- required :payment_type,
5214
- enum: -> {
5215
- MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType
5216
- }
3502
+ # @!attribute is_enabled
3503
+ # When set to false, the contract will not be evaluated against the
3504
+ # threshold_amount. Toggling to true will result an immediate evaluation,
3505
+ # regardless of prior state.
3506
+ #
3507
+ # @return [Boolean, nil]
3508
+ optional :is_enabled, MetronomeSDK::Internal::Type::Boolean
5217
3509
 
5218
- # @!attribute invoice_metadata
5219
- # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
5220
- # your payment type.
5221
- #
5222
- # @return [Hash{Symbol=>String}, nil]
5223
- optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
3510
+ # @!attribute payment_gate_config
3511
+ #
3512
+ # @return [MetronomeSDK::Models::PaymentGateConfigV2, nil]
3513
+ optional :payment_gate_config, -> { MetronomeSDK::PaymentGateConfigV2 }
5224
3514
 
5225
- # @!method initialize(payment_type:, invoice_metadata: nil)
5226
- # Some parameter documentations has been truncated, see
5227
- # {MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig}
5228
- # for more details.
5229
- #
5230
- # Only applicable if using STRIPE as your payment gateway type.
5231
- #
5232
- # @param payment_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
5233
- #
5234
- # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
3515
+ # @!attribute recharge_to_amount
3516
+ # Specify the amount the balance should be recharged to.
3517
+ #
3518
+ # @return [Float, nil]
3519
+ optional :recharge_to_amount, Float
5235
3520
 
5236
- # If left blank, will default to INVOICE
5237
- #
5238
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
5239
- module PaymentType
5240
- extend MetronomeSDK::Internal::Type::Enum
3521
+ # @!attribute threshold_amount
3522
+ # Specify the threshold amount for the contract. Each time the contract's balance
3523
+ # lowers to this amount, a threshold charge will be initiated.
3524
+ #
3525
+ # @return [Float, nil]
3526
+ optional :threshold_amount, Float
5241
3527
 
5242
- INVOICE = :INVOICE
5243
- PAYMENT_INTENT = :PAYMENT_INTENT
3528
+ # @!method initialize(commit: nil, custom_credit_type_id: nil, is_enabled: nil, payment_gate_config: nil, recharge_to_amount: nil, threshold_amount: nil)
3529
+ # Some parameter documentations has been truncated, see
3530
+ # {MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration}
3531
+ # for more details.
3532
+ #
3533
+ # @param commit [MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::Commit]
3534
+ #
3535
+ # @param custom_credit_type_id [String, nil] If provided, the threshold, recharge-to amount, and the resulting threshold comm
3536
+ #
3537
+ # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
3538
+ #
3539
+ # @param payment_gate_config [MetronomeSDK::Models::PaymentGateConfigV2]
3540
+ #
3541
+ # @param recharge_to_amount [Float] Specify the amount the balance should be recharged to.
3542
+ #
3543
+ # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's balance
5244
3544
 
5245
- # @!method self.values
5246
- # @return [Array<Symbol>]
5247
- end
5248
- end
3545
+ # @see MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration#commit
3546
+ class Commit < MetronomeSDK::Models::UpdateBaseThresholdCommit
3547
+ # @!attribute applicable_product_ids
3548
+ # Which products the threshold commit applies to. If both applicable_product_ids
3549
+ # and applicable_product_tags are not provided, the commit applies to all
3550
+ # products.
3551
+ #
3552
+ # @return [Array<String>, nil]
3553
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
5249
3554
 
5250
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
5251
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
5252
- # will default to NONE.
3555
+ # @!attribute applicable_product_tags
3556
+ # Which tags the threshold commit applies to. If both applicable_product_ids and
3557
+ # applicable_product_tags are not provided, the commit applies to all products.
5253
3558
  #
5254
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig#tax_type
5255
- module TaxType
5256
- extend MetronomeSDK::Internal::Type::Enum
3559
+ # @return [Array<String>, nil]
3560
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
5257
3561
 
5258
- NONE = :NONE
5259
- STRIPE = :STRIPE
5260
- ANROK = :ANROK
5261
- PRECALCULATED = :PRECALCULATED
3562
+ # @!attribute specifiers
3563
+ # List of filters that determine what kind of customer usage draws down a commit
3564
+ # or credit. A customer's usage needs to meet the condition of at least one of the
3565
+ # specifiers to contribute to a commit's or credit's drawdown. This field cannot
3566
+ # be used together with `applicable_product_ids` or `applicable_product_tags`.
3567
+ # Instead, to target usage by product or product tag, pass those values in the
3568
+ # body of `specifiers`.
3569
+ #
3570
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
3571
+ optional :specifiers,
3572
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] },
3573
+ nil?: true
5262
3574
 
5263
- # @!method self.values
5264
- # @return [Array<Symbol>]
5265
- end
3575
+ # @!method initialize(applicable_product_ids: nil, applicable_product_tags: nil, specifiers: nil)
3576
+ # Some parameter documentations has been truncated, see
3577
+ # {MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::Commit}
3578
+ # for more details.
3579
+ #
3580
+ # @param applicable_product_ids [Array<String>, nil] Which products the threshold commit applies to. If both applicable_product_ids a
3581
+ #
3582
+ # @param applicable_product_tags [Array<String>, nil] Which tags the threshold commit applies to. If both applicable_product_ids and a
3583
+ #
3584
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil] List of filters that determine what kind of customer usage draws down a commit o
5266
3585
  end
5267
3586
  end
5268
3587
 
@@ -5275,10 +3594,7 @@ module MetronomeSDK
5275
3594
  # @!attribute access_amount
5276
3595
  #
5277
3596
  # @return [MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCommit::AccessAmount, nil]
5278
- optional :access_amount,
5279
- -> {
5280
- MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::AccessAmount
5281
- }
3597
+ optional :access_amount, -> { MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::AccessAmount }
5282
3598
 
5283
3599
  # @!attribute ending_before
5284
3600
  #
@@ -5341,10 +3657,7 @@ module MetronomeSDK
5341
3657
  # @!attribute access_amount
5342
3658
  #
5343
3659
  # @return [MetronomeSDK::Models::V2::ContractEditParams::UpdateRecurringCredit::AccessAmount, nil]
5344
- optional :access_amount,
5345
- -> {
5346
- MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::AccessAmount
5347
- }
3660
+ optional :access_amount, -> { MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::AccessAmount }
5348
3661
 
5349
3662
  # @!attribute ending_before
5350
3663
  #
@@ -5402,25 +3715,19 @@ module MetronomeSDK
5402
3715
  #
5403
3716
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateScheduledCharge::InvoiceSchedule::AddScheduleItem>, nil]
5404
3717
  optional :add_schedule_items,
5405
- -> {
5406
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateScheduledCharge::InvoiceSchedule::AddScheduleItem]
5407
- }
3718
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateScheduledCharge::InvoiceSchedule::AddScheduleItem] }
5408
3719
 
5409
3720
  # @!attribute remove_schedule_items
5410
3721
  #
5411
3722
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateScheduledCharge::InvoiceSchedule::RemoveScheduleItem>, nil]
5412
3723
  optional :remove_schedule_items,
5413
- -> {
5414
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateScheduledCharge::InvoiceSchedule::RemoveScheduleItem]
5415
- }
3724
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateScheduledCharge::InvoiceSchedule::RemoveScheduleItem] }
5416
3725
 
5417
3726
  # @!attribute update_schedule_items
5418
3727
  #
5419
3728
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateScheduledCharge::InvoiceSchedule::UpdateScheduleItem>, nil]
5420
3729
  optional :update_schedule_items,
5421
- -> {
5422
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateScheduledCharge::InvoiceSchedule::UpdateScheduleItem]
5423
- }
3730
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateScheduledCharge::InvoiceSchedule::UpdateScheduleItem] }
5424
3731
 
5425
3732
  # @!method initialize(add_schedule_items: nil, remove_schedule_items: nil, update_schedule_items: nil)
5426
3733
  # @param add_schedule_items [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateScheduledCharge::InvoiceSchedule::AddScheduleItem>]
@@ -5504,11 +3811,8 @@ module MetronomeSDK
5504
3811
  class UpdateSpendThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
5505
3812
  # @!attribute commit
5506
3813
  #
5507
- # @return [MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::Commit, nil]
5508
- optional :commit,
5509
- -> {
5510
- MetronomeSDK::V2::ContractEditParams::UpdateSpendThresholdConfiguration::Commit
5511
- }
3814
+ # @return [MetronomeSDK::Models::UpdateBaseThresholdCommit, nil]
3815
+ optional :commit, -> { MetronomeSDK::UpdateBaseThresholdCommit }
5512
3816
 
5513
3817
  # @!attribute is_enabled
5514
3818
  # When set to false, the contract will not be evaluated against the
@@ -5520,11 +3824,8 @@ module MetronomeSDK
5520
3824
 
5521
3825
  # @!attribute payment_gate_config
5522
3826
  #
5523
- # @return [MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig, nil]
5524
- optional :payment_gate_config,
5525
- -> {
5526
- MetronomeSDK::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig
5527
- }
3827
+ # @return [MetronomeSDK::Models::PaymentGateConfigV2, nil]
3828
+ optional :payment_gate_config, -> { MetronomeSDK::PaymentGateConfigV2 }
5528
3829
 
5529
3830
  # @!attribute threshold_amount
5530
3831
  # Specify the threshold amount for the contract. Each time the contract's usage
@@ -5538,208 +3839,13 @@ module MetronomeSDK
5538
3839
  # {MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration}
5539
3840
  # for more details.
5540
3841
  #
5541
- # @param commit [MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::Commit]
3842
+ # @param commit [MetronomeSDK::Models::UpdateBaseThresholdCommit]
5542
3843
  #
5543
3844
  # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
5544
3845
  #
5545
- # @param payment_gate_config [MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig]
3846
+ # @param payment_gate_config [MetronomeSDK::Models::PaymentGateConfigV2]
5546
3847
  #
5547
3848
  # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's usage hi
5548
-
5549
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration#commit
5550
- class Commit < MetronomeSDK::Internal::Type::BaseModel
5551
- # @!attribute description
5552
- #
5553
- # @return [String, nil]
5554
- optional :description, String
5555
-
5556
- # @!attribute name
5557
- # Specify the name of the line item for the threshold charge. If left blank, it
5558
- # will default to the commit product name.
5559
- #
5560
- # @return [String, nil]
5561
- optional :name, String
5562
-
5563
- # @!attribute product_id
5564
- # The commit product that will be used to generate the line item for commit
5565
- # payment.
5566
- #
5567
- # @return [String, nil]
5568
- optional :product_id, String
5569
-
5570
- # @!method initialize(description: nil, name: nil, product_id: nil)
5571
- # Some parameter documentations has been truncated, see
5572
- # {MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::Commit}
5573
- # for more details.
5574
- #
5575
- # @param description [String]
5576
- #
5577
- # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
5578
- #
5579
- # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
5580
- end
5581
-
5582
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration#payment_gate_config
5583
- class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
5584
- # @!attribute payment_gate_type
5585
- # Gate access to the commit balance based on successful collection of payment.
5586
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
5587
- # facilitate payment using your own payment integration. Select NONE if you do not
5588
- # wish to payment gate the commit balance.
5589
- #
5590
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::PaymentGateType]
5591
- required :payment_gate_type,
5592
- enum: -> {
5593
- MetronomeSDK::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::PaymentGateType
5594
- }
5595
-
5596
- # @!attribute precalculated_tax_config
5597
- # Only applicable if using PRECALCULATED as your tax type.
5598
- #
5599
- # @return [MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
5600
- optional :precalculated_tax_config,
5601
- -> {
5602
- MetronomeSDK::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig
5603
- }
5604
-
5605
- # @!attribute stripe_config
5606
- # Only applicable if using STRIPE as your payment gateway type.
5607
- #
5608
- # @return [MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
5609
- optional :stripe_config,
5610
- -> {
5611
- MetronomeSDK::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig
5612
- }
5613
-
5614
- # @!attribute tax_type
5615
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
5616
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
5617
- # will default to NONE.
5618
- #
5619
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::TaxType, nil]
5620
- optional :tax_type,
5621
- enum: -> {
5622
- MetronomeSDK::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::TaxType
5623
- }
5624
-
5625
- # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
5626
- # Some parameter documentations has been truncated, see
5627
- # {MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig}
5628
- # for more details.
5629
- #
5630
- # @param payment_gate_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
5631
- #
5632
- # @param precalculated_tax_config [MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
5633
- #
5634
- # @param stripe_config [MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gateway type.
5635
- #
5636
- # @param tax_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
5637
-
5638
- # Gate access to the commit balance based on successful collection of payment.
5639
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
5640
- # facilitate payment using your own payment integration. Select NONE if you do not
5641
- # wish to payment gate the commit balance.
5642
- #
5643
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig#payment_gate_type
5644
- module PaymentGateType
5645
- extend MetronomeSDK::Internal::Type::Enum
5646
-
5647
- NONE = :NONE
5648
- STRIPE = :STRIPE
5649
- EXTERNAL = :EXTERNAL
5650
-
5651
- # @!method self.values
5652
- # @return [Array<Symbol>]
5653
- end
5654
-
5655
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
5656
- class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
5657
- # @!attribute tax_amount
5658
- # Amount of tax to be applied. This should be in the same currency and
5659
- # denomination as the commit's invoice schedule
5660
- #
5661
- # @return [Float]
5662
- required :tax_amount, Float
5663
-
5664
- # @!attribute tax_name
5665
- # Name of the tax to be applied. This may be used in an invoice line item
5666
- # description.
5667
- #
5668
- # @return [String, nil]
5669
- optional :tax_name, String
5670
-
5671
- # @!method initialize(tax_amount:, tax_name: nil)
5672
- # Some parameter documentations has been truncated, see
5673
- # {MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
5674
- # for more details.
5675
- #
5676
- # Only applicable if using PRECALCULATED as your tax type.
5677
- #
5678
- # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
5679
- #
5680
- # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
5681
- end
5682
-
5683
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig#stripe_config
5684
- class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
5685
- # @!attribute payment_type
5686
- # If left blank, will default to INVOICE
5687
- #
5688
- # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
5689
- required :payment_type,
5690
- enum: -> {
5691
- MetronomeSDK::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType
5692
- }
5693
-
5694
- # @!attribute invoice_metadata
5695
- # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
5696
- # your payment type.
5697
- #
5698
- # @return [Hash{Symbol=>String}, nil]
5699
- optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
5700
-
5701
- # @!method initialize(payment_type:, invoice_metadata: nil)
5702
- # Some parameter documentations has been truncated, see
5703
- # {MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig}
5704
- # for more details.
5705
- #
5706
- # Only applicable if using STRIPE as your payment gateway type.
5707
- #
5708
- # @param payment_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
5709
- #
5710
- # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
5711
-
5712
- # If left blank, will default to INVOICE
5713
- #
5714
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
5715
- module PaymentType
5716
- extend MetronomeSDK::Internal::Type::Enum
5717
-
5718
- INVOICE = :INVOICE
5719
- PAYMENT_INTENT = :PAYMENT_INTENT
5720
-
5721
- # @!method self.values
5722
- # @return [Array<Symbol>]
5723
- end
5724
- end
5725
-
5726
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
5727
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
5728
- # will default to NONE.
5729
- #
5730
- # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::PaymentGateConfig#tax_type
5731
- module TaxType
5732
- extend MetronomeSDK::Internal::Type::Enum
5733
-
5734
- NONE = :NONE
5735
- STRIPE = :STRIPE
5736
- ANROK = :ANROK
5737
- PRECALCULATED = :PRECALCULATED
5738
-
5739
- # @!method self.values
5740
- # @return [Array<Symbol>]
5741
- end
5742
- end
5743
3849
  end
5744
3850
 
5745
3851
  class UpdateSubscription < MetronomeSDK::Internal::Type::BaseModel
@@ -5760,9 +3866,7 @@ module MetronomeSDK
5760
3866
  #
5761
3867
  # @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdateSubscription::QuantityUpdate>, nil]
5762
3868
  optional :quantity_updates,
5763
- -> {
5764
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateSubscription::QuantityUpdate]
5765
- }
3869
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateSubscription::QuantityUpdate] }
5766
3870
 
5767
3871
  # @!method initialize(subscription_id:, ending_before: nil, quantity_updates: nil)
5768
3872
  # Some parameter documentations has been truncated, see