metronome-sdk 0.3.0 → 2.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 (363) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +91 -0
  3. data/README.md +9 -9
  4. data/lib/metronome_sdk/errors.rb +25 -11
  5. data/lib/metronome_sdk/file_part.rb +10 -7
  6. data/lib/metronome_sdk/internal/body_cursor_page.rb +86 -0
  7. data/lib/metronome_sdk/internal/cursor_page.rb +1 -1
  8. data/lib/metronome_sdk/internal/cursor_page_without_limit.rb +86 -0
  9. data/lib/metronome_sdk/internal/transport/base_client.rb +12 -11
  10. data/lib/metronome_sdk/internal/transport/pooled_net_requester.rb +8 -19
  11. data/lib/metronome_sdk/internal/type/base_model.rb +6 -13
  12. data/lib/metronome_sdk/internal/type/base_page.rb +1 -1
  13. data/lib/metronome_sdk/internal/type/enum.rb +25 -0
  14. data/lib/metronome_sdk/internal/type/file_input.rb +7 -4
  15. data/lib/metronome_sdk/internal/type/union.rb +11 -0
  16. data/lib/metronome_sdk/internal/util.rb +9 -8
  17. data/lib/metronome_sdk/models/base_threshold_commit.rb +36 -0
  18. data/lib/metronome_sdk/models/commit.rb +26 -170
  19. data/lib/metronome_sdk/models/commit_hierarchy_configuration.rb +98 -0
  20. data/lib/metronome_sdk/models/commit_rate.rb +48 -0
  21. data/lib/metronome_sdk/models/commit_specifier.rb +42 -0
  22. data/lib/metronome_sdk/models/commit_specifier_input.rb +42 -0
  23. data/lib/metronome_sdk/models/contract.rb +404 -0
  24. data/lib/metronome_sdk/models/contract_v2.rb +3169 -0
  25. data/lib/metronome_sdk/models/contract_without_amendments.rb +38 -1128
  26. data/lib/metronome_sdk/models/credit.rb +9 -156
  27. data/lib/metronome_sdk/models/discount.rb +2 -1
  28. data/lib/metronome_sdk/models/hierarchy_configuration.rb +173 -0
  29. data/lib/metronome_sdk/models/override.rb +6 -101
  30. data/lib/metronome_sdk/models/override_tier.rb +21 -0
  31. data/lib/metronome_sdk/models/overwrite_rate.rb +82 -0
  32. data/lib/metronome_sdk/models/payment_gate_config.rb +150 -0
  33. data/lib/metronome_sdk/models/payment_gate_config_v2.rb +150 -0
  34. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +100 -0
  35. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +102 -0
  36. data/lib/metronome_sdk/models/pro_service.rb +2 -1
  37. data/lib/metronome_sdk/models/recurring_commit_subscription_config.rb +51 -0
  38. data/lib/metronome_sdk/models/scheduled_charge.rb +2 -1
  39. data/lib/metronome_sdk/models/spend_threshold_configuration.rb +44 -0
  40. data/lib/metronome_sdk/models/spend_threshold_configuration_v2.rb +44 -0
  41. data/lib/metronome_sdk/models/subscription.rb +311 -0
  42. data/lib/metronome_sdk/models/update_base_threshold_commit.rb +36 -0
  43. data/lib/metronome_sdk/models/v1/alert_archive_params.rb +8 -4
  44. data/lib/metronome_sdk/models/v1/alert_create_params.rb +42 -42
  45. data/lib/metronome_sdk/models/v1/billable_metric_create_params.rb +1 -2
  46. data/lib/metronome_sdk/models/v1/billable_metric_list_response.rb +3 -3
  47. data/lib/metronome_sdk/models/v1/billable_metric_retrieve_response.rb +4 -7
  48. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +58 -411
  49. data/lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb +7 -16
  50. data/lib/metronome_sdk/models/v1/contract_create_params.rb +315 -1459
  51. data/lib/metronome_sdk/models/v1/contract_list_balances_response.rb +6 -23
  52. data/lib/metronome_sdk/models/v1/contract_list_response.rb +3 -1153
  53. data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_params.rb +2 -6
  54. data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rb +5 -50
  55. data/lib/metronome_sdk/models/v1/contract_retrieve_response.rb +3 -1154
  56. data/lib/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_params.rb +1 -3
  57. data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +2 -1
  58. data/lib/metronome_sdk/models/v1/contracts/product_list_response.rb +8 -1
  59. data/lib/metronome_sdk/models/v1/contracts/product_retrieve_response.rb +8 -1
  60. data/lib/metronome_sdk/models/v1/contracts/quantity_rounding.rb +1 -4
  61. data/lib/metronome_sdk/models/v1/contracts/rate_card_create_params.rb +4 -7
  62. data/lib/metronome_sdk/models/v1/contracts/rate_card_list_response.rb +10 -1
  63. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_params.rb +2 -6
  64. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rb +5 -50
  65. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rb +10 -1
  66. data/lib/metronome_sdk/models/v1/contracts/rate_card_update_params.rb +1 -3
  67. data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_params.rb +1 -3
  68. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +6 -61
  69. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +3 -49
  70. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rb +4 -51
  71. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_params.rb +2 -6
  72. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rb +5 -49
  73. data/lib/metronome_sdk/models/v1/credit_grant_list_entries_response.rb +103 -123
  74. data/lib/metronome_sdk/models/v1/credit_grant_list_response.rb +3 -5
  75. data/lib/metronome_sdk/models/v1/custom_field_list_keys_params.rb +1 -3
  76. data/lib/metronome_sdk/models/v1/custom_field_list_keys_response.rb +41 -58
  77. data/lib/metronome_sdk/models/v1/custom_field_set_values_params.rb +5 -1
  78. data/lib/metronome_sdk/models/v1/customer.rb +2 -1
  79. data/lib/metronome_sdk/models/v1/customer_create_params.rb +37 -11
  80. data/lib/metronome_sdk/models/v1/customer_detail.rb +11 -2
  81. data/lib/metronome_sdk/models/v1/customer_list_billable_metrics_response.rb +3 -3
  82. data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +6 -18
  83. data/lib/metronome_sdk/models/v1/customer_preview_events_response.rb +3 -3
  84. data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rb +28 -0
  85. data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rb +128 -0
  86. data/lib/metronome_sdk/models/v1/customer_set_billing_configurations_params.rb +143 -0
  87. data/lib/metronome_sdk/models/v1/customers/alert_list_params.rb +4 -6
  88. data/lib/metronome_sdk/models/v1/customers/alert_reset_params.rb +2 -2
  89. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +37 -8
  90. data/lib/metronome_sdk/models/v1/customers/billing_config_create_params.rb +2 -0
  91. data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +2 -0
  92. data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +10 -60
  93. data/lib/metronome_sdk/models/v1/customers/credit_create_params.rb +6 -48
  94. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +48 -54
  95. data/lib/metronome_sdk/models/v1/customers/invoice.rb +197 -66
  96. data/lib/metronome_sdk/models/v1/customers/invoice_list_breakdowns_params.rb +1 -4
  97. data/lib/metronome_sdk/models/v1/customers/invoice_retrieve_pdf_params.rb +30 -0
  98. data/lib/metronome_sdk/models/v1/customers/plan_add_params.rb +2 -6
  99. data/lib/metronome_sdk/models/v1/customers/plan_list_response.rb +2 -1
  100. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +4 -11
  101. data/lib/metronome_sdk/models/v1/payment.rb +151 -0
  102. data/lib/metronome_sdk/models/v1/payment_attempt_params.rb +28 -0
  103. data/lib/metronome_sdk/models/v1/payment_attempt_response.rb +18 -0
  104. data/lib/metronome_sdk/models/v1/payment_cancel_params.rb +28 -0
  105. data/lib/metronome_sdk/models/v1/payment_cancel_response.rb +18 -0
  106. data/lib/metronome_sdk/models/v1/payment_list_params.rb +53 -0
  107. data/lib/metronome_sdk/models/v1/payment_status.rb +19 -0
  108. data/lib/metronome_sdk/models/v1/plan_detail.rb +9 -5
  109. data/lib/metronome_sdk/models/v1/plan_list_charges_response.rb +2 -1
  110. data/lib/metronome_sdk/models/v1/plan_list_customers_response.rb +2 -1
  111. data/lib/metronome_sdk/models/v1/plan_list_response.rb +5 -1
  112. data/lib/metronome_sdk/models/v1/usage_ingest_params.rb +1 -4
  113. data/lib/metronome_sdk/models/v1/usage_list_params.rb +1 -3
  114. data/lib/metronome_sdk/models/v1/usage_list_response.rb +45 -62
  115. data/lib/metronome_sdk/models/v1/usage_search_response.rb +4 -7
  116. data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +37 -58
  117. data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +34 -49
  118. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +552 -2265
  119. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +417 -2317
  120. data/lib/metronome_sdk/models/v2/contract_list_response.rb +3 -4520
  121. data/lib/metronome_sdk/models/v2/contract_retrieve_response.rb +3 -4528
  122. data/lib/metronome_sdk/models.rb +38 -0
  123. data/lib/metronome_sdk/resources/v1/alerts.rb +90 -16
  124. data/lib/metronome_sdk/resources/v1/audit_logs.rb +39 -4
  125. data/lib/metronome_sdk/resources/v1/billable_metrics.rb +54 -4
  126. data/lib/metronome_sdk/resources/v1/contracts/products.rb +25 -6
  127. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rb +7 -2
  128. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +10 -2
  129. data/lib/metronome_sdk/resources/v1/contracts/rate_cards.rb +109 -10
  130. data/lib/metronome_sdk/resources/v1/contracts.rb +255 -18
  131. data/lib/metronome_sdk/resources/v1/credit_grants.rb +2 -1
  132. data/lib/metronome_sdk/resources/v1/custom_fields.rb +51 -14
  133. data/lib/metronome_sdk/resources/v1/customers/alerts.rb +127 -13
  134. data/lib/metronome_sdk/resources/v1/customers/commits.rb +119 -9
  135. data/lib/metronome_sdk/resources/v1/customers/credits.rb +104 -8
  136. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +179 -8
  137. data/lib/metronome_sdk/resources/v1/customers.rb +175 -15
  138. data/lib/metronome_sdk/resources/v1/dashboards.rb +29 -3
  139. data/lib/metronome_sdk/resources/v1/invoices.rb +23 -2
  140. data/lib/metronome_sdk/resources/v1/payments.rb +102 -0
  141. data/lib/metronome_sdk/resources/v1/pricing_units.rb +6 -1
  142. data/lib/metronome_sdk/resources/v1/services.rb +6 -4
  143. data/lib/metronome_sdk/resources/v1/usage.rb +188 -13
  144. data/lib/metronome_sdk/resources/v1.rb +4 -0
  145. data/lib/metronome_sdk/resources/v2/contracts.rb +120 -18
  146. data/lib/metronome_sdk/version.rb +1 -1
  147. data/lib/metronome_sdk.rb +33 -3
  148. data/rbi/metronome_sdk/errors.rbi +31 -4
  149. data/rbi/metronome_sdk/file_part.rbi +1 -1
  150. data/rbi/metronome_sdk/internal/body_cursor_page.rbi +22 -0
  151. data/rbi/metronome_sdk/internal/cursor_page_without_limit.rbi +22 -0
  152. data/rbi/metronome_sdk/internal/transport/base_client.rbi +4 -5
  153. data/rbi/metronome_sdk/internal/type/base_page.rbi +1 -1
  154. data/rbi/metronome_sdk/internal/util.rbi +1 -1
  155. data/rbi/metronome_sdk/models/base_threshold_commit.rbi +58 -0
  156. data/rbi/metronome_sdk/models/commit.rbi +26 -348
  157. data/rbi/metronome_sdk/models/commit_hierarchy_configuration.rbi +280 -0
  158. data/rbi/metronome_sdk/models/commit_rate.rbi +85 -0
  159. data/rbi/metronome_sdk/models/commit_specifier.rbi +71 -0
  160. data/rbi/metronome_sdk/models/commit_specifier_input.rbi +74 -0
  161. data/rbi/metronome_sdk/models/contract.rbi +768 -0
  162. data/rbi/metronome_sdk/models/contract_v2.rbi +6415 -0
  163. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +186 -2509
  164. data/rbi/metronome_sdk/models/credit.rbi +10 -348
  165. data/rbi/metronome_sdk/models/discount.rbi +2 -0
  166. data/rbi/metronome_sdk/models/hierarchy_configuration.rbi +424 -0
  167. data/rbi/metronome_sdk/models/override.rbi +8 -193
  168. data/rbi/metronome_sdk/models/override_tier.rbi +29 -0
  169. data/rbi/metronome_sdk/models/overwrite_rate.rbi +137 -0
  170. data/rbi/metronome_sdk/models/payment_gate_config.rbi +317 -0
  171. data/rbi/metronome_sdk/models/payment_gate_config_v2.rbi +326 -0
  172. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +183 -0
  173. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +188 -0
  174. data/rbi/metronome_sdk/models/pro_service.rbi +2 -0
  175. data/rbi/metronome_sdk/models/recurring_commit_subscription_config.rbi +125 -0
  176. data/rbi/metronome_sdk/models/scheduled_charge.rbi +2 -0
  177. data/rbi/metronome_sdk/models/spend_threshold_configuration.rbi +76 -0
  178. data/rbi/metronome_sdk/models/spend_threshold_configuration_v2.rbi +78 -0
  179. data/rbi/metronome_sdk/models/subscription.rbi +635 -0
  180. data/rbi/metronome_sdk/models/update_base_threshold_commit.rbi +61 -0
  181. data/rbi/metronome_sdk/models/v1/alert_archive_params.rbi +6 -4
  182. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +57 -50
  183. data/rbi/metronome_sdk/models/v1/billable_metric_list_response.rbi +2 -0
  184. data/rbi/metronome_sdk/models/v1/billable_metric_retrieve_response.rbi +2 -0
  185. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +49 -768
  186. data/rbi/metronome_sdk/models/v1/contract_create_historical_invoices_params.rbi +2 -0
  187. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +1843 -4119
  188. data/rbi/metronome_sdk/models/v1/contract_list_balances_response.rbi +8 -59
  189. data/rbi/metronome_sdk/models/v1/contract_list_response.rbi +5 -2420
  190. data/rbi/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbi +6 -129
  191. data/rbi/metronome_sdk/models/v1/contract_retrieve_response.rbi +4 -2419
  192. data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +2 -0
  193. data/rbi/metronome_sdk/models/v1/contracts/product_list_response.rbi +2 -0
  194. data/rbi/metronome_sdk/models/v1/contracts/product_retrieve_response.rbi +2 -0
  195. data/rbi/metronome_sdk/models/v1/contracts/rate_card_create_params.rbi +2 -0
  196. data/rbi/metronome_sdk/models/v1/contracts/rate_card_list_response.rbi +2 -0
  197. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbi +6 -129
  198. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rbi +2 -0
  199. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +4 -129
  200. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +4 -129
  201. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbi +4 -129
  202. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbi +6 -129
  203. data/rbi/metronome_sdk/models/v1/credit_grant_list_entries_response.rbi +147 -198
  204. data/rbi/metronome_sdk/models/v1/credit_grant_list_response.rbi +2 -0
  205. data/rbi/metronome_sdk/models/v1/custom_field_list_keys_response.rbi +117 -165
  206. data/rbi/metronome_sdk/models/v1/custom_field_set_values_params.rbi +8 -1
  207. data/rbi/metronome_sdk/models/v1/customer.rbi +2 -0
  208. data/rbi/metronome_sdk/models/v1/customer_create_params.rbi +88 -3
  209. data/rbi/metronome_sdk/models/v1/customer_detail.rbi +10 -0
  210. data/rbi/metronome_sdk/models/v1/customer_list_billable_metrics_response.rbi +2 -0
  211. data/rbi/metronome_sdk/models/v1/customer_preview_events_params.rbi +6 -21
  212. data/rbi/metronome_sdk/models/v1/customer_preview_events_response.rbi +10 -9
  213. data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rbi +51 -0
  214. data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbi +265 -0
  215. data/rbi/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbi +348 -0
  216. data/rbi/metronome_sdk/models/v1/customers/alert_list_params.rbi +4 -4
  217. data/rbi/metronome_sdk/models/v1/customers/alert_reset_params.rbi +2 -2
  218. data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +68 -8
  219. data/rbi/metronome_sdk/models/v1/customers/billing_config_create_params.rbi +10 -0
  220. data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +10 -0
  221. data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +6 -90
  222. data/rbi/metronome_sdk/models/v1/customers/credit_create_params.rbi +6 -90
  223. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +54 -47
  224. data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +316 -68
  225. data/rbi/metronome_sdk/models/v1/customers/invoice_retrieve_pdf_params.rbi +50 -0
  226. data/rbi/metronome_sdk/models/v1/customers/plan_list_response.rbi +2 -0
  227. data/rbi/metronome_sdk/models/v1/payment.rbi +316 -0
  228. data/rbi/metronome_sdk/models/v1/payment_attempt_params.rbi +48 -0
  229. data/rbi/metronome_sdk/models/v1/payment_attempt_response.rbi +35 -0
  230. data/rbi/metronome_sdk/models/v1/payment_cancel_params.rbi +48 -0
  231. data/rbi/metronome_sdk/models/v1/payment_cancel_response.rbi +35 -0
  232. data/rbi/metronome_sdk/models/v1/payment_list_params.rbi +91 -0
  233. data/rbi/metronome_sdk/models/v1/payment_status.rbi +33 -0
  234. data/rbi/metronome_sdk/models/v1/plan_detail.rbi +2 -0
  235. data/rbi/metronome_sdk/models/v1/plan_list_charges_response.rbi +2 -0
  236. data/rbi/metronome_sdk/models/v1/plan_list_customers_response.rbi +2 -0
  237. data/rbi/metronome_sdk/models/v1/plan_list_response.rbi +8 -1
  238. data/rbi/metronome_sdk/models/v1/usage_list_response.rbi +45 -86
  239. data/rbi/metronome_sdk/models/v1/usage_search_response.rbi +2 -0
  240. data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +74 -76
  241. data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +74 -76
  242. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +3875 -7234
  243. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1733 -6207
  244. data/rbi/metronome_sdk/models/v2/contract_list_response.rbi +5 -9867
  245. data/rbi/metronome_sdk/models/v2/contract_retrieve_response.rbi +6 -9866
  246. data/rbi/metronome_sdk/models.rbi +44 -0
  247. data/rbi/metronome_sdk/resources/v1/alerts.rbi +101 -27
  248. data/rbi/metronome_sdk/resources/v1/audit_logs.rbi +39 -4
  249. data/rbi/metronome_sdk/resources/v1/billable_metrics.rbi +54 -4
  250. data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +25 -5
  251. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rbi +7 -2
  252. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +10 -3
  253. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards.rbi +109 -9
  254. data/rbi/metronome_sdk/resources/v1/contracts.rbi +258 -16
  255. data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +5 -1
  256. data/rbi/metronome_sdk/resources/v1/custom_fields.rbi +57 -14
  257. data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +133 -11
  258. data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +119 -10
  259. data/rbi/metronome_sdk/resources/v1/customers/credits.rbi +104 -9
  260. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +159 -7
  261. data/rbi/metronome_sdk/resources/v1/customers.rbi +162 -14
  262. data/rbi/metronome_sdk/resources/v1/dashboards.rbi +29 -3
  263. data/rbi/metronome_sdk/resources/v1/invoices.rbi +23 -2
  264. data/rbi/metronome_sdk/resources/v1/payments.rbi +72 -0
  265. data/rbi/metronome_sdk/resources/v1/pricing_units.rbi +6 -1
  266. data/rbi/metronome_sdk/resources/v1/services.rbi +6 -4
  267. data/rbi/metronome_sdk/resources/v1/usage.rbi +191 -13
  268. data/rbi/metronome_sdk/resources/v1.rbi +3 -0
  269. data/rbi/metronome_sdk/resources/v2/contracts.rbi +134 -23
  270. data/sig/metronome_sdk/errors.rbs +7 -0
  271. data/sig/metronome_sdk/file_part.rbs +1 -1
  272. data/sig/metronome_sdk/internal/body_cursor_page.rbs +13 -0
  273. data/sig/metronome_sdk/internal/cursor_page_without_limit.rbs +13 -0
  274. data/sig/metronome_sdk/models/base_threshold_commit.rbs +26 -0
  275. data/sig/metronome_sdk/models/commit.rbs +17 -170
  276. data/sig/metronome_sdk/models/commit_hierarchy_configuration.rbs +117 -0
  277. data/sig/metronome_sdk/models/commit_rate.rbs +48 -0
  278. data/sig/metronome_sdk/models/commit_specifier.rbs +47 -0
  279. data/sig/metronome_sdk/models/commit_specifier_input.rbs +47 -0
  280. data/sig/metronome_sdk/models/contract.rbs +398 -0
  281. data/sig/metronome_sdk/models/contract_v2.rbs +3108 -0
  282. data/sig/metronome_sdk/models/contract_without_amendments.rbs +54 -976
  283. data/sig/metronome_sdk/models/credit.rbs +12 -170
  284. data/sig/metronome_sdk/models/hierarchy_configuration.rbs +152 -0
  285. data/sig/metronome_sdk/models/override.rbs +12 -101
  286. data/sig/metronome_sdk/models/override_tier.rbs +17 -0
  287. data/sig/metronome_sdk/models/overwrite_rate.rbs +78 -0
  288. data/sig/metronome_sdk/models/payment_gate_config.rbs +124 -0
  289. data/sig/metronome_sdk/models/payment_gate_config_v2.rbs +124 -0
  290. data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +82 -0
  291. data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +82 -0
  292. data/sig/metronome_sdk/models/recurring_commit_subscription_config.rbs +51 -0
  293. data/sig/metronome_sdk/models/spend_threshold_configuration.rbs +35 -0
  294. data/sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs +35 -0
  295. data/sig/metronome_sdk/models/subscription.rbs +295 -0
  296. data/sig/metronome_sdk/models/update_base_threshold_commit.rbs +28 -0
  297. data/sig/metronome_sdk/models/v1/alert_create_params.rbs +4 -2
  298. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +26 -341
  299. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +219 -1184
  300. data/sig/metronome_sdk/models/v1/contract_list_balances_response.rbs +4 -25
  301. data/sig/metronome_sdk/models/v1/contract_list_response.rbs +4 -1041
  302. data/sig/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbs +6 -54
  303. data/sig/metronome_sdk/models/v1/contract_retrieve_response.rbs +4 -1041
  304. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbs +6 -54
  305. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +6 -54
  306. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +6 -54
  307. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbs +6 -54
  308. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbs +6 -54
  309. data/sig/metronome_sdk/models/v1/credit_grant_list_entries_response.rbs +72 -94
  310. data/sig/metronome_sdk/models/v1/custom_field_list_keys_response.rbs +53 -75
  311. data/sig/metronome_sdk/models/v1/customer_create_params.rbs +31 -4
  312. data/sig/metronome_sdk/models/v1/customer_detail.rbs +5 -0
  313. data/sig/metronome_sdk/models/v1/customer_preview_events_params.rbs +0 -7
  314. data/sig/metronome_sdk/models/v1/customer_preview_events_response.rbs +6 -4
  315. data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rbs +32 -0
  316. data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbs +113 -0
  317. data/sig/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbs +133 -0
  318. data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +21 -0
  319. data/sig/metronome_sdk/models/v1/customers/billing_config_create_params.rbs +7 -1
  320. data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbs +6 -1
  321. data/sig/metronome_sdk/models/v1/customers/commit_create_params.rbs +6 -50
  322. data/sig/metronome_sdk/models/v1/customers/credit_create_params.rbs +6 -50
  323. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +4 -2
  324. data/sig/metronome_sdk/models/v1/customers/invoice.rbs +137 -24
  325. data/sig/metronome_sdk/models/v1/customers/invoice_retrieve_pdf_params.rbs +32 -0
  326. data/sig/metronome_sdk/models/v1/payment.rbs +191 -0
  327. data/sig/metronome_sdk/models/v1/payment_attempt_params.rbs +30 -0
  328. data/sig/metronome_sdk/models/v1/payment_attempt_response.rbs +15 -0
  329. data/sig/metronome_sdk/models/v1/payment_cancel_params.rbs +30 -0
  330. data/sig/metronome_sdk/models/v1/payment_cancel_response.rbs +15 -0
  331. data/sig/metronome_sdk/models/v1/payment_list_params.rbs +56 -0
  332. data/sig/metronome_sdk/models/v1/payment_status.rbs +19 -0
  333. data/sig/metronome_sdk/models/v1/usage_list_response.rbs +33 -55
  334. data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +28 -43
  335. data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +28 -43
  336. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +412 -1793
  337. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +342 -2149
  338. data/sig/metronome_sdk/models/v2/contract_list_response.rbs +4 -4426
  339. data/sig/metronome_sdk/models/v2/contract_retrieve_response.rbs +4 -4426
  340. data/sig/metronome_sdk/models.rbs +38 -0
  341. data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +1 -1
  342. data/sig/metronome_sdk/resources/v1/contracts.rbs +3 -3
  343. data/sig/metronome_sdk/resources/v1/credit_grants.rbs +1 -1
  344. data/sig/metronome_sdk/resources/v1/custom_fields.rbs +1 -1
  345. data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +2 -1
  346. data/sig/metronome_sdk/resources/v1/customers/commits.rbs +2 -2
  347. data/sig/metronome_sdk/resources/v1/customers/credits.rbs +2 -2
  348. data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +6 -0
  349. data/sig/metronome_sdk/resources/v1/customers.rbs +11 -0
  350. data/sig/metronome_sdk/resources/v1/payments.rbs +30 -0
  351. data/sig/metronome_sdk/resources/v1/usage.rbs +1 -1
  352. data/sig/metronome_sdk/resources/v1.rbs +2 -0
  353. data/sig/metronome_sdk/resources/v2/contracts.rbs +10 -4
  354. metadata +101 -11
  355. data/lib/metronome_sdk/models/v1/customers/alert_list_response.rb +0 -29
  356. data/lib/metronome_sdk/models/v1/customers/commit_list_response.rb +0 -26
  357. data/lib/metronome_sdk/models/v1/customers/credit_list_response.rb +0 -26
  358. data/rbi/metronome_sdk/models/v1/customers/alert_list_response.rbi +0 -46
  359. data/rbi/metronome_sdk/models/v1/customers/commit_list_response.rbi +0 -45
  360. data/rbi/metronome_sdk/models/v1/customers/credit_list_response.rbi +0 -45
  361. data/sig/metronome_sdk/models/v1/customers/alert_list_response.rbs +0 -29
  362. data/sig/metronome_sdk/models/v1/customers/commit_list_response.rbs +0 -26
  363. data/sig/metronome_sdk/models/v1/customers/credit_list_response.rbs +0 -26
