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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (475) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +85 -0
  3. data/README.md +120 -74
  4. data/SECURITY.md +2 -2
  5. data/lib/metronome_sdk/client.rb +4 -4
  6. data/lib/metronome_sdk/errors.rb +22 -0
  7. data/lib/metronome_sdk/internal/transport/base_client.rb +10 -2
  8. data/lib/metronome_sdk/internal/transport/pooled_net_requester.rb +3 -1
  9. data/lib/metronome_sdk/internal/type/array_of.rb +14 -1
  10. data/lib/metronome_sdk/internal/type/base_model.rb +92 -23
  11. data/lib/metronome_sdk/internal/type/boolean.rb +15 -1
  12. data/lib/metronome_sdk/internal/type/converter.rb +42 -34
  13. data/lib/metronome_sdk/internal/type/enum.rb +25 -2
  14. data/lib/metronome_sdk/internal/type/file_input.rb +13 -1
  15. data/lib/metronome_sdk/internal/type/hash_of.rb +14 -1
  16. data/lib/metronome_sdk/internal/type/union.rb +27 -7
  17. data/lib/metronome_sdk/internal/type/unknown.rb +15 -1
  18. data/lib/metronome_sdk/internal/util.rb +62 -10
  19. data/lib/metronome_sdk/internal.rb +3 -0
  20. data/lib/metronome_sdk/models/commit.rb +230 -87
  21. data/lib/metronome_sdk/models/contract_without_amendments.rb +551 -185
  22. data/lib/metronome_sdk/models/credit.rb +201 -51
  23. data/lib/metronome_sdk/models/discount.rb +5 -5
  24. data/lib/metronome_sdk/models/event_type_filter.rb +1 -1
  25. data/lib/metronome_sdk/models/override.rb +53 -34
  26. data/lib/metronome_sdk/models/pro_service.rb +2 -2
  27. data/lib/metronome_sdk/models/property_filter.rb +1 -1
  28. data/lib/metronome_sdk/models/rate.rb +9 -9
  29. data/lib/metronome_sdk/models/schedule_duration.rb +4 -4
  30. data/lib/metronome_sdk/models/schedule_point_in_time.rb +11 -11
  31. data/lib/metronome_sdk/models/scheduled_charge.rb +5 -5
  32. data/lib/metronome_sdk/models/v1/alert_archive_response.rb +2 -2
  33. data/lib/metronome_sdk/models/v1/alert_create_params.rb +15 -12
  34. data/lib/metronome_sdk/models/v1/alert_create_response.rb +2 -2
  35. data/lib/metronome_sdk/models/v1/audit_log_list_params.rb +2 -2
  36. data/lib/metronome_sdk/models/v1/billable_metric_archive_response.rb +2 -2
  37. data/lib/metronome_sdk/models/v1/billable_metric_create_params.rb +6 -6
  38. data/lib/metronome_sdk/models/v1/billable_metric_create_response.rb +2 -2
  39. data/lib/metronome_sdk/models/v1/billable_metric_list_response.rb +4 -4
  40. data/lib/metronome_sdk/models/v1/billable_metric_retrieve_response.rb +4 -4
  41. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +577 -152
  42. data/lib/metronome_sdk/models/v1/contract_amend_response.rb +2 -2
  43. data/lib/metronome_sdk/models/v1/contract_archive_response.rb +2 -2
  44. data/lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb +12 -12
  45. data/lib/metronome_sdk/models/v1/contract_create_historical_invoices_response.rb +2 -2
  46. data/lib/metronome_sdk/models/v1/contract_create_params.rb +1317 -341
  47. data/lib/metronome_sdk/models/v1/contract_create_response.rb +2 -2
  48. data/lib/metronome_sdk/models/v1/contract_list_balances_response.rb +3 -7
  49. data/lib/metronome_sdk/models/v1/contract_list_response.rb +421 -36
  50. data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_params.rb +33 -5
  51. data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rb +28 -7
  52. data/lib/metronome_sdk/models/v1/contract_retrieve_response.rb +422 -36
  53. data/lib/metronome_sdk/models/v1/contract_retrieve_subscription_quantity_history_params.rb +34 -0
  54. data/lib/metronome_sdk/models/v1/contract_retrieve_subscription_quantity_history_response.rb +81 -0
  55. data/lib/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_params.rb +4 -4
  56. data/lib/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_response.rb +2 -2
  57. data/lib/metronome_sdk/models/v1/contract_update_end_date_response.rb +2 -2
  58. data/lib/metronome_sdk/models/v1/contracts/product_archive_response.rb +2 -2
  59. data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +6 -6
  60. data/lib/metronome_sdk/models/v1/contracts/product_create_response.rb +2 -2
  61. data/lib/metronome_sdk/models/v1/contracts/product_list_item_state.rb +5 -5
  62. data/lib/metronome_sdk/models/v1/contracts/product_list_params.rb +4 -4
  63. data/lib/metronome_sdk/models/v1/contracts/product_list_response.rb +8 -8
  64. data/lib/metronome_sdk/models/v1/contracts/product_retrieve_response.rb +8 -8
  65. data/lib/metronome_sdk/models/v1/contracts/product_update_params.rb +4 -4
  66. data/lib/metronome_sdk/models/v1/contracts/product_update_response.rb +2 -2
  67. data/lib/metronome_sdk/models/v1/contracts/quantity_conversion.rb +3 -3
  68. data/lib/metronome_sdk/models/v1/contracts/quantity_rounding.rb +3 -3
  69. data/lib/metronome_sdk/models/v1/contracts/rate_card_archive_response.rb +2 -2
  70. data/lib/metronome_sdk/models/v1/contracts/rate_card_create_params.rb +4 -4
  71. data/lib/metronome_sdk/models/v1/contracts/rate_card_create_response.rb +2 -2
  72. data/lib/metronome_sdk/models/v1/contracts/rate_card_list_response.rb +4 -4
  73. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_params.rb +33 -5
  74. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rb +26 -5
  75. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rb +4 -4
  76. data/lib/metronome_sdk/models/v1/contracts/rate_card_update_params.rb +2 -2
  77. data/lib/metronome_sdk/models/v1/contracts/rate_card_update_response.rb +2 -2
  78. data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_set_response.rb +2 -2
  79. data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_params.rb +2 -2
  80. data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_response.rb +2 -2
  81. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +46 -18
  82. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_response.rb +2 -2
  83. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +36 -12
  84. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rb +6 -6
  85. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_params.rb +33 -5
  86. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rb +26 -5
  87. data/lib/metronome_sdk/models/v1/credit_grant_create_params.rb +12 -20
  88. data/lib/metronome_sdk/models/v1/credit_grant_create_response.rb +2 -2
  89. data/lib/metronome_sdk/models/v1/credit_grant_edit_response.rb +2 -2
  90. data/lib/metronome_sdk/models/v1/credit_grant_list_entries_params.rb +20 -1
  91. data/lib/metronome_sdk/models/v1/credit_grant_list_entries_response.rb +6 -6
  92. data/lib/metronome_sdk/models/v1/credit_grant_list_response.rb +8 -8
  93. data/lib/metronome_sdk/models/v1/credit_grant_void_response.rb +2 -2
  94. data/lib/metronome_sdk/models/v1/credit_ledger_entry.rb +1 -1
  95. data/lib/metronome_sdk/models/v1/custom_field_add_key_params.rb +2 -2
  96. data/lib/metronome_sdk/models/v1/custom_field_delete_values_params.rb +2 -2
  97. data/lib/metronome_sdk/models/v1/custom_field_list_keys_params.rb +2 -2
  98. data/lib/metronome_sdk/models/v1/custom_field_remove_key_params.rb +2 -2
  99. data/lib/metronome_sdk/models/v1/custom_field_set_values_params.rb +2 -2
  100. data/lib/metronome_sdk/models/v1/customer.rb +1 -1
  101. data/lib/metronome_sdk/models/v1/customer_archive_response.rb +2 -2
  102. data/lib/metronome_sdk/models/v1/customer_create_params.rb +20 -20
  103. data/lib/metronome_sdk/models/v1/customer_create_response.rb +2 -2
  104. data/lib/metronome_sdk/models/v1/customer_detail.rb +10 -10
  105. data/lib/metronome_sdk/models/v1/customer_list_billable_metrics_response.rb +4 -4
  106. data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +115 -0
  107. data/lib/metronome_sdk/models/v1/customer_preview_events_response.rb +18 -0
  108. data/lib/metronome_sdk/models/v1/customer_retrieve_response.rb +2 -2
  109. data/lib/metronome_sdk/models/v1/customer_set_name_response.rb +2 -2
  110. data/lib/metronome_sdk/models/v1/customers/alert_list_params.rb +2 -2
  111. data/lib/metronome_sdk/models/v1/customers/alert_list_response.rb +2 -2
  112. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +2 -2
  113. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_response.rb +2 -2
  114. data/lib/metronome_sdk/models/v1/customers/billing_config_create_params.rb +6 -6
  115. data/lib/metronome_sdk/models/v1/customers/billing_config_delete_params.rb +2 -2
  116. data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_params.rb +2 -2
  117. data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +9 -1
  118. data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +86 -32
  119. data/lib/metronome_sdk/models/v1/customers/commit_create_response.rb +2 -2
  120. data/lib/metronome_sdk/models/v1/customers/commit_list_response.rb +2 -2
  121. data/lib/metronome_sdk/models/v1/customers/commit_update_end_date_response.rb +2 -2
  122. data/lib/metronome_sdk/models/v1/customers/credit_create_params.rb +59 -7
  123. data/lib/metronome_sdk/models/v1/customers/credit_create_response.rb +2 -2
  124. data/lib/metronome_sdk/models/v1/customers/credit_list_response.rb +2 -2
  125. data/lib/metronome_sdk/models/v1/customers/credit_update_end_date_response.rb +2 -2
  126. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +24 -24
  127. data/lib/metronome_sdk/models/v1/customers/invoice.rb +74 -73
  128. data/lib/metronome_sdk/models/v1/customers/invoice_list_breakdowns_params.rb +4 -4
  129. data/lib/metronome_sdk/models/v1/customers/invoice_list_params.rb +2 -2
  130. data/lib/metronome_sdk/models/v1/customers/invoice_retrieve_response.rb +2 -2
  131. data/lib/metronome_sdk/models/v1/customers/plan_add_params.rb +16 -15
  132. data/lib/metronome_sdk/models/v1/customers/plan_add_response.rb +2 -2
  133. data/lib/metronome_sdk/models/v1/customers/plan_list_response.rb +2 -2
  134. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +14 -13
  135. data/lib/metronome_sdk/models/v1/plan_detail.rb +18 -18
  136. data/lib/metronome_sdk/models/v1/plan_get_details_response.rb +2 -2
  137. data/lib/metronome_sdk/models/v1/plan_list_charges_response.rb +2 -2
  138. data/lib/metronome_sdk/models/v1/plan_list_customers_params.rb +2 -2
  139. data/lib/metronome_sdk/models/v1/plan_list_customers_response.rb +2 -2
  140. data/lib/metronome_sdk/models/v1/rollover_amount_max_amount.rb +3 -3
  141. data/lib/metronome_sdk/models/v1/rollover_amount_max_percentage.rb +3 -3
  142. data/lib/metronome_sdk/models/v1/usage_ingest_params.rb +2 -2
  143. data/lib/metronome_sdk/models/v1/usage_list_params.rb +9 -8
  144. data/lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb +5 -5
  145. data/lib/metronome_sdk/models/v1/usage_search_params.rb +24 -0
  146. data/lib/metronome_sdk/models/v1/usage_search_response.rb +249 -0
  147. data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +78 -23
  148. data/lib/metronome_sdk/models/v2/contract_edit_commit_response.rb +2 -2
  149. data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +62 -9
  150. data/lib/metronome_sdk/models/v2/contract_edit_credit_response.rb +2 -2
  151. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +1995 -443
  152. data/lib/metronome_sdk/models/v2/contract_edit_response.rb +2 -2
  153. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +1959 -140
  154. data/lib/metronome_sdk/models/v2/contract_list_response.rb +963 -91
  155. data/lib/metronome_sdk/models/v2/contract_retrieve_response.rb +964 -91
  156. data/lib/metronome_sdk/models.rb +30 -19
  157. data/lib/metronome_sdk/resources/v1/alerts.rb +4 -4
  158. data/lib/metronome_sdk/resources/v1/audit_logs.rb +1 -1
  159. data/lib/metronome_sdk/resources/v1/billable_metrics.rb +3 -3
  160. data/lib/metronome_sdk/resources/v1/contracts/products.rb +9 -6
  161. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rb +1 -1
  162. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +8 -6
  163. data/lib/metronome_sdk/resources/v1/contracts/rate_cards.rb +4 -4
  164. data/lib/metronome_sdk/resources/v1/contracts.rb +59 -28
  165. data/lib/metronome_sdk/resources/v1/credit_grants.rb +7 -5
  166. data/lib/metronome_sdk/resources/v1/custom_fields.rb +5 -5
  167. data/lib/metronome_sdk/resources/v1/customers/alerts.rb +2 -2
  168. data/lib/metronome_sdk/resources/v1/customers/billing_config.rb +5 -5
  169. data/lib/metronome_sdk/resources/v1/customers/commits.rb +9 -7
  170. data/lib/metronome_sdk/resources/v1/customers/credits.rb +5 -3
  171. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +4 -4
  172. data/lib/metronome_sdk/resources/v1/customers/plans.rb +3 -3
  173. data/lib/metronome_sdk/resources/v1/customers.rb +43 -4
  174. data/lib/metronome_sdk/resources/v1/dashboards.rb +4 -4
  175. data/lib/metronome_sdk/resources/v1/plans.rb +1 -1
  176. data/lib/metronome_sdk/resources/v1/usage.rb +30 -5
  177. data/lib/metronome_sdk/resources/v2/contracts.rb +45 -31
  178. data/lib/metronome_sdk/version.rb +1 -1
  179. data/lib/metronome_sdk.rb +9 -1
  180. data/rbi/metronome_sdk/errors.rbi +16 -0
  181. data/rbi/metronome_sdk/internal/transport/pooled_net_requester.rbi +5 -1
  182. data/rbi/metronome_sdk/internal/type/array_of.rbi +6 -0
  183. data/rbi/metronome_sdk/internal/type/base_model.rbi +5 -0
  184. data/rbi/metronome_sdk/internal/type/boolean.rbi +8 -0
  185. data/rbi/metronome_sdk/internal/type/converter.rbi +15 -15
  186. data/rbi/metronome_sdk/internal/type/enum.rbi +5 -0
  187. data/rbi/metronome_sdk/internal/type/file_input.rbi +5 -0
  188. data/rbi/metronome_sdk/internal/type/hash_of.rbi +6 -0
  189. data/rbi/metronome_sdk/internal/type/union.rbi +10 -0
  190. data/rbi/metronome_sdk/internal/type/unknown.rbi +8 -0
  191. data/rbi/metronome_sdk/internal/util.rbi +36 -0
  192. data/rbi/metronome_sdk/internal.rbi +5 -0
  193. data/rbi/metronome_sdk/models/commit.rbi +376 -39
  194. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +791 -54
  195. data/rbi/metronome_sdk/models/credit.rbi +376 -25
  196. data/rbi/metronome_sdk/models/override.rbi +66 -0
  197. data/rbi/metronome_sdk/models/schedule_point_in_time.rbi +9 -9
  198. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +10 -4
  199. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +995 -17
  200. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +2220 -136
  201. data/rbi/metronome_sdk/models/v1/contract_list_balances_response.rbi +9 -2
  202. data/rbi/metronome_sdk/models/v1/contract_list_response.rbi +820 -28
  203. data/rbi/metronome_sdk/models/v1/contract_retrieve_rate_schedule_params.rbi +72 -0
  204. data/rbi/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbi +66 -0
  205. data/rbi/metronome_sdk/models/v1/contract_retrieve_response.rbi +820 -28
  206. data/rbi/metronome_sdk/models/v1/contract_retrieve_subscription_quantity_history_params.rbi +58 -0
  207. data/rbi/metronome_sdk/models/v1/contract_retrieve_subscription_quantity_history_response.rbi +212 -0
  208. data/rbi/metronome_sdk/models/v1/contracts/product_list_params.rbi +3 -3
  209. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_params.rbi +72 -0
  210. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbi +66 -0
  211. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +72 -0
  212. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +72 -0
  213. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_list_params.rbi +72 -0
  214. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbi +66 -0
  215. data/rbi/metronome_sdk/models/v1/credit_grant_list_entries_params.rbi +58 -0
  216. data/rbi/metronome_sdk/models/v1/customer_preview_events_params.rbi +214 -0
  217. data/rbi/metronome_sdk/models/v1/customer_preview_events_response.rbi +35 -0
  218. data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +11 -0
  219. data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +121 -8
  220. data/rbi/metronome_sdk/models/v1/customers/credit_create_params.rbi +109 -0
  221. data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +5 -0
  222. data/rbi/metronome_sdk/models/v1/usage_search_params.rbi +48 -0
  223. data/rbi/metronome_sdk/models/v1/usage_search_response.rbi +438 -0
  224. data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +113 -8
  225. data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +101 -0
  226. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +3667 -315
  227. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +5965 -2014
  228. data/rbi/metronome_sdk/models/v2/contract_list_response.rbi +2279 -226
  229. data/rbi/metronome_sdk/models/v2/contract_retrieve_response.rbi +2279 -226
  230. data/rbi/metronome_sdk/resources/v1/alerts.rbi +5 -2
  231. data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +2 -1
  232. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +5 -0
  233. data/rbi/metronome_sdk/resources/v1/contracts.rbi +36 -1
  234. data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +4 -0
  235. data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +15 -4
  236. data/rbi/metronome_sdk/resources/v1/customers/credits.rbi +9 -0
  237. data/rbi/metronome_sdk/resources/v1/customers.rbi +35 -1
  238. data/rbi/metronome_sdk/resources/v1/usage.rbi +17 -0
  239. data/rbi/metronome_sdk/resources/v2/contracts.rbi +65 -7
  240. data/sig/metronome_sdk/errors.rbs +9 -0
  241. data/sig/metronome_sdk/internal/transport/pooled_net_requester.rbs +2 -0
  242. data/sig/metronome_sdk/internal/type/array_of.rbs +3 -0
  243. data/sig/metronome_sdk/internal/type/base_model.rbs +2 -0
  244. data/sig/metronome_sdk/internal/type/boolean.rbs +3 -0
  245. data/sig/metronome_sdk/internal/type/converter.rbs +7 -1
  246. data/sig/metronome_sdk/internal/type/enum.rbs +2 -0
  247. data/sig/metronome_sdk/internal/type/file_input.rbs +2 -0
  248. data/sig/metronome_sdk/internal/type/hash_of.rbs +3 -0
  249. data/sig/metronome_sdk/internal/type/union.rbs +2 -0
  250. data/sig/metronome_sdk/internal/type/unknown.rbs +3 -0
  251. data/sig/metronome_sdk/internal/util.rbs +12 -0
  252. data/sig/metronome_sdk/internal.rbs +2 -0
  253. data/sig/metronome_sdk/models/base_usage_filter.rbs +6 -0
  254. data/sig/metronome_sdk/models/commit.rbs +374 -68
  255. data/sig/metronome_sdk/models/contract_without_amendments.rbs +620 -110
  256. data/sig/metronome_sdk/models/credit.rbs +286 -40
  257. data/sig/metronome_sdk/models/credit_type_data.rbs +2 -0
  258. data/sig/metronome_sdk/models/discount.rbs +11 -0
  259. data/sig/metronome_sdk/models/event_type_filter.rbs +5 -0
  260. data/sig/metronome_sdk/models/id.rbs +2 -0
  261. data/sig/metronome_sdk/models/override.rbs +92 -22
  262. data/sig/metronome_sdk/models/pro_service.rbs +11 -0
  263. data/sig/metronome_sdk/models/property_filter.rbs +7 -0
  264. data/sig/metronome_sdk/models/rate.rbs +16 -4
  265. data/sig/metronome_sdk/models/schedule_duration.rbs +12 -0
  266. data/sig/metronome_sdk/models/schedule_point_in_time.rbs +20 -6
  267. data/sig/metronome_sdk/models/scheduled_charge.rbs +12 -0
  268. data/sig/metronome_sdk/models/tier.rbs +2 -0
  269. data/sig/metronome_sdk/models/v1/alert_archive_params.rbs +6 -0
  270. data/sig/metronome_sdk/models/v1/alert_archive_response.rbs +2 -0
  271. data/sig/metronome_sdk/models/v1/alert_create_params.rbs +29 -4
  272. data/sig/metronome_sdk/models/v1/alert_create_response.rbs +2 -0
  273. data/sig/metronome_sdk/models/v1/audit_log_list_params.rbs +11 -0
  274. data/sig/metronome_sdk/models/v1/audit_log_list_response.rbs +16 -0
  275. data/sig/metronome_sdk/models/v1/billable_metric_archive_params.rbs +2 -0
  276. data/sig/metronome_sdk/models/v1/billable_metric_archive_response.rbs +2 -0
  277. data/sig/metronome_sdk/models/v1/billable_metric_create_params.rbs +12 -0
  278. data/sig/metronome_sdk/models/v1/billable_metric_create_response.rbs +2 -0
  279. data/sig/metronome_sdk/models/v1/billable_metric_list_params.rbs +7 -0
  280. data/sig/metronome_sdk/models/v1/billable_metric_list_response.rbs +13 -0
  281. data/sig/metronome_sdk/models/v1/billable_metric_retrieve_params.rbs +5 -0
  282. data/sig/metronome_sdk/models/v1/billable_metric_retrieve_response.rbs +17 -0
  283. data/sig/metronome_sdk/models/v1/contract_add_manual_balance_entry_params.rbs +11 -0
  284. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +719 -75
  285. data/sig/metronome_sdk/models/v1/contract_amend_response.rbs +2 -0
  286. data/sig/metronome_sdk/models/v1/contract_archive_params.rbs +7 -0
  287. data/sig/metronome_sdk/models/v1/contract_archive_response.rbs +2 -0
  288. data/sig/metronome_sdk/models/v1/contract_create_historical_invoices_params.rbs +47 -12
  289. data/sig/metronome_sdk/models/v1/contract_create_historical_invoices_response.rbs +2 -0
  290. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +1503 -250
  291. data/sig/metronome_sdk/models/v1/contract_create_response.rbs +2 -0
  292. data/sig/metronome_sdk/models/v1/contract_list_balances_params.rbs +14 -0
  293. data/sig/metronome_sdk/models/v1/contract_list_balances_response.rbs +5 -0
  294. data/sig/metronome_sdk/models/v1/contract_list_params.rbs +10 -0
  295. data/sig/metronome_sdk/models/v1/contract_list_response.rbs +459 -10
  296. data/sig/metronome_sdk/models/v1/contract_retrieve_params.rbs +8 -0
  297. data/sig/metronome_sdk/models/v1/contract_retrieve_rate_schedule_params.rbs +39 -0
  298. data/sig/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbs +48 -0
  299. data/sig/metronome_sdk/models/v1/contract_retrieve_response.rbs +459 -10
  300. data/sig/metronome_sdk/models/v1/contract_retrieve_subscription_quantity_history_params.rbs +34 -0
  301. data/sig/metronome_sdk/models/v1/contract_retrieve_subscription_quantity_history_response.rbs +101 -0
  302. data/sig/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_params.rbs +21 -0
  303. data/sig/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_response.rbs +2 -0
  304. data/sig/metronome_sdk/models/v1/contract_set_usage_filter_params.rbs +9 -0
  305. data/sig/metronome_sdk/models/v1/contract_update_end_date_params.rbs +8 -0
  306. data/sig/metronome_sdk/models/v1/contract_update_end_date_response.rbs +2 -0
  307. data/sig/metronome_sdk/models/v1/contracts/named_schedule_retrieve_params.rbs +7 -0
  308. data/sig/metronome_sdk/models/v1/contracts/named_schedule_retrieve_response.rbs +10 -0
  309. data/sig/metronome_sdk/models/v1/contracts/named_schedule_update_params.rbs +9 -0
  310. data/sig/metronome_sdk/models/v1/contracts/product_archive_params.rbs +5 -0
  311. data/sig/metronome_sdk/models/v1/contracts/product_archive_response.rbs +2 -0
  312. data/sig/metronome_sdk/models/v1/contracts/product_create_params.rbs +18 -0
  313. data/sig/metronome_sdk/models/v1/contracts/product_create_response.rbs +2 -0
  314. data/sig/metronome_sdk/models/v1/contracts/product_list_item_state.rbs +19 -0
  315. data/sig/metronome_sdk/models/v1/contracts/product_list_params.rbs +7 -0
  316. data/sig/metronome_sdk/models/v1/contracts/product_list_response.rbs +29 -0
  317. data/sig/metronome_sdk/models/v1/contracts/product_retrieve_params.rbs +2 -0
  318. data/sig/metronome_sdk/models/v1/contracts/product_retrieve_response.rbs +33 -0
  319. data/sig/metronome_sdk/models/v1/contracts/product_update_params.rbs +19 -0
  320. data/sig/metronome_sdk/models/v1/contracts/product_update_response.rbs +2 -0
  321. data/sig/metronome_sdk/models/v1/contracts/quantity_conversion.rbs +10 -4
  322. data/sig/metronome_sdk/models/v1/contracts/quantity_rounding.rbs +9 -4
  323. data/sig/metronome_sdk/models/v1/contracts/rate_card_archive_params.rbs +2 -0
  324. data/sig/metronome_sdk/models/v1/contracts/rate_card_archive_response.rbs +2 -0
  325. data/sig/metronome_sdk/models/v1/contracts/rate_card_create_params.rbs +21 -0
  326. data/sig/metronome_sdk/models/v1/contracts/rate_card_create_response.rbs +2 -0
  327. data/sig/metronome_sdk/models/v1/contracts/rate_card_list_params.rbs +7 -0
  328. data/sig/metronome_sdk/models/v1/contracts/rate_card_list_response.rbs +23 -0
  329. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_params.rbs +2 -0
  330. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_params.rbs +38 -0
  331. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbs +46 -0
  332. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rbs +27 -0
  333. data/sig/metronome_sdk/models/v1/contracts/rate_card_update_params.rbs +14 -0
  334. data/sig/metronome_sdk/models/v1/contracts/rate_card_update_response.rbs +2 -0
  335. data/sig/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_retrieve_params.rbs +8 -0
  336. data/sig/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_retrieve_response.rbs +10 -0
  337. data/sig/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_update_params.rbs +10 -0
  338. data/sig/metronome_sdk/models/v1/contracts/rate_cards/product_order_set_params.rbs +6 -0
  339. data/sig/metronome_sdk/models/v1/contracts/rate_cards/product_order_set_response.rbs +2 -0
  340. data/sig/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_params.rbs +8 -0
  341. data/sig/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_response.rbs +2 -0
  342. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +59 -8
  343. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_response.rbs +2 -0
  344. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +51 -4
  345. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbs +23 -0
  346. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_list_params.rbs +38 -0
  347. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbs +41 -0
  348. data/sig/metronome_sdk/models/v1/credit_grant_create_params.rbs +32 -4
  349. data/sig/metronome_sdk/models/v1/credit_grant_create_response.rbs +2 -0
  350. data/sig/metronome_sdk/models/v1/credit_grant_edit_params.rbs +8 -0
  351. data/sig/metronome_sdk/models/v1/credit_grant_edit_response.rbs +2 -0
  352. data/sig/metronome_sdk/models/v1/credit_grant_list_entries_params.rbs +29 -0
  353. data/sig/metronome_sdk/models/v1/credit_grant_list_entries_response.rbs +30 -0
  354. data/sig/metronome_sdk/models/v1/credit_grant_list_params.rbs +11 -0
  355. data/sig/metronome_sdk/models/v1/credit_grant_list_response.rbs +38 -0
  356. data/sig/metronome_sdk/models/v1/credit_grant_void_params.rbs +7 -0
  357. data/sig/metronome_sdk/models/v1/credit_grant_void_response.rbs +2 -0
  358. data/sig/metronome_sdk/models/v1/credit_ledger_entry.rbs +10 -0
  359. data/sig/metronome_sdk/models/v1/custom_field_add_key_params.rbs +7 -0
  360. data/sig/metronome_sdk/models/v1/custom_field_delete_values_params.rbs +7 -0
  361. data/sig/metronome_sdk/models/v1/custom_field_list_keys_params.rbs +12 -6
  362. data/sig/metronome_sdk/models/v1/custom_field_list_keys_response.rbs +11 -0
  363. data/sig/metronome_sdk/models/v1/custom_field_remove_key_params.rbs +6 -0
  364. data/sig/metronome_sdk/models/v1/custom_field_set_values_params.rbs +7 -0
  365. data/sig/metronome_sdk/models/v1/customer.rbs +8 -0
  366. data/sig/metronome_sdk/models/v1/customer_archive_params.rbs +2 -0
  367. data/sig/metronome_sdk/models/v1/customer_archive_response.rbs +2 -0
  368. data/sig/metronome_sdk/models/v1/customer_create_params.rbs +52 -26
  369. data/sig/metronome_sdk/models/v1/customer_create_response.rbs +2 -0
  370. data/sig/metronome_sdk/models/v1/customer_detail.rbs +23 -4
  371. data/sig/metronome_sdk/models/v1/customer_list_billable_metrics_params.rbs +9 -0
  372. data/sig/metronome_sdk/models/v1/customer_list_billable_metrics_response.rbs +17 -0
  373. data/sig/metronome_sdk/models/v1/customer_list_costs_params.rbs +9 -0
  374. data/sig/metronome_sdk/models/v1/customer_list_costs_response.rbs +19 -0
  375. data/sig/metronome_sdk/models/v1/customer_list_params.rbs +10 -0
  376. data/sig/metronome_sdk/models/v1/customer_preview_events_params.rbs +105 -0
  377. data/sig/metronome_sdk/models/v1/customer_preview_events_response.rbs +16 -0
  378. data/sig/metronome_sdk/models/v1/customer_retrieve_params.rbs +5 -0
  379. data/sig/metronome_sdk/models/v1/customer_retrieve_response.rbs +2 -0
  380. data/sig/metronome_sdk/models/v1/customer_set_ingest_aliases_params.rbs +6 -0
  381. data/sig/metronome_sdk/models/v1/customer_set_name_params.rbs +6 -0
  382. data/sig/metronome_sdk/models/v1/customer_set_name_response.rbs +2 -0
  383. data/sig/metronome_sdk/models/v1/customer_update_config_params.rbs +7 -0
  384. data/sig/metronome_sdk/models/v1/customers/alert_list_params.rbs +13 -6
  385. data/sig/metronome_sdk/models/v1/customers/alert_list_response.rbs +5 -0
  386. data/sig/metronome_sdk/models/v1/customers/alert_reset_params.rbs +6 -0
  387. data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +7 -0
  388. data/sig/metronome_sdk/models/v1/customers/alert_retrieve_response.rbs +2 -0
  389. data/sig/metronome_sdk/models/v1/customers/billing_config_create_params.rbs +10 -0
  390. data/sig/metronome_sdk/models/v1/customers/billing_config_delete_params.rbs +6 -0
  391. data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_params.rbs +6 -0
  392. data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbs +23 -0
  393. data/sig/metronome_sdk/models/v1/customers/commit_create_params.rbs +116 -8
  394. data/sig/metronome_sdk/models/v1/customers/commit_create_response.rbs +2 -0
  395. data/sig/metronome_sdk/models/v1/customers/commit_list_params.rbs +14 -0
  396. data/sig/metronome_sdk/models/v1/customers/commit_list_response.rbs +5 -0
  397. data/sig/metronome_sdk/models/v1/customers/commit_update_end_date_params.rbs +8 -0
  398. data/sig/metronome_sdk/models/v1/customers/commit_update_end_date_response.rbs +2 -0
  399. data/sig/metronome_sdk/models/v1/customers/credit_create_params.rbs +82 -0
  400. data/sig/metronome_sdk/models/v1/customers/credit_create_response.rbs +2 -0
  401. data/sig/metronome_sdk/models/v1/customers/credit_list_params.rbs +14 -0
  402. data/sig/metronome_sdk/models/v1/customers/credit_list_response.rbs +5 -0
  403. data/sig/metronome_sdk/models/v1/customers/credit_update_end_date_params.rbs +7 -0
  404. data/sig/metronome_sdk/models/v1/customers/credit_update_end_date_response.rbs +2 -0
  405. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +45 -16
  406. data/sig/metronome_sdk/models/v1/customers/invoice.rbs +195 -40
  407. data/sig/metronome_sdk/models/v1/customers/invoice_add_charge_params.rbs +11 -0
  408. data/sig/metronome_sdk/models/v1/customers/invoice_add_charge_response.rbs +2 -0
  409. data/sig/metronome_sdk/models/v1/customers/invoice_list_breakdowns_params.rbs +14 -0
  410. data/sig/metronome_sdk/models/v1/customers/invoice_list_breakdowns_response.rbs +5 -0
  411. data/sig/metronome_sdk/models/v1/customers/invoice_list_params.rbs +13 -0
  412. data/sig/metronome_sdk/models/v1/customers/invoice_retrieve_params.rbs +7 -0
  413. data/sig/metronome_sdk/models/v1/customers/invoice_retrieve_response.rbs +2 -0
  414. data/sig/metronome_sdk/models/v1/customers/named_schedule_retrieve_params.rbs +7 -0
  415. data/sig/metronome_sdk/models/v1/customers/named_schedule_retrieve_response.rbs +10 -0
  416. data/sig/metronome_sdk/models/v1/customers/named_schedule_update_params.rbs +9 -0
  417. data/sig/metronome_sdk/models/v1/customers/plan_add_params.rbs +38 -4
  418. data/sig/metronome_sdk/models/v1/customers/plan_add_response.rbs +2 -0
  419. data/sig/metronome_sdk/models/v1/customers/plan_end_params.rbs +9 -0
  420. data/sig/metronome_sdk/models/v1/customers/plan_end_response.rbs +2 -0
  421. data/sig/metronome_sdk/models/v1/customers/plan_list_params.rbs +7 -0
  422. data/sig/metronome_sdk/models/v1/customers/plan_list_price_adjustments_params.rbs +8 -0
  423. data/sig/metronome_sdk/models/v1/customers/plan_list_price_adjustments_response.rbs +14 -0
  424. data/sig/metronome_sdk/models/v1/customers/plan_list_response.rbs +23 -0
  425. data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +30 -7
  426. data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_response.rbs +6 -0
  427. data/sig/metronome_sdk/models/v1/invoice_regenerate_params.rbs +5 -0
  428. data/sig/metronome_sdk/models/v1/invoice_regenerate_response.rbs +6 -0
  429. data/sig/metronome_sdk/models/v1/invoice_void_params.rbs +5 -0
  430. data/sig/metronome_sdk/models/v1/invoice_void_response.rbs +6 -0
  431. data/sig/metronome_sdk/models/v1/plan_detail.rbs +38 -0
  432. data/sig/metronome_sdk/models/v1/plan_get_details_params.rbs +5 -0
  433. data/sig/metronome_sdk/models/v1/plan_get_details_response.rbs +2 -0
  434. data/sig/metronome_sdk/models/v1/plan_list_charges_params.rbs +7 -0
  435. data/sig/metronome_sdk/models/v1/plan_list_charges_response.rbs +28 -0
  436. data/sig/metronome_sdk/models/v1/plan_list_customers_params.rbs +8 -0
  437. data/sig/metronome_sdk/models/v1/plan_list_customers_response.rbs +14 -0
  438. data/sig/metronome_sdk/models/v1/plan_list_params.rbs +6 -0
  439. data/sig/metronome_sdk/models/v1/plan_list_response.rbs +7 -0
  440. data/sig/metronome_sdk/models/v1/pricing_unit_list_params.rbs +6 -0
  441. data/sig/metronome_sdk/models/v1/pricing_unit_list_response.rbs +2 -0
  442. data/sig/metronome_sdk/models/v1/rollover_amount_max_amount.rbs +12 -4
  443. data/sig/metronome_sdk/models/v1/rollover_amount_max_percentage.rbs +9 -4
  444. data/sig/metronome_sdk/models/v1/service_list_params.rbs +2 -0
  445. data/sig/metronome_sdk/models/v1/service_list_response.rbs +10 -0
  446. data/sig/metronome_sdk/models/v1/usage_ingest_params.rbs +13 -0
  447. data/sig/metronome_sdk/models/v1/usage_list_params.rbs +17 -0
  448. data/sig/metronome_sdk/models/v1/usage_list_response.rbs +15 -0
  449. data/sig/metronome_sdk/models/v1/usage_list_with_groups_params.rbs +15 -0
  450. data/sig/metronome_sdk/models/v1/usage_list_with_groups_response.rbs +8 -0
  451. data/sig/metronome_sdk/models/v1/usage_search_params.rbs +26 -0
  452. data/sig/metronome_sdk/models/v1/usage_search_response.rbs +230 -0
  453. data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +106 -1
  454. data/sig/metronome_sdk/models/v2/contract_edit_commit_response.rbs +2 -0
  455. data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +81 -1
  456. data/sig/metronome_sdk/models/v2/contract_edit_credit_response.rbs +2 -0
  457. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +2233 -303
  458. data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +2 -0
  459. data/sig/metronome_sdk/models/v2/contract_get_edit_history_params.rbs +6 -0
  460. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +2475 -453
  461. data/sig/metronome_sdk/models/v2/contract_list_params.rbs +10 -0
  462. data/sig/metronome_sdk/models/v2/contract_list_response.rbs +1400 -43
  463. data/sig/metronome_sdk/models/v2/contract_retrieve_params.rbs +9 -0
  464. data/sig/metronome_sdk/models/v2/contract_retrieve_response.rbs +1400 -43
  465. data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +1 -0
  466. data/sig/metronome_sdk/resources/v1/contracts.rbs +10 -0
  467. data/sig/metronome_sdk/resources/v1/credit_grants.rbs +1 -0
  468. data/sig/metronome_sdk/resources/v1/custom_fields.rbs +1 -1
  469. data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +1 -1
  470. data/sig/metronome_sdk/resources/v1/customers/commits.rbs +1 -0
  471. data/sig/metronome_sdk/resources/v1/customers/credits.rbs +1 -0
  472. data/sig/metronome_sdk/resources/v1/customers.rbs +8 -0
  473. data/sig/metronome_sdk/resources/v1/usage.rbs +5 -0
  474. data/sig/metronome_sdk/resources/v2/contracts.rbs +8 -1
  475. metadata +20 -2