@@ -45,9 +45,9 @@ module MetronomeSDK
45
45
 
46
46
  # @!attribute add_prepaid_balance_threshold_configuration
47
47
  #
48
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration, nil]
48
+ # @return [MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2, nil]
49
49
  optional :add_prepaid_balance_threshold_configuration,
50
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration }
50
+ -> { MetronomeSDK::PrepaidBalanceThresholdConfigurationV2 }
51
51
 
52
52
  # @!attribute add_pro_services
53
53
  #
@@ -80,16 +80,14 @@ module MetronomeSDK
80
80
 
81
81
  # @!attribute add_spend_threshold_configuration
82
82
  #
83
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration, nil]
84
- optional :add_spend_threshold_configuration,
85
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration }
83
+ # @return [MetronomeSDK::Models::SpendThresholdConfigurationV2, nil]
84
+ optional :add_spend_threshold_configuration, -> { MetronomeSDK::SpendThresholdConfigurationV2 }
86
85
 
87
86
  # @!attribute add_subscriptions
88
87
  # List of subscriptions on the contract.
89
88
  #
90
- # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription>, nil]
91
- optional :add_subscriptions,
92
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription] }
89
+ # @return [Array<MetronomeSDK::Models::Subscription>, nil]
90
+ optional :add_subscriptions, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Subscription] }
93
91
 
94
92
  # @!attribute add_usage_filters
95
93
  #
@@ -126,6 +124,14 @@ module MetronomeSDK
126
124
  # @return [Time, nil]
127
125
  optional :timestamp, Time
128
126
 
127
+ # @!attribute uniqueness_key
128
+ # Prevents the creation of duplicates. If a request to create a record is made
129
+ # with a previously used uniqueness key, a new record will not be created and the
130
+ # request will fail with a 409 error.
131
+ #
132
+ # @return [String, nil]
133
+ optional :uniqueness_key, String
134
+
129
135
  # @!attribute update_commits
130
136
  #
131
137
  # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit>, nil]
@@ -199,7 +205,7 @@ module MetronomeSDK
199
205
  optional :update_subscriptions,
200
206
  -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSubscription] }
201
207
 
202
- # @!method initialize(id:, add_commits: nil, add_credits: nil, add_discounts: nil, add_overrides: nil, add_prepaid_balance_threshold_configuration: nil, add_pro_services: nil, add_recurring_commits: nil, add_recurring_credits: nil, add_reseller_royalties: nil, add_scheduled_charges: nil, add_spend_threshold_configuration: nil, add_subscriptions: nil, add_usage_filters: nil, archive_commits: nil, archive_credits: nil, archive_scheduled_charges: nil, remove_overrides: nil, timestamp: nil, update_commits: nil, update_contract_end_date: nil, update_contract_name: nil, update_credits: nil, update_discounts: nil, update_prepaid_balance_threshold_configuration: nil, update_recurring_commits: nil, update_recurring_credits: nil, update_refund_invoices: nil, update_scheduled_charges: nil, update_spend_threshold_configuration: nil, update_subscriptions: nil)
208
+ # @!method initialize(id:, add_commits: nil, add_credits: nil, add_discounts: nil, add_overrides: nil, add_prepaid_balance_threshold_configuration: nil, add_pro_services: nil, add_recurring_commits: nil, add_recurring_credits: nil, add_reseller_royalties: nil, add_scheduled_charges: nil, add_spend_threshold_configuration: nil, add_subscriptions: nil, add_usage_filters: nil, archive_commits: nil, archive_credits: nil, archive_scheduled_charges: nil, remove_overrides: nil, timestamp: nil, uniqueness_key: nil, update_commits: nil, update_contract_end_date: nil, update_contract_name: nil, update_credits: nil, update_discounts: nil, update_prepaid_balance_threshold_configuration: nil, update_recurring_commits: nil, update_recurring_credits: nil, update_refund_invoices: nil, update_scheduled_charges: nil, update_spend_threshold_configuration: nil, update_subscriptions: nil)
203
209
  # Some parameter documentations has been truncated, see
204
210
  # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data} for more
205
211
  # details.
@@ -214,7 +220,7 @@ module MetronomeSDK
214
220
  #
215
221
  # @param add_overrides [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride>]
216
222
  #
217
- # @param add_prepaid_balance_threshold_configuration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration]
223
+ # @param add_prepaid_balance_threshold_configuration [MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2]
218
224
  #
219
225
  # @param add_pro_services [Array<MetronomeSDK::Models::ProService>]
220
226
  #
@@ -226,9 +232,9 @@ module MetronomeSDK
226
232
  #
227
233
  # @param add_scheduled_charges [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge>]
228
234
  #
229
- # @param add_spend_threshold_configuration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration]
235
+ # @param add_spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfigurationV2]
230
236
  #
231
- # @param add_subscriptions [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription>] List of subscriptions on the contract.
237
+ # @param add_subscriptions [Array<MetronomeSDK::Models::Subscription>] List of subscriptions on the contract.
232
238
  #
233
239
  # @param add_usage_filters [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddUsageFilter>]
234
240
  #
@@ -242,6 +248,8 @@ module MetronomeSDK
242
248
  #
243
249
  # @param timestamp [Time]
244
250
  #
251
+ # @param uniqueness_key [String] Prevents the creation of duplicates. If a request to create a record is made wit
252
+ #
245
253
  # @param update_commits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit>]
246
254
  #
247
255
  # @param update_contract_end_date [Time]
@@ -309,15 +317,15 @@ module MetronomeSDK
309
317
  # @!attribute hierarchy_configuration
310
318
  # Optional configuration for commit hierarchy access control
311
319
  #
312
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration, nil]
313
- optional :hierarchy_configuration,
314
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration }
320
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
321
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
315
322
 
316
323
  # @!attribute invoice_schedule
317
324
  # The schedule that the customer will be invoiced for this commit.
318
325
  #
319
- # @return [MetronomeSDK::Models::SchedulePointInTime, nil]
320
- optional :invoice_schedule, -> { MetronomeSDK::SchedulePointInTime }
326
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule, nil]
327
+ optional :invoice_schedule,
328
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule }
321
329
 
322
330
  # @!attribute name
323
331
  #
@@ -362,9 +370,8 @@ module MetronomeSDK
362
370
  # Instead, to target usage by product or product tag, pass those values in the
363
371
  # body of `specifiers`.
364
372
  #
365
- # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Specifier>, nil]
366
- optional :specifiers,
367
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Specifier] }
373
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
374
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
368
375
 
369
376
  # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, rollover_fraction: nil, salesforce_opportunity_id: nil, specifiers: nil)
370
377
  # Some parameter documentations has been truncated, see
@@ -385,9 +392,9 @@ module MetronomeSDK
385
392
  #
386
393
  # @param description [String]
387
394
  #
388
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration] Optional configuration for commit hierarchy access control
395
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for commit hierarchy access control
389
396
  #
390
- # @param invoice_schedule [MetronomeSDK::Models::SchedulePointInTime] The schedule that the customer will be invoiced for this commit.
397
+ # @param invoice_schedule [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule] The schedule that the customer will be invoiced for this commit.
391
398
  #
392
399
  # @param name [String]
393
400
  #
@@ -401,7 +408,7 @@ module MetronomeSDK
401
408
  #
402
409
  # @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
403
410
  #
404
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
411
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
405
412
 
406
413
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit#product
407
414
  class Product < MetronomeSDK::Internal::Type::BaseModel
@@ -431,100 +438,72 @@ module MetronomeSDK
431
438
  # @return [Array<Symbol>]
432
439
  end
433
440
 
434
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit#hierarchy_configuration
435
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
436
- # @!attribute child_access
441
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit#invoice_schedule
442
+ class InvoiceSchedule < MetronomeSDK::Internal::Type::BaseModel
443
+ # @!attribute credit_type
437
444
  #
438
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
439
- required :child_access,
440
- union: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess }
445
+ # @return [MetronomeSDK::Models::CreditTypeData, nil]
446
+ optional :credit_type, -> { MetronomeSDK::CreditTypeData }
441
447
 
442
- # @!method initialize(child_access:)
443
- # Optional configuration for commit hierarchy access control
448
+ # @!attribute do_not_invoice
449
+ # If true, this schedule will not generate an invoice.
444
450
  #
445
- # @param child_access [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
446
-
447
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration#child_access
448
- module ChildAccess
449
- extend MetronomeSDK::Internal::Type::Union
450
-
451
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll }
452
-
453
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone }
454
-
455
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs }
456
-
457
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
458
- # @!attribute type
459
- #
460
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
461
- required :type,
462
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type }
463
-
464
- # @!method initialize(type:)
465
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
466
-
467
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
468
- module Type
469
- extend MetronomeSDK::Internal::Type::Enum
470
-
471
- ALL = :ALL
472
-
473
- # @!method self.values
474
- # @return [Array<Symbol>]
475
- end
476
- end
477
-
478
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
479
- # @!attribute type
480
- #
481
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
482
- required :type,
483
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type }
484
-
485
- # @!method initialize(type:)
486
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
487
-
488
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
489
- module Type
490
- extend MetronomeSDK::Internal::Type::Enum
451
+ # @return [Boolean, nil]
452
+ optional :do_not_invoice, MetronomeSDK::Internal::Type::Boolean
491
453
 
492
- NONE = :NONE
454
+ # @!attribute schedule_items
455
+ #
456
+ # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule::ScheduleItem>, nil]
457
+ optional :schedule_items,
458
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule::ScheduleItem] }
493
459
 
494
- # @!method self.values
495
- # @return [Array<Symbol>]
496
- end
497
- end
460
+ # @!method initialize(credit_type: nil, do_not_invoice: nil, schedule_items: nil)
461
+ # The schedule that the customer will be invoiced for this commit.
462
+ #
463
+ # @param credit_type [MetronomeSDK::Models::CreditTypeData]
464
+ #
465
+ # @param do_not_invoice [Boolean] If true, this schedule will not generate an invoice.
466
+ #
467
+ # @param schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule::ScheduleItem>]
498
468
 
499
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
500
- # @!attribute contract_ids
501
- #
502
- # @return [Array<String>]
503
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
469
+ class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
470
+ # @!attribute id
471
+ #
472
+ # @return [String]
473
+ required :id, String
504
474
 
505
- # @!attribute type
506
- #
507
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
508
- required :type,
509
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type }
475
+ # @!attribute timestamp
476
+ #
477
+ # @return [Time]
478
+ required :timestamp, Time
510
479
 
511
- # @!method initialize(contract_ids:, type:)
512
- # @param contract_ids [Array<String>]
513
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
480
+ # @!attribute amount
481
+ #
482
+ # @return [Float, nil]
483
+ optional :amount, Float
514
484
 
515
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
516
- module Type
517
- extend MetronomeSDK::Internal::Type::Enum
485
+ # @!attribute invoice_id
486
+ #
487
+ # @return [String, nil]
488
+ optional :invoice_id, String, nil?: true
518
489
 
519
- CONTRACT_IDS = :CONTRACT_IDS
490
+ # @!attribute quantity
491
+ #
492
+ # @return [Float, nil]
493
+ optional :quantity, Float
520
494
 
521
- # @!method self.values
522
- # @return [Array<Symbol>]
523
- end
524
- end
495
+ # @!attribute unit_price
496
+ #
497
+ # @return [Float, nil]
498
+ optional :unit_price, Float
525
499
 
526
- # @!method self.variants
527
- # @return [Array(MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
500
+ # @!method initialize(id:, timestamp:, amount: nil, invoice_id: nil, quantity: nil, unit_price: nil)
501
+ # @param id [String]
502
+ # @param timestamp [Time]
503
+ # @param amount [Float]
504
+ # @param invoice_id [String, nil]
505
+ # @param quantity [Float]
506
+ # @param unit_price [Float]
528
507
  end
529
508
  end
530
509
 
@@ -538,44 +517,6 @@ module MetronomeSDK
538
517
  # @!method self.values
539
518
  # @return [Array<Symbol>]
540
519
  end
541
-
542
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
543
- # @!attribute presentation_group_values
544
- #
545
- # @return [Hash{Symbol=>String}, nil]
546
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
547
-
548
- # @!attribute pricing_group_values
549
- #
550
- # @return [Hash{Symbol=>String}, nil]
551
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
552
-
553
- # @!attribute product_id
554
- # If provided, the specifier will only apply to the product with the specified ID.
555
- #
556
- # @return [String, nil]
557
- optional :product_id, String
558
-
559
- # @!attribute product_tags
560
- # If provided, the specifier will only apply to products with all the specified
561
- # tags.
562
- #
563
- # @return [Array<String>, nil]
564
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
565
-
566
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
567
- # Some parameter documentations has been truncated, see
568
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Specifier}
569
- # for more details.
570
- #
571
- # @param presentation_group_values [Hash{Symbol=>String}]
572
- #
573
- # @param pricing_group_values [Hash{Symbol=>String}]
574
- #
575
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
576
- #
577
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
578
- end
579
520
  end
580
521
 
581
522
  class AddCredit < MetronomeSDK::Internal::Type::BaseModel
@@ -620,9 +561,8 @@ module MetronomeSDK
620
561
  # @!attribute hierarchy_configuration
621
562
  # Optional configuration for recurring credit hierarchy access control
622
563
  #
623
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration, nil]
624
- optional :hierarchy_configuration,
625
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration }
564
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
565
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
626
566
 
627
567
  # @!attribute name
628
568
  #
@@ -656,9 +596,8 @@ module MetronomeSDK
656
596
  # Instead, to target usage by product or product tag, pass those values in the
657
597
  # body of `specifiers`.
658
598
  #
659
- # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::Specifier>, nil]
660
- optional :specifiers,
661
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::Specifier] }
599
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
600
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
662
601
 
663
602
  # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, salesforce_opportunity_id: nil, specifiers: nil)
664
603
  # Some parameter documentations has been truncated, see
@@ -679,7 +618,7 @@ module MetronomeSDK
679
618
  #
680
619
  # @param description [String]
681
620
  #
682
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
621
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
683
622
  #
684
623
  # @param name [String]
685
624
  #
@@ -689,7 +628,7 @@ module MetronomeSDK
689
628
  #
690
629
  # @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
691
630
  #
692
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
631
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
693
632
 
694
633
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit#product
695
634
  class Product < MetronomeSDK::Internal::Type::BaseModel
@@ -717,141 +656,6 @@ module MetronomeSDK
717
656
  # @!method self.values
718
657
  # @return [Array<Symbol>]
719
658
  end
720
-
721
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit#hierarchy_configuration
722
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
723
- # @!attribute child_access
724
- #
725
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
726
- required :child_access,
727
- union: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess }
728
-
729
- # @!method initialize(child_access:)
730
- # Optional configuration for recurring credit hierarchy access control
731
- #
732
- # @param child_access [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
733
-
734
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration#child_access
735
- module ChildAccess
736
- extend MetronomeSDK::Internal::Type::Union
737
-
738
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll }
739
-
740
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone }
741
-
742
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs }
743
-
744
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
745
- # @!attribute type
746
- #
747
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
748
- required :type,
749
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type }
750
-
751
- # @!method initialize(type:)
752
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
753
-
754
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
755
- module Type
756
- extend MetronomeSDK::Internal::Type::Enum
757
-
758
- ALL = :ALL
759
-
760
- # @!method self.values
761
- # @return [Array<Symbol>]
762
- end
763
- end
764
-
765
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
766
- # @!attribute type
767
- #
768
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
769
- required :type,
770
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type }
771
-
772
- # @!method initialize(type:)
773
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
774
-
775
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
776
- module Type
777
- extend MetronomeSDK::Internal::Type::Enum
778
-
779
- NONE = :NONE
780
-
781
- # @!method self.values
782
- # @return [Array<Symbol>]
783
- end
784
- end
785
-
786
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
787
- # @!attribute contract_ids
788
- #
789
- # @return [Array<String>]
790
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
791
-
792
- # @!attribute type
793
- #
794
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
795
- required :type,
796
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type }
797
-
798
- # @!method initialize(contract_ids:, type:)
799
- # @param contract_ids [Array<String>]
800
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
801
-
802
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
803
- module Type
804
- extend MetronomeSDK::Internal::Type::Enum
805
-
806
- CONTRACT_IDS = :CONTRACT_IDS
807
-
808
- # @!method self.values
809
- # @return [Array<Symbol>]
810
- end
811
- end
812
-
813
- # @!method self.variants
814
- # @return [Array(MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
815
- end
816
- end
817
-
818
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
819
- # @!attribute presentation_group_values
820
- #
821
- # @return [Hash{Symbol=>String}, nil]
822
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
823
-
824
- # @!attribute pricing_group_values
825
- #
826
- # @return [Hash{Symbol=>String}, nil]
827
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
828
-
829
- # @!attribute product_id
830
- # If provided, the specifier will only apply to the product with the specified ID.
831
- #
832
- # @return [String, nil]
833
- optional :product_id, String
834
-
835
- # @!attribute product_tags
836
- # If provided, the specifier will only apply to products with all the specified
837
- # tags.
838
- #
839
- # @return [Array<String>, nil]
840
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
841
-
842
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
843
- # Some parameter documentations has been truncated, see
844
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::Specifier}
845
- # for more details.
846
- #
847
- # @param presentation_group_values [Hash{Symbol=>String}]
848
- #
849
- # @param pricing_group_values [Hash{Symbol=>String}]
850
- #
851
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
852
- #
853
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
854
- end
855
659
  end
856
660
 
857
661
  class AddOverride < MetronomeSDK::Internal::Type::BaseModel
@@ -898,9 +702,8 @@ module MetronomeSDK
898
702
 
899
703
  # @!attribute override_tiers
900
704
  #
901
- # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideTier>, nil]
902
- optional :override_tiers,
903
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideTier] }
705
+ # @return [Array<MetronomeSDK::Models::OverrideTier>, nil]
706
+ optional :override_tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::OverrideTier] }
904
707
 
905
708
  # @!attribute overwrite_rate
906
709
  #
@@ -940,7 +743,7 @@ module MetronomeSDK
940
743
  # @param is_commit_specific [Boolean]
941
744
  # @param multiplier [Float]
942
745
  # @param override_specifiers [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideSpecifier>]
943
- # @param override_tiers [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideTier>]
746
+ # @param override_tiers [Array<MetronomeSDK::Models::OverrideTier>]
944
747
  # @param overwrite_rate [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate]
945
748
  # @param priority [Float]
946
749
  # @param product [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::Product]
@@ -1013,22 +816,6 @@ module MetronomeSDK
1013
816
  end
1014
817
  end
1015
818
 
1016
- class OverrideTier < MetronomeSDK::Internal::Type::BaseModel
1017
- # @!attribute multiplier
1018
- #
1019
- # @return [Float]
1020
- required :multiplier, Float
1021
-
1022
- # @!attribute size
1023
- #
1024
- # @return [Float, nil]
1025
- optional :size, Float
1026
-
1027
- # @!method initialize(multiplier:, size: nil)
1028
- # @param multiplier [Float]
1029
- # @param size [Float]
1030
- end
1031
-
1032
819
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride#overwrite_rate
1033
820
  class OverwriteRate < MetronomeSDK::Internal::Type::BaseModel
1034
821
  # @!attribute rate_type
@@ -1047,8 +834,7 @@ module MetronomeSDK
1047
834
  # processors.
1048
835
  #
1049
836
  # @return [Hash{Symbol=>Object}, nil]
1050
- optional :custom_rate,
1051
- MetronomeSDK::Internal::Type::HashOf[MetronomeSDK::Internal::Type::Unknown]
837
+ optional :custom_rate, MetronomeSDK::Internal::Type::HashOf[MetronomeSDK::Internal::Type::Unknown]
1052
838
 
1053
839
  # @!attribute is_prorated
1054
840
  # Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
@@ -1151,415 +937,93 @@ module MetronomeSDK
1151
937
  end
1152
938
  end
1153
939
 
1154
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data#add_prepaid_balance_threshold_configuration
1155
- class AddPrepaidBalanceThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
1156
- # @!attribute commit
940
+ class AddRecurringCommit < MetronomeSDK::Internal::Type::BaseModel
941
+ # @!attribute id
1157
942
  #
1158
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::Commit]
1159
- required :commit,
1160
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::Commit }
943
+ # @return [String]
944
+ required :id, String
1161
945
 
1162
- # @!attribute is_enabled
1163
- # When set to false, the contract will not be evaluated against the
1164
- # threshold_amount. Toggling to true will result an immediate evaluation,
1165
- # regardless of prior state.
946
+ # @!attribute access_amount
947
+ # The amount of commit to grant.
1166
948
  #
1167
- # @return [Boolean]
1168
- required :is_enabled, MetronomeSDK::Internal::Type::Boolean
949
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::AccessAmount]
950
+ required :access_amount,
951
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::AccessAmount }
1169
952
 
1170
- # @!attribute payment_gate_config
953
+ # @!attribute commit_duration
954
+ # The amount of time the created commits will be valid for
1171
955
  #
1172
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig]
1173
- required :payment_gate_config,
1174
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig }
956
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::CommitDuration]
957
+ required :commit_duration,
958
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::CommitDuration }
1175
959
 
1176
- # @!attribute recharge_to_amount
1177
- # Specify the amount the balance should be recharged to.
960
+ # @!attribute priority
961
+ # Will be passed down to the individual commits
1178
962
  #
1179
963
  # @return [Float]
1180
- required :recharge_to_amount, Float
964
+ required :priority, Float
1181
965
 
1182
- # @!attribute threshold_amount
1183
- # Specify the threshold amount for the contract. Each time the contract's balance
1184
- # lowers to this amount, a threshold charge will be initiated.
966
+ # @!attribute product
1185
967
  #
1186
- # @return [Float]
1187
- required :threshold_amount, Float
968
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Product]
969
+ required :product,
970
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Product }
1188
971
 
1189
- # @!attribute custom_credit_type_id
1190
- # If provided, the threshold, recharge-to amount, and the resulting threshold
1191
- # commit amount will be in terms of this credit type instead of the fiat currency.
972
+ # @!attribute rate_type
973
+ # Whether the created commits will use the commit rate or list rate
1192
974
  #
1193
- # @return [String, nil]
1194
- optional :custom_credit_type_id, String
975
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::RateType]
976
+ required :rate_type,
977
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::RateType }
1195
978
 
1196
- # @!method initialize(commit:, is_enabled:, payment_gate_config:, recharge_to_amount:, threshold_amount:, custom_credit_type_id: nil)
1197
- # Some parameter documentations has been truncated, see
1198
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration}
1199
- # for more details.
1200
- #
1201
- # @param commit [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::Commit]
1202
- #
1203
- # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
979
+ # @!attribute starting_at
980
+ # Determines the start time for the first commit
1204
981
  #
1205
- # @param payment_gate_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig]
982
+ # @return [Time]
983
+ required :starting_at, Time
984
+
985
+ # @!attribute applicable_product_ids
986
+ # Will be passed down to the individual commits
1206
987
  #
1207
- # @param recharge_to_amount [Float] Specify the amount the balance should be recharged to.
988
+ # @return [Array<String>, nil]
989
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
990
+
991
+ # @!attribute applicable_product_tags
992
+ # Will be passed down to the individual commits
1208
993
  #
1209
- # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's balance
994
+ # @return [Array<String>, nil]
995
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
996
+
997
+ # @!attribute contract
1210
998
  #
1211
- # @param custom_credit_type_id [String] If provided, the threshold, recharge-to amount, and the resulting threshold comm
999
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Contract, nil]
1000
+ optional :contract,
1001
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Contract }
1212
1002
 