@@ -34,7 +34,7 @@ module MetronomeSDK
34
34
 
35
35
  # @!attribute add_discounts
36
36
  #
37
- # @return [Array<MetronomeSDK::Discount>, nil]
37
+ # @return [Array<MetronomeSDK::Models::Discount>, nil]
38
38
  optional :add_discounts, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Discount] }
39
39
 
40
40
  # @!attribute add_overrides
@@ -43,9 +43,15 @@ module MetronomeSDK
43
43
  optional :add_overrides,
44
44
  -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride] }
45
45
 
46
+ # @!attribute add_prepaid_balance_threshold_configuration
47
+ #
48
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration, nil]
49
+ optional :add_prepaid_balance_threshold_configuration,
50
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration }
51
+
46
52
  # @!attribute add_pro_services
47
53
  #
48
- # @return [Array<MetronomeSDK::ProService>, nil]
54
+ # @return [Array<MetronomeSDK::Models::ProService>, nil]
49
55
  optional :add_pro_services, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ProService] }
50
56
 
51
57
  # @!attribute add_recurring_commits
@@ -72,6 +78,19 @@ module MetronomeSDK
72
78
  optional :add_scheduled_charges,
73
79
  -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge] }
74
80
 
81
+ # @!attribute add_spend_threshold_configuration
82
+ #
83
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration, nil]
84
+ optional :add_spend_threshold_configuration,
85
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration }
86
+
87
+ # @!attribute add_subscriptions
88
+ # List of subscriptions on the contract.
89
+ #
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] }
93
+
75
94
  # @!attribute add_usage_filters
76
95
  #
77
96
  # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddUsageFilter>, nil]
@@ -118,6 +137,13 @@ module MetronomeSDK
118
137
  # @return [Time, nil]
119
138
  optional :update_contract_end_date, Time
120
139
 
140
+ # @!attribute update_contract_name
141
+ # Value to update the contract name to. If not provided, the contract name will
142
+ # remain unchanged.
143
+ #
144
+ # @return [String, nil]
145
+ optional :update_contract_name, String, nil?: true
146
+
121
147
  # @!attribute update_credits
122
148
  #
123
149
  # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit>, nil]
@@ -130,6 +156,24 @@ module MetronomeSDK
130
156
  optional :update_discounts,
131
157
  -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount] }
132
158
 
159
+ # @!attribute update_prepaid_balance_threshold_configuration
160
+ #
161
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration, nil]
162
+ optional :update_prepaid_balance_threshold_configuration,
163
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration }
164
+
165
+ # @!attribute update_recurring_commits
166
+ #
167
+ # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit>, nil]
168
+ optional :update_recurring_commits,
169
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit] }
170
+
171
+ # @!attribute update_recurring_credits
172
+ #
173
+ # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit>, nil]
174
+ optional :update_recurring_credits,
175
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit] }
176
+
133
177
  # @!attribute update_refund_invoices
134
178
  #
135
179
  # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRefundInvoice>, nil]
@@ -142,29 +186,85 @@ module MetronomeSDK
142
186
  optional :update_scheduled_charges,
143
187
  -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge] }
144
188
 
145
- # @!method initialize(id:, add_commits: nil, add_credits: nil, add_discounts: nil, add_overrides: nil, add_pro_services: nil, add_recurring_commits: nil, add_recurring_credits: nil, add_reseller_royalties: nil, add_scheduled_charges: 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_credits: nil, update_discounts: nil, update_refund_invoices: nil, update_scheduled_charges: nil)
189
+ # @!attribute update_spend_threshold_configuration
190
+ #
191
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration, nil]
192
+ optional :update_spend_threshold_configuration,
193
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration }
194
+
195
+ # @!attribute update_subscriptions
196
+ # Optional list of subscriptions to update.
197
+ #
198
+ # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSubscription>, nil]
199
+ optional :update_subscriptions,
200
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSubscription] }
201
+
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)
203
+ # Some parameter documentations has been truncated, see
204
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data} for more
205
+ # details.
206
+ #
146
207
  # @param id [String]
208
+ #
147
209
  # @param add_commits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit>]
210
+ #
148
211
  # @param add_credits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit>]
149
- # @param add_discounts [Array<MetronomeSDK::Discount>]
212
+ #
213
+ # @param add_discounts [Array<MetronomeSDK::Models::Discount>]
214
+ #
150
215
  # @param add_overrides [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride>]
151
- # @param add_pro_services [Array<MetronomeSDK::ProService>]
216
+ #
217
+ # @param add_prepaid_balance_threshold_configuration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration]
218
+ #
219
+ # @param add_pro_services [Array<MetronomeSDK::Models::ProService>]
220
+ #
152
221
  # @param add_recurring_commits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit>]
222
+ #
153
223
  # @param add_recurring_credits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit>]
224
+ #
154
225
  # @param add_reseller_royalties [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty>]
226
+ #
155
227
  # @param add_scheduled_charges [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge>]
228
+ #
229
+ # @param add_spend_threshold_configuration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration]
230
+ #
231
+ # @param add_subscriptions [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription>] List of subscriptions on the contract.
232
+ #
156
233
  # @param add_usage_filters [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddUsageFilter>]
234
+ #
157
235
  # @param archive_commits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveCommit>]
236
+ #
158
237
  # @param archive_credits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveCredit>]
238
+ #
159
239
  # @param archive_scheduled_charges [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::ArchiveScheduledCharge>]
240
+ #
160
241
  # @param remove_overrides [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::RemoveOverride>]
242
+ #
161
243
  # @param timestamp [Time]
244
+ #
162
245
  # @param update_commits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit>]
246
+ #
163
247
  # @param update_contract_end_date [Time]
248
+ #
249
+ # @param update_contract_name [String, nil] Value to update the contract name to. If not provided, the contract name will re
250
+ #
164
251
  # @param update_credits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit>]
252
+ #
165
253
  # @param update_discounts [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount>]
254
+ #
255
+ # @param update_prepaid_balance_threshold_configuration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration]
256
+ #
257
+ # @param update_recurring_commits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit>]
258
+ #
259
+ # @param update_recurring_credits [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit>]
260
+ #
166
261
  # @param update_refund_invoices [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRefundInvoice>]
262
+ #
167
263
  # @param update_scheduled_charges [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateScheduledCharge>]
264
+ #
265
+ # @param update_spend_threshold_configuration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration]
266
+ #
267
+ # @param update_subscriptions [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSubscription>] Optional list of subscriptions to update.
168
268
 
169
269
  class AddCommit < MetronomeSDK::Internal::Type::BaseModel
170
270
  # @!attribute id
@@ -188,7 +288,7 @@ module MetronomeSDK
188
288
  # The schedule that the customer will gain access to the credits purposed with
189
289
  # this commit.
190
290
  #
191
- # @return [MetronomeSDK::ScheduleDuration, nil]
291
+ # @return [MetronomeSDK::Models::ScheduleDuration, nil]
192
292
  optional :access_schedule, -> { MetronomeSDK::ScheduleDuration }
193
293
 
194
294
  # @!attribute applicable_product_ids
@@ -209,7 +309,7 @@ module MetronomeSDK
209
309
  # @!attribute invoice_schedule
210
310
  # The schedule that the customer will be invoiced for this commit.
211
311
  #
212
- # @return [MetronomeSDK::SchedulePointInTime, nil]
312
+ # @return [MetronomeSDK::Models::SchedulePointInTime, nil]
213
313
  optional :invoice_schedule, -> { MetronomeSDK::SchedulePointInTime }
214
314
 
215
315
  # @!attribute name
@@ -247,7 +347,17 @@ module MetronomeSDK
247
347
  # @return [String, nil]
248
348
  optional :salesforce_opportunity_id, String
249
349
 
250
- # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, rollover_fraction: nil, salesforce_opportunity_id: nil)
350
+ # @!attribute specifiers
351
+ # List of filters that determine what kind of customer usage draws down a commit
352
+ # or credit. A customer's usage needs to meet the condition of at least one of the
353
+ # specifiers to contribute to a commit's or credit's drawdown. This field cannot
354
+ # be used together with `applicable_product_ids` or `applicable_product_tags`.
355
+ #
356
+ # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Specifier>, nil]
357
+ optional :specifiers,
358
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Specifier] }
359
+
360
+ # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: 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)
251
361
  # Some parameter documentations has been truncated, see
252
362
  # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit} for
253
363
  # more details.
@@ -258,7 +368,7 @@ module MetronomeSDK
258
368
  #
259
369
  # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Type]
260
370
  #
261
- # @param access_schedule [MetronomeSDK::ScheduleDuration] The schedule that the customer will gain access to the credits purposed with thi
371
+ # @param access_schedule [MetronomeSDK::Models::ScheduleDuration] The schedule that the customer will gain access to the credits purposed with thi
262
372
  #
263
373
  # @param applicable_product_ids [Array<String>]
264
374
  #
@@ -266,7 +376,7 @@ module MetronomeSDK
266
376
  #
267
377
  # @param description [String]
268
378
  #
269
- # @param invoice_schedule [MetronomeSDK::SchedulePointInTime] The schedule that the customer will be invoiced for this commit.
379
+ # @param invoice_schedule [MetronomeSDK::Models::SchedulePointInTime] The schedule that the customer will be invoiced for this commit.
270
380
  #
271
381
  # @param name [String]
272
382
  #
@@ -279,6 +389,8 @@ module MetronomeSDK
279
389
  # @param rollover_fraction [Float]
280
390
  #
281
391
  # @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
392
+ #
393
+ # @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
282
394
 
283
395
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit#product
284
396
  class Product < MetronomeSDK::Internal::Type::BaseModel
@@ -318,6 +430,44 @@ module MetronomeSDK
318
430
  # @!method self.values
319
431
  # @return [Array<Symbol>]
320
432
  end