1213
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration#commit
1214
- class Commit < MetronomeSDK::Internal::Type::BaseModel
1215
- # @!attribute product_id
1216
- # The commit product that will be used to generate the line item for commit
1217
- # payment.
1218
- #
1219
- # @return [String]
1220
- required :product_id, String
1003
+ # @!attribute description
1004
+ # Will be passed down to the individual commits
1005
+ #
1006
+ # @return [String, nil]
1007
+ optional :description, String
1221
1008
 
1222
- # @!attribute applicable_product_ids
1223
- # Which products the threshold commit applies to. If applicable_product_ids,
1224
- # applicable_product_tags or specifiers are not provided, the commit applies to
1225
- # all products.
1226
- #
1227
- # @return [Array<String>, nil]
1228
- optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1009
+ # @!attribute ending_before
1010
+ # Determines when the contract will stop creating recurring commits. Optional
1011
+ #
1012
+ # @return [Time, nil]
1013
+ optional :ending_before, Time
1229
1014
 
1230
- # @!attribute applicable_product_tags
1231
- # Which tags the threshold commit applies to. If applicable_product_ids,
1232
- # applicable_product_tags or specifiers are not provided, the commit applies to
1233
- # all products.
1234
- #
1235
- # @return [Array<String>, nil]
1236
- optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1015
+ # @!attribute hierarchy_configuration
1016
+ # Optional configuration for recurring credit hierarchy access control
1017
+ #
1018
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
1019
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
1237
1020
 
1238
- # @!attribute description
1239
- #
1240
- # @return [String, nil]
1241
- optional :description, String
1242
-
1243
- # @!attribute name
1244
- # Specify the name of the line item for the threshold charge. If left blank, it
1245
- # will default to the commit product name.
1246
- #
1247
- # @return [String, nil]
1248
- optional :name, String
1249
-
1250
- # @!attribute specifiers
1251
- # List of filters that determine what kind of customer usage draws down a commit
1252
- # or credit. A customer's usage needs to meet the condition of at least one of the
1253
- # specifiers to contribute to a commit's or credit's drawdown. This field cannot
1254
- # be used together with `applicable_product_ids` or `applicable_product_tags`.
1255
- # Instead, to target usage by product or product tag, pass those values in the
1256
- # body of `specifiers`.
1257
- #
1258
- # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::Commit::Specifier>, nil]
1259
- optional :specifiers,
1260
- -> do
1261
- MetronomeSDK::Internal::Type::ArrayOf[
1262
- MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::Commit::Specifier
1263
- ]
1264
- end
1265
-
1266
- # @!method initialize(product_id:, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, name: nil, specifiers: nil)
1267
- # Some parameter documentations has been truncated, see
1268
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::Commit}
1269
- # for more details.
1270
- #
1271
- # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
1272
- #
1273
- # @param applicable_product_ids [Array<String>] Which products the threshold commit applies to. If applicable_product_ids, appli
1274
- #
1275
- # @param applicable_product_tags [Array<String>] Which tags the threshold commit applies to. If applicable_product_ids, applicabl
1276
- #
1277
- # @param description [String]
1278
- #
1279
- # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
1280
- #
1281
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::Commit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
1282
-
1283
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
1284
- # @!attribute presentation_group_values
1285
- #
1286
- # @return [Hash{Symbol=>String}, nil]
1287
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1288
-
1289
- # @!attribute pricing_group_values
1290
- #
1291
- # @return [Hash{Symbol=>String}, nil]
1292
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1293
-
1294
- # @!attribute product_id
1295
- # If provided, the specifier will only apply to the product with the specified ID.
1296
- #
1297
- # @return [String, nil]
1298
- optional :product_id, String
1299
-
1300
- # @!attribute product_tags
1301
- # If provided, the specifier will only apply to products with all the specified
1302
- # tags.
1303
- #
1304
- # @return [Array<String>, nil]
1305
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1306
-
1307
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
1308
- # Some parameter documentations has been truncated, see
1309
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::Commit::Specifier}
1310
- # for more details.
1311
- #
1312
- # @param presentation_group_values [Hash{Symbol=>String}]
1313
- #
1314
- # @param pricing_group_values [Hash{Symbol=>String}]
1315
- #
1316
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
1317
- #
1318
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
1319
- end
1320
- end
1321
-
1322
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration#payment_gate_config
1323
- class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
1324
- # @!attribute payment_gate_type
1325
- # Gate access to the commit balance based on successful collection of payment.
1326
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
1327
- # facilitate payment using your own payment integration. Select NONE if you do not
1328
- # wish to payment gate the commit balance.
1329
- #
1330
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType]
1331
- required :payment_gate_type,
1332
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType }
1333
-
1334
- # @!attribute precalculated_tax_config
1335
- # Only applicable if using PRECALCULATED as your tax type.
1336
- #
1337
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
1338
- optional :precalculated_tax_config,
1339
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig }
1340
-
1341
- # @!attribute stripe_config
1342
- # Only applicable if using STRIPE as your payment gateway type.
1343
- #
1344
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
1345
- optional :stripe_config,
1346
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig }
1347
-
1348
- # @!attribute tax_type
1349
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
1350
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
1351
- # will default to NONE.
1352
- #
1353
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType, nil]
1354
- optional :tax_type,
1355
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType }
1356
-
1357
- # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
1358
- # Some parameter documentations has been truncated, see
1359
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig}
1360
- # for more details.
1361
- #
1362
- # @param payment_gate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
1363
- #
1364
- # @param precalculated_tax_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
1365
- #
1366
- # @param stripe_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gateway type.
1367
- #
1368
- # @param tax_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
1369
-
1370
- # Gate access to the commit balance based on successful collection of payment.
1371
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
1372
- # facilitate payment using your own payment integration. Select NONE if you do not
1373
- # wish to payment gate the commit balance.
1374
- #
1375
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig#payment_gate_type
1376
- module PaymentGateType
1377
- extend MetronomeSDK::Internal::Type::Enum
1378
-
1379
- NONE = :NONE
1380
- STRIPE = :STRIPE
1381
- EXTERNAL = :EXTERNAL
1382
-
1383
- # @!method self.values
1384
- # @return [Array<Symbol>]
1385
- end
1386
-
1387
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
1388
- class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
1389
- # @!attribute tax_amount
1390
- # Amount of tax to be applied. This should be in the same currency and
1391
- # denomination as the commit's invoice schedule
1392
- #
1393
- # @return [Float]
1394
- required :tax_amount, Float
1395
-
1396
- # @!attribute tax_name
1397
- # Name of the tax to be applied. This may be used in an invoice line item
1398
- # description.
1399
- #
1400
- # @return [String, nil]
1401
- optional :tax_name, String
1402
-
1403
- # @!method initialize(tax_amount:, tax_name: nil)
1404
- # Some parameter documentations has been truncated, see
1405
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
1406
- # for more details.
1407
- #
1408
- # Only applicable if using PRECALCULATED as your tax type.
1409
- #
1410
- # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
1411
- #
1412
- # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
1413
- end
1414
-
1415
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig#stripe_config
1416
- class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
1417
- # @!attribute payment_type
1418
- # If left blank, will default to INVOICE
1419
- #
1420
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
1421
- required :payment_type,
1422
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType }
1423
-
1424
- # @!attribute invoice_metadata
1425
- # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
1426
- # your payment type.
1427
- #
1428
- # @return [Hash{Symbol=>String}, nil]
1429
- optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
1430
-
1431
- # @!method initialize(payment_type:, invoice_metadata: nil)
1432
- # Some parameter documentations has been truncated, see
1433
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig}
1434
- # for more details.
1435
- #
1436
- # Only applicable if using STRIPE as your payment gateway type.
1437
- #
1438
- # @param payment_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
1439
- #
1440
- # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
1441
-
1442
- # If left blank, will default to INVOICE
1443
- #
1444
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
1445
- module PaymentType
1446
- extend MetronomeSDK::Internal::Type::Enum
1447
-
1448
- INVOICE = :INVOICE
1449
- PAYMENT_INTENT = :PAYMENT_INTENT
1450
-
1451
- # @!method self.values
1452
- # @return [Array<Symbol>]
1453
- end
1454
- end
1455
-
1456
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
1457
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
1458
- # will default to NONE.
1459
- #
1460
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig#tax_type
1461
- module TaxType
1462
- extend MetronomeSDK::Internal::Type::Enum
1463
-
1464
- NONE = :NONE
1465
- STRIPE = :STRIPE
1466
- ANROK = :ANROK
1467
- PRECALCULATED = :PRECALCULATED
1468
-
1469
- # @!method self.values
1470
- # @return [Array<Symbol>]
1471
- end
1472
- end
1473
- end
1474
-
1475
- class AddRecurringCommit < MetronomeSDK::Internal::Type::BaseModel
1476
- # @!attribute id
1477
- #
1478
- # @return [String]
1479
- required :id, String
1480
-
1481
- # @!attribute access_amount
1482
- # The amount of commit to grant.
1483
- #
1484
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::AccessAmount]
1485
- required :access_amount,
1486
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::AccessAmount }
1487
-
1488
- # @!attribute commit_duration
1489
- # The amount of time the created commits will be valid for
1490
- #
1491
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::CommitDuration]
1492
- required :commit_duration,
1493
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::CommitDuration }
1494
-
1495
- # @!attribute priority
1496
- # Will be passed down to the individual commits
1497
- #
1498
- # @return [Float]
1499
- required :priority, Float
1500
-
1501
- # @!attribute product
1502
- #
1503
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Product]
1504
- required :product,
1505
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Product }
1506
-
1507
- # @!attribute rate_type
1508
- # Whether the created commits will use the commit rate or list rate
1509
- #
1510
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::RateType]
1511
- required :rate_type,
1512
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::RateType }
1513
-
1514
- # @!attribute starting_at
1515
- # Determines the start time for the first commit
1516
- #
1517
- # @return [Time]
1518
- required :starting_at, Time
1519
-
1520
- # @!attribute applicable_product_ids
1521
- # Will be passed down to the individual commits
1522
- #
1523
- # @return [Array<String>, nil]
1524
- optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1525
-
1526
- # @!attribute applicable_product_tags
1527
- # Will be passed down to the individual commits
1528
- #
1529
- # @return [Array<String>, nil]
1530
- optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1531
-
1532
- # @!attribute contract
1533
- #
1534
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Contract, nil]
1535
- optional :contract,
1536
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Contract }
1537
-
1538
- # @!attribute description
1539
- # Will be passed down to the individual commits
1540
- #
1541
- # @return [String, nil]
1542
- optional :description, String
1543
-
1544
- # @!attribute ending_before
1545
- # Determines when the contract will stop creating recurring commits. Optional
1546
- #
1547
- # @return [Time, nil]
1548
- optional :ending_before, Time
1549
-
1550
- # @!attribute hierarchy_configuration
1551
- # Optional configuration for recurring credit hierarchy access control
1552
- #
1553
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration, nil]
1554
- optional :hierarchy_configuration,
1555
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration }
1556
-
1557
- # @!attribute invoice_amount
1558
- # The amount the customer should be billed for the commit. Not required.
1559
- #
1560
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::InvoiceAmount, nil]
1561
- optional :invoice_amount,
1562
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::InvoiceAmount }
1021
+ # @!attribute invoice_amount
1022
+ # The amount the customer should be billed for the commit. Not required.
1023
+ #
1024
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::InvoiceAmount, nil]
1025
+ optional :invoice_amount,
1026
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::InvoiceAmount }
1563
1027
 
1564
1028
  # @!attribute name
1565
1029
  # Displayed on invoices. Will be passed through to the individual commits
@@ -1605,16 +1069,14 @@ module MetronomeSDK
1605
1069
  # or credit. A customer's usage needs to meet the condition of at least one of the
1606
1070
  # specifiers to contribute to a commit's or credit's drawdown.
1607
1071
  #
1608
- # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Specifier>, nil]
1609
- optional :specifiers,
1610
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Specifier] }
1072
+ # @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
1073
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
1611
1074
 
1612
1075
  # @!attribute subscription_config
1613
1076
  # Attach a subscription to the recurring commit/credit.
1614
1077
  #
1615
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::SubscriptionConfig, nil]
1616
- optional :subscription_config,
1617
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::SubscriptionConfig }
1078
+ # @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
1079
+ optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
1618
1080
 
1619
1081
  # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, invoice_amount: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
1620
1082
  # Some parameter documentations has been truncated, see
@@ -1645,7 +1107,7 @@ module MetronomeSDK
1645
1107
  #
1646
1108
  # @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
1647
1109
  #
1648
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
1110
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
1649
1111
  #
1650
1112
  # @param invoice_amount [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::InvoiceAmount] The amount the customer should be billed for the commit. Not required.
1651
1113
  #
@@ -1659,9 +1121,9 @@ module MetronomeSDK
1659
1121
  #
1660
1122
  # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
1661
1123
  #
1662
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
1124
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
1663
1125
  #
1664
- # @param subscription_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::SubscriptionConfig] Attach a subscription to the recurring commit/credit.
1126
+ # @param subscription_config [MetronomeSDK::Models::RecurringCommitSubscriptionConfig] Attach a subscription to the recurring commit/credit.
1665
1127
 
1666
1128
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#access_amount
1667
1129
  class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
@@ -1759,103 +1221,6 @@ module MetronomeSDK
1759
1221
  # @param id [String]
1760
1222
  end
1761
1223
 
1762
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#hierarchy_configuration
1763
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
1764
- # @!attribute child_access
1765
- #
1766
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
1767
- required :child_access,
1768
- union: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess }
1769
-
1770
- # @!method initialize(child_access:)
1771
- # Optional configuration for recurring credit hierarchy access control
1772
- #
1773
- # @param child_access [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
1774
-
1775
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration#child_access
1776
- module ChildAccess
1777
- extend MetronomeSDK::Internal::Type::Union
1778
-
1779
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll }
1780
-
1781
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone }
1782
-
1783
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs }
1784
-
1785
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
1786
- # @!attribute type
1787
- #
1788
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
1789
- required :type,
1790
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type }
1791
-
1792
- # @!method initialize(type:)
1793
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
1794
-
1795
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
1796
- module Type
1797
- extend MetronomeSDK::Internal::Type::Enum
1798
-
1799
- ALL = :ALL
1800
-
1801
- # @!method self.values
1802
- # @return [Array<Symbol>]
1803
- end
1804
- end
1805
-
1806
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
1807
- # @!attribute type
1808
- #
1809
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
1810
- required :type,
1811
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type }
1812
-
1813
- # @!method initialize(type:)
1814
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
1815
-
1816
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
1817
- module Type
1818
- extend MetronomeSDK::Internal::Type::Enum
1819
-
1820
- NONE = :NONE
1821
-
1822
- # @!method self.values
1823
- # @return [Array<Symbol>]
1824
- end
1825
- end
1826
-
1827
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
1828
- # @!attribute contract_ids
1829
- #
1830
- # @return [Array<String>]
1831
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1832
-
1833
- # @!attribute type
1834
- #
1835
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
1836
- required :type,
1837
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type }
1838
-
1839
- # @!method initialize(contract_ids:, type:)
1840
- # @param contract_ids [Array<String>]
1841
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
1842
-
1843
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
1844
- module Type
1845
- extend MetronomeSDK::Internal::Type::Enum
1846
-
1847
- CONTRACT_IDS = :CONTRACT_IDS
1848
-
1849
- # @!method self.values
1850
- # @return [Array<Symbol>]
1851
- end
1852
- end
1853
-
1854
- # @!method self.variants
1855
- # @return [Array(MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
1856
- end
1857
- end
1858
-
1859
1224
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#invoice_amount
1860
1225
  class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
1861
1226
  # @!attribute credit_type_id
@@ -1915,115 +1280,27 @@ module MetronomeSDK
1915
1280
  # @!method self.values
1916
1281
  # @return [Array<Symbol>]
1917
1282
  end
1283
+ end
1918
1284
 
1919
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
1920
- # @!attribute presentation_group_values
1921
- #
1922
- # @return [Hash{Symbol=>String}, nil]
1923
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1285
+ class AddRecurringCredit < MetronomeSDK::Internal::Type::BaseModel
1286
+ # @!attribute id
1287
+ #
1288
+ # @return [String]
1289
+ required :id, String
1924
1290
 
1925
- # @!attribute pricing_group_values
1926
- #
1927
- # @return [Hash{Symbol=>String}, nil]
1928
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1291
+ # @!attribute access_amount
1292
+ # The amount of commit to grant.
1293
+ #
1294
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::AccessAmount]
1295
+ required :access_amount,
1296
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::AccessAmount }
1929
1297
 