433
+
434
+ class Specifier < MetronomeSDK::Internal::Type::BaseModel
435
+ # @!attribute presentation_group_values
436
+ #
437
+ # @return [Hash{Symbol=>String}, nil]
438
+ optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
439
+
440
+ # @!attribute pricing_group_values
441
+ #
442
+ # @return [Hash{Symbol=>String}, nil]
443
+ optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
444
+
445
+ # @!attribute product_id
446
+ # If provided, the specifier will only apply to the product with the specified ID.
447
+ #
448
+ # @return [String, nil]
449
+ optional :product_id, String
450
+
451
+ # @!attribute product_tags
452
+ # If provided, the specifier will only apply to products with all the specified
453
+ # tags.
454
+ #
455
+ # @return [Array<String>, nil]
456
+ optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
457
+
458
+ # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
459
+ # Some parameter documentations has been truncated, see
460
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Specifier}
461
+ # for more details.
462
+ #
463
+ # @param presentation_group_values [Hash{Symbol=>String}]
464
+ #
465
+ # @param pricing_group_values [Hash{Symbol=>String}]
466
+ #
467
+ # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
468
+ #
469
+ # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
470
+ end
321
471
  end
322
472
 
323
473
  class AddCredit < MetronomeSDK::Internal::Type::BaseModel
@@ -341,7 +491,7 @@ module MetronomeSDK
341
491
  # @!attribute access_schedule
342
492
  # The schedule that the customer will gain access to the credits.
343
493
  #
344
- # @return [MetronomeSDK::ScheduleDuration, nil]
494
+ # @return [MetronomeSDK::Models::ScheduleDuration, nil]
345
495
  optional :access_schedule, -> { MetronomeSDK::ScheduleDuration }
346
496
 
347
497
  # @!attribute applicable_product_ids
@@ -383,7 +533,17 @@ module MetronomeSDK
383
533
  # @return [String, nil]
384
534
  optional :salesforce_opportunity_id, String
385
535
 
386
- # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, salesforce_opportunity_id: nil)
536
+ # @!attribute specifiers
537
+ # List of filters that determine what kind of customer usage draws down a commit
538
+ # or credit. A customer's usage needs to meet the condition of at least one of the
539
+ # specifiers to contribute to a commit's or credit's drawdown. This field cannot
540
+ # be used together with `applicable_product_ids` or `applicable_product_tags`.
541
+ #
542
+ # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::Specifier>, nil]
543
+ optional :specifiers,
544
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::Specifier] }
545
+
546
+ # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, salesforce_opportunity_id: nil, specifiers: nil)
387
547
  # Some parameter documentations has been truncated, see
388
548
  # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit} for
389
549
  # more details.
@@ -394,7 +554,7 @@ module MetronomeSDK
394
554
  #
395
555
  # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::Type]
396
556
  #
397
- # @param access_schedule [MetronomeSDK::ScheduleDuration] The schedule that the customer will gain access to the credits.
557
+ # @param access_schedule [MetronomeSDK::Models::ScheduleDuration] The schedule that the customer will gain access to the credits.
398
558
  #
399
559
  # @param applicable_product_ids [Array<String>]
400
560
  #
@@ -409,6 +569,8 @@ module MetronomeSDK
409
569
  # @param priority [Float] If multiple credits or commits are applicable, the one with the lower priority w
410
570
  #
411
571
  # @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
572
+ #
573
+ # @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
412
574
 
413
575
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit#product
414
576
  class Product < MetronomeSDK::Internal::Type::BaseModel
@@ -436,6 +598,44 @@ module MetronomeSDK
436
598
  # @!method self.values
437
599
  # @return [Array<Symbol>]
438
600
  end
601
+
602
+ class Specifier < MetronomeSDK::Internal::Type::BaseModel
603
+ # @!attribute presentation_group_values
604
+ #
605
+ # @return [Hash{Symbol=>String}, nil]
606
+ optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
607
+
608
+ # @!attribute pricing_group_values
609
+ #
610
+ # @return [Hash{Symbol=>String}, nil]
611
+ optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
612
+
613
+ # @!attribute product_id
614
+ # If provided, the specifier will only apply to the product with the specified ID.
615
+ #
616
+ # @return [String, nil]
617
+ optional :product_id, String
618
+
619
+ # @!attribute product_tags
620
+ # If provided, the specifier will only apply to products with all the specified
621
+ # tags.
622
+ #
623
+ # @return [Array<String>, nil]
624
+ optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
625
+
626
+ # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
627
+ # Some parameter documentations has been truncated, see
628
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::Specifier}
629
+ # for more details.
630
+ #
631
+ # @param presentation_group_values [Hash{Symbol=>String}]
632
+ #
633
+ # @param pricing_group_values [Hash{Symbol=>String}]
634
+ #
635
+ # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
636
+ #
637
+ # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
638
+ end
439
639
  end
440
640
 
441
641
  class AddOverride < MetronomeSDK::Internal::Type::BaseModel
@@ -532,6 +732,12 @@ module MetronomeSDK
532
732
  # @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::Type]
533
733
 
534
734
  class OverrideSpecifier < MetronomeSDK::Internal::Type::BaseModel
735
+ # @!attribute billing_frequency
736
+ #
737
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideSpecifier::BillingFrequency, nil]
738
+ optional :billing_frequency,
739
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideSpecifier::BillingFrequency }
740
+
535
741
  # @!attribute commit_ids
536
742
  #
537
743
  # @return [Array<String>, nil]
@@ -567,7 +773,8 @@ module MetronomeSDK
567
773
  # @return [Array<String>, nil]
568
774
  optional :recurring_credit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
569
775
 
570
- # @!method initialize(commit_ids: nil, presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil, recurring_commit_ids: nil, recurring_credit_ids: nil)
776
+ # @!method initialize(billing_frequency: nil, commit_ids: nil, presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil, recurring_commit_ids: nil, recurring_credit_ids: nil)
777
+ # @param billing_frequency [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideSpecifier::BillingFrequency]
571
778
  # @param commit_ids [Array<String>]
572
779
  # @param presentation_group_values [Hash{Symbol=>String, nil}]
573
780
  # @param pricing_group_values [Hash{Symbol=>String}]
@@ -575,6 +782,19 @@ module MetronomeSDK
575
782
  # @param product_tags [Array<String>]
576
783
  # @param recurring_commit_ids [Array<String>]
577
784
  # @param recurring_credit_ids [Array<String>]
785
+
786
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideSpecifier#billing_frequency
787
+ module BillingFrequency
788
+ extend MetronomeSDK::Internal::Type::Enum
789
+
790
+ MONTHLY = :MONTHLY
791
+ QUARTERLY = :QUARTERLY
792
+ ANNUAL = :ANNUAL
793
+ WEEKLY = :WEEKLY
794
+
795
+ # @!method self.values
796
+ # @return [Array<Symbol>]
797
+ end
578
798
  end
579
799
 
580
800
  class OverrideTier < MetronomeSDK::Internal::Type::BaseModel
@@ -603,7 +823,7 @@ module MetronomeSDK
603
823
 
604
824
  # @!attribute credit_type
605
825
  #
606
- # @return [MetronomeSDK::CreditTypeData, nil]
826
+ # @return [MetronomeSDK::Models::CreditTypeData, nil]
607
827
  optional :credit_type, -> { MetronomeSDK::CreditTypeData }
608
828
 
609
829
  # @!attribute custom_rate
@@ -637,7 +857,7 @@ module MetronomeSDK
637
857
  # @!attribute tiers
638
858
  # Only set for TIERED rate_type.
639
859
  #
640
- # @return [Array<MetronomeSDK::Tier>, nil]
860
+ # @return [Array<MetronomeSDK::Models::Tier>, nil]
641
861
  optional :tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Tier] }
642
862
 
643
863
  # @!method initialize(rate_type:, credit_type: nil, custom_rate: nil, is_prorated: nil, price: nil, quantity: nil, tiers: nil)
@@ -647,7 +867,7 @@ module MetronomeSDK
647
867
  #
648
868
  # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate::RateType]
649
869
  #
650
- # @param credit_type [MetronomeSDK::CreditTypeData]
870
+ # @param credit_type [MetronomeSDK::Models::CreditTypeData]
651
871
  #
652
872
  # @param custom_rate [Hash{Symbol=>Object}] Only set for CUSTOM rate_type. This field is interpreted by custom rate processo
653
873
  #
@@ -657,7 +877,7 @@ module MetronomeSDK
657
877
  #
658
878
  # @param quantity [Float] Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
659
879
  #
660
- # @param tiers [Array<MetronomeSDK::Tier>] Only set for TIERED rate_type.
880
+ # @param tiers [Array<MetronomeSDK::Models::Tier>] Only set for TIERED rate_type.
661
881
 
662
882
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate#rate_type
663
883
  module RateType
@@ -715,6 +935,325 @@ module MetronomeSDK
715
935
  end
716
936
  end
717
937
 
938
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data#add_prepaid_balance_threshold_configuration
939
+ class AddPrepaidBalanceThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
940
+ # @!attribute commit
941
+ #
942
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::Commit]
943
+ required :commit,
944
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::Commit }
945
+
946
+ # @!attribute is_enabled
947
+ # When set to false, the contract will not be evaluated against the
948
+ # threshold_amount. Toggling to true will result an immediate evaluation,
949
+ # regardless of prior state.
950
+ #
951
+ # @return [Boolean]
952
+ required :is_enabled, MetronomeSDK::Internal::Type::Boolean
953
+
954
+ # @!attribute payment_gate_config
955
+ #
956
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig]
957
+ required :payment_gate_config,
958
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig }
959
+
960
+ # @!attribute recharge_to_amount
961
+ # Specify the amount the balance should be recharged to.
962
+ #
963
+ # @return [Float]
964
+ required :recharge_to_amount, Float
965
+
966
+ # @!attribute threshold_amount
967
+ # Specify the threshold amount for the contract. Each time the contract's balance
968
+ # lowers to this amount, a threshold charge will be initiated.
969
+ #
970
+ # @return [Float]
971
+ required :threshold_amount, Float
972
+
973
+ # @!attribute custom_credit_type_id
974
+ # If provided, the threshold, recharge-to amount, and the resulting threshold
975
+ # commit amount will be in terms of this credit type instead of the fiat currency.
976
+ #
977
+ # @return [String, nil]
978
+ optional :custom_credit_type_id, String
979
+
980
+ # @!method initialize(commit:, is_enabled:, payment_gate_config:, recharge_to_amount:, threshold_amount:, custom_credit_type_id: nil)
981
+ # Some parameter documentations has been truncated, see
982
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration}
983
+ # for more details.
984
+ #
985
+ # @param commit [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::Commit]
986
+ #
987
+ # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
988
+ #
989
+ # @param payment_gate_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig]
990
+ #
991
+ # @param recharge_to_amount [Float] Specify the amount the balance should be recharged to.
992
+ #
993
+ # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's balance
994
+ #
995
+ # @param custom_credit_type_id [String] If provided, the threshold, recharge-to amount, and the resulting threshold comm
996
+
997
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration#commit
998
+ class Commit < MetronomeSDK::Internal::Type::BaseModel
999
+ # @!attribute product_id
1000
+ # The commit product that will be used to generate the line item for commit
1001
+ # payment.
1002
+ #
1003
+ # @return [String]
1004
+ required :product_id, String
1005
+
1006
+ # @!attribute applicable_product_ids
1007
+ # Which products the threshold commit applies to. If applicable_product_ids,
1008
+ # applicable_product_tags or specifiers are not provided, the commit applies to
1009
+ # all products.
1010
+ #
1011
+ # @return [Array<String>, nil]
1012
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1013
+
1014
+ # @!attribute applicable_product_tags
1015
+ # Which tags the threshold commit applies to. If applicable_product_ids,
1016
+ # applicable_product_tags or specifiers are not provided, the commit applies to
1017
+ # all products.
1018
+ #
1019
+ # @return [Array<String>, nil]
1020
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1021
+
1022
+ # @!attribute description
1023
+ #
1024
+ # @return [String, nil]
1025
+ optional :description, String
1026
+
1027
+ # @!attribute name
1028
+ # Specify the name of the line item for the threshold charge. If left blank, it
1029
+ # will default to the commit product name.
1030
+ #
1031
+ # @return [String, nil]
1032
+ optional :name, String
1033
+
1034
+ # @!attribute specifiers
1035
+ # List of filters that determine what kind of customer usage draws down a commit
1036
+ # or credit. A customer's usage needs to meet the condition of at least one of the
1037
+ # specifiers to contribute to a commit's or credit's drawdown. This field cannot
1038
+ # be used together with `applicable_product_ids` or `applicable_product_tags`.
1039
+ #
1040
+ # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::Commit::Specifier>, nil]
1041
+ optional :specifiers,
1042
+ -> do
1043
+ MetronomeSDK::Internal::Type::ArrayOf[
1044
+ MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::Commit::Specifier
1045
+ ]
1046
+ end
1047
+
1048
+ # @!method initialize(product_id:, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, name: nil, specifiers: nil)
1049
+ # Some parameter documentations has been truncated, see
1050
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::Commit}
1051
+ # for more details.
1052
+ #
1053
+ # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
1054
+ #
1055
+ # @param applicable_product_ids [Array<String>] Which products the threshold commit applies to. If applicable_product_ids, appli
1056
+ #
1057
+ # @param applicable_product_tags [Array<String>] Which tags the threshold commit applies to. If applicable_product_ids, applicabl
1058
+ #
1059
+ # @param description [String]
1060
+ #
1061
+ # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
1062
+ #
1063
+ # @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
1064
+
1065
+ class Specifier < MetronomeSDK::Internal::Type::BaseModel
1066
+ # @!attribute presentation_group_values
1067
+ #
1068
+ # @return [Hash{Symbol=>String}, nil]
1069
+ optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1070
+
1071
+ # @!attribute pricing_group_values
1072
+ #
1073
+ # @return [Hash{Symbol=>String}, nil]
1074
+ optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1075
+
1076
+ # @!attribute product_id
1077
+ # If provided, the specifier will only apply to the product with the specified ID.
1078
+ #
1079
+ # @return [String, nil]
1080
+ optional :product_id, String
1081
+
1082
+ # @!attribute product_tags
1083
+ # If provided, the specifier will only apply to products with all the specified
1084
+ # tags.
1085
+ #
1086
+ # @return [Array<String>, nil]
1087
+ optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1088
+
1089
+ # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
1090
+ # Some parameter documentations has been truncated, see
1091
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::Commit::Specifier}
1092
+ # for more details.
1093
+ #
1094
+ # @param presentation_group_values [Hash{Symbol=>String}]
1095
+ #
1096
+ # @param pricing_group_values [Hash{Symbol=>String}]
1097
+ #
1098
+ # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
1099
+ #
1100
+ # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
1101
+ end
1102
+ end
1103
+
1104
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration#payment_gate_config
1105
+ class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
1106
+ # @!attribute payment_gate_type
1107
+ # Gate access to the commit balance based on successful collection of payment.
1108
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
1109
+ # facilitate payment using your own payment integration. Select NONE if you do not
1110
+ # wish to payment gate the commit balance.
1111
+ #
1112
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType]
1113
+ required :payment_gate_type,
1114
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType }
1115
+
1116
+ # @!attribute precalculated_tax_config
1117
+ # Only applicable if using PRECALCULATED as your tax type.
1118
+ #
1119
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
1120
+ optional :precalculated_tax_config,
1121
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig }
1122
+
1123
+ # @!attribute stripe_config
1124
+ # Only applicable if using STRIPE as your payment gateway type.
1125
+ #
1126
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
1127
+ optional :stripe_config,
1128
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig }
1129
+
1130
+ # @!attribute tax_type
1131
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
1132
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
1133
+ # will default to NONE.
1134
+ #
1135
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType, nil]
1136
+ optional :tax_type,
1137
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType }
1138
+
1139
+ # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
1140
+ # Some parameter documentations has been truncated, see
1141
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig}
1142
+ # for more details.
1143
+ #
1144
+ # @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
1145
+ #
1146
+ # @param precalculated_tax_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
1147
+ #
1148
+ # @param stripe_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gateway type.
1149
+ #
1150
+ # @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
1151
+
1152
+ # Gate access to the commit balance based on successful collection of payment.
1153
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
1154
+ # facilitate payment using your own payment integration. Select NONE if you do not
1155
+ # wish to payment gate the commit balance.
1156
+ #
1157
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig#payment_gate_type
1158
+ module PaymentGateType
1159
+ extend MetronomeSDK::Internal::Type::Enum
1160
+
1161
+ NONE = :NONE
1162
+ STRIPE = :STRIPE
1163
+ EXTERNAL = :EXTERNAL
1164
+
1165
+ # @!method self.values
1166
+ # @return [Array<Symbol>]
1167
+ end
1168
+
1169
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
1170
+ class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
1171
+ # @!attribute tax_amount
1172
+ # Amount of tax to be applied. This should be in the same currency and
1173
+ # denomination as the commit's invoice schedule
1174
+ #
1175
+ # @return [Float]
1176
+ required :tax_amount, Float
1177
+
1178
+ # @!attribute tax_name
1179
+ # Name of the tax to be applied. This may be used in an invoice line item
1180
+ # description.
1181
+ #
1182
+ # @return [String, nil]
1183
+ optional :tax_name, String
1184
+
1185
+ # @!method initialize(tax_amount:, tax_name: nil)
1186
+ # Some parameter documentations has been truncated, see
1187
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
1188
+ # for more details.
1189
+ #
1190
+ # Only applicable if using PRECALCULATED as your tax type.
1191
+ #
1192
+ # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
1193
+ #
1194
+ # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
1195
+ end
1196
+
1197
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig#stripe_config
1198
+ class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
1199
+ # @!attribute payment_type
1200
+ # If left blank, will default to INVOICE
1201
+ #
1202
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
1203
+ required :payment_type,
1204
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType }
1205
+
1206
+ # @!attribute invoice_metadata
1207
+ # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
1208
+ # your payment type.
1209
+ #
1210
+ # @return [Hash{Symbol=>String}, nil]
1211
+ optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
1212
+
1213
+ # @!method initialize(payment_type:, invoice_metadata: nil)
1214
+ # Some parameter documentations has been truncated, see
1215
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig}
1216
+ # for more details.
1217
+ #
1218
+ # Only applicable if using STRIPE as your payment gateway type.
1219
+ #
1220
+ # @param payment_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
1221
+ #
1222
+ # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
1223
+
1224
+ # If left blank, will default to INVOICE
1225
+ #
1226
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
1227
+ module PaymentType
1228
+ extend MetronomeSDK::Internal::Type::Enum
1229
+
1230
+ INVOICE = :INVOICE
1231
+ PAYMENT_INTENT = :PAYMENT_INTENT
1232
+
1233
+ # @!method self.values
1234
+ # @return [Array<Symbol>]
1235
+ end
1236
+ end
1237
+
1238
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
1239
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
1240
+ # will default to NONE.
1241
+ #
1242
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddPrepaidBalanceThresholdConfiguration::PaymentGateConfig#tax_type
1243
+ module TaxType
1244
+ extend MetronomeSDK::Internal::Type::Enum
1245
+
1246
+ NONE = :NONE
1247
+ STRIPE = :STRIPE
1248
+ ANROK = :ANROK
1249
+ PRECALCULATED = :PRECALCULATED
1250
+
1251
+ # @!method self.values
1252
+ # @return [Array<Symbol>]
1253
+ end
1254
+ end
1255
+ end
1256
+
718
1257
  class AddRecurringCommit < MetronomeSDK::Internal::Type::BaseModel