1930
- # @!attribute product_id
1931
- # If provided, the specifier will only apply to the product with the specified ID.
1932
- #
1933
- # @return [String, nil]
1934
- optional :product_id, String
1935
-
1936
- # @!attribute product_tags
1937
- # If provided, the specifier will only apply to products with all the specified
1938
- # tags.
1939
- #
1940
- # @return [Array<String>, nil]
1941
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1942
-
1943
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
1944
- # Some parameter documentations has been truncated, see
1945
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Specifier}
1946
- # for more details.
1947
- #
1948
- # @param presentation_group_values [Hash{Symbol=>String}]
1949
- #
1950
- # @param pricing_group_values [Hash{Symbol=>String}]
1951
- #
1952
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
1953
- #
1954
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
1955
- end
1956
-
1957
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#subscription_config
1958
- class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
1959
- # @!attribute allocation
1960
- #
1961
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::SubscriptionConfig::Allocation]
1962
- required :allocation,
1963
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::SubscriptionConfig::Allocation }
1964
-
1965
- # @!attribute apply_seat_increase_config
1966
- #
1967
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig]
1968
- required :apply_seat_increase_config,
1969
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig }
1970
-
1971
- # @!attribute subscription_id
1972
- #
1973
- # @return [String]
1974
- required :subscription_id, String
1975
-
1976
- # @!method initialize(allocation:, apply_seat_increase_config:, subscription_id:)
1977
- # Attach a subscription to the recurring commit/credit.
1978
- #
1979
- # @param allocation [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::SubscriptionConfig::Allocation]
1980
- # @param apply_seat_increase_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig]
1981
- # @param subscription_id [String]
1982
-
1983
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::SubscriptionConfig#allocation
1984
- module Allocation
1985
- extend MetronomeSDK::Internal::Type::Enum
1986
-
1987
- INDIVIDUAL = :INDIVIDUAL
1988
- POOLED = :POOLED
1989
-
1990
- # @!method self.values
1991
- # @return [Array<Symbol>]
1992
- end
1993
-
1994
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::SubscriptionConfig#apply_seat_increase_config
1995
- class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
1996
- # @!attribute is_prorated
1997
- # Indicates whether a mid-period seat increase should be prorated.
1998
- #
1999
- # @return [Boolean]
2000
- required :is_prorated, MetronomeSDK::Internal::Type::Boolean
2001
-
2002
- # @!method initialize(is_prorated:)
2003
- # @param is_prorated [Boolean] Indicates whether a mid-period seat increase should be prorated.
2004
- end
2005
- end
2006
- end
2007
-
2008
- class AddRecurringCredit < MetronomeSDK::Internal::Type::BaseModel
2009
- # @!attribute id
2010
- #
2011
- # @return [String]
2012
- required :id, String
2013
-
2014
- # @!attribute access_amount
2015
- # The amount of commit to grant.
2016
- #
2017
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::AccessAmount]
2018
- required :access_amount,
2019
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::AccessAmount }
2020
-
2021
- # @!attribute commit_duration
2022
- # The amount of time the created commits will be valid for
2023
- #
2024
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::CommitDuration]
2025
- required :commit_duration,
2026
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::CommitDuration }
1298
+ # @!attribute commit_duration
1299
+ # The amount of time the created commits will be valid for
1300
+ #
1301
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::CommitDuration]
1302
+ required :commit_duration,
1303
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::CommitDuration }
2027
1304
 
2028
1305
  # @!attribute priority
2029
1306
  # Will be passed down to the individual commits
@@ -2083,9 +1360,8 @@ module MetronomeSDK
2083
1360
  # @!attribute hierarchy_configuration
2084
1361
  # Optional configuration for recurring credit hierarchy access control
2085
1362
  #
2086
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration, nil]
2087
- optional :hierarchy_configuration,
2088
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration }
1363
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
1364
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
2089
1365
 
2090
1366
  # @!attribute name
2091
1367
  # Displayed on invoices. Will be passed through to the individual commits
@@ -2131,16 +1407,14 @@ module MetronomeSDK
2131
1407
  # or credit. A customer's usage needs to meet the condition of at least one of the
2132
1408
  # specifiers to contribute to a commit's or credit's drawdown.
2133
1409
  #
2134
- # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Specifier>, nil]
2135
- optional :specifiers,
2136
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Specifier] }
1410
+ # @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
1411
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
2137
1412
 
2138
1413
  # @!attribute subscription_config
2139
1414
  # Attach a subscription to the recurring commit/credit.
2140
1415
  #
2141
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::SubscriptionConfig, nil]
2142
- optional :subscription_config,
2143
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::SubscriptionConfig }
1416
+ # @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
1417
+ optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
2144
1418
 
2145
1419
  # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
2146
1420
  # Some parameter documentations has been truncated, see
@@ -2171,7 +1445,7 @@ module MetronomeSDK
2171
1445
  #
2172
1446
  # @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
2173
1447
  #
2174
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
1448
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
2175
1449
  #
2176
1450
  # @param name [String] Displayed on invoices. Will be passed through to the individual commits
2177
1451
  #
@@ -2183,9 +1457,9 @@ module MetronomeSDK
2183
1457
  #
2184
1458
  # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
2185
1459
  #
2186
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
1460
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
2187
1461
  #
2188
- # @param subscription_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::SubscriptionConfig] Attach a subscription to the recurring commit/credit.
1462
+ # @param subscription_config [MetronomeSDK::Models::RecurringCommitSubscriptionConfig] Attach a subscription to the recurring commit/credit.
2189
1463
 
2190
1464
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#access_amount
2191
1465
  class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
@@ -2283,103 +1557,6 @@ module MetronomeSDK
2283
1557
  # @param id [String]
2284
1558
  end
2285
1559
 
2286
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#hierarchy_configuration
2287
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
2288
- # @!attribute child_access
2289
- #
2290
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
2291
- required :child_access,
2292
- union: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess }
2293
-
2294
- # @!method initialize(child_access:)
2295
- # Optional configuration for recurring credit hierarchy access control
2296
- #
2297
- # @param child_access [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
2298
-
2299
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration#child_access
2300
- module ChildAccess
2301
- extend MetronomeSDK::Internal::Type::Union
2302
-
2303
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll }
2304
-
2305
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone }
2306
-
2307
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs }
2308
-
2309
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
2310
- # @!attribute type
2311
- #
2312
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
2313
- required :type,
2314
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type }
2315
-
2316
- # @!method initialize(type:)
2317
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
2318
-
2319
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
2320
- module Type
2321
- extend MetronomeSDK::Internal::Type::Enum
2322
-
2323
- ALL = :ALL
2324
-
2325
- # @!method self.values
2326
- # @return [Array<Symbol>]
2327
- end
2328
- end
2329
-
2330
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
2331
- # @!attribute type
2332
- #
2333
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
2334
- required :type,
2335
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type }
2336
-
2337
- # @!method initialize(type:)
2338
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
2339
-
2340
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
2341
- module Type
2342
- extend MetronomeSDK::Internal::Type::Enum
2343
-
2344
- NONE = :NONE
2345
-
2346
- # @!method self.values
2347
- # @return [Array<Symbol>]
2348
- end
2349
- end
2350
-
2351
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
2352
- # @!attribute contract_ids
2353
- #
2354
- # @return [Array<String>]
2355
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
2356
-
2357
- # @!attribute type
2358
- #
2359
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
2360
- required :type,
2361
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type }
2362
-
2363
- # @!method initialize(contract_ids:, type:)
2364
- # @param contract_ids [Array<String>]
2365
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
2366
-
2367
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
2368
- module Type
2369
- extend MetronomeSDK::Internal::Type::Enum
2370
-
2371
- CONTRACT_IDS = :CONTRACT_IDS
2372
-
2373
- # @!method self.values
2374
- # @return [Array<Symbol>]
2375
- end
2376
- end
2377
-
2378
- # @!method self.variants
2379
- # @return [Array(MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
2380
- end
2381
- end
2382
-
2383
1560
  # Determines whether the first and last commit will be prorated. If not provided,
2384
1561
  # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
2385
1562
  #
@@ -2396,694 +1573,177 @@ module MetronomeSDK
2396
1573
  # @return [Array<Symbol>]
2397
1574
  end
2398
1575
 
2399
- # The frequency at which the recurring commits will be created. If not provided: -
2400
- # The commits will be created on the usage invoice frequency. If provided: - The
2401
- # period defined in the duration will correspond to this frequency. - Commits will
2402
- # be created aligned with the recurring commit's starting_at rather than the usage
2403
- # invoice dates.
2404
- #
2405
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#recurrence_frequency
2406
- module RecurrenceFrequency
2407
- extend MetronomeSDK::Internal::Type::Enum
2408
-
2409
- MONTHLY = :MONTHLY
2410
- QUARTERLY = :QUARTERLY
2411
- ANNUAL = :ANNUAL
2412
- WEEKLY = :WEEKLY
2413
-
2414
- # @!method self.values
2415
- # @return [Array<Symbol>]
2416
- end
2417
-
2418
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
2419
- # @!attribute presentation_group_values
2420
- #
2421
- # @return [Hash{Symbol=>String}, nil]
2422
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
2423
-
2424
- # @!attribute pricing_group_values
2425
- #
2426
- # @return [Hash{Symbol=>String}, nil]
2427
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
2428
-
2429
- # @!attribute product_id
2430
- # If provided, the specifier will only apply to the product with the specified ID.
2431
- #
2432
- # @return [String, nil]
2433
- optional :product_id, String
2434
-
2435
- # @!attribute product_tags
2436
- # If provided, the specifier will only apply to products with all the specified
2437
- # tags.
2438
- #
2439
- # @return [Array<String>, nil]
2440
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
2441
-
2442
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
2443
- # Some parameter documentations has been truncated, see
2444
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Specifier}
2445
- # for more details.
2446
- #
2447
- # @param presentation_group_values [Hash{Symbol=>String}]
2448
- #
2449
- # @param pricing_group_values [Hash{Symbol=>String}]
2450
- #
2451
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
2452
- #
2453
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
2454
- end
2455
-
2456
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#subscription_config
2457
- class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
2458
- # @!attribute allocation
2459
- #
2460
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::SubscriptionConfig::Allocation]
2461
- required :allocation,
2462
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::SubscriptionConfig::Allocation }
2463
-
2464
- # @!attribute apply_seat_increase_config
2465
- #
2466
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig]
2467
- required :apply_seat_increase_config,
2468
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig }
2469
-
2470
- # @!attribute subscription_id
2471
- #
2472
- # @return [String]
2473
- required :subscription_id, String
2474
-
2475
- # @!method initialize(allocation:, apply_seat_increase_config:, subscription_id:)
2476
- # Attach a subscription to the recurring commit/credit.
2477
- #
2478
- # @param allocation [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::SubscriptionConfig::Allocation]
2479
- # @param apply_seat_increase_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig]
2480
- # @param subscription_id [String]
2481
-
2482
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::SubscriptionConfig#allocation
2483
- module Allocation
2484
- extend MetronomeSDK::Internal::Type::Enum
2485
-
2486
- INDIVIDUAL = :INDIVIDUAL
2487
- POOLED = :POOLED
2488
-
2489
- # @!method self.values
2490
- # @return [Array<Symbol>]
2491
- end
2492
-
2493
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::SubscriptionConfig#apply_seat_increase_config
2494
- class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
2495
- # @!attribute is_prorated
2496
- # Indicates whether a mid-period seat increase should be prorated.
2497
- #
2498
- # @return [Boolean]
2499
- required :is_prorated, MetronomeSDK::Internal::Type::Boolean
2500
-
2501
- # @!method initialize(is_prorated:)
2502
- # @param is_prorated [Boolean] Indicates whether a mid-period seat increase should be prorated.
2503
- end
2504
- end
2505
- end
2506
-
2507
- class AddResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
2508
- # @!attribute reseller_type
2509
- #
2510
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty::ResellerType]
2511
- required :reseller_type,
2512
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty::ResellerType }
2513
-
2514
- # @!attribute applicable_product_ids
2515
- #
2516
- # @return [Array<String>, nil]
2517
- optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
2518
-
2519
- # @!attribute applicable_product_tags
2520
- #
2521
- # @return [Array<String>, nil]
2522
- optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
2523
-
2524
- # @!attribute aws_account_number
2525
- #
2526
- # @return [String, nil]
2527
- optional :aws_account_number, String
2528
-
2529
- # @!attribute aws_offer_id
2530
- #
2531
- # @return [String, nil]
2532
- optional :aws_offer_id, String
2533
-
2534
- # @!attribute aws_payer_reference_id
2535
- #
2536
- # @return [String, nil]
2537
- optional :aws_payer_reference_id, String
2538
-
2539
- # @!attribute ending_before
2540
- #
2541
- # @return [Time, nil]
2542
- optional :ending_before, Time, nil?: true
2543
-
2544
- # @!attribute fraction
2545
- #
2546
- # @return [Float, nil]
2547
- optional :fraction, Float
2548
-
2549
- # @!attribute gcp_account_id
2550
- #
2551
- # @return [String, nil]
2552
- optional :gcp_account_id, String
2553
-
2554
- # @!attribute gcp_offer_id
2555
- #
2556
- # @return [String, nil]
2557
- optional :gcp_offer_id, String
2558
-
2559
- # @!attribute netsuite_reseller_id
2560
- #
2561
- # @return [String, nil]
2562
- optional :netsuite_reseller_id, String
2563
-
2564
- # @!attribute reseller_contract_value
2565
- #
2566
- # @return [Float, nil]
2567
- optional :reseller_contract_value, Float
2568
-
2569
- # @!attribute starting_at
2570
- #
2571
- # @return [Time, nil]
2572
- optional :starting_at, Time
2573
-
2574
- # @!method initialize(reseller_type:, applicable_product_ids: nil, applicable_product_tags: nil, aws_account_number: nil, aws_offer_id: nil, aws_payer_reference_id: nil, ending_before: nil, fraction: nil, gcp_account_id: nil, gcp_offer_id: nil, netsuite_reseller_id: nil, reseller_contract_value: nil, starting_at: nil)
2575
- # @param reseller_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty::ResellerType]
2576
- # @param applicable_product_ids [Array<String>]
2577
- # @param applicable_product_tags [Array<String>]
2578
- # @param aws_account_number [String]
2579
- # @param aws_offer_id [String]
2580
- # @param aws_payer_reference_id [String]
2581
- # @param ending_before [Time, nil]
2582
- # @param fraction [Float]
2583
- # @param gcp_account_id [String]
2584
- # @param gcp_offer_id [String]
2585
- # @param netsuite_reseller_id [String]
2586
- # @param reseller_contract_value [Float]
2587
- # @param starting_at [Time]
2588
-
2589
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty#reseller_type
2590
- module ResellerType
2591
- extend MetronomeSDK::Internal::Type::Enum
2592
-
2593
- AWS = :AWS
2594
- AWS_PRO_SERVICE = :AWS_PRO_SERVICE
2595
- GCP = :GCP
2596
- GCP_PRO_SERVICE = :GCP_PRO_SERVICE
2597
-
2598
- # @!method self.values
2599
- # @return [Array<Symbol>]
2600
- end
2601
- end
2602
-
2603
- class AddScheduledCharge < MetronomeSDK::Internal::Type::BaseModel
2604
- # @!attribute id
2605
- #
2606
- # @return [String]
2607
- required :id, String
2608
-
2609
- # @!attribute product
2610
- #
2611
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge::Product]
2612
- required :product,
2613
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge::Product }
2614
-
2615
- # @!attribute schedule
2616
- #
2617
- # @return [MetronomeSDK::Models::SchedulePointInTime]
2618
- required :schedule, -> { MetronomeSDK::SchedulePointInTime }
2619
-
2620
- # @!attribute name
2621
- # displayed on invoices
2622
- #
2623
- # @return [String, nil]
2624
- optional :name, String
2625
-
2626
- # @!attribute netsuite_sales_order_id
2627
- # This field's availability is dependent on your client's configuration.
2628
- #
2629
- # @return [String, nil]
2630
- optional :netsuite_sales_order_id, String
2631
-
2632
- # @!method initialize(id:, product:, schedule:, name: nil, netsuite_sales_order_id: nil)
2633
- # @param id [String]
2634
- #
2635
- # @param product [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge::Product]
2636
- #
2637
- # @param schedule [MetronomeSDK::Models::SchedulePointInTime]
2638
- #
2639
- # @param name [String] displayed on invoices
2640
- #
2641
- # @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
2642
-
2643
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge#product
2644
- class Product < MetronomeSDK::Internal::Type::BaseModel
2645
- # @!attribute id
2646
- #
2647
- # @return [String]
2648
- required :id, String
2649
-
2650
- # @!attribute name
2651
- #
2652
- # @return [String]
2653
- required :name, String
2654
-
2655
- # @!method initialize(id:, name:)
2656
- # @param id [String]
2657
- # @param name [String]
2658
- end
2659
- end
2660
-
2661
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data#add_spend_threshold_configuration
2662
- class AddSpendThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
2663
- # @!attribute commit
2664
- #
2665
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::Commit]
2666
- required :commit,
2667
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::Commit }
2668
-
2669
- # @!attribute is_enabled
2670
- # When set to false, the contract will not be evaluated against the
2671
- # threshold_amount. Toggling to true will result an immediate evaluation,
2672
- # regardless of prior state.
2673
- #
2674
- # @return [Boolean]
2675
- required :is_enabled, MetronomeSDK::Internal::Type::Boolean
2676
-
2677
- # @!attribute payment_gate_config
2678
- #
2679
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig]
2680
- required :payment_gate_config,
2681
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig }
2682
-
2683
- # @!attribute threshold_amount
2684
- # Specify the threshold amount for the contract. Each time the contract's usage
2685
- # hits this amount, a threshold charge will be initiated.
2686
- #
2687
- # @return [Float]
2688
- required :threshold_amount, Float
2689
-
2690
- # @!method initialize(commit:, is_enabled:, payment_gate_config:, threshold_amount:)
2691
- # Some parameter documentations has been truncated, see
2692
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration}
2693
- # for more details.
2694
- #
2695
- # @param commit [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::Commit]
2696
- #
2697
- # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
2698
- #
2699
- # @param payment_gate_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig]
2700
- #
2701
- # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's usage hi
2702
-
2703
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration#commit
2704
- class Commit < MetronomeSDK::Internal::Type::BaseModel
2705
- # @!attribute product_id
2706
- # The commit product that will be used to generate the line item for commit
2707
- # payment.
2708
- #
2709
- # @return [String]
2710
- required :product_id, String
2711
-
2712
- # @!attribute description
2713
- #
2714
- # @return [String, nil]
2715
- optional :description, String
2716
-
2717
- # @!attribute name
2718
- # Specify the name of the line item for the threshold charge. If left blank, it
2719
- # will default to the commit product name.
2720
- #
2721
- # @return [String, nil]
2722
- optional :name, String
2723
-
2724
- # @!method initialize(product_id:, description: nil, name: nil)
2725
- # Some parameter documentations has been truncated, see
2726
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::Commit}
2727
- # for more details.
2728
- #
2729
- # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
2730
- #
2731
- # @param description [String]
2732
- #
2733
- # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
2734
- end
2735
-
2736
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration#payment_gate_config
2737
- class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
2738
- # @!attribute payment_gate_type
2739
- # Gate access to the commit balance based on successful collection of payment.
2740
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
2741
- # facilitate payment using your own payment integration. Select NONE if you do not
2742
- # wish to payment gate the commit balance.
2743
- #
2744
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::PaymentGateType]
2745
- required :payment_gate_type,
2746
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::PaymentGateType }
2747
-
2748
- # @!attribute precalculated_tax_config
2749
- # Only applicable if using PRECALCULATED as your tax type.
2750
- #
2751
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
2752
- optional :precalculated_tax_config,
2753
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig }
2754
-
2755
- # @!attribute stripe_config
2756
- # Only applicable if using STRIPE as your payment gateway type.
2757
- #
2758
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
2759
- optional :stripe_config,
2760
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig }
2761
-
2762
- # @!attribute tax_type
2763
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
2764
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
2765
- # will default to NONE.
2766
- #
2767
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::TaxType, nil]
2768
- optional :tax_type,
2769
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::TaxType }
2770
-
2771
- # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
2772
- # Some parameter documentations has been truncated, see
2773
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig}
2774
- # for more details.
2775
- #
2776
- # @param payment_gate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
2777
- #
2778
- # @param precalculated_tax_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
2779
- #
2780
- # @param stripe_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gateway type.
2781
- #
2782
- # @param tax_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
2783
-
2784
- # Gate access to the commit balance based on successful collection of payment.
2785
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
2786
- # facilitate payment using your own payment integration. Select NONE if you do not
2787
- # wish to payment gate the commit balance.
2788
- #
2789
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig#payment_gate_type
2790
- module PaymentGateType
2791
- extend MetronomeSDK::Internal::Type::Enum
2792
-
2793
- NONE = :NONE
2794
- STRIPE = :STRIPE
2795
- EXTERNAL = :EXTERNAL
2796
-
2797
- # @!method self.values
2798
- # @return [Array<Symbol>]
2799
- end
2800
-
2801
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
2802
- class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
2803
- # @!attribute tax_amount
2804
- # Amount of tax to be applied. This should be in the same currency and
2805
- # denomination as the commit's invoice schedule
2806
- #
2807
- # @return [Float]
2808
- required :tax_amount, Float
2809
-
2810
- # @!attribute tax_name
2811
- # Name of the tax to be applied. This may be used in an invoice line item
2812
- # description.
2813
- #
2814
- # @return [String, nil]
2815
- optional :tax_name, String
2816
-
2817
- # @!method initialize(tax_amount:, tax_name: nil)
2818
- # Some parameter documentations has been truncated, see
2819
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
2820
- # for more details.
2821
- #
2822
- # Only applicable if using PRECALCULATED as your tax type.
2823
- #
2824
- # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
2825
- #
2826
- # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
2827
- end
2828
-
2829
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig#stripe_config
2830
- class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
2831
- # @!attribute payment_type
2832
- # If left blank, will default to INVOICE
2833
- #
2834
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
2835
- required :payment_type,
2836
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType }
2837
-
2838
- # @!attribute invoice_metadata
2839
- # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
2840
- # your payment type.
2841
- #
2842
- # @return [Hash{Symbol=>String}, nil]
2843
- optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
2844
-
2845
- # @!method initialize(payment_type:, invoice_metadata: nil)
2846
- # Some parameter documentations has been truncated, see
2847
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig}
2848
- # for more details.
2849
- #
2850
- # Only applicable if using STRIPE as your payment gateway type.
2851
- #
2852
- # @param payment_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
2853
- #
2854
- # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
2855
-
2856
- # If left blank, will default to INVOICE
2857
- #
2858
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
2859
- module PaymentType
2860
- extend MetronomeSDK::Internal::Type::Enum
2861
-
2862
- INVOICE = :INVOICE
2863
- PAYMENT_INTENT = :PAYMENT_INTENT
2864
-
2865
- # @!method self.values
2866
- # @return [Array<Symbol>]
2867
- end
2868
- end
2869
-
2870
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
2871
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
2872
- # will default to NONE.
2873
- #
2874
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig#tax_type
2875
- module TaxType
2876
- extend MetronomeSDK::Internal::Type::Enum
2877
-
2878
- NONE = :NONE
2879
- STRIPE = :STRIPE
2880
- ANROK = :ANROK
2881
- PRECALCULATED = :PRECALCULATED
2882
-
2883
- # @!method self.values
2884
- # @return [Array<Symbol>]
2885
- end
2886
- end
2887
- end
2888
-
2889
- class AddSubscription < MetronomeSDK::Internal::Type::BaseModel
2890
- # @!attribute collection_schedule
1576
+ # The frequency at which the recurring commits will be created. If not provided: -
1577
+ # The commits will be created on the usage invoice frequency. If provided: - The
1578
+ # period defined in the duration will correspond to this frequency. - Commits will
1579
+ # be created aligned with the recurring commit's starting_at rather than the usage
1580
+ # invoice dates.
2891
1581
  #