719
1258
  # @!attribute id
720
1259
  #
@@ -812,6 +1351,7 @@ module MetronomeSDK
812
1351
  # @!attribute proration
813
1352
  # Determines whether the first and last commit will be prorated. If not provided,
814
1353
  # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1354
+ # subscription_config:
815
1355
  #
816
1356
  # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Proration, nil]
817
1357
  optional :proration,
@@ -821,7 +1361,7 @@ module MetronomeSDK
821
1361
  # The frequency at which the recurring commits will be created. If not provided: -
822
1362
  # The commits will be created on the usage invoice frequency. If provided: - The
823
1363
  # period defined in the duration will correspond to this frequency. - Commits will
824
- # be created aligned with the recurring commit's start_date rather than the usage
1364
+ # be created aligned with the recurring commit's starting_at rather than the usage
825
1365
  # invoice dates.
826
1366
  #
827
1367
  # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::RecurrenceFrequency, nil]
@@ -836,8 +1376,17 @@ module MetronomeSDK
836
1376
  # @return [Float, nil]
837
1377
  optional :rollover_fraction, Float
838
1378
 
839
- # @!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, invoice_amount: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil)
840
- # Some parameter documentations has been truncated, see
1379
+ # @!attribute specifiers
1380
+ # List of filters that determine what kind of customer usage draws down a commit
1381
+ # or credit. A customer's usage needs to meet the condition of at least one of the
1382
+ # specifiers to contribute to a commit's or credit's drawdown.
1383
+ #
1384
+ # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Specifier>, nil]
1385
+ optional :specifiers,
1386
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Specifier] }
1387
+
1388
+ # @!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, invoice_amount: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil)
1389
+ # Some parameter documentations has been truncated, see
841
1390
  # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit}
842
1391
  # for more details.
843
1392
  #
@@ -876,6 +1425,8 @@ module MetronomeSDK
876
1425
  # @param recurrence_frequency [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
877
1426
  #
878
1427
  # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
1428
+ #
1429
+ # @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
879
1430
 
880
1431
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#access_amount
881
1432
  class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
@@ -884,22 +1435,22 @@ module MetronomeSDK
884
1435
  # @return [String]
885
1436
  required :credit_type_id, String
886
1437
 
887
- # @!attribute quantity
888
- #
889
- # @return [Float]
890
- required :quantity, Float
891
-
892
1438
  # @!attribute unit_price
893
1439
  #
894
1440
  # @return [Float]
895
1441
  required :unit_price, Float
896
1442
 
897
- # @!method initialize(credit_type_id:, quantity:, unit_price:)
1443
+ # @!attribute quantity
1444
+ #
1445
+ # @return [Float, nil]
1446
+ optional :quantity, Float
1447
+
1448
+ # @!method initialize(credit_type_id:, unit_price:, quantity: nil)
898
1449
  # The amount of commit to grant.
899
1450
  #
900
1451
  # @param credit_type_id [String]
901
- # @param quantity [Float]
902
1452
  # @param unit_price [Float]
1453
+ # @param quantity [Float]
903
1454
  end
904
1455
 
905
1456
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#commit_duration
@@ -1000,6 +1551,7 @@ module MetronomeSDK
1000
1551
 
1001
1552
  # Determines whether the first and last commit will be prorated. If not provided,
1002
1553
  # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1554
+ # subscription_config:
1003
1555
  #
1004
1556
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#proration
1005
1557
  module Proration
@@ -1017,7 +1569,7 @@ module MetronomeSDK
1017
1569
  # The frequency at which the recurring commits will be created. If not provided: -
1018
1570
  # The commits will be created on the usage invoice frequency. If provided: - The
1019
1571
  # period defined in the duration will correspond to this frequency. - Commits will
1020
- # be created aligned with the recurring commit's start_date rather than the usage
1572
+ # be created aligned with the recurring commit's starting_at rather than the usage
1021
1573
  # invoice dates.
1022
1574
  #
1023
1575
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#recurrence_frequency
@@ -1032,6 +1584,44 @@ module MetronomeSDK
1032
1584
  # @!method self.values
1033
1585
  # @return [Array<Symbol>]
1034
1586
  end
1587
+
1588
+ class Specifier < MetronomeSDK::Internal::Type::BaseModel
1589
+ # @!attribute presentation_group_values
1590
+ #
1591
+ # @return [Hash{Symbol=>String}, nil]
1592
+ optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1593
+
1594
+ # @!attribute pricing_group_values
1595
+ #
1596
+ # @return [Hash{Symbol=>String}, nil]
1597
+ optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1598
+
1599
+ # @!attribute product_id
1600
+ # If provided, the specifier will only apply to the product with the specified ID.
1601
+ #
1602
+ # @return [String, nil]
1603
+ optional :product_id, String
1604
+
1605
+ # @!attribute product_tags
1606
+ # If provided, the specifier will only apply to products with all the specified
1607
+ # tags.
1608
+ #
1609
+ # @return [Array<String>, nil]
1610
+ optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1611
+
1612
+ # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
1613
+ # Some parameter documentations has been truncated, see
1614
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Specifier}
1615
+ # for more details.
1616
+ #
1617
+ # @param presentation_group_values [Hash{Symbol=>String}]
1618
+ #
1619
+ # @param pricing_group_values [Hash{Symbol=>String}]
1620
+ #
1621
+ # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
1622
+ #
1623
+ # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
1624
+ end
1035
1625
  end
1036
1626
 
1037
1627
  class AddRecurringCredit < MetronomeSDK::Internal::Type::BaseModel
@@ -1124,6 +1714,7 @@ module MetronomeSDK
1124
1714
  # @!attribute proration
1125
1715
  # Determines whether the first and last commit will be prorated. If not provided,
1126
1716
  # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1717
+ # subscription_config:
1127
1718
  #
1128
1719
  # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Proration, nil]
1129
1720
  optional :proration,
@@ -1133,7 +1724,7 @@ module MetronomeSDK
1133
1724
  # The frequency at which the recurring commits will be created. If not provided: -
1134
1725
  # The commits will be created on the usage invoice frequency. If provided: - The
1135
1726
  # period defined in the duration will correspond to this frequency. - Commits will
1136
- # be created aligned with the recurring commit's start_date rather than the usage
1727
+ # be created aligned with the recurring commit's starting_at rather than the usage
1137
1728
  # invoice dates.
1138
1729
  #
1139
1730
  # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::RecurrenceFrequency, nil]
@@ -1148,7 +1739,16 @@ module MetronomeSDK
1148
1739
  # @return [Float, nil]
1149
1740
  optional :rollover_fraction, Float
1150
1741
 
1151
- # @!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, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil)
1742
+ # @!attribute specifiers
1743
+ # List of filters that determine what kind of customer usage draws down a commit
1744
+ # or credit. A customer's usage needs to meet the condition of at least one of the
1745
+ # specifiers to contribute to a commit's or credit's drawdown.
1746
+ #
1747
+ # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Specifier>, nil]
1748
+ optional :specifiers,
1749
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Specifier] }
1750
+
1751
+ # @!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, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil)
1152
1752
  # Some parameter documentations has been truncated, see
1153
1753
  # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit}
1154
1754
  # for more details.
@@ -1186,6 +1786,8 @@ module MetronomeSDK
1186
1786
  # @param recurrence_frequency [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
1187
1787
  #
1188
1788
  # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
1789
+ #
1790
+ # @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
1189
1791
 
1190
1792
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#access_amount
1191
1793
  class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
@@ -1194,22 +1796,22 @@ module MetronomeSDK
1194
1796
  # @return [String]
1195
1797
  required :credit_type_id, String
1196
1798
 
1197
- # @!attribute quantity
1198
- #
1199
- # @return [Float]
1200
- required :quantity, Float
1201
-
1202
1799
  # @!attribute unit_price
1203
1800
  #
1204
1801
  # @return [Float]
1205
1802
  required :unit_price, Float
1206
1803
 
1207
- # @!method initialize(credit_type_id:, quantity:, unit_price:)
1804
+ # @!attribute quantity
1805
+ #
1806
+ # @return [Float, nil]
1807
+ optional :quantity, Float
1808
+
1809
+ # @!method initialize(credit_type_id:, unit_price:, quantity: nil)
1208
1810
  # The amount of commit to grant.
1209
1811
  #
1210
1812
  # @param credit_type_id [String]
1211
- # @param quantity [Float]
1212
1813
  # @param unit_price [Float]
1814
+ # @param quantity [Float]
1213
1815
  end
1214
1816
 
1215
1817
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#commit_duration
@@ -1285,6 +1887,7 @@ module MetronomeSDK
1285
1887
 
1286
1888
  # Determines whether the first and last commit will be prorated. If not provided,
1287
1889
  # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1890
+ # subscription_config:
1288
1891
  #
1289
1892
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#proration
1290
1893
  module Proration
@@ -1302,7 +1905,7 @@ module MetronomeSDK
1302
1905
  # The frequency at which the recurring commits will be created. If not provided: -
1303
1906
  # The commits will be created on the usage invoice frequency. If provided: - The
1304
1907
  # period defined in the duration will correspond to this frequency. - Commits will
1305
- # be created aligned with the recurring commit's start_date rather than the usage
1908
+ # be created aligned with the recurring commit's starting_at rather than the usage
1306
1909
  # invoice dates.
1307
1910
  #
1308
1911
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#recurrence_frequency
@@ -1317,6 +1920,44 @@ module MetronomeSDK
1317
1920
  # @!method self.values
1318
1921
  # @return [Array<Symbol>]
1319
1922
  end
1923
+
1924
+ class Specifier < MetronomeSDK::Internal::Type::BaseModel
1925
+ # @!attribute presentation_group_values
1926
+ #
1927
+ # @return [Hash{Symbol=>String}, nil]
1928
+ optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1929
+
1930
+ # @!attribute pricing_group_values
1931
+ #
1932
+ # @return [Hash{Symbol=>String}, nil]
1933
+ optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1934
+
1935
+ # @!attribute product_id
1936
+ # If provided, the specifier will only apply to the product with the specified ID.
1937
+ #
1938
+ # @return [String, nil]
1939
+ optional :product_id, String
1940
+
1941
+ # @!attribute product_tags
1942
+ # If provided, the specifier will only apply to products with all the specified
1943
+ # tags.
1944
+ #
1945
+ # @return [Array<String>, nil]
1946
+ optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1947
+
1948
+ # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
1949
+ # Some parameter documentations has been truncated, see
1950
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Specifier}
1951
+ # for more details.
1952
+ #
1953
+ # @param presentation_group_values [Hash{Symbol=>String}]
1954
+ #
1955
+ # @param pricing_group_values [Hash{Symbol=>String}]
1956
+ #
1957
+ # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
1958
+ #
1959
+ # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
1960
+ end
1320
1961
  end
1321
1962
 
1322
1963
  class AddResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
@@ -1429,7 +2070,7 @@ module MetronomeSDK
1429
2070
 
1430
2071
  # @!attribute schedule
1431
2072
  #
1432
- # @return [MetronomeSDK::SchedulePointInTime]
2073
+ # @return [MetronomeSDK::Models::SchedulePointInTime]
1433
2074
  required :schedule, -> { MetronomeSDK::SchedulePointInTime }
1434
2075
 
1435
2076
  # @!attribute name
@@ -1449,7 +2090,7 @@ module MetronomeSDK
1449
2090
  #
1450
2091
  # @param product [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddScheduledCharge::Product]
1451
2092
  #
1452
- # @param schedule [MetronomeSDK::SchedulePointInTime]
2093
+ # @param schedule [MetronomeSDK::Models::SchedulePointInTime]
1453
2094
  #
1454
2095
  # @param name [String] displayed on invoices
1455
2096
  #
@@ -1473,138 +2114,580 @@ module MetronomeSDK
1473
2114
  end
1474
2115
  end
1475
2116
 
1476
- class AddUsageFilter < MetronomeSDK::Internal::Type::BaseModel
1477
- # @!attribute group_key
2117
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data#add_spend_threshold_configuration
2118
+ class AddSpendThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
2119
+ # @!attribute commit
1478
2120
  #
1479
- # @return [String]
1480
- required :group_key, String
2121
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::Commit]
2122
+ required :commit,
2123
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::Commit }
1481
2124
 
1482
- # @!attribute group_values
2125
+ # @!attribute is_enabled
2126
+ # When set to false, the contract will not be evaluated against the
2127
+ # threshold_amount. Toggling to true will result an immediate evaluation,
2128
+ # regardless of prior state.
1483
2129
  #
1484
- # @return [Array<String>]
1485
- required :group_values, MetronomeSDK::Internal::Type::ArrayOf[String]
2130
+ # @return [Boolean]
2131
+ required :is_enabled, MetronomeSDK::Internal::Type::Boolean
1486
2132
 
1487
- # @!attribute starting_at
1488
- # This will match contract starting_at value if usage filter is active from the
1489
- # beginning of the contract.
2133
+ # @!attribute payment_gate_config
1490
2134
  #
1491
- # @return [Time]
1492
- required :starting_at, Time
2135
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig]
2136
+ required :payment_gate_config,
2137
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig }
1493
2138
 
1494
- # @!attribute ending_before
1495
- # This will match contract ending_before value if usage filter is active until the
1496
- # end of the contract. It will be undefined if the contract is open-ended.
2139
+ # @!attribute threshold_amount
2140
+ # Specify the threshold amount for the contract. Each time the contract's usage
2141
+ # hits this amount, a threshold charge will be initiated.
1497
2142
  #