2892
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::CollectionSchedule]
2893
- required :collection_schedule,
2894
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::CollectionSchedule }
1582
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#recurrence_frequency
1583
+ module RecurrenceFrequency
1584
+ extend MetronomeSDK::Internal::Type::Enum
2895
1585
 
2896
- # @!attribute proration
2897
- #
2898
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration]
2899
- required :proration,
2900
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration }
1586
+ MONTHLY = :MONTHLY
1587
+ QUARTERLY = :QUARTERLY
1588
+ ANNUAL = :ANNUAL
1589
+ WEEKLY = :WEEKLY
1590
+
1591
+ # @!method self.values
1592
+ # @return [Array<Symbol>]
1593
+ end
1594
+ end
2901
1595
 
2902
- # @!attribute quantity_schedule
2903
- # List of quantity schedule items for the subscription. Only includes the current
2904
- # quantity and future quantity changes.
1596
+ class AddResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
1597
+ # @!attribute reseller_type
2905
1598
  #
2906
- # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::QuantitySchedule>]
2907
- required :quantity_schedule,
2908
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::QuantitySchedule] }
1599
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty::ResellerType]
1600
+ required :reseller_type,
1601
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty::ResellerType }
2909
1602
 
2910
- # @!attribute starting_at
1603
+ # @!attribute applicable_product_ids
2911
1604
  #
2912
- # @return [Time]
2913
- required :starting_at, Time
1605
+ # @return [Array<String>, nil]
1606
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
2914
1607
 
2915
- # @!attribute subscription_rate
1608
+ # @!attribute applicable_product_tags
2916
1609
  #
2917
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate]
2918
- required :subscription_rate,
2919
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate }
1610
+ # @return [Array<String>, nil]
1611
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
2920
1612
 
2921
- # @!attribute id
1613
+ # @!attribute aws_account_number
2922
1614
  #
2923
1615
  # @return [String, nil]
2924
- optional :id, String
1616
+ optional :aws_account_number, String
2925
1617
 
2926
- # @!attribute custom_fields
1618
+ # @!attribute aws_offer_id
2927
1619
  #
2928
- # @return [Hash{Symbol=>String}, nil]
2929
- optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
1620
+ # @return [String, nil]
1621
+ optional :aws_offer_id, String
2930
1622
 
2931
- # @!attribute description
1623
+ # @!attribute aws_payer_reference_id
2932
1624
  #
2933
1625
  # @return [String, nil]
2934
- optional :description, String
1626
+ optional :aws_payer_reference_id, String
2935
1627
 
2936
1628
  # @!attribute ending_before
2937
1629
  #
2938
1630
  # @return [Time, nil]
2939
- optional :ending_before, Time
1631
+ optional :ending_before, Time, nil?: true
2940
1632
 
2941
- # @!attribute fiat_credit_type_id
1633
+ # @!attribute fraction
2942
1634
  #
2943
- # @return [String, nil]
2944
- optional :fiat_credit_type_id, String
1635
+ # @return [Float, nil]
1636
+ optional :fraction, Float
2945
1637
 
2946
- # @!attribute name
1638
+ # @!attribute gcp_account_id
2947
1639
  #
2948
1640
  # @return [String, nil]
2949
- optional :name, String
1641
+ optional :gcp_account_id, String
2950
1642
 
2951
- # @!method initialize(collection_schedule:, proration:, quantity_schedule:, starting_at:, subscription_rate:, id: nil, custom_fields: nil, description: nil, ending_before: nil, fiat_credit_type_id: nil, name: nil)
2952
- # Some parameter documentations has been truncated, see
2953
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription}
2954
- # for more details.
1643
+ # @!attribute gcp_offer_id
2955
1644
  #
2956
- # @param collection_schedule [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::CollectionSchedule]
1645
+ # @return [String, nil]
1646
+ optional :gcp_offer_id, String
1647
+
1648
+ # @!attribute netsuite_reseller_id
2957
1649
  #
2958
- # @param proration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration]
1650
+ # @return [String, nil]
1651
+ optional :netsuite_reseller_id, String
1652
+
1653
+ # @!attribute reseller_contract_value
2959
1654
  #
2960
- # @param quantity_schedule [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::QuantitySchedule>] List of quantity schedule items for the subscription. Only includes the current
1655
+ # @return [Float, nil]
1656
+ optional :reseller_contract_value, Float
1657
+
1658
+ # @!attribute starting_at
2961
1659
  #
1660
+ # @return [Time, nil]
1661
+ optional :starting_at, Time
1662
+
1663
+ # @!method initialize(reseller_type:, applicable_product_ids: nil, applicable_product_tags: nil, aws_account_number: nil, aws_offer_id: nil, aws_payer_reference_id: nil, ending_before: nil, fraction: nil, gcp_account_id: nil, gcp_offer_id: nil, netsuite_reseller_id: nil, reseller_contract_value: nil, starting_at: nil)
1664
+ # @param reseller_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty::ResellerType]
1665
+ # @param applicable_product_ids [Array<String>]
1666
+ # @param applicable_product_tags [Array<String>]
1667
+ # @param aws_account_number [String]
1668
+ # @param aws_offer_id [String]
1669
+ # @param aws_payer_reference_id [String]
1670
+ # @param ending_before [Time, nil]
1671
+ # @param fraction [Float]
1672
+ # @param gcp_account_id [String]
1673
+ # @param gcp_offer_id [String]
1674
+ # @param netsuite_reseller_id [String]
1675
+ # @param reseller_contract_value [Float]
2962
1676
  # @param starting_at [Time]
2963
- #
2964
- # @param subscription_rate [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate]
2965
- #
2966
- # @param id [String]
2967
- #
2968
- # @param custom_fields [Hash{Symbol=>String}]
2969
- #
2970
- # @param description [String]
2971
- #
2972
- # @param ending_before [Time]
2973
- #
2974
- # @param fiat_credit_type_id [String]
2975
- #
2976
- # @param name [String]
2977
1677
 
2978
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription#collection_schedule
2979
- module CollectionSchedule
1678
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty#reseller_type
1679
+ module ResellerType
2980
1680
  extend MetronomeSDK::Internal::Type::Enum
2981
1681
 
2982
- ADVANCE = :ADVANCE
2983
- ARREARS = :ARREARS
1682
+ AWS = :AWS
1683
+ AWS_PRO_SERVICE = :AWS_PRO_SERVICE
1684
+ GCP = :GCP
1685
+ GCP_PRO_SERVICE = :GCP_PRO_SERVICE
2984
1686
 
2985
1687
  # @!method self.values
2986
1688
  # @return [Array<Symbol>]
2987
1689
  end
1690
+ end
2988
1691
 
2989
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription#proration
2990
- class Proration < MetronomeSDK::Internal::Type::BaseModel
2991
- # @!attribute invoice_behavior
2992
- #
2993
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration::InvoiceBehavior]
2994
- required :invoice_behavior,
2995
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration::InvoiceBehavior }
2996
-
2997
- # @!attribute is_prorated
2998
- #
2999
- # @return [Boolean]
3000
- required :is_prorated, MetronomeSDK::Internal::Type::Boolean
3001
-
3002
- # @!method initialize(invoice_behavior:, is_prorated:)
3003
- # @param invoice_behavior [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration::InvoiceBehavior]
3004
- # @param is_prorated [Boolean]
3005
-
3006
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration#invoice_behavior
3007
- module InvoiceBehavior
3008
- extend MetronomeSDK::Internal::Type::Enum
3009
-
3010
- BILL_IMMEDIATELY = :BILL_IMMEDIATELY
3011
- BILL_ON_NEXT_COLLECTION_DATE = :BILL_ON_NEXT_COLLECTION_DATE
1692
+ class AddScheduledCharge < MetronomeSDK::Internal::Type::BaseModel
1693
+ # @!attribute id
1694
+ #
1695
+ # @return [String]
1696
+ required :id, String
3012
1697
 
3013
- # @!method self.values
3014
- # @return [Array<Symbol>]
3015
- end
3016
- end
1698
+ # @!attribute product
1699
+ #
1700
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge::Product]
1701
+ required :product,
1702
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge::Product }
3017
1703
 
3018
- class QuantitySchedule < MetronomeSDK::Internal::Type::BaseModel
3019
- # @!attribute quantity
3020
- #
3021
- # @return [Float]
3022
- required :quantity, Float
1704
+ # @!attribute schedule
1705
+ #
1706
+ # @return [MetronomeSDK::Models::SchedulePointInTime]
1707
+ required :schedule, -> { MetronomeSDK::SchedulePointInTime }
3023
1708
 
3024
- # @!attribute starting_at
3025
- #
3026
- # @return [Time]
3027
- required :starting_at, Time
1709
+ # @!attribute name
1710
+ # displayed on invoices
1711
+ #
1712
+ # @return [String, nil]
1713
+ optional :name, String
3028
1714
 
3029
- # @!attribute ending_before
3030
- #
3031
- # @return [Time, nil]
3032
- optional :ending_before, Time
1715
+ # @!attribute netsuite_sales_order_id
1716
+ # This field's availability is dependent on your client's configuration.
1717
+ #
1718
+ # @return [String, nil]
1719
+ optional :netsuite_sales_order_id, String
3033
1720
 
3034
- # @!method initialize(quantity:, starting_at:, ending_before: nil)
3035
- # @param quantity [Float]
3036
- # @param starting_at [Time]
3037
- # @param ending_before [Time]
3038
- end
1721
+ # @!method initialize(id:, product:, schedule:, name: nil, netsuite_sales_order_id: nil)
1722
+ # @param id [String]
1723
+ #
1724
+ # @param product [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge::Product]
1725
+ #
1726
+ # @param schedule [MetronomeSDK::Models::SchedulePointInTime]
1727
+ #
1728
+ # @param name [String] displayed on invoices
1729
+ #
1730
+ # @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
3039
1731
 
3040
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription#subscription_rate
3041
- class SubscriptionRate < MetronomeSDK::Internal::Type::BaseModel
3042
- # @!attribute billing_frequency
1732
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge#product
1733
+ class Product < MetronomeSDK::Internal::Type::BaseModel
1734
+ # @!attribute id
3043
1735
  #