1498
- # @return [Time, nil]
1499
- optional :ending_before, Time
2143
+ # @return [Float]
2144
+ required :threshold_amount, Float
1500
2145
 
1501
- # @!method initialize(group_key:, group_values:, starting_at:, ending_before: nil)
2146
+ # @!method initialize(commit:, is_enabled:, payment_gate_config:, threshold_amount:)
1502
2147
  # Some parameter documentations has been truncated, see
1503
- # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddUsageFilter}
2148
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration}
1504
2149
  # for more details.
1505
2150
  #
1506
- # @param group_key [String]
2151
+ # @param commit [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::Commit]
1507
2152
  #
1508
- # @param group_values [Array<String>]
2153
+ # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
1509
2154
  #
1510
- # @param starting_at [Time] This will match contract starting_at value if usage filter is active from the be
2155
+ # @param payment_gate_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig]
1511
2156
  #
1512
- # @param ending_before [Time] This will match contract ending_before value if usage filter is active until the
1513
- end
2157
+ # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's usage hi
1514
2158
 
1515
- class ArchiveCommit < MetronomeSDK::Internal::Type::BaseModel
1516
- # @!attribute id
1517
- #
1518
- # @return [String]
1519
- required :id, String
2159
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration#commit
2160
+ class Commit < MetronomeSDK::Internal::Type::BaseModel
2161
+ # @!attribute product_id
2162
+ # The commit product that will be used to generate the line item for commit
2163
+ # payment.
2164
+ #
2165
+ # @return [String]
2166
+ required :product_id, String
1520
2167
 
1521
- # @!method initialize(id:)
1522
- # @param id [String]
1523
- end
2168
+ # @!attribute description
2169
+ #
2170
+ # @return [String, nil]
2171
+ optional :description, String
1524
2172
 
1525
- class ArchiveCredit < MetronomeSDK::Internal::Type::BaseModel
1526
- # @!attribute id
1527
- #
1528
- # @return [String]
1529
- required :id, String
2173
+ # @!attribute name
2174
+ # Specify the name of the line item for the threshold charge. If left blank, it
2175
+ # will default to the commit product name.
2176
+ #
2177
+ # @return [String, nil]
2178
+ optional :name, String
1530
2179
 
1531
- # @!method initialize(id:)
1532
- # @param id [String]
1533
- end
2180
+ # @!method initialize(product_id:, description: nil, name: nil)
2181
+ # Some parameter documentations has been truncated, see
2182
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::Commit}
2183
+ # for more details.
2184
+ #
2185
+ # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
2186
+ #
2187
+ # @param description [String]
2188
+ #
2189
+ # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
2190
+ end
1534
2191
 
1535
- class ArchiveScheduledCharge < MetronomeSDK::Internal::Type::BaseModel
1536
- # @!attribute id
1537
- #
1538
- # @return [String]
1539
- required :id, String
2192
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration#payment_gate_config
2193
+ class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
2194
+ # @!attribute payment_gate_type
2195
+ # Gate access to the commit balance based on successful collection of payment.
2196
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
2197
+ # facilitate payment using your own payment integration. Select NONE if you do not
2198
+ # wish to payment gate the commit balance.
2199
+ #
2200
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::PaymentGateType]
2201
+ required :payment_gate_type,
2202
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::PaymentGateType }
1540
2203
 
1541
- # @!method initialize(id:)
1542
- # @param id [String]
1543
- end
2204
+ # @!attribute precalculated_tax_config
2205
+ # Only applicable if using PRECALCULATED as your tax type.
2206
+ #
2207
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
2208
+ optional :precalculated_tax_config,
2209
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig }
1544
2210
 
1545
- class RemoveOverride < MetronomeSDK::Internal::Type::BaseModel
1546
- # @!attribute id
1547
- #
1548
- # @return [String]
1549
- required :id, String
2211
+ # @!attribute stripe_config
2212
+ # Only applicable if using STRIPE as your payment gateway type.
2213
+ #
2214
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
2215
+ optional :stripe_config,
2216
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig }
2217
+
2218
+ # @!attribute tax_type
2219
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
2220
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
2221
+ # will default to NONE.
2222
+ #
2223
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::TaxType, nil]
2224
+ optional :tax_type,
2225
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::TaxType }
1550
2226
 
1551
- # @!method initialize(id:)
1552
- # @param id [String]
2227
+ # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
2228
+ # Some parameter documentations has been truncated, see
2229
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig}
2230
+ # for more details.
2231
+ #
2232
+ # @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
2233
+ #
2234
+ # @param precalculated_tax_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
2235
+ #
2236
+ # @param stripe_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gateway type.
2237
+ #
2238
+ # @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
2239
+
2240
+ # Gate access to the commit balance based on successful collection of payment.
2241
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
2242
+ # facilitate payment using your own payment integration. Select NONE if you do not
2243
+ # wish to payment gate the commit balance.
2244
+ #
2245
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig#payment_gate_type
2246
+ module PaymentGateType
2247
+ extend MetronomeSDK::Internal::Type::Enum
2248
+
2249
+ NONE = :NONE
2250
+ STRIPE = :STRIPE
2251
+ EXTERNAL = :EXTERNAL
2252
+
2253
+ # @!method self.values
2254
+ # @return [Array<Symbol>]
2255
+ end
2256
+
2257
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
2258
+ class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
2259
+ # @!attribute tax_amount
2260
+ # Amount of tax to be applied. This should be in the same currency and
2261
+ # denomination as the commit's invoice schedule
2262
+ #
2263
+ # @return [Float]
2264
+ required :tax_amount, Float
2265
+
2266
+ # @!attribute tax_name
2267
+ # Name of the tax to be applied. This may be used in an invoice line item
2268
+ # description.
2269
+ #
2270
+ # @return [String, nil]
2271
+ optional :tax_name, String
2272
+
2273
+ # @!method initialize(tax_amount:, tax_name: nil)
2274
+ # Some parameter documentations has been truncated, see
2275
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
2276
+ # for more details.
2277
+ #
2278
+ # Only applicable if using PRECALCULATED as your tax type.
2279
+ #
2280
+ # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
2281
+ #
2282
+ # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
2283
+ end
2284
+
2285
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig#stripe_config
2286
+ class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
2287
+ # @!attribute payment_type
2288
+ # If left blank, will default to INVOICE
2289
+ #
2290
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
2291
+ required :payment_type,
2292
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType }
2293
+
2294
+ # @!attribute invoice_metadata
2295
+ # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
2296
+ # your payment type.
2297
+ #
2298
+ # @return [Hash{Symbol=>String}, nil]
2299
+ optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
2300
+
2301
+ # @!method initialize(payment_type:, invoice_metadata: nil)
2302
+ # Some parameter documentations has been truncated, see
2303
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig}
2304
+ # for more details.
2305
+ #
2306
+ # Only applicable if using STRIPE as your payment gateway type.
2307
+ #
2308
+ # @param payment_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
2309
+ #
2310
+ # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
2311
+
2312
+ # If left blank, will default to INVOICE
2313
+ #
2314
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
2315
+ module PaymentType
2316
+ extend MetronomeSDK::Internal::Type::Enum
2317
+
2318
+ INVOICE = :INVOICE
2319
+ PAYMENT_INTENT = :PAYMENT_INTENT
2320
+
2321
+ # @!method self.values
2322
+ # @return [Array<Symbol>]
2323
+ end
2324
+ end
2325
+
2326
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
2327
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
2328
+ # will default to NONE.
2329
+ #
2330
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSpendThresholdConfiguration::PaymentGateConfig#tax_type
2331
+ module TaxType
2332
+ extend MetronomeSDK::Internal::Type::Enum
2333
+
2334
+ NONE = :NONE
2335
+ STRIPE = :STRIPE
2336
+ ANROK = :ANROK
2337
+ PRECALCULATED = :PRECALCULATED
2338
+
2339
+ # @!method self.values
2340
+ # @return [Array<Symbol>]
2341
+ end
2342
+ end
1553
2343
  end
1554
2344
 
1555
- class UpdateCommit < MetronomeSDK::Internal::Type::BaseModel
1556
- # @!attribute id
2345
+ class AddSubscription < MetronomeSDK::Internal::Type::BaseModel
2346
+ # @!attribute collection_schedule
1557
2347
  #
1558
- # @return [String]
1559
- required :id, String
2348
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::CollectionSchedule]
2349
+ required :collection_schedule,
2350
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::CollectionSchedule }
1560
2351
 
1561
- # @!attribute access_schedule
2352
+ # @!attribute proration
1562
2353
  #
1563
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule, nil]
1564
- optional :access_schedule,
1565
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule }
2354
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration]
2355
+ required :proration,
2356
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration }
1566
2357
 
1567
- # @!attribute applicable_product_ids
1568
- # Which products the commit applies to. If both applicable_product_ids and
1569
- # applicable_product_tags are not provided, the commit applies to all products.
2358
+ # @!attribute quantity_schedule
2359
+ # List of quantity schedule items for the subscription. Only includes the current
2360
+ # quantity and future quantity changes.
1570
2361
  #
1571
- # @return [Array<String>, nil]
1572
- optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
2362
+ # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::QuantitySchedule>]
2363
+ required :quantity_schedule,
2364
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::QuantitySchedule] }
1573
2365
 
1574
- # @!attribute applicable_product_tags
1575
- # Which tags the commit applies to. If both applicable_product_ids and
1576
- # applicable_product_tags are not provided, the commit applies to all products.
2366
+ # @!attribute starting_at
1577
2367
  #
1578
- # @return [Array<String>, nil]
1579
- optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
2368
+ # @return [Time]
2369
+ required :starting_at, Time
1580
2370
 
1581
- # @!attribute invoice_schedule
2371
+ # @!attribute subscription_rate
1582
2372
  #
1583
- # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule, nil]
1584
- optional :invoice_schedule,
1585
- -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule }
2373
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate]
2374
+ required :subscription_rate,
2375
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate }
1586
2376
 
1587
- # @!attribute name
2377
+ # @!attribute id
1588
2378
  #
1589
2379
  # @return [String, nil]
1590
- optional :name, String
2380
+ optional :id, String
1591
2381
 
1592
- # @!attribute netsuite_sales_order_id
2382
+ # @!attribute custom_fields
1593
2383
  #
1594
- # @return [String, nil]
1595
- optional :netsuite_sales_order_id, String, nil?: true
2384
+ # @return [Hash{Symbol=>String}, nil]
2385
+ optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
1596
2386
 
1597
- # @!attribute product_id
2387
+ # @!attribute description
1598
2388
  #
1599
2389
  # @return [String, nil]
1600
- optional :product_id, String
2390
+ optional :description, String
1601
2391
 
1602
- # @!attribute rollover_fraction
2392
+ # @!attribute ending_before
1603
2393
  #
1604
- # @return [Float, nil]
1605
- optional :rollover_fraction, Float, nil?: true
2394
+ # @return [Time, nil]
2395
+ optional :ending_before, Time
2396
+
2397
+ # @!attribute fiat_credit_type_id
2398
+ #
2399
+ # @return [String, nil]
2400
+ optional :fiat_credit_type_id, String
2401
+
2402
+ # @!attribute name
2403
+ #
2404
+ # @return [String, nil]
2405
+ optional :name, String
2406
+
2407
+ # @!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)
2408
+ # Some parameter documentations has been truncated, see
2409
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription}
2410
+ # for more details.
2411
+ #
2412
+ # @param collection_schedule [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::CollectionSchedule]
2413
+ #
2414
+ # @param proration [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration]
2415
+ #
2416
+ # @param quantity_schedule [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::QuantitySchedule>] List of quantity schedule items for the subscription. Only includes the current
2417
+ #
2418
+ # @param starting_at [Time]
2419
+ #
2420
+ # @param subscription_rate [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate]
2421
+ #
2422
+ # @param id [String]
2423
+ #
2424
+ # @param custom_fields [Hash{Symbol=>String}]
2425
+ #
2426
+ # @param description [String]
2427
+ #
2428
+ # @param ending_before [Time]
2429
+ #
2430
+ # @param fiat_credit_type_id [String]
2431
+ #
2432
+ # @param name [String]
2433
+
2434
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription#collection_schedule
2435
+ module CollectionSchedule
2436
+ extend MetronomeSDK::Internal::Type::Enum
2437
+
2438
+ ADVANCE = :ADVANCE
2439
+ ARREARS = :ARREARS
2440
+
2441
+ # @!method self.values
2442
+ # @return [Array<Symbol>]
2443
+ end
2444
+
2445
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription#proration
2446
+ class Proration < MetronomeSDK::Internal::Type::BaseModel
2447
+ # @!attribute invoice_behavior
2448
+ #
2449
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration::InvoiceBehavior]
2450
+ required :invoice_behavior,
2451
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration::InvoiceBehavior }
2452
+
2453
+ # @!attribute is_prorated
2454
+ #
2455
+ # @return [Boolean]
2456
+ required :is_prorated, MetronomeSDK::Internal::Type::Boolean
2457
+
2458
+ # @!method initialize(invoice_behavior:, is_prorated:)
2459
+ # @param invoice_behavior [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration::InvoiceBehavior]
2460
+ # @param is_prorated [Boolean]
2461
+
2462
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::Proration#invoice_behavior
2463
+ module InvoiceBehavior
2464
+ extend MetronomeSDK::Internal::Type::Enum
2465
+
2466
+ BILL_IMMEDIATELY = :BILL_IMMEDIATELY
2467
+ BILL_ON_NEXT_COLLECTION_DATE = :BILL_ON_NEXT_COLLECTION_DATE
2468
+
2469
+ # @!method self.values
2470
+ # @return [Array<Symbol>]
2471
+ end
2472
+ end
2473
+
2474
+ class QuantitySchedule < MetronomeSDK::Internal::Type::BaseModel
2475
+ # @!attribute quantity
2476
+ #
2477
+ # @return [Float]
2478
+ required :quantity, Float
2479
+
2480
+ # @!attribute starting_at
2481
+ #
2482
+ # @return [Time]
2483
+ required :starting_at, Time
2484
+
2485
+ # @!attribute ending_before
2486
+ #
2487
+ # @return [Time, nil]
2488
+ optional :ending_before, Time
2489
+
2490
+ # @!method initialize(quantity:, starting_at:, ending_before: nil)
2491
+ # @param quantity [Float]
2492
+ # @param starting_at [Time]
2493
+ # @param ending_before [Time]
2494
+ end
2495
+
2496
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription#subscription_rate
2497
+ class SubscriptionRate < MetronomeSDK::Internal::Type::BaseModel
2498
+ # @!attribute billing_frequency
2499
+ #
2500
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::BillingFrequency]
2501
+ required :billing_frequency,
2502
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::BillingFrequency }
2503
+
2504
+ # @!attribute product
2505
+ #
2506
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::Product]
2507
+ required :product,
2508
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::Product }
2509
+
2510
+ # @!method initialize(billing_frequency:, product:)
2511
+ # @param billing_frequency [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::BillingFrequency]
2512
+ # @param product [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate::Product]
2513
+
2514
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate#billing_frequency
2515
+ module BillingFrequency
2516
+ extend MetronomeSDK::Internal::Type::Enum
2517
+
2518
+ MONTHLY = :MONTHLY
2519
+ QUARTERLY = :QUARTERLY
2520
+ ANNUAL = :ANNUAL
2521
+ WEEKLY = :WEEKLY
2522
+
2523
+ # @!method self.values
2524
+ # @return [Array<Symbol>]
2525
+ end
2526
+
2527
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddSubscription::SubscriptionRate#product
2528
+ class Product < MetronomeSDK::Internal::Type::BaseModel
2529
+ # @!attribute id
2530
+ #
2531
+ # @return [String]
2532
+ required :id, String
2533
+
2534
+ # @!attribute name
2535
+ #
2536
+ # @return [String]
2537
+ required :name, String
2538
+
2539
+ # @!method initialize(id:, name:)
2540
+ # @param id [String]
2541
+ # @param name [String]
2542
+ end
2543
+ end
2544
+ end
2545
+
2546
+ class AddUsageFilter < MetronomeSDK::Internal::Type::BaseModel
2547
+ # @!attribute group_key
2548
+ #
2549
+ # @return [String]
2550
+ required :group_key, String
2551
+
2552
+ # @!attribute group_values
2553
+ #
2554
+ # @return [Array<String>]
2555
+ required :group_values, MetronomeSDK::Internal::Type::ArrayOf[String]
2556
+
2557
+ # @!attribute starting_at
2558
+ # This will match contract starting_at value if usage filter is active from the
2559
+ # beginning of the contract.
2560
+ #
2561
+ # @return [Time]
2562
+ required :starting_at, Time
2563
+
2564
+ # @!attribute ending_before
2565
+ # This will match contract ending_before value if usage filter is active until the
2566
+ # end of the contract. It will be undefined if the contract is open-ended.
2567
+ #
2568
+ # @return [Time, nil]
2569
+ optional :ending_before, Time
2570
+
2571
+ # @!method initialize(group_key:, group_values:, starting_at:, ending_before: nil)
2572
+ # Some parameter documentations has been truncated, see
2573
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddUsageFilter}
2574
+ # for more details.
2575
+ #
2576
+ # @param group_key [String]
2577
+ #
2578
+ # @param group_values [Array<String>]
2579
+ #
2580
+ # @param starting_at [Time] This will match contract starting_at value if usage filter is active from the be
2581
+ #
2582
+ # @param ending_before [Time] This will match contract ending_before value if usage filter is active until the
2583
+ end
2584
+
2585
+ class ArchiveCommit < MetronomeSDK::Internal::Type::BaseModel
2586
+ # @!attribute id
2587
+ #
2588
+ # @return [String]
2589
+ required :id, String
2590
+
2591
+ # @!method initialize(id:)
2592
+ # @param id [String]
2593
+ end
2594
+
2595
+ class ArchiveCredit < MetronomeSDK::Internal::Type::BaseModel
2596
+ # @!attribute id
2597
+ #
2598
+ # @return [String]
2599
+ required :id, String
2600
+
2601
+ # @!method initialize(id:)
2602
+ # @param id [String]
2603
+ end
2604
+
2605
+ class ArchiveScheduledCharge < MetronomeSDK::Internal::Type::BaseModel
2606
+ # @!attribute id
2607
+ #
2608
+ # @return [String]
2609
+ required :id, String
2610
+
2611
+ # @!method initialize(id:)
2612
+ # @param id [String]
2613
+ end
2614
+
2615
+ class RemoveOverride < MetronomeSDK::Internal::Type::BaseModel
2616
+ # @!attribute id
2617
+ #
2618
+ # @return [String]
2619
+ required :id, String
2620
+
2621
+ # @!method initialize(id:)
2622
+ # @param id [String]
2623
+ end
2624
+
2625
+ class UpdateCommit < MetronomeSDK::Internal::Type::BaseModel
2626
+ # @!attribute id
2627
+ #
2628
+ # @return [String]
2629
+ required :id, String
2630
+
2631
+ # @!attribute access_schedule
2632
+ #
2633
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule, nil]
2634
+ optional :access_schedule,
2635
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule }
2636
+
2637
+ # @!attribute applicable_product_ids
2638
+ # Which products the commit applies to. If applicable_product_ids,
2639
+ # applicable_product_tags or specifiers are not provided, the commit applies to
2640
+ # all products.
2641
+ #
2642
+ # @return [Array<String>, nil]
2643
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
2644
+
2645
+ # @!attribute applicable_product_tags
2646
+ # Which tags the commit applies to. If applicable_product_ids,
2647
+ # applicable_product_tags or specifiers are not provided, the commit applies to
2648
+ # all products.
2649
+ #
2650
+ # @return [Array<String>, nil]
2651
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
2652
+
2653
+ # @!attribute invoice_schedule
2654
+ #
2655
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule, nil]
2656
+ optional :invoice_schedule,
2657
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule }
2658
+
2659
+ # @!attribute name
2660
+ #
2661
+ # @return [String, nil]
2662
+ optional :name, String
2663
+
2664
+ # @!attribute netsuite_sales_order_id
2665
+ #
2666
+ # @return [String, nil]
2667
+ optional :netsuite_sales_order_id, String, nil?: true
2668
+
2669
+ # @!attribute product_id
2670
+ #
2671
+ # @return [String, nil]
2672
+ optional :product_id, String
2673
+
2674
+ # @!attribute rollover_fraction
2675
+ #
2676
+ # @return [Float, nil]
2677
+ optional :rollover_fraction, Float, nil?: true
2678
+
2679
+ # @!attribute specifiers
2680
+ # List of filters that determine what kind of customer usage draws down a commit
2681
+ # or credit. A customer's usage needs to meet the condition of at least one of the
2682
+ # specifiers to contribute to a commit's or credit's drawdown. This field cannot
2683
+ # be used together with `applicable_product_ids` or `applicable_product_tags`.
2684
+ #
2685
+ # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::Specifier>, nil]
2686
+ optional :specifiers,
2687
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::Specifier] },
2688
+ nil?: true
1606
2689
 