3044
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::BillingFrequency]
3045
- required :billing_frequency,
3046
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::BillingFrequency }
1736
+ # @return [String]
1737
+ required :id, String
3047
1738
 
3048
- # @!attribute product
1739
+ # @!attribute name
3049
1740
  #
3050
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::Product]
3051
- required :product,
3052
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::Product }
3053
-
3054
- # @!method initialize(billing_frequency:, product:)
3055
- # @param billing_frequency [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::BillingFrequency]
3056
- # @param product [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::Product]
3057
-
3058
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate#billing_frequency
3059
- module BillingFrequency
3060
- extend MetronomeSDK::Internal::Type::Enum
3061
-
3062
- MONTHLY = :MONTHLY
3063
- QUARTERLY = :QUARTERLY
3064
- ANNUAL = :ANNUAL
3065
- WEEKLY = :WEEKLY
3066
-
3067
- # @!method self.values
3068
- # @return [Array<Symbol>]
3069
- end
3070
-
3071
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate#product
3072
- class Product < MetronomeSDK::Internal::Type::BaseModel
3073
- # @!attribute id
3074
- #
3075
- # @return [String]
3076
- required :id, String
3077
-
3078
- # @!attribute name
3079
- #
3080
- # @return [String]
3081
- required :name, String
1741
+ # @return [String]
1742
+ required :name, String
3082
1743
 
3083
- # @!method initialize(id:, name:)
3084
- # @param id [String]
3085
- # @param name [String]
3086
- end
1744
+ # @!method initialize(id:, name:)
1745
+ # @param id [String]
1746
+ # @param name [String]
3087
1747
  end
3088
1748
  end
3089
1749
 
@@ -3197,9 +1857,8 @@ module MetronomeSDK
3197
1857
  # @!attribute hierarchy_configuration
3198
1858
  # Optional configuration for commit hierarchy access control
3199
1859
  #
3200
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration, nil]
3201
- optional :hierarchy_configuration,
3202
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration }
1860
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
1861
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
3203
1862
 
3204
1863
  # @!attribute invoice_schedule
3205
1864
  #
@@ -3229,6 +1888,13 @@ module MetronomeSDK
3229
1888
  # @return [String, nil]
3230
1889
  optional :product_id, String
3231
1890
 
1891
+ # @!attribute rate_type
1892
+ # If set, the commit's rate type was updated to the specified value.
1893
+ #
1894
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::RateType, nil]
1895
+ optional :rate_type,
1896
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::RateType }
1897
+
3232
1898
  # @!attribute rollover_fraction
3233
1899
  #
3234
1900
  # @return [Float, nil]
@@ -3242,12 +1908,12 @@ module MetronomeSDK
3242
1908
  # Instead, to target usage by product or product tag, pass those values in the
3243
1909
  # body of `specifiers`.
3244
1910
  #
3245
- # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::Specifier>, nil]
1911
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
3246
1912
  optional :specifiers,
3247
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::Specifier] },
1913
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] },
3248
1914
  nil?: true
3249
1915
 
3250
- # @!method initialize(id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, product_id: nil, rollover_fraction: nil, specifiers: nil)
1916
+ # @!method initialize(id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, product_id: nil, rate_type: nil, rollover_fraction: nil, specifiers: nil)
3251
1917
  # Some parameter documentations has been truncated, see
3252
1918
  # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit}
3253
1919
  # for more details.
@@ -3260,7 +1926,7 @@ module MetronomeSDK
3260
1926
  #
3261
1927
  # @param applicable_product_tags [Array<String>, nil] Which tags the commit applies to. If applicable*product_ids, applicable_product*
3262
1928
  #
3263
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration] Optional configuration for commit hierarchy access control
1929
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for commit hierarchy access control
3264
1930
  #
3265
1931
  # @param invoice_schedule [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule]
3266
1932
  #
@@ -3272,9 +1938,11 @@ module MetronomeSDK
3272
1938
  #
3273
1939
  # @param product_id [String]
3274
1940
  #
1941
+ # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::RateType] If set, the commit's rate type was updated to the specified value.
1942
+ #
3275
1943
  # @param rollover_fraction [Float, nil]
3276
1944
  #
3277
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::Specifier>, nil] List of filters that determine what kind of customer usage draws down a commit o
1945
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil] List of filters that determine what kind of customer usage draws down a commit o
3278
1946
 
3279
1947
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit#access_schedule
3280
1948
  class AccessSchedule < MetronomeSDK::Internal::Type::BaseModel
@@ -3383,103 +2051,6 @@ module MetronomeSDK
3383
2051
  end
3384
2052
  end
3385
2053
 
3386
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit#hierarchy_configuration
3387
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
3388
- # @!attribute child_access
3389
- #
3390
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
3391
- required :child_access,
3392
- union: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess }
3393
-
3394
- # @!method initialize(child_access:)
3395
- # Optional configuration for commit hierarchy access control
3396
- #
3397
- # @param child_access [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
3398
-
3399
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration#child_access
3400
- module ChildAccess
3401
- extend MetronomeSDK::Internal::Type::Union
3402
-
3403
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll }
3404
-
3405
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone }
3406
-
3407
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs }
3408
-
3409
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
3410
- # @!attribute type
3411
- #
3412
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
3413
- required :type,
3414
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type }
3415
-
3416
- # @!method initialize(type:)
3417
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
3418
-
3419
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
3420
- module Type
3421
- extend MetronomeSDK::Internal::Type::Enum
3422
-
3423
- ALL = :ALL
3424
-
3425
- # @!method self.values
3426
- # @return [Array<Symbol>]
3427
- end
3428
- end
3429
-
3430
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
3431
- # @!attribute type
3432
- #
3433
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
3434
- required :type,
3435
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type }
3436
-
3437
- # @!method initialize(type:)
3438
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
3439
-
3440
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
3441
- module Type
3442
- extend MetronomeSDK::Internal::Type::Enum
3443
-
3444
- NONE = :NONE
3445
-
3446
- # @!method self.values
3447
- # @return [Array<Symbol>]
3448
- end
3449
- end
3450
-
3451
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
3452
- # @!attribute contract_ids
3453
- #
3454
- # @return [Array<String>]
3455
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
3456
-
3457
- # @!attribute type
3458
- #
3459
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
3460
- required :type,
3461
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type }
3462
-
3463
- # @!method initialize(contract_ids:, type:)
3464
- # @param contract_ids [Array<String>]
3465
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
3466
-
3467
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
3468
- module Type
3469
- extend MetronomeSDK::Internal::Type::Enum
3470
-
3471
- CONTRACT_IDS = :CONTRACT_IDS
3472
-
3473
- # @!method self.values
3474
- # @return [Array<Symbol>]
3475
- end
3476
- end
3477
-
3478
- # @!method self.variants
3479
- # @return [Array(MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
3480
- end
3481
- end
3482
-
3483
2054
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit#invoice_schedule
3484
2055
  class InvoiceSchedule < MetronomeSDK::Internal::Type::BaseModel
3485
2056
  # @!attribute add_schedule_items
@@ -3590,42 +2161,17 @@ module MetronomeSDK
3590
2161
  end
3591
2162
  end
3592
2163
 
3593
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
3594
- # @!attribute presentation_group_values
3595
- #
3596
- # @return [Hash{Symbol=>String}, nil]
3597
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
3598
-
3599
- # @!attribute pricing_group_values
3600
- #
3601
- # @return [Hash{Symbol=>String}, nil]
3602
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
3603
-
3604
- # @!attribute product_id
3605
- # If provided, the specifier will only apply to the product with the specified ID.
3606
- #
3607
- # @return [String, nil]
3608
- optional :product_id, String
2164
+ # If set, the commit's rate type was updated to the specified value.
2165
+ #
2166
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit#rate_type
2167
+ module RateType
2168
+ extend MetronomeSDK::Internal::Type::Enum
3609
2169
 
3610
- # @!attribute product_tags
3611
- # If provided, the specifier will only apply to products with all the specified
3612
- # tags.
3613
- #
3614
- # @return [Array<String>, nil]
3615
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
2170
+ COMMIT_RATE = :COMMIT_RATE
2171
+ LIST_RATE = :LIST_RATE
3616
2172
 
3617
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
3618
- # Some parameter documentations has been truncated, see
3619
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::Specifier}
3620
- # for more details.
3621
- #
3622
- # @param presentation_group_values [Hash{Symbol=>String}]
3623
- #
3624
- # @param pricing_group_values [Hash{Symbol=>String}]
3625
- #
3626
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
3627
- #
3628
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
2173
+ # @!method self.values
2174
+ # @return [Array<Symbol>]
3629
2175
  end
3630
2176
  end
3631
2177
 
@@ -3644,9 +2190,8 @@ module MetronomeSDK
3644
2190
  # @!attribute hierarchy_configuration
3645
2191
  # Optional configuration for credit hierarchy access control
3646
2192
  #
3647
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration, nil]
3648
- optional :hierarchy_configuration,
3649
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration }
2193
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
2194
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
3650
2195
 
3651
2196
  # @!attribute name
3652
2197
  #
@@ -3665,12 +2210,19 @@ module MetronomeSDK
3665
2210
  # @return [Float, nil]
3666
2211
  optional :priority, Float, nil?: true
3667
2212
 
2213
+ # @!attribute rate_type
2214
+ # If set, the credit's rate type was updated to the specified value.
2215
+ #
2216
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::RateType, nil]
2217
+ optional :rate_type,
2218
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::RateType }
2219
+
3668
2220
  # @!attribute rollover_fraction
3669
2221
  #
3670
2222
  # @return [Float, nil]
3671
2223
  optional :rollover_fraction, Float, nil?: true
3672
2224
 
3673
- # @!method initialize(id:, access_schedule: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rollover_fraction: nil)
2225
+ # @!method initialize(id:, access_schedule: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, rollover_fraction: nil)
3674
2226
  # Some parameter documentations has been truncated, see
3675
2227
  # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit}
3676
2228
  # for more details.
@@ -3679,7 +2231,7 @@ module MetronomeSDK
3679
2231
  #
3680
2232
  # @param access_schedule [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::AccessSchedule]
3681
2233
  #
3682
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration] Optional configuration for credit hierarchy access control
2234
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for credit hierarchy access control
3683
2235
  #
3684
2236
  # @param name [String]
3685
2237
  #
@@ -3687,6 +2239,8 @@ module MetronomeSDK
3687
2239
  #
3688
2240
  # @param priority [Float, nil] If multiple credits are applicable, the one with the lower priority will apply f
3689
2241
  #
2242
+ # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::RateType] If set, the credit's rate type was updated to the specified value.
2243
+ #
3690
2244
  # @param rollover_fraction [Float, nil]
3691
2245
 
3692
2246
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit#access_schedule
@@ -3796,101 +2350,17 @@ module MetronomeSDK
3796
2350
  end
3797
2351
  end
3798
2352
 
3799
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit#hierarchy_configuration
3800
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
3801
- # @!attribute child_access
3802
- #
3803
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
3804
- required :child_access,
3805
- union: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess }
3806
-
3807
- # @!method initialize(child_access:)
3808
- # Optional configuration for credit hierarchy access control
3809
- #
3810
- # @param child_access [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
3811
-
3812
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration#child_access
3813
- module ChildAccess
3814
- extend MetronomeSDK::Internal::Type::Union
3815
-
3816
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll }
3817
-
3818
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone }
3819
-
3820
- variant -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs }
3821
-
3822
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
3823
- # @!attribute type
3824
- #
3825
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
3826
- required :type,
3827
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type }
3828
-
3829
- # @!method initialize(type:)
3830
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
3831
-
3832
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
3833
- module Type
3834
- extend MetronomeSDK::Internal::Type::Enum
3835
-
3836
- ALL = :ALL
3837
-
3838
- # @!method self.values
3839
- # @return [Array<Symbol>]
3840
- end
3841
- end
3842
-
3843
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
3844
- # @!attribute type
3845
- #
3846
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
3847
- required :type,
3848
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type }
3849
-
3850
- # @!method initialize(type:)
3851
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
3852
-
3853
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
3854
- module Type
3855
- extend MetronomeSDK::Internal::Type::Enum
3856
-
3857
- NONE = :NONE
3858
-
3859
- # @!method self.values
3860
- # @return [Array<Symbol>]
3861
- end
3862
- end
3863
-
3864
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
3865
- # @!attribute contract_ids
3866
- #
3867
- # @return [Array<String>]
3868
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
3869
-
3870
- # @!attribute type
3871
- #
3872
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
3873
- required :type,
3874
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type }
3875
-
3876
- # @!method initialize(contract_ids:, type:)
3877
- # @param contract_ids [Array<String>]
3878
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
3879
-
3880
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
3881
- module Type
3882
- extend MetronomeSDK::Internal::Type::Enum
3883
-
3884
- CONTRACT_IDS = :CONTRACT_IDS
2353
+ # If set, the credit's rate type was updated to the specified value.
2354
+ #
2355
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit#rate_type
2356
+ module RateType
2357
+ extend MetronomeSDK::Internal::Type::Enum
3885
2358
 
3886
- # @!method self.values
3887
- # @return [Array<Symbol>]
3888
- end
3889
- end
2359
+ LIST_RATE = :LIST_RATE
2360
+ COMMIT_RATE = :COMMIT_RATE
3890
2361
 
3891
- # @!method self.variants
3892
- # @return [Array(MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
3893
- end
2362
+ # @!method self.values
2363
+ # @return [Array<Symbol>]
3894
2364
  end
3895
2365
  end
3896
2366
 
@@ -3901,6 +2371,7 @@ module MetronomeSDK
3901
2371
  required :id, String
3902
2372
 
3903
2373
  # @!attribute custom_fields
2374
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
3904
2375
  #
3905
2376
  # @return [Hash{Symbol=>String}, nil]
3906
2377
  optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
@@ -3925,7 +2396,7 @@ module MetronomeSDK
3925
2396
  # @!method initialize(id:, custom_fields: nil, name: nil, netsuite_sales_order_id: nil, schedule: nil)
3926
2397
  # @param id [String]
3927
2398
  #
3928
- # @param custom_fields [Hash{Symbol=>String}]
2399
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
3929
2400
  #
3930
2401
  # @param name [String]
3931
2402
  #
@@ -4151,9 +2622,8 @@ module MetronomeSDK
4151
2622
 
4152
2623
  # @!attribute payment_gate_config
4153
2624
  #
4154
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig, nil]
4155
- optional :payment_gate_config,
4156
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig }
2625
+ # @return [MetronomeSDK::Models::PaymentGateConfigV2, nil]
2626
+ optional :payment_gate_config, -> { MetronomeSDK::PaymentGateConfigV2 }
4157
2627
 
4158
2628
  # @!attribute recharge_to_amount
4159
2629
  # Specify the amount the balance should be recharged to.
@@ -4179,14 +2649,14 @@ module MetronomeSDK
4179
2649
  #
4180
2650
  # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
4181
2651
  #
4182
- # @param payment_gate_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig]
2652
+ # @param payment_gate_config [MetronomeSDK::Models::PaymentGateConfigV2]
4183
2653
  #
4184
2654
  # @param recharge_to_amount [Float] Specify the amount the balance should be recharged to.
4185
2655
  #
4186
2656
  # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's balance
4187
2657
 
4188
2658
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration#commit
4189
- class Commit < MetronomeSDK::Internal::Type::BaseModel
2659
+ class Commit < MetronomeSDK::Models::UpdateBaseThresholdCommit
4190
2660
  # @!attribute applicable_product_ids
4191
2661
  # Which products the threshold commit applies to. If both applicable_product_ids
4192
2662
  # and applicable_product_tags are not provided, the commit applies to all
@@ -4202,25 +2672,6 @@ module MetronomeSDK
4202
2672
  # @return [Array<String>, nil]
4203
2673
  optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
4204
2674
 
4205
- # @!attribute description
4206
- #
4207
- # @return [String, nil]
4208
- optional :description, String
4209
-
4210
- # @!attribute name
4211
- # Specify the name of the line item for the threshold charge. If left blank, it
4212
- # will default to the commit product name.
4213
- #
4214
- # @return [String, nil]
4215
- optional :name, String
4216
-
4217
- # @!attribute product_id
4218
- # The commit product that will be used to generate the line item for commit
4219
- # payment.
4220
- #
4221
- # @return [String, nil]
4222
- optional :product_id, String
4223
-
4224
2675
  # @!attribute specifiers
4225
2676
  # List of filters that determine what kind of customer usage draws down a commit
4226
2677
  # or credit. A customer's usage needs to meet the condition of at least one of the
@@ -4229,16 +2680,12 @@ module MetronomeSDK
4229
2680
  # Instead, to target usage by product or product tag, pass those values in the
4230
2681
  # body of `specifiers`.
4231
2682
  #
4232
- # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::Commit::Specifier>, nil]
2683
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
4233
2684
  optional :specifiers,