1607
- # @!method initialize(id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, product_id: nil, rollover_fraction: nil)
2690
+ # @!method initialize(id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, product_id: nil, rollover_fraction: nil, specifiers: nil)
1608
2691
  # Some parameter documentations has been truncated, see
1609
2692
  # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit}
1610
2693
  # for more details.
@@ -1613,9 +2696,9 @@ module MetronomeSDK
1613
2696
  #
1614
2697
  # @param access_schedule [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::AccessSchedule]
1615
2698
  #
1616
- # @param applicable_product_ids [Array<String>, nil] Which products the commit applies to. If both applicable_product_ids and applica
2699
+ # @param applicable_product_ids [Array<String>, nil] Which products the commit applies to. If applicable_product_ids, applicable_prod
1617
2700
  #
1618
- # @param applicable_product_tags [Array<String>, nil] Which tags the commit applies to. If both applicable*product_ids and applicable*
2701
+ # @param applicable_product_tags [Array<String>, nil] Which tags the commit applies to. If applicable*product_ids, applicable_product*
1619
2702
  #
1620
2703
  # @param invoice_schedule [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::InvoiceSchedule]
1621
2704
  #
@@ -1626,6 +2709,8 @@ module MetronomeSDK
1626
2709
  # @param product_id [String]
1627
2710
  #
1628
2711
  # @param rollover_fraction [Float, nil]
2712
+ #
2713
+ # @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
1629
2714
 
1630
2715
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit#access_schedule
1631
2716
  class AccessSchedule < MetronomeSDK::Internal::Type::BaseModel
@@ -1843,6 +2928,44 @@ module MetronomeSDK
1843
2928
  # @param unit_price [Float]
1844
2929
  end
1845
2930
  end
2931
+
2932
+ class Specifier < MetronomeSDK::Internal::Type::BaseModel
2933
+ # @!attribute presentation_group_values
2934
+ #
2935
+ # @return [Hash{Symbol=>String}, nil]
2936
+ optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
2937
+
2938
+ # @!attribute pricing_group_values
2939
+ #
2940
+ # @return [Hash{Symbol=>String}, nil]
2941
+ optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
2942
+
2943
+ # @!attribute product_id
2944
+ # If provided, the specifier will only apply to the product with the specified ID.
2945
+ #
2946
+ # @return [String, nil]
2947
+ optional :product_id, String
2948
+
2949
+ # @!attribute product_tags
2950
+ # If provided, the specifier will only apply to products with all the specified
2951
+ # tags.
2952
+ #
2953
+ # @return [Array<String>, nil]
2954
+ optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
2955
+
2956
+ # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
2957
+ # Some parameter documentations has been truncated, see
2958
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::Specifier}
2959
+ # for more details.
2960
+ #
2961
+ # @param presentation_group_values [Hash{Symbol=>String}]
2962
+ #
2963
+ # @param pricing_group_values [Hash{Symbol=>String}]
2964
+ #
2965
+ # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
2966
+ #
2967
+ # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
2968
+ end
1846
2969
  end
1847
2970
 
1848
2971
  class UpdateCredit < MetronomeSDK::Internal::Type::BaseModel
@@ -2210,19 +3333,442 @@ module MetronomeSDK
2210
3333
  end
2211
3334
  end
2212
3335
 
2213
- class UpdateRefundInvoice < MetronomeSDK::Internal::Type::BaseModel
2214
- # @!attribute date
3336
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data#update_prepaid_balance_threshold_configuration
3337
+ class UpdatePrepaidBalanceThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
3338
+ # @!attribute commit
2215
3339
  #
2216
- # @return [Time]
2217
- required :date, Time
3340
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::Commit, nil]
3341
+ optional :commit,
3342
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::Commit }
2218
3343
 
2219
- # @!attribute invoice_id
3344
+ # @!attribute custom_credit_type_id
3345
+ # If provided, the threshold, recharge-to amount, and the resulting threshold
3346
+ # commit amount will be in terms of this credit type instead of the fiat currency.
2220
3347
  #
2221
- # @return [String]
2222
- required :invoice_id, String
3348
+ # @return [String, nil]
3349
+ optional :custom_credit_type_id, String, nil?: true
2223
3350
 
2224
- # @!method initialize(date:, invoice_id:)
2225
- # @param date [Time]
3351
+ # @!attribute is_enabled
3352
+ # When set to false, the contract will not be evaluated against the
3353
+ # threshold_amount. Toggling to true will result an immediate evaluation,
3354
+ # regardless of prior state.
3355
+ #
3356
+ # @return [Boolean, nil]
3357
+ optional :is_enabled, MetronomeSDK::Internal::Type::Boolean
3358
+
3359
+ # @!attribute payment_gate_config
3360
+ #
3361
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig, nil]
3362
+ optional :payment_gate_config,
3363
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig }
3364
+
3365
+ # @!attribute recharge_to_amount
3366
+ # Specify the amount the balance should be recharged to.
3367
+ #
3368
+ # @return [Float, nil]
3369
+ optional :recharge_to_amount, Float
3370
+
3371
+ # @!attribute threshold_amount
3372
+ # Specify the threshold amount for the contract. Each time the contract's balance
3373
+ # lowers to this amount, a threshold charge will be initiated.
3374
+ #
3375
+ # @return [Float, nil]
3376
+ optional :threshold_amount, Float
3377
+
3378
+ # @!method initialize(commit: nil, custom_credit_type_id: nil, is_enabled: nil, payment_gate_config: nil, recharge_to_amount: nil, threshold_amount: nil)
3379
+ # Some parameter documentations has been truncated, see
3380
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration}
3381
+ # for more details.
3382
+ #
3383
+ # @param commit [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::Commit]
3384
+ #
3385
+ # @param custom_credit_type_id [String, nil] If provided, the threshold, recharge-to amount, and the resulting threshold comm
3386
+ #
3387
+ # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
3388
+ #
3389
+ # @param payment_gate_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig]
3390
+ #
3391
+ # @param recharge_to_amount [Float] Specify the amount the balance should be recharged to.
3392
+ #
3393
+ # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's balance
3394
+
3395
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration#commit
3396
+ class Commit < MetronomeSDK::Internal::Type::BaseModel
3397
+ # @!attribute applicable_product_ids
3398
+ # Which products the threshold commit applies to. If both applicable_product_ids
3399
+ # and applicable_product_tags are not provided, the commit applies to all
3400
+ # products.
3401
+ #
3402
+ # @return [Array<String>, nil]
3403
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
3404
+
3405
+ # @!attribute applicable_product_tags
3406
+ # Which tags the threshold commit applies to. If both applicable_product_ids and
3407
+ # applicable_product_tags are not provided, the commit applies to all products.
3408
+ #
3409
+ # @return [Array<String>, nil]
3410
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
3411
+
3412
+ # @!attribute description
3413
+ #
3414
+ # @return [String, nil]
3415
+ optional :description, String
3416
+
3417
+ # @!attribute name
3418
+ # Specify the name of the line item for the threshold charge. If left blank, it
3419
+ # will default to the commit product name.
3420
+ #
3421
+ # @return [String, nil]
3422
+ optional :name, String
3423
+
3424
+ # @!attribute product_id
3425
+ # The commit product that will be used to generate the line item for commit
3426
+ # payment.
3427
+ #
3428
+ # @return [String, nil]
3429
+ optional :product_id, String
3430
+
3431
+ # @!attribute specifiers
3432
+ # List of filters that determine what kind of customer usage draws down a commit
3433
+ # or credit. A customer's usage needs to meet the condition of at least one of the
3434
+ # specifiers to contribute to a commit's or credit's drawdown. This field cannot
3435
+ # be used together with `applicable_product_ids` or `applicable_product_tags`.
3436
+ #
3437
+ # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::Commit::Specifier>, nil]
3438
+ optional :specifiers,
3439
+ -> do
3440
+ MetronomeSDK::Internal::Type::ArrayOf[
3441
+ MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::Commit::Specifier
3442
+ ]
3443
+ end,
3444
+ nil?: true
3445
+
3446
+ # @!method initialize(applicable_product_ids: nil, applicable_product_tags: nil, description: nil, name: nil, product_id: nil, specifiers: nil)
3447
+ # Some parameter documentations has been truncated, see
3448
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::Commit}
3449
+ # for more details.
3450
+ #
3451
+ # @param applicable_product_ids [Array<String>, nil] Which products the threshold commit applies to. If both applicable_product_ids a
3452
+ #
3453
+ # @param applicable_product_tags [Array<String>, nil] Which tags the threshold commit applies to. If both applicable_product_ids and a
3454
+ #
3455
+ # @param description [String]
3456
+ #
3457
+ # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
3458
+ #
3459
+ # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
3460
+ #
3461
+ # @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
3462
+
3463
+ class Specifier < MetronomeSDK::Internal::Type::BaseModel
3464
+ # @!attribute presentation_group_values
3465
+ #
3466
+ # @return [Hash{Symbol=>String}, nil]
3467
+ optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
3468
+
3469
+ # @!attribute pricing_group_values
3470
+ #
3471
+ # @return [Hash{Symbol=>String}, nil]
3472
+ optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
3473
+
3474
+ # @!attribute product_id
3475
+ # If provided, the specifier will only apply to the product with the specified ID.
3476
+ #
3477
+ # @return [String, nil]
3478
+ optional :product_id, String
3479
+
3480
+ # @!attribute product_tags
3481
+ # If provided, the specifier will only apply to products with all the specified
3482
+ # tags.
3483
+ #
3484
+ # @return [Array<String>, nil]
3485
+ optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
3486
+
3487
+ # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
3488
+ # Some parameter documentations has been truncated, see
3489
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::Commit::Specifier}
3490
+ # for more details.
3491
+ #
3492
+ # @param presentation_group_values [Hash{Symbol=>String}]
3493
+ #
3494
+ # @param pricing_group_values [Hash{Symbol=>String}]
3495
+ #
3496
+ # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
3497
+ #
3498
+ # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
3499
+ end
3500
+ end
3501
+
3502
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration#payment_gate_config
3503
+ class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
3504
+ # @!attribute payment_gate_type
3505
+ # Gate access to the commit balance based on successful collection of payment.
3506
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
3507
+ # facilitate payment using your own payment integration. Select NONE if you do not
3508
+ # wish to payment gate the commit balance.
3509
+ #
3510
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType]
3511
+ required :payment_gate_type,
3512
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType }
3513
+
3514
+ # @!attribute precalculated_tax_config
3515
+ # Only applicable if using PRECALCULATED as your tax type.
3516
+ #
3517
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
3518
+ optional :precalculated_tax_config,
3519
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig }
3520
+
3521
+ # @!attribute stripe_config
3522
+ # Only applicable if using STRIPE as your payment gateway type.
3523
+ #
3524
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
3525
+ optional :stripe_config,
3526
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig }
3527
+
3528
+ # @!attribute tax_type
3529
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
3530
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
3531
+ # will default to NONE.
3532
+ #
3533
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType, nil]
3534
+ optional :tax_type,
3535
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType }
3536
+
3537
+ # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
3538
+ # Some parameter documentations has been truncated, see
3539
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig}
3540
+ # for more details.
3541
+ #
3542
+ # @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
3543
+ #
3544
+ # @param precalculated_tax_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
3545
+ #
3546
+ # @param stripe_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gateway type.
3547
+ #
3548
+ # @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
3549
+
3550
+ # Gate access to the commit balance based on successful collection of payment.
3551
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
3552
+ # facilitate payment using your own payment integration. Select NONE if you do not
3553
+ # wish to payment gate the commit balance.
3554
+ #
3555
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig#payment_gate_type
3556
+ module PaymentGateType
3557
+ extend MetronomeSDK::Internal::Type::Enum
3558
+
3559
+ NONE = :NONE
3560
+ STRIPE = :STRIPE
3561
+ EXTERNAL = :EXTERNAL
3562
+
3563
+ # @!method self.values
3564
+ # @return [Array<Symbol>]
3565
+ end
3566
+
3567
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
3568
+ class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
3569
+ # @!attribute tax_amount
3570
+ # Amount of tax to be applied. This should be in the same currency and
3571
+ # denomination as the commit's invoice schedule
3572
+ #
3573
+ # @return [Float]
3574
+ required :tax_amount, Float
3575
+
3576
+ # @!attribute tax_name
3577
+ # Name of the tax to be applied. This may be used in an invoice line item
3578
+ # description.
3579
+ #
3580
+ # @return [String, nil]
3581
+ optional :tax_name, String
3582
+
3583
+ # @!method initialize(tax_amount:, tax_name: nil)
3584
+ # Some parameter documentations has been truncated, see
3585
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
3586
+ # for more details.
3587
+ #
3588
+ # Only applicable if using PRECALCULATED as your tax type.
3589
+ #
3590
+ # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
3591
+ #
3592
+ # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
3593
+ end
3594
+
3595
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig#stripe_config
3596
+ class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
3597
+ # @!attribute payment_type
3598
+ # If left blank, will default to INVOICE
3599
+ #
3600
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
3601
+ required :payment_type,
3602
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType }
3603
+
3604
+ # @!attribute invoice_metadata
3605
+ # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
3606
+ # your payment type.
3607
+ #
3608
+ # @return [Hash{Symbol=>String}, nil]
3609
+ optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
3610
+
3611
+ # @!method initialize(payment_type:, invoice_metadata: nil)
3612
+ # Some parameter documentations has been truncated, see
3613
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig}
3614
+ # for more details.
3615
+ #
3616
+ # Only applicable if using STRIPE as your payment gateway type.
3617
+ #
3618
+ # @param payment_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
3619
+ #
3620
+ # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
3621
+
3622
+ # If left blank, will default to INVOICE
3623
+ #
3624
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
3625
+ module PaymentType
3626
+ extend MetronomeSDK::Internal::Type::Enum
3627
+
3628
+ INVOICE = :INVOICE
3629
+ PAYMENT_INTENT = :PAYMENT_INTENT
3630
+
3631
+ # @!method self.values
3632
+ # @return [Array<Symbol>]
3633
+ end
3634
+ end
3635
+
3636
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
3637
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
3638
+ # will default to NONE.
3639
+ #
3640
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdatePrepaidBalanceThresholdConfiguration::PaymentGateConfig#tax_type
3641
+ module TaxType
3642
+ extend MetronomeSDK::Internal::Type::Enum
3643
+
3644
+ NONE = :NONE
3645
+ STRIPE = :STRIPE
3646
+ ANROK = :ANROK
3647
+ PRECALCULATED = :PRECALCULATED
3648
+
3649
+ # @!method self.values
3650
+ # @return [Array<Symbol>]
3651
+ end
3652
+ end
3653
+ end
3654
+
3655
+ class UpdateRecurringCommit < MetronomeSDK::Internal::Type::BaseModel
3656
+ # @!attribute id
3657
+ #
3658
+ # @return [String]
3659
+ required :id, String
3660
+
3661
+ # @!attribute access_amount
3662
+ #
3663
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::AccessAmount, nil]
3664
+ optional :access_amount,
3665
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::AccessAmount }
3666
+
3667
+ # @!attribute ending_before
3668
+ #
3669
+ # @return [Time, nil]
3670
+ optional :ending_before, Time
3671
+
3672
+ # @!attribute invoice_amount
3673
+ #
3674
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::InvoiceAmount, nil]
3675
+ optional :invoice_amount,
3676
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::InvoiceAmount }
3677
+
3678
+ # @!method initialize(id:, access_amount: nil, ending_before: nil, invoice_amount: nil)
3679
+ # @param id [String]
3680
+ # @param access_amount [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::AccessAmount]
3681
+ # @param ending_before [Time]
3682
+ # @param invoice_amount [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::InvoiceAmount]
3683
+
3684
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit#access_amount
3685
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
3686
+ # @!attribute quantity
3687
+ #
3688
+ # @return [Float, nil]
3689
+ optional :quantity, Float
3690
+
3691
+ # @!attribute unit_price
3692
+ #
3693
+ # @return [Float, nil]
3694
+ optional :unit_price, Float
3695
+
3696
+ # @!method initialize(quantity: nil, unit_price: nil)
3697
+ # @param quantity [Float]
3698
+ # @param unit_price [Float]
3699
+ end
3700
+
3701
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit#invoice_amount
3702
+ class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
3703
+ # @!attribute quantity
3704
+ #
3705
+ # @return [Float, nil]
3706
+ optional :quantity, Float
3707
+
3708
+ # @!attribute unit_price
3709
+ #
3710
+ # @return [Float, nil]
3711
+ optional :unit_price, Float
3712
+
3713
+ # @!method initialize(quantity: nil, unit_price: nil)
3714
+ # @param quantity [Float]
3715
+ # @param unit_price [Float]
3716
+ end
3717
+ end
3718
+
3719
+ class UpdateRecurringCredit < MetronomeSDK::Internal::Type::BaseModel
3720
+ # @!attribute id
3721
+ #
3722
+ # @return [String]
3723
+ required :id, String
3724
+
3725
+ # @!attribute access_amount
3726
+ #
3727
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::AccessAmount, nil]
3728
+ optional :access_amount,
3729
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::AccessAmount }
3730
+
3731
+ # @!attribute ending_before
3732
+ #
3733
+ # @return [Time, nil]
3734
+ optional :ending_before, Time
3735
+
3736
+ # @!method initialize(id:, access_amount: nil, ending_before: nil)
3737
+ # @param id [String]
3738
+ # @param access_amount [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::AccessAmount]
3739
+ # @param ending_before [Time]
3740
+
3741
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit#access_amount
3742
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
3743
+ # @!attribute quantity
3744
+ #
3745
+ # @return [Float, nil]
3746
+ optional :quantity, Float
3747
+
3748
+ # @!attribute unit_price
3749
+ #
3750
+ # @return [Float, nil]
3751
+ optional :unit_price, Float
3752
+
3753
+ # @!method initialize(quantity: nil, unit_price: nil)
3754
+ # @param quantity [Float]
3755
+ # @param unit_price [Float]
3756
+ end
3757
+ end
3758
+
3759
+ class UpdateRefundInvoice < MetronomeSDK::Internal::Type::BaseModel
3760
+ # @!attribute date
3761
+ #
3762
+ # @return [Time]
3763
+ required :date, Time
3764
+
3765
+ # @!attribute invoice_id
3766
+ #
3767
+ # @return [String]
3768
+ required :invoice_id, String
3769
+
3770
+ # @!method initialize(date:, invoice_id:)
3771
+ # @param date [Time]
2226
3772
  # @param invoice_id [String]