4234
- -> do
4235
- MetronomeSDK::Internal::Type::ArrayOf[
4236
- MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::Commit::Specifier
4237
- ]
4238
- end,
2685
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] },
4239
2686
  nil?: true
4240
2687
 
4241
- # @!method initialize(applicable_product_ids: nil, applicable_product_tags: nil, description: nil, name: nil, product_id: nil, specifiers: nil)
2688
+ # @!method initialize(applicable_product_ids: nil, applicable_product_tags: nil, specifiers: nil)
4242
2689
  # Some parameter documentations has been truncated, see
4243
2690
  # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::Commit}
4244
2691
  # for more details.
@@ -4247,203 +2694,7 @@ module MetronomeSDK
4247
2694
  #
4248
2695
  # @param applicable_product_tags [Array<String>, nil] Which tags the threshold commit applies to. If both applicable_product_ids and a
4249
2696
  #
4250
- # @param description [String]
4251
- #
4252
- # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
4253
- #
4254
- # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
4255
- #
4256
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::Commit::Specifier>, nil] List of filters that determine what kind of customer usage draws down a commit o
4257
-
4258
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
4259
- # @!attribute presentation_group_values
4260
- #
4261
- # @return [Hash{Symbol=>String}, nil]
4262
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
4263
-
4264
- # @!attribute pricing_group_values
4265
- #
4266
- # @return [Hash{Symbol=>String}, nil]
4267
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
4268
-
4269
- # @!attribute product_id
4270
- # If provided, the specifier will only apply to the product with the specified ID.
4271
- #
4272
- # @return [String, nil]
4273
- optional :product_id, String
4274
-
4275
- # @!attribute product_tags
4276
- # If provided, the specifier will only apply to products with all the specified
4277
- # tags.
4278
- #
4279
- # @return [Array<String>, nil]
4280
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
4281
-
4282
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
4283
- # Some parameter documentations has been truncated, see
4284
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::Commit::Specifier}
4285
- # for more details.
4286
- #
4287
- # @param presentation_group_values [Hash{Symbol=>String}]
4288
- #
4289
- # @param pricing_group_values [Hash{Symbol=>String}]
4290
- #
4291
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
4292
- #
4293
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
4294
- end
4295
- end
4296
-
4297
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration#payment_gate_config
4298
- class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
4299
- # @!attribute payment_gate_type
4300
- # Gate access to the commit balance based on successful collection of payment.
4301
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
4302
- # facilitate payment using your own payment integration. Select NONE if you do not
4303
- # wish to payment gate the commit balance.
4304
- #
4305
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType]
4306
- required :payment_gate_type,
4307
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType }
4308
-
4309
- # @!attribute precalculated_tax_config
4310
- # Only applicable if using PRECALCULATED as your tax type.
4311
- #
4312
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
4313
- optional :precalculated_tax_config,
4314
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig }
4315
-
4316
- # @!attribute stripe_config
4317
- # Only applicable if using STRIPE as your payment gateway type.
4318
- #
4319
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
4320
- optional :stripe_config,
4321
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig }
4322
-
4323
- # @!attribute tax_type
4324
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
4325
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
4326
- # will default to NONE.
4327
- #
4328
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType, nil]
4329
- optional :tax_type,
4330
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType }
4331
-
4332
- # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
4333
- # Some parameter documentations has been truncated, see
4334
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig}
4335
- # for more details.
4336
- #
4337
- # @param payment_gate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
4338
- #
4339
- # @param precalculated_tax_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
4340
- #
4341
- # @param stripe_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gateway type.
4342
- #
4343
- # @param tax_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
4344
-
4345
- # Gate access to the commit balance based on successful collection of payment.
4346
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
4347
- # facilitate payment using your own payment integration. Select NONE if you do not
4348
- # wish to payment gate the commit balance.
4349
- #
4350
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig#payment_gate_type
4351
- module PaymentGateType
4352
- extend MetronomeSDK::Internal::Type::Enum
4353
-
4354
- NONE = :NONE
4355
- STRIPE = :STRIPE
4356
- EXTERNAL = :EXTERNAL
4357
-
4358
- # @!method self.values
4359
- # @return [Array<Symbol>]
4360
- end
4361
-
4362
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
4363
- class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
4364
- # @!attribute tax_amount
4365
- # Amount of tax to be applied. This should be in the same currency and
4366
- # denomination as the commit's invoice schedule
4367
- #
4368
- # @return [Float]
4369
- required :tax_amount, Float
4370
-
4371
- # @!attribute tax_name
4372
- # Name of the tax to be applied. This may be used in an invoice line item
4373
- # description.
4374
- #
4375
- # @return [String, nil]
4376
- optional :tax_name, String
4377
-
4378
- # @!method initialize(tax_amount:, tax_name: nil)
4379
- # Some parameter documentations has been truncated, see
4380
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
4381
- # for more details.
4382
- #
4383
- # Only applicable if using PRECALCULATED as your tax type.
4384
- #
4385
- # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
4386
- #
4387
- # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
4388
- end
4389
-
4390
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig#stripe_config
4391
- class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
4392
- # @!attribute payment_type
4393
- # If left blank, will default to INVOICE
4394
- #
4395
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
4396
- required :payment_type,
4397
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType }
4398
-
4399
- # @!attribute invoice_metadata
4400
- # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
4401
- # your payment type.
4402
- #
4403
- # @return [Hash{Symbol=>String}, nil]
4404
- optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
4405
-
4406
- # @!method initialize(payment_type:, invoice_metadata: nil)
4407
- # Some parameter documentations has been truncated, see
4408
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig}
4409
- # for more details.
4410
- #
4411
- # Only applicable if using STRIPE as your payment gateway type.
4412
- #
4413
- # @param payment_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
4414
- #
4415
- # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
4416
-
4417
- # If left blank, will default to INVOICE
4418
- #
4419
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
4420
- module PaymentType
4421
- extend MetronomeSDK::Internal::Type::Enum
4422
-
4423
- INVOICE = :INVOICE
4424
- PAYMENT_INTENT = :PAYMENT_INTENT
4425
-
4426
- # @!method self.values
4427
- # @return [Array<Symbol>]
4428
- end
4429
- end
4430
-
4431
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
4432
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
4433
- # will default to NONE.
4434
- #
4435
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig#tax_type
4436
- module TaxType
4437
- extend MetronomeSDK::Internal::Type::Enum
4438
-
4439
- NONE = :NONE
4440
- STRIPE = :STRIPE
4441
- ANROK = :ANROK
4442
- PRECALCULATED = :PRECALCULATED
4443
-
4444
- # @!method self.values
4445
- # @return [Array<Symbol>]
4446
- end
2697
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil] List of filters that determine what kind of customer usage draws down a commit o
4447
2698
  end
4448
2699
  end
4449
2700
 
@@ -4470,11 +2721,18 @@ module MetronomeSDK
4470
2721
  optional :invoice_amount,
4471
2722
  -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::InvoiceAmount }
4472
2723
 
4473
- # @!method initialize(id:, access_amount: nil, ending_before: nil, invoice_amount: nil)
2724
+ # @!attribute rate_type
2725
+ #
2726
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::RateType, nil]
2727
+ optional :rate_type,
2728
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::RateType }
2729
+
2730
+ # @!method initialize(id:, access_amount: nil, ending_before: nil, invoice_amount: nil, rate_type: nil)
4474
2731
  # @param id [String]
4475
2732
  # @param access_amount [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::AccessAmount]
4476
2733
  # @param ending_before [Time]
4477
2734
  # @param invoice_amount [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::InvoiceAmount]
2735
+ # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::RateType]
4478
2736
 
4479
2737
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit#access_amount
4480
2738
  class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
@@ -4509,6 +2767,17 @@ module MetronomeSDK
4509
2767
  # @param quantity [Float]
4510
2768
  # @param unit_price [Float]
4511
2769
  end
2770
+
2771
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit#rate_type
2772
+ module RateType
2773
+ extend MetronomeSDK::Internal::Type::Enum
2774
+
2775
+ LIST_RATE = :LIST_RATE
2776
+ COMMIT_RATE = :COMMIT_RATE
2777
+
2778
+ # @!method self.values
2779
+ # @return [Array<Symbol>]
2780
+ end
4512
2781
  end
4513
2782
 
4514
2783
  class UpdateRecurringCredit < MetronomeSDK::Internal::Type::BaseModel
@@ -4528,10 +2797,17 @@ module MetronomeSDK
4528
2797
  # @return [Time, nil]
4529
2798
  optional :ending_before, Time
4530
2799
 
4531
- # @!method initialize(id:, access_amount: nil, ending_before: nil)
2800
+ # @!attribute rate_type
2801
+ #
2802
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::RateType, nil]
2803
+ optional :rate_type,
2804
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::RateType }
2805
+
2806
+ # @!method initialize(id:, access_amount: nil, ending_before: nil, rate_type: nil)
4532
2807
  # @param id [String]
4533
2808
  # @param access_amount [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::AccessAmount]
4534
2809
  # @param ending_before [Time]
2810
+ # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::RateType]
4535
2811
 
4536
2812
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit#access_amount
4537
2813
  class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
@@ -4549,6 +2825,17 @@ module MetronomeSDK
4549
2825
  # @param quantity [Float]
4550
2826
  # @param unit_price [Float]
4551
2827
  end
2828
+
2829
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit#rate_type
2830
+ module RateType
2831
+ extend MetronomeSDK::Internal::Type::Enum
2832
+
2833
+ LIST_RATE = :LIST_RATE
2834
+ COMMIT_RATE = :COMMIT_RATE
2835
+
2836
+ # @!method self.values
2837
+ # @return [Array<Symbol>]
2838
+ end
4552
2839
  end
4553
2840
 
4554
2841
  class UpdateRefundInvoice < MetronomeSDK::Internal::Type::BaseModel
@@ -4710,9 +2997,8 @@ module MetronomeSDK
4710
2997
  class UpdateSpendThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
4711
2998
  # @!attribute commit
4712
2999
  #
4713
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::Commit, nil]
4714
- optional :commit,
4715
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::Commit }
3000
+ # @return [MetronomeSDK::Models::UpdateBaseThresholdCommit, nil]
3001
+ optional :commit, -> { MetronomeSDK::UpdateBaseThresholdCommit }
4716
3002
 
4717
3003
  # @!attribute is_enabled
4718
3004
  # When set to false, the contract will not be evaluated against the
@@ -4724,9 +3010,8 @@ module MetronomeSDK
4724
3010
 
4725
3011
  # @!attribute payment_gate_config
4726
3012
  #
4727
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig, nil]
4728
- optional :payment_gate_config,
4729
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig }
3013
+ # @return [MetronomeSDK::Models::PaymentGateConfigV2, nil]
3014
+ optional :payment_gate_config, -> { MetronomeSDK::PaymentGateConfigV2 }
4730
3015
 
4731
3016
  # @!attribute threshold_amount
4732
3017
  # Specify the threshold amount for the contract. Each time the contract's usage
@@ -4740,198 +3025,13 @@ module MetronomeSDK
4740
3025
  # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration}
4741
3026
  # for more details.
4742
3027
  #
4743
- # @param commit [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::Commit]
3028
+ # @param commit [MetronomeSDK::Models::UpdateBaseThresholdCommit]
4744
3029
  #
4745
3030
  # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
4746
3031
  #
4747
- # @param payment_gate_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig]
3032
+ # @param payment_gate_config [MetronomeSDK::Models::PaymentGateConfigV2]
4748
3033
  #
4749
3034
  # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's usage hi
4750
-
4751
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration#commit
4752
- class Commit < MetronomeSDK::Internal::Type::BaseModel
4753
- # @!attribute description
4754
- #
4755
- # @return [String, nil]
4756
- optional :description, String
4757
-
4758
- # @!attribute name
4759
- # Specify the name of the line item for the threshold charge. If left blank, it
4760
- # will default to the commit product name.
4761
- #
4762
- # @return [String, nil]
4763
- optional :name, String
4764
-
4765
- # @!attribute product_id
4766
- # The commit product that will be used to generate the line item for commit
4767
- # payment.
4768
- #
4769
- # @return [String, nil]
4770
- optional :product_id, String
4771
-
4772
- # @!method initialize(description: nil, name: nil, product_id: nil)
4773
- # Some parameter documentations has been truncated, see
4774
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::Commit}
4775
- # for more details.
4776
- #
4777
- # @param description [String]
4778
- #
4779
- # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
4780
- #
4781
- # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
4782
- end
4783
-
4784
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration#payment_gate_config
4785
- class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
4786
- # @!attribute payment_gate_type
4787
- # Gate access to the commit balance based on successful collection of payment.
4788
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
4789
- # facilitate payment using your own payment integration. Select NONE if you do not
4790
- # wish to payment gate the commit balance.
4791
- #
4792
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::PaymentGateType]
4793
- required :payment_gate_type,
4794
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::PaymentGateType }
4795
-
4796
- # @!attribute precalculated_tax_config
4797
- # Only applicable if using PRECALCULATED as your tax type.
4798
- #
4799
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
4800
- optional :precalculated_tax_config,
4801
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig }
4802
-
4803
- # @!attribute stripe_config
4804
- # Only applicable if using STRIPE as your payment gateway type.
4805
- #
4806
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
4807
- optional :stripe_config,
4808
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig }
4809
-
4810
- # @!attribute tax_type
4811
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
4812
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
4813
- # will default to NONE.
4814
- #
4815
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::TaxType, nil]
4816
- optional :tax_type,
4817
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::TaxType }
4818
-
4819
- # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
4820
- # Some parameter documentations has been truncated, see
4821
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig}
4822
- # for more details.
4823
- #
4824
- # @param payment_gate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
4825
- #
4826
- # @param precalculated_tax_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
4827
- #
4828
- # @param stripe_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gateway type.
4829
- #
4830
- # @param tax_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
4831
-
4832
- # Gate access to the commit balance based on successful collection of payment.
4833
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
4834
- # facilitate payment using your own payment integration. Select NONE if you do not
4835
- # wish to payment gate the commit balance.
4836
- #
4837
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig#payment_gate_type
4838
- module PaymentGateType
4839
- extend MetronomeSDK::Internal::Type::Enum
4840
-
4841
- NONE = :NONE
4842
- STRIPE = :STRIPE
4843
- EXTERNAL = :EXTERNAL
4844
-
4845
- # @!method self.values
4846
- # @return [Array<Symbol>]
4847
- end
4848
-
4849
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
4850
- class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
4851
- # @!attribute tax_amount
4852
- # Amount of tax to be applied. This should be in the same currency and
4853
- # denomination as the commit's invoice schedule
4854
- #
4855
- # @return [Float]
4856
- required :tax_amount, Float
4857
-
4858
- # @!attribute tax_name
4859
- # Name of the tax to be applied. This may be used in an invoice line item
4860
- # description.
4861
- #
4862
- # @return [String, nil]
4863
- optional :tax_name, String
4864
-
4865
- # @!method initialize(tax_amount:, tax_name: nil)
4866
- # Some parameter documentations has been truncated, see
4867
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
4868
- # for more details.
4869
- #
4870
- # Only applicable if using PRECALCULATED as your tax type.
4871
- #
4872
- # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
4873
- #
4874
- # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
4875
- end
4876
-
4877
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig#stripe_config
4878
- class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
4879
- # @!attribute payment_type
4880
- # If left blank, will default to INVOICE
4881
- #
4882
- # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
4883
- required :payment_type,
4884
- enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType }
4885
-
4886
- # @!attribute invoice_metadata
4887
- # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
4888
- # your payment type.
4889
- #
4890
- # @return [Hash{Symbol=>String}, nil]
4891
- optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
4892
-
4893
- # @!method initialize(payment_type:, invoice_metadata: nil)
4894
- # Some parameter documentations has been truncated, see
4895
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig}
4896
- # for more details.
4897
- #
4898
- # Only applicable if using STRIPE as your payment gateway type.
4899
- #
4900
- # @param payment_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
4901
- #
4902
- # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
4903
-
4904
- # If left blank, will default to INVOICE
4905
- #
4906
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
4907
- module PaymentType
4908
- extend MetronomeSDK::Internal::Type::Enum
4909
-
4910
- INVOICE = :INVOICE
4911
- PAYMENT_INTENT = :PAYMENT_INTENT
4912
-
4913
- # @!method self.values
4914
- # @return [Array<Symbol>]
4915
- end
4916
- end
4917
-
4918
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
4919
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
4920
- # will default to NONE.
4921
- #
4922
- # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig#tax_type
4923
- module TaxType
4924
- extend MetronomeSDK::Internal::Type::Enum
4925
-
4926
- NONE = :NONE
4927
- STRIPE = :STRIPE
4928
- ANROK = :ANROK
4929
- PRECALCULATED = :PRECALCULATED
4930
-
4931
- # @!method self.values
4932
- # @return [Array<Symbol>]
4933
- end
4934
- end
4935
3035
  end
4936
3036
 
4937
3037
  class UpdateSubscription < MetronomeSDK::Internal::Type::BaseModel