2227
3773
  end
2228
3774
 
@@ -2364,6 +3910,279 @@ module MetronomeSDK
2364
3910
  end
2365
3911
  end
2366
3912
  end
3913
+
3914
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data#update_spend_threshold_configuration
3915
+ class UpdateSpendThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
3916
+ # @!attribute commit
3917
+ #
3918
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::Commit, nil]
3919
+ optional :commit,
3920
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::Commit }
3921
+
3922
+ # @!attribute is_enabled
3923
+ # When set to false, the contract will not be evaluated against the
3924
+ # threshold_amount. Toggling to true will result an immediate evaluation,
3925
+ # regardless of prior state.
3926
+ #
3927
+ # @return [Boolean, nil]
3928
+ optional :is_enabled, MetronomeSDK::Internal::Type::Boolean
3929
+
3930
+ # @!attribute payment_gate_config
3931
+ #
3932
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig, nil]
3933
+ optional :payment_gate_config,
3934
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig }
3935
+
3936
+ # @!attribute threshold_amount
3937
+ # Specify the threshold amount for the contract. Each time the contract's usage
3938
+ # hits this amount, a threshold charge will be initiated.
3939
+ #
3940
+ # @return [Float, nil]
3941
+ optional :threshold_amount, Float
3942
+
3943
+ # @!method initialize(commit: nil, is_enabled: nil, payment_gate_config: nil, threshold_amount: nil)
3944
+ # Some parameter documentations has been truncated, see
3945
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration}
3946
+ # for more details.
3947
+ #
3948
+ # @param commit [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::Commit]
3949
+ #
3950
+ # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
3951
+ #
3952
+ # @param payment_gate_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig]
3953
+ #
3954
+ # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's usage hi
3955
+
3956
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration#commit
3957
+ class Commit < MetronomeSDK::Internal::Type::BaseModel
3958
+ # @!attribute description
3959
+ #
3960
+ # @return [String, nil]
3961
+ optional :description, String
3962
+
3963
+ # @!attribute name
3964
+ # Specify the name of the line item for the threshold charge. If left blank, it
3965
+ # will default to the commit product name.
3966
+ #
3967
+ # @return [String, nil]
3968
+ optional :name, String
3969
+
3970
+ # @!attribute product_id
3971
+ # The commit product that will be used to generate the line item for commit
3972
+ # payment.
3973
+ #
3974
+ # @return [String, nil]
3975
+ optional :product_id, String
3976
+
3977
+ # @!method initialize(description: nil, name: nil, product_id: nil)
3978
+ # Some parameter documentations has been truncated, see
3979
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::Commit}
3980
+ # for more details.
3981
+ #
3982
+ # @param description [String]
3983
+ #
3984
+ # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
3985
+ #
3986
+ # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
3987
+ end
3988
+
3989
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration#payment_gate_config
3990
+ class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
3991
+ # @!attribute payment_gate_type
3992
+ # Gate access to the commit balance based on successful collection of payment.
3993
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
3994
+ # facilitate payment using your own payment integration. Select NONE if you do not
3995
+ # wish to payment gate the commit balance.
3996
+ #
3997
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::PaymentGateType]
3998
+ required :payment_gate_type,
3999
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::PaymentGateType }
4000
+
4001
+ # @!attribute precalculated_tax_config
4002
+ # Only applicable if using PRECALCULATED as your tax type.
4003
+ #
4004
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
4005
+ optional :precalculated_tax_config,
4006
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig }
4007
+
4008
+ # @!attribute stripe_config
4009
+ # Only applicable if using STRIPE as your payment gateway type.
4010
+ #
4011
+ # @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
4012
+ optional :stripe_config,
4013
+ -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig }
4014
+
4015
+ # @!attribute tax_type
4016
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
4017
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
4018
+ # will default to NONE.
4019
+ #
4020
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::TaxType, nil]
4021
+ optional :tax_type,
4022
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::TaxType }
4023
+
4024
+ # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
4025
+ # Some parameter documentations has been truncated, see
4026
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig}
4027
+ # for more details.
4028
+ #
4029
+ # @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
4030
+ #
4031
+ # @param precalculated_tax_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
4032
+ #
4033
+ # @param stripe_config [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gateway type.
4034
+ #
4035
+ # @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
4036
+
4037
+ # Gate access to the commit balance based on successful collection of payment.
4038
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
4039
+ # facilitate payment using your own payment integration. Select NONE if you do not
4040
+ # wish to payment gate the commit balance.
4041
+ #
4042
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig#payment_gate_type
4043
+ module PaymentGateType
4044
+ extend MetronomeSDK::Internal::Type::Enum
4045
+
4046
+ NONE = :NONE
4047
+ STRIPE = :STRIPE
4048
+ EXTERNAL = :EXTERNAL
4049
+
4050
+ # @!method self.values
4051
+ # @return [Array<Symbol>]
4052
+ end
4053
+
4054
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
4055
+ class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
4056
+ # @!attribute tax_amount
4057
+ # Amount of tax to be applied. This should be in the same currency and
4058
+ # denomination as the commit's invoice schedule
4059
+ #
4060
+ # @return [Float]
4061
+ required :tax_amount, Float
4062
+
4063
+ # @!attribute tax_name
4064
+ # Name of the tax to be applied. This may be used in an invoice line item
4065
+ # description.
4066
+ #
4067
+ # @return [String, nil]
4068
+ optional :tax_name, String
4069
+
4070
+ # @!method initialize(tax_amount:, tax_name: nil)
4071
+ # Some parameter documentations has been truncated, see
4072
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
4073
+ # for more details.
4074
+ #
4075
+ # Only applicable if using PRECALCULATED as your tax type.
4076
+ #
4077
+ # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
4078
+ #
4079
+ # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
4080
+ end
4081
+
4082
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig#stripe_config
4083
+ class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
4084
+ # @!attribute payment_type
4085
+ # If left blank, will default to INVOICE
4086
+ #
4087
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
4088
+ required :payment_type,
4089
+ enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType }
4090
+
4091
+ # @!attribute invoice_metadata
4092
+ # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
4093
+ # your payment type.
4094
+ #
4095
+ # @return [Hash{Symbol=>String}, nil]
4096
+ optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
4097
+
4098
+ # @!method initialize(payment_type:, invoice_metadata: nil)
4099
+ # Some parameter documentations has been truncated, see
4100
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig}
4101
+ # for more details.
4102
+ #
4103
+ # Only applicable if using STRIPE as your payment gateway type.
4104
+ #
4105
+ # @param payment_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
4106
+ #
4107
+ # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
4108
+
4109
+ # If left blank, will default to INVOICE
4110
+ #
4111
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
4112
+ module PaymentType
4113
+ extend MetronomeSDK::Internal::Type::Enum
4114
+
4115
+ INVOICE = :INVOICE
4116
+ PAYMENT_INTENT = :PAYMENT_INTENT
4117
+
4118
+ # @!method self.values
4119
+ # @return [Array<Symbol>]
4120
+ end
4121
+ end
4122
+
4123
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
4124
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
4125
+ # will default to NONE.
4126
+ #
4127
+ # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSpendThresholdConfiguration::PaymentGateConfig#tax_type
4128
+ module TaxType
4129
+ extend MetronomeSDK::Internal::Type::Enum
4130
+
4131
+ NONE = :NONE
4132
+ STRIPE = :STRIPE
4133
+ ANROK = :ANROK
4134
+ PRECALCULATED = :PRECALCULATED
4135
+
4136
+ # @!method self.values
4137
+ # @return [Array<Symbol>]
4138
+ end
4139
+ end
4140
+ end
4141
+
4142
+ class UpdateSubscription < MetronomeSDK::Internal::Type::BaseModel
4143
+ # @!attribute id
4144
+ #
4145
+ # @return [String]
4146
+ required :id, String
4147
+
4148
+ # @!attribute ending_before
4149
+ #
4150
+ # @return [Time, nil]
4151
+ optional :ending_before, Time
4152
+
4153
+ # @!attribute quantity_updates
4154
+ #
4155
+ # @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSubscription::QuantityUpdate>, nil]
4156
+ optional :quantity_updates,
4157
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSubscription::QuantityUpdate] }
4158
+
4159
+ # @!method initialize(id:, ending_before: nil, quantity_updates: nil)
4160
+ # @param id [String]
4161
+ # @param ending_before [Time]
4162
+ # @param quantity_updates [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateSubscription::QuantityUpdate>]
4163
+
4164
+ class QuantityUpdate < MetronomeSDK::Internal::Type::BaseModel
4165
+ # @!attribute starting_at
4166
+ #
4167
+ # @return [Time]
4168
+ required :starting_at, Time
4169
+
4170
+ # @!attribute quantity
4171
+ #
4172
+ # @return [Float, nil]
4173
+ optional :quantity, Float
4174
+
4175
+ # @!attribute quantity_delta
4176
+ #
4177
+ # @return [Float, nil]
4178
+ optional :quantity_delta, Float
4179
+
4180
+ # @!method initialize(starting_at:, quantity: nil, quantity_delta: nil)
4181
+ # @param starting_at [Time]
4182
+ # @param quantity [Float]
4183
+ # @param quantity_delta [Float]
4184
+ end
4185
+ end
2367
4186
  end
2368
4187
  end
2369
4188
  end