metronome-sdk 0.3.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +36 -0
  3. data/README.md +9 -9
  4. data/lib/metronome_sdk/internal/body_cursor_page.rb +86 -0
  5. data/lib/metronome_sdk/internal/cursor_page_without_limit.rb +86 -0
  6. data/lib/metronome_sdk/internal/transport/base_client.rb +1 -4
  7. data/lib/metronome_sdk/internal/transport/pooled_net_requester.rb +1 -9
  8. data/lib/metronome_sdk/internal/type/base_model.rb +6 -13
  9. data/lib/metronome_sdk/internal/type/union.rb +11 -0
  10. data/lib/metronome_sdk/internal/util.rb +1 -1
  11. data/lib/metronome_sdk/models/base_threshold_commit.rb +36 -0
  12. data/lib/metronome_sdk/models/commit.rb +26 -170
  13. data/lib/metronome_sdk/models/commit_hierarchy_configuration.rb +98 -0
  14. data/lib/metronome_sdk/models/commit_rate.rb +48 -0
  15. data/lib/metronome_sdk/models/commit_specifier.rb +42 -0
  16. data/lib/metronome_sdk/models/commit_specifier_input.rb +42 -0
  17. data/lib/metronome_sdk/models/contract.rb +404 -0
  18. data/lib/metronome_sdk/models/contract_v2.rb +2919 -0
  19. data/lib/metronome_sdk/models/contract_without_amendments.rb +36 -1126
  20. data/lib/metronome_sdk/models/credit.rb +9 -156
  21. data/lib/metronome_sdk/models/discount.rb +2 -1
  22. data/lib/metronome_sdk/models/hierarchy_configuration.rb +76 -0
  23. data/lib/metronome_sdk/models/override.rb +6 -101
  24. data/lib/metronome_sdk/models/override_tier.rb +21 -0
  25. data/lib/metronome_sdk/models/overwrite_rate.rb +82 -0
  26. data/lib/metronome_sdk/models/payment_gate_config.rb +149 -0
  27. data/lib/metronome_sdk/models/payment_gate_config_v2.rb +149 -0
  28. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +100 -0
  29. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +102 -0
  30. data/lib/metronome_sdk/models/pro_service.rb +2 -1
  31. data/lib/metronome_sdk/models/recurring_commit_subscription_config.rb +51 -0
  32. data/lib/metronome_sdk/models/scheduled_charge.rb +2 -1
  33. data/lib/metronome_sdk/models/spend_threshold_configuration.rb +44 -0
  34. data/lib/metronome_sdk/models/spend_threshold_configuration_v2.rb +44 -0
  35. data/lib/metronome_sdk/models/subscription.rb +227 -0
  36. data/lib/metronome_sdk/models/update_base_threshold_commit.rb +36 -0
  37. data/lib/metronome_sdk/models/v1/alert_create_params.rb +4 -6
  38. data/lib/metronome_sdk/models/v1/billable_metric_create_params.rb +1 -2
  39. data/lib/metronome_sdk/models/v1/billable_metric_list_response.rb +3 -3
  40. data/lib/metronome_sdk/models/v1/billable_metric_retrieve_response.rb +4 -7
  41. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +57 -411
  42. data/lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb +7 -16
  43. data/lib/metronome_sdk/models/v1/contract_create_params.rb +236 -1478
  44. data/lib/metronome_sdk/models/v1/contract_list_balances_response.rb +6 -23
  45. data/lib/metronome_sdk/models/v1/contract_list_response.rb +3 -1153
  46. data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_params.rb +2 -6
  47. data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rb +5 -50
  48. data/lib/metronome_sdk/models/v1/contract_retrieve_response.rb +3 -1154
  49. data/lib/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_params.rb +1 -3
  50. data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +2 -1
  51. data/lib/metronome_sdk/models/v1/contracts/product_list_response.rb +8 -1
  52. data/lib/metronome_sdk/models/v1/contracts/product_retrieve_response.rb +8 -1
  53. data/lib/metronome_sdk/models/v1/contracts/quantity_rounding.rb +1 -4
  54. data/lib/metronome_sdk/models/v1/contracts/rate_card_create_params.rb +4 -7
  55. data/lib/metronome_sdk/models/v1/contracts/rate_card_list_response.rb +10 -1
  56. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_params.rb +2 -6
  57. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rb +5 -50
  58. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rb +10 -1
  59. data/lib/metronome_sdk/models/v1/contracts/rate_card_update_params.rb +1 -3
  60. data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_params.rb +1 -3
  61. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +6 -61
  62. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +3 -49
  63. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rb +4 -51
  64. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_params.rb +2 -6
  65. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rb +5 -49
  66. data/lib/metronome_sdk/models/v1/credit_grant_list_entries_response.rb +103 -123
  67. data/lib/metronome_sdk/models/v1/credit_grant_list_response.rb +3 -5
  68. data/lib/metronome_sdk/models/v1/custom_field_list_keys_params.rb +1 -3
  69. data/lib/metronome_sdk/models/v1/custom_field_list_keys_response.rb +41 -58
  70. data/lib/metronome_sdk/models/v1/custom_field_set_values_params.rb +5 -1
  71. data/lib/metronome_sdk/models/v1/customer.rb +2 -1
  72. data/lib/metronome_sdk/models/v1/customer_create_params.rb +37 -11
  73. data/lib/metronome_sdk/models/v1/customer_detail.rb +2 -1
  74. data/lib/metronome_sdk/models/v1/customer_list_billable_metrics_response.rb +3 -3
  75. data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +1 -3
  76. data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rb +28 -0
  77. data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rb +128 -0
  78. data/lib/metronome_sdk/models/v1/customer_set_billing_configurations_params.rb +143 -0
  79. data/lib/metronome_sdk/models/v1/customers/alert_list_params.rb +1 -3
  80. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +30 -1
  81. data/lib/metronome_sdk/models/v1/customers/billing_config_create_params.rb +2 -0
  82. data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +2 -0
  83. data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +10 -60
  84. data/lib/metronome_sdk/models/v1/customers/credit_create_params.rb +6 -48
  85. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +8 -16
  86. data/lib/metronome_sdk/models/v1/customers/invoice.rb +61 -48
  87. data/lib/metronome_sdk/models/v1/customers/invoice_list_breakdowns_params.rb +1 -4
  88. data/lib/metronome_sdk/models/v1/customers/plan_add_params.rb +2 -6
  89. data/lib/metronome_sdk/models/v1/customers/plan_list_response.rb +2 -1
  90. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +4 -11
  91. data/lib/metronome_sdk/models/v1/plan_detail.rb +9 -5
  92. data/lib/metronome_sdk/models/v1/plan_list_charges_response.rb +2 -1
  93. data/lib/metronome_sdk/models/v1/plan_list_customers_response.rb +2 -1
  94. data/lib/metronome_sdk/models/v1/plan_list_response.rb +5 -1
  95. data/lib/metronome_sdk/models/v1/usage_ingest_params.rb +1 -4
  96. data/lib/metronome_sdk/models/v1/usage_list_params.rb +1 -3
  97. data/lib/metronome_sdk/models/v1/usage_list_response.rb +45 -62
  98. data/lib/metronome_sdk/models/v1/usage_search_response.rb +4 -7
  99. data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +29 -58
  100. data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +26 -49
  101. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +414 -2310
  102. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +337 -2424
  103. data/lib/metronome_sdk/models/v2/contract_list_response.rb +3 -4520
  104. data/lib/metronome_sdk/models/v2/contract_retrieve_response.rb +3 -4528
  105. data/lib/metronome_sdk/models.rb +38 -0
  106. data/lib/metronome_sdk/resources/v1/alerts.rb +72 -2
  107. data/lib/metronome_sdk/resources/v1/audit_logs.rb +39 -4
  108. data/lib/metronome_sdk/resources/v1/billable_metrics.rb +54 -4
  109. data/lib/metronome_sdk/resources/v1/contracts/products.rb +25 -6
  110. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rb +7 -2
  111. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +10 -2
  112. data/lib/metronome_sdk/resources/v1/contracts/rate_cards.rb +109 -10
  113. data/lib/metronome_sdk/resources/v1/contracts.rb +254 -18
  114. data/lib/metronome_sdk/resources/v1/credit_grants.rb +2 -1
  115. data/lib/metronome_sdk/resources/v1/custom_fields.rb +51 -14
  116. data/lib/metronome_sdk/resources/v1/customers/alerts.rb +103 -8
  117. data/lib/metronome_sdk/resources/v1/customers/commits.rb +119 -9
  118. data/lib/metronome_sdk/resources/v1/customers/credits.rb +104 -8
  119. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +124 -8
  120. data/lib/metronome_sdk/resources/v1/customers.rb +169 -12
  121. data/lib/metronome_sdk/resources/v1/dashboards.rb +29 -3
  122. data/lib/metronome_sdk/resources/v1/invoices.rb +23 -2
  123. data/lib/metronome_sdk/resources/v1/pricing_units.rb +6 -1
  124. data/lib/metronome_sdk/resources/v1/services.rb +6 -4
  125. data/lib/metronome_sdk/resources/v1/usage.rb +185 -12
  126. data/lib/metronome_sdk/resources/v2/contracts.rb +114 -18
  127. data/lib/metronome_sdk/version.rb +1 -1
  128. data/lib/metronome_sdk.rb +24 -3
  129. data/rbi/metronome_sdk/errors.rbi +2 -2
  130. data/rbi/metronome_sdk/internal/body_cursor_page.rbi +22 -0
  131. data/rbi/metronome_sdk/internal/cursor_page_without_limit.rbi +22 -0
  132. data/rbi/metronome_sdk/models/base_threshold_commit.rbi +58 -0
  133. data/rbi/metronome_sdk/models/commit.rbi +26 -348
  134. data/rbi/metronome_sdk/models/commit_hierarchy_configuration.rbi +280 -0
  135. data/rbi/metronome_sdk/models/commit_rate.rbi +85 -0
  136. data/rbi/metronome_sdk/models/commit_specifier.rbi +71 -0
  137. data/rbi/metronome_sdk/models/commit_specifier_input.rbi +74 -0
  138. data/rbi/metronome_sdk/models/contract.rbi +768 -0
  139. data/rbi/metronome_sdk/models/contract_v2.rbi +5822 -0
  140. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +184 -2507
  141. data/rbi/metronome_sdk/models/credit.rbi +10 -348
  142. data/rbi/metronome_sdk/models/discount.rbi +2 -0
  143. data/rbi/metronome_sdk/models/hierarchy_configuration.rbi +180 -0
  144. data/rbi/metronome_sdk/models/override.rbi +8 -193
  145. data/rbi/metronome_sdk/models/override_tier.rbi +29 -0
  146. data/rbi/metronome_sdk/models/overwrite_rate.rbi +137 -0
  147. data/rbi/metronome_sdk/models/payment_gate_config.rbi +312 -0
  148. data/rbi/metronome_sdk/models/payment_gate_config_v2.rbi +321 -0
  149. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +183 -0
  150. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +188 -0
  151. data/rbi/metronome_sdk/models/pro_service.rbi +2 -0
  152. data/rbi/metronome_sdk/models/recurring_commit_subscription_config.rbi +125 -0
  153. data/rbi/metronome_sdk/models/scheduled_charge.rbi +2 -0
  154. data/rbi/metronome_sdk/models/spend_threshold_configuration.rbi +76 -0
  155. data/rbi/metronome_sdk/models/spend_threshold_configuration_v2.rbi +78 -0
  156. data/rbi/metronome_sdk/models/subscription.rbi +460 -0
  157. data/rbi/metronome_sdk/models/update_base_threshold_commit.rbi +61 -0
  158. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +6 -3
  159. data/rbi/metronome_sdk/models/v1/billable_metric_list_response.rbi +2 -0
  160. data/rbi/metronome_sdk/models/v1/billable_metric_retrieve_response.rbi +2 -0
  161. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +44 -768
  162. data/rbi/metronome_sdk/models/v1/contract_create_historical_invoices_params.rbi +2 -0
  163. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +1550 -4079
  164. data/rbi/metronome_sdk/models/v1/contract_list_balances_response.rbi +8 -59
  165. data/rbi/metronome_sdk/models/v1/contract_list_response.rbi +5 -2420
  166. data/rbi/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbi +6 -129
  167. data/rbi/metronome_sdk/models/v1/contract_retrieve_response.rbi +4 -2419
  168. data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +2 -0
  169. data/rbi/metronome_sdk/models/v1/contracts/product_list_response.rbi +2 -0
  170. data/rbi/metronome_sdk/models/v1/contracts/product_retrieve_response.rbi +2 -0
  171. data/rbi/metronome_sdk/models/v1/contracts/rate_card_create_params.rbi +2 -0
  172. data/rbi/metronome_sdk/models/v1/contracts/rate_card_list_response.rbi +2 -0
  173. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbi +6 -129
  174. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rbi +2 -0
  175. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +4 -129
  176. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +4 -129
  177. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbi +4 -129
  178. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbi +6 -129
  179. data/rbi/metronome_sdk/models/v1/credit_grant_list_entries_response.rbi +147 -198
  180. data/rbi/metronome_sdk/models/v1/credit_grant_list_response.rbi +2 -0
  181. data/rbi/metronome_sdk/models/v1/custom_field_list_keys_response.rbi +117 -165
  182. data/rbi/metronome_sdk/models/v1/custom_field_set_values_params.rbi +8 -1
  183. data/rbi/metronome_sdk/models/v1/customer.rbi +2 -0
  184. data/rbi/metronome_sdk/models/v1/customer_create_params.rbi +88 -3
  185. data/rbi/metronome_sdk/models/v1/customer_detail.rbi +2 -0
  186. data/rbi/metronome_sdk/models/v1/customer_list_billable_metrics_response.rbi +2 -0
  187. data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rbi +51 -0
  188. data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbi +265 -0
  189. data/rbi/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbi +348 -0
  190. data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +60 -0
  191. data/rbi/metronome_sdk/models/v1/customers/billing_config_create_params.rbi +10 -0
  192. data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +10 -0
  193. data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +6 -90
  194. data/rbi/metronome_sdk/models/v1/customers/credit_create_params.rbi +6 -90
  195. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +6 -3
  196. data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +70 -10
  197. data/rbi/metronome_sdk/models/v1/customers/plan_list_response.rbi +2 -0
  198. data/rbi/metronome_sdk/models/v1/plan_detail.rbi +2 -0
  199. data/rbi/metronome_sdk/models/v1/plan_list_charges_response.rbi +2 -0
  200. data/rbi/metronome_sdk/models/v1/plan_list_customers_response.rbi +2 -0
  201. data/rbi/metronome_sdk/models/v1/plan_list_response.rbi +8 -1
  202. data/rbi/metronome_sdk/models/v1/usage_list_response.rbi +45 -86
  203. data/rbi/metronome_sdk/models/v1/usage_search_response.rbi +2 -0
  204. data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +56 -76
  205. data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +56 -76
  206. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +3419 -7270
  207. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1140 -6062
  208. data/rbi/metronome_sdk/models/v2/contract_list_response.rbi +5 -9867
  209. data/rbi/metronome_sdk/models/v2/contract_retrieve_response.rbi +6 -9866
  210. data/rbi/metronome_sdk/models.rbi +44 -0
  211. data/rbi/metronome_sdk/resources/v1/alerts.rbi +72 -2
  212. data/rbi/metronome_sdk/resources/v1/audit_logs.rbi +39 -4
  213. data/rbi/metronome_sdk/resources/v1/billable_metrics.rbi +54 -4
  214. data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +25 -5
  215. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rbi +7 -2
  216. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +10 -3
  217. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards.rbi +109 -9
  218. data/rbi/metronome_sdk/resources/v1/contracts.rbi +257 -16
  219. data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +5 -1
  220. data/rbi/metronome_sdk/resources/v1/custom_fields.rbi +57 -14
  221. data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +108 -5
  222. data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +119 -10
  223. data/rbi/metronome_sdk/resources/v1/customers/credits.rbi +104 -9
  224. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +123 -7
  225. data/rbi/metronome_sdk/resources/v1/customers.rbi +156 -11
  226. data/rbi/metronome_sdk/resources/v1/dashboards.rbi +29 -3
  227. data/rbi/metronome_sdk/resources/v1/invoices.rbi +23 -2
  228. data/rbi/metronome_sdk/resources/v1/pricing_units.rbi +6 -1
  229. data/rbi/metronome_sdk/resources/v1/services.rbi +6 -4
  230. data/rbi/metronome_sdk/resources/v1/usage.rbi +188 -12
  231. data/rbi/metronome_sdk/resources/v2/contracts.rbi +120 -23
  232. data/sig/metronome_sdk/internal/body_cursor_page.rbs +13 -0
  233. data/sig/metronome_sdk/internal/cursor_page_without_limit.rbs +13 -0
  234. data/sig/metronome_sdk/models/base_threshold_commit.rbs +26 -0
  235. data/sig/metronome_sdk/models/commit.rbs +17 -170
  236. data/sig/metronome_sdk/models/commit_hierarchy_configuration.rbs +117 -0
  237. data/sig/metronome_sdk/models/commit_rate.rbs +48 -0
  238. data/sig/metronome_sdk/models/commit_specifier.rbs +47 -0
  239. data/sig/metronome_sdk/models/commit_specifier_input.rbs +47 -0
  240. data/sig/metronome_sdk/models/contract.rbs +398 -0
  241. data/sig/metronome_sdk/models/contract_v2.rbs +2881 -0
  242. data/sig/metronome_sdk/models/contract_without_amendments.rbs +54 -976
  243. data/sig/metronome_sdk/models/credit.rbs +12 -170
  244. data/sig/metronome_sdk/models/hierarchy_configuration.rbs +71 -0
  245. data/sig/metronome_sdk/models/override.rbs +12 -101
  246. data/sig/metronome_sdk/models/override_tier.rbs +17 -0
  247. data/sig/metronome_sdk/models/overwrite_rate.rbs +78 -0
  248. data/sig/metronome_sdk/models/payment_gate_config.rbs +123 -0
  249. data/sig/metronome_sdk/models/payment_gate_config_v2.rbs +123 -0
  250. data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +82 -0
  251. data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +82 -0
  252. data/sig/metronome_sdk/models/recurring_commit_subscription_config.rbs +51 -0
  253. data/sig/metronome_sdk/models/spend_threshold_configuration.rbs +35 -0
  254. data/sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs +35 -0
  255. data/sig/metronome_sdk/models/subscription.rbs +215 -0
  256. data/sig/metronome_sdk/models/update_base_threshold_commit.rbs +28 -0
  257. data/sig/metronome_sdk/models/v1/alert_create_params.rbs +4 -2
  258. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +24 -340
  259. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +168 -1219
  260. data/sig/metronome_sdk/models/v1/contract_list_balances_response.rbs +4 -25
  261. data/sig/metronome_sdk/models/v1/contract_list_response.rbs +4 -1041
  262. data/sig/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbs +6 -54
  263. data/sig/metronome_sdk/models/v1/contract_retrieve_response.rbs +4 -1041
  264. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbs +6 -54
  265. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +6 -54
  266. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +6 -54
  267. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbs +6 -54
  268. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbs +6 -54
  269. data/sig/metronome_sdk/models/v1/credit_grant_list_entries_response.rbs +72 -94
  270. data/sig/metronome_sdk/models/v1/custom_field_list_keys_response.rbs +53 -75
  271. data/sig/metronome_sdk/models/v1/customer_create_params.rbs +31 -4
  272. data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rbs +32 -0
  273. data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbs +113 -0
  274. data/sig/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbs +133 -0
  275. data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +21 -0
  276. data/sig/metronome_sdk/models/v1/customers/billing_config_create_params.rbs +7 -1
  277. data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbs +6 -1
  278. data/sig/metronome_sdk/models/v1/customers/commit_create_params.rbs +6 -50
  279. data/sig/metronome_sdk/models/v1/customers/credit_create_params.rbs +6 -50
  280. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +4 -2
  281. data/sig/metronome_sdk/models/v1/usage_list_response.rbs +33 -55
  282. data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +19 -43
  283. data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +19 -43
  284. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +361 -1917
  285. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +242 -2252
  286. data/sig/metronome_sdk/models/v2/contract_list_response.rbs +4 -4426
  287. data/sig/metronome_sdk/models/v2/contract_retrieve_response.rbs +4 -4426
  288. data/sig/metronome_sdk/models.rbs +38 -0
  289. data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +1 -1
  290. data/sig/metronome_sdk/resources/v1/contracts.rbs +3 -3
  291. data/sig/metronome_sdk/resources/v1/credit_grants.rbs +1 -1
  292. data/sig/metronome_sdk/resources/v1/custom_fields.rbs +1 -1
  293. data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +2 -1
  294. data/sig/metronome_sdk/resources/v1/customers/commits.rbs +2 -2
  295. data/sig/metronome_sdk/resources/v1/customers/credits.rbs +2 -2
  296. data/sig/metronome_sdk/resources/v1/customers.rbs +11 -0
  297. data/sig/metronome_sdk/resources/v1/usage.rbs +1 -1
  298. data/sig/metronome_sdk/resources/v2/contracts.rbs +7 -4
  299. metadata +74 -11
  300. data/lib/metronome_sdk/models/v1/customers/alert_list_response.rb +0 -29
  301. data/lib/metronome_sdk/models/v1/customers/commit_list_response.rb +0 -26
  302. data/lib/metronome_sdk/models/v1/customers/credit_list_response.rb +0 -26
  303. data/rbi/metronome_sdk/models/v1/customers/alert_list_response.rbi +0 -46
  304. data/rbi/metronome_sdk/models/v1/customers/commit_list_response.rbi +0 -45
  305. data/rbi/metronome_sdk/models/v1/customers/credit_list_response.rbi +0 -45
  306. data/sig/metronome_sdk/models/v1/customers/alert_list_response.rbs +0 -29
  307. data/sig/metronome_sdk/models/v1/customers/commit_list_response.rbs +0 -26
  308. data/sig/metronome_sdk/models/v1/customers/credit_list_response.rbs +0 -26
@@ -7,4536 +7,11 @@ module MetronomeSDK
7
7
  class ContractRetrieveResponse < MetronomeSDK::Internal::Type::BaseModel
8
8
  # @!attribute data
9
9
  #
10
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data]
11
- required :data, -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data }
10
+ # @return [MetronomeSDK::Models::ContractV2]
11
+ required :data, -> { MetronomeSDK::ContractV2 }
12
12
 
13
13
  # @!method initialize(data:)
14
- # @param data [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data]
15
-
16
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse#data
17
- class Data < MetronomeSDK::Internal::Type::BaseModel
18
- # @!attribute id
19
- #
20
- # @return [String]
21
- required :id, String
22
-
23
- # @!attribute commits
24
- #
25
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit>]
26
- required :commits,
27
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit] }
28
-
29
- # @!attribute created_at
30
- #
31
- # @return [Time]
32
- required :created_at, Time
33
-
34
- # @!attribute created_by
35
- #
36
- # @return [String]
37
- required :created_by, String
38
-
39
- # @!attribute customer_id
40
- #
41
- # @return [String]
42
- required :customer_id, String
43
-
44
- # @!attribute overrides
45
- #
46
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override>]
47
- required :overrides,
48
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override] }
49
-
50
- # @!attribute scheduled_charges
51
- #
52
- # @return [Array<MetronomeSDK::Models::ScheduledCharge>]
53
- required :scheduled_charges,
54
- -> {
55
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ScheduledCharge]
56
- }
57
-
58
- # @!attribute starting_at
59
- #
60
- # @return [Time]
61
- required :starting_at, Time
62
-
63
- # @!attribute transitions
64
- #
65
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Transition>]
66
- required :transitions,
67
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Transition] }
68
-
69
- # @!attribute usage_filter
70
- #
71
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::UsageFilter>]
72
- required :usage_filter,
73
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::UsageFilter] }
74
-
75
- # @!attribute usage_statement_schedule
76
- #
77
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::UsageStatementSchedule]
78
- required :usage_statement_schedule,
79
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::UsageStatementSchedule }
80
-
81
- # @!attribute archived_at
82
- #
83
- # @return [Time, nil]
84
- optional :archived_at, Time
85
-
86
- # @!attribute credits
87
- #
88
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit>, nil]
89
- optional :credits,
90
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit] }
91
-
92
- # @!attribute custom_fields
93
- #
94
- # @return [Hash{Symbol=>String}, nil]
95
- optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
96
-
97
- # @!attribute customer_billing_provider_configuration
98
- # This field's availability is dependent on your client's configuration.
99
- #
100
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::CustomerBillingProviderConfiguration, nil]
101
- optional :customer_billing_provider_configuration,
102
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::CustomerBillingProviderConfiguration }
103
-
104
- # @!attribute discounts
105
- # This field's availability is dependent on your client's configuration.
106
- #
107
- # @return [Array<MetronomeSDK::Models::Discount>, nil]
108
- optional :discounts, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Discount] }
109
-
110
- # @!attribute ending_before
111
- #
112
- # @return [Time, nil]
113
- optional :ending_before, Time
114
-
115
- # @!attribute has_more
116
- # Indicates whether there are more items than the limit for this endpoint. Use the
117
- # respective list endpoints to get the full lists.
118
- #
119
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HasMore, nil]
120
- optional :has_more, -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HasMore }
121
-
122
- # @!attribute hierarchy_configuration
123
- # Either a **parent** configuration with a list of children or a **child**
124
- # configuration with a single parent.
125
- #
126
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HierarchyConfiguration::ParentHierarchyConfiguration, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HierarchyConfiguration::ChildHierarchyConfiguration, nil]
127
- optional :hierarchy_configuration,
128
- union: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HierarchyConfiguration }
129
-
130
- # @!attribute multiplier_override_prioritization
131
- # Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
132
- # prices automatically. EXPLICIT prioritization requires specifying priorities for
133
- # each multiplier; the one with the lowest priority value will be prioritized
134
- # first.
135
- #
136
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::MultiplierOverridePrioritization, nil]
137
- optional :multiplier_override_prioritization,
138
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::MultiplierOverridePrioritization }
139
-
140
- # @!attribute name
141
- #
142
- # @return [String, nil]
143
- optional :name, String
144
-
145
- # @!attribute net_payment_terms_days
146
- #
147
- # @return [Float, nil]
148
- optional :net_payment_terms_days, Float
149
-
150
- # @!attribute netsuite_sales_order_id
151
- # This field's availability is dependent on your client's configuration.
152
- #
153
- # @return [String, nil]
154
- optional :netsuite_sales_order_id, String
155
-
156
- # @!attribute prepaid_balance_threshold_configuration
157
- #
158
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration, nil]
159
- optional :prepaid_balance_threshold_configuration,
160
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration }
161
-
162
- # @!attribute priority
163
- # Priority of the contract.
164
- #
165
- # @return [Float, nil]
166
- optional :priority, Float
167
-
168
- # @!attribute professional_services
169
- # This field's availability is dependent on your client's configuration.
170
- #
171
- # @return [Array<MetronomeSDK::Models::ProService>, nil]
172
- optional :professional_services,
173
- -> {
174
- MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ProService]
175
- }
176
-
177
- # @!attribute rate_card_id
178
- #
179
- # @return [String, nil]
180
- optional :rate_card_id, String
181
-
182
- # @!attribute recurring_commits
183
- #
184
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit>, nil]
185
- optional :recurring_commits,
186
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit] }
187
-
188
- # @!attribute recurring_credits
189
- #
190
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit>, nil]
191
- optional :recurring_credits,
192
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit] }
193
-
194
- # @!attribute reseller_royalties
195
- # This field's availability is dependent on your client's configuration.
196
- #
197
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ResellerRoyalty>, nil]
198
- optional :reseller_royalties,
199
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ResellerRoyalty] }
200
-
201
- # @!attribute salesforce_opportunity_id
202
- # This field's availability is dependent on your client's configuration.
203
- #
204
- # @return [String, nil]
205
- optional :salesforce_opportunity_id, String
206
-
207
- # @!attribute scheduled_charges_on_usage_invoices
208
- # Determines which scheduled and commit charges to consolidate onto the Contract's
209
- # usage invoice. The charge's `timestamp` must match the usage invoice's
210
- # `ending_before` date for consolidation to occur. This field cannot be modified
211
- # after a Contract has been created. If this field is omitted, charges will appear
212
- # on a separate invoice from usage charges.
213
- #
214
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ScheduledChargesOnUsageInvoices, nil]
215
- optional :scheduled_charges_on_usage_invoices,
216
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ScheduledChargesOnUsageInvoices }
217
-
218
- # @!attribute spend_threshold_configuration
219
- #
220
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration, nil]
221
- optional :spend_threshold_configuration,
222
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration }
223
-
224
- # @!attribute subscriptions
225
- # List of subscriptions on the contract.
226
- #
227
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription>, nil]
228
- optional :subscriptions,
229
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription] }
230
-
231
- # @!attribute total_contract_value
232
- #
233
- # @return [Float, nil]
234
- optional :total_contract_value, Float
235
-
236
- # @!attribute uniqueness_key
237
- # Prevents the creation of duplicates. If a request to create a record is made
238
- # with a previously used uniqueness key, a new record will not be created and the
239
- # request will fail with a 409 error.
240
- #
241
- # @return [String, nil]
242
- optional :uniqueness_key, String
243
-
244
- # @!method initialize(id:, commits:, created_at:, created_by:, customer_id:, overrides:, scheduled_charges:, starting_at:, transitions:, usage_filter:, usage_statement_schedule:, archived_at: nil, credits: nil, custom_fields: nil, customer_billing_provider_configuration: nil, discounts: nil, ending_before: nil, has_more: nil, hierarchy_configuration: nil, multiplier_override_prioritization: nil, name: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, prepaid_balance_threshold_configuration: nil, priority: nil, professional_services: nil, rate_card_id: nil, recurring_commits: nil, recurring_credits: nil, reseller_royalties: nil, salesforce_opportunity_id: nil, scheduled_charges_on_usage_invoices: nil, spend_threshold_configuration: nil, subscriptions: nil, total_contract_value: nil, uniqueness_key: nil)
245
- # Some parameter documentations has been truncated, see
246
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data} for more details.
247
- #
248
- # @param id [String]
249
- #
250
- # @param commits [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit>]
251
- #
252
- # @param created_at [Time]
253
- #
254
- # @param created_by [String]
255
- #
256
- # @param customer_id [String]
257
- #
258
- # @param overrides [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override>]
259
- #
260
- # @param scheduled_charges [Array<MetronomeSDK::Models::ScheduledCharge>]
261
- #
262
- # @param starting_at [Time]
263
- #
264
- # @param transitions [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Transition>]
265
- #
266
- # @param usage_filter [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::UsageFilter>]
267
- #
268
- # @param usage_statement_schedule [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::UsageStatementSchedule]
269
- #
270
- # @param archived_at [Time]
271
- #
272
- # @param credits [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit>]
273
- #
274
- # @param custom_fields [Hash{Symbol=>String}]
275
- #
276
- # @param customer_billing_provider_configuration [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::CustomerBillingProviderConfiguration] This field's availability is dependent on your client's configuration.
277
- #
278
- # @param discounts [Array<MetronomeSDK::Models::Discount>] This field's availability is dependent on your client's configuration.
279
- #
280
- # @param ending_before [Time]
281
- #
282
- # @param has_more [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HasMore] Indicates whether there are more items than the limit for this endpoint. Use the
283
- #
284
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HierarchyConfiguration::ParentHierarchyConfiguration, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HierarchyConfiguration::ChildHierarchyConfiguration] Either a **parent** configuration with a list of children or a **child** configu
285
- #
286
- # @param multiplier_override_prioritization [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::MultiplierOverridePrioritization] Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list price
287
- #
288
- # @param name [String]
289
- #
290
- # @param net_payment_terms_days [Float]
291
- #
292
- # @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
293
- #
294
- # @param prepaid_balance_threshold_configuration [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration]
295
- #
296
- # @param priority [Float] Priority of the contract.
297
- #
298
- # @param professional_services [Array<MetronomeSDK::Models::ProService>] This field's availability is dependent on your client's configuration.
299
- #
300
- # @param rate_card_id [String]
301
- #
302
- # @param recurring_commits [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit>]
303
- #
304
- # @param recurring_credits [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit>]
305
- #
306
- # @param reseller_royalties [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ResellerRoyalty>] This field's availability is dependent on your client's configuration.
307
- #
308
- # @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
309
- #
310
- # @param scheduled_charges_on_usage_invoices [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ScheduledChargesOnUsageInvoices] Determines which scheduled and commit charges to consolidate onto the Contract's
311
- #
312
- # @param spend_threshold_configuration [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration]
313
- #
314
- # @param subscriptions [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription>] List of subscriptions on the contract.
315
- #
316
- # @param total_contract_value [Float]
317
- #
318
- # @param uniqueness_key [String] Prevents the creation of duplicates. If a request to create a record is made wit
319
-
320
- class Commit < MetronomeSDK::Internal::Type::BaseModel
321
- # @!attribute id
322
- #
323
- # @return [String]
324
- required :id, String
325
-
326
- # @!attribute product
327
- #
328
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Product]
329
- required :product, -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Product }
330
-
331
- # @!attribute type
332
- #
333
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Type]
334
- required :type, enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Type }
335
-
336
- # @!attribute access_schedule
337
- # The schedule that the customer will gain access to the credits purposed with
338
- # this commit.
339
- #
340
- # @return [MetronomeSDK::Models::ScheduleDuration, nil]
341
- optional :access_schedule, -> { MetronomeSDK::ScheduleDuration }
342
-
343
- # @!attribute applicable_contract_ids
344
- #
345
- # @return [Array<String>, nil]
346
- optional :applicable_contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
347
-
348
- # @!attribute applicable_product_ids
349
- #
350
- # @return [Array<String>, nil]
351
- optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
352
-
353
- # @!attribute applicable_product_tags
354
- #
355
- # @return [Array<String>, nil]
356
- optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
357
-
358
- # @!attribute archived_at
359
- #
360
- # @return [Time, nil]
361
- optional :archived_at, Time
362
-
363
- # @!attribute balance
364
- # The current balance of the credit or commit. This balance reflects the amount of
365
- # credit or commit that the customer has access to use at this moment - thus,
366
- # expired and upcoming credit or commit segments contribute 0 to the balance. The
367
- # balance will match the sum of all ledger entries with the exception of the case
368
- # where the sum of negative manual ledger entries exceeds the positive amount
369
- # remaining on the credit or commit - in that case, the balance will be 0. All
370
- # manual ledger entries associated with active credit or commit segments are
371
- # included in the balance, including future-dated manual ledger entries.
372
- #
373
- # @return [Float, nil]
374
- optional :balance, Float
375
-
376
- # @!attribute contract
377
- #
378
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Contract, nil]
379
- optional :contract, -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Contract }
380
-
381
- # @!attribute custom_fields
382
- #
383
- # @return [Hash{Symbol=>String}, nil]
384
- optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
385
-
386
- # @!attribute description
387
- #
388
- # @return [String, nil]
389
- optional :description, String
390
-
391
- # @!attribute hierarchy_configuration
392
- # Optional configuration for commit hierarchy access control
393
- #
394
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration, nil]
395
- optional :hierarchy_configuration,
396
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration }
397
-
398
- # @!attribute invoice_contract
399
- # The contract that this commit will be billed on.
400
- #
401
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::InvoiceContract, nil]
402
- optional :invoice_contract,
403
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::InvoiceContract }
404
-
405
- # @!attribute invoice_schedule
406
- # The schedule that the customer will be invoiced for this commit.
407
- #
408
- # @return [MetronomeSDK::Models::SchedulePointInTime, nil]
409
- optional :invoice_schedule, -> { MetronomeSDK::SchedulePointInTime }
410
-
411
- # @!attribute ledger
412
- # A list of ordered events that impact the balance of a commit. For example, an
413
- # invoice deduction or a rollover.
414
- #
415
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitRolloverLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitExpirationLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCanceledLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCreditedLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitRolloverLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitTrueupLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitManualLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitManualLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitExpirationLedgerEntry>, nil]
416
- optional :ledger,
417
- -> { MetronomeSDK::Internal::Type::ArrayOf[union: MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger] }
418
-
419
- # @!attribute name
420
- #
421
- # @return [String, nil]
422
- optional :name, String
423
-
424
- # @!attribute netsuite_sales_order_id
425
- # This field's availability is dependent on your client's configuration.
426
- #
427
- # @return [String, nil]
428
- optional :netsuite_sales_order_id, String
429
-
430
- # @!attribute priority
431
- # If multiple credits or commits are applicable, the one with the lower priority
432
- # will apply first.
433
- #
434
- # @return [Float, nil]
435
- optional :priority, Float
436
-
437
- # @!attribute rate_type
438
- #
439
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::RateType, nil]
440
- optional :rate_type,
441
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::RateType }
442
-
443
- # @!attribute rolled_over_from
444
- #
445
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::RolledOverFrom, nil]
446
- optional :rolled_over_from,
447
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::RolledOverFrom }
448
-
449
- # @!attribute rollover_fraction
450
- #
451
- # @return [Float, nil]
452
- optional :rollover_fraction, Float
453
-
454
- # @!attribute salesforce_opportunity_id
455
- # This field's availability is dependent on your client's configuration.
456
- #
457
- # @return [String, nil]
458
- optional :salesforce_opportunity_id, String
459
-
460
- # @!attribute specifiers
461
- # List of filters that determine what kind of customer usage draws down a commit
462
- # or credit. A customer's usage needs to meet the condition of at least one of the
463
- # specifiers to contribute to a commit's or credit's drawdown.
464
- #
465
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Specifier>, nil]
466
- optional :specifiers,
467
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Specifier] }
468
-
469
- # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, archived_at: nil, balance: nil, contract: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_contract: nil, invoice_schedule: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, rolled_over_from: nil, rollover_fraction: nil, salesforce_opportunity_id: nil, specifiers: nil)
470
- # Some parameter documentations has been truncated, see
471
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit} for more
472
- # details.
473
- #
474
- # @param id [String]
475
- #
476
- # @param product [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Product]
477
- #
478
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Type]
479
- #
480
- # @param access_schedule [MetronomeSDK::Models::ScheduleDuration] The schedule that the customer will gain access to the credits purposed with thi
481
- #
482
- # @param applicable_contract_ids [Array<String>]
483
- #
484
- # @param applicable_product_ids [Array<String>]
485
- #
486
- # @param applicable_product_tags [Array<String>]
487
- #
488
- # @param archived_at [Time]
489
- #
490
- # @param balance [Float] The current balance of the credit or commit. This balance reflects the amount of
491
- #
492
- # @param contract [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Contract]
493
- #
494
- # @param custom_fields [Hash{Symbol=>String}]
495
- #
496
- # @param description [String]
497
- #
498
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration] Optional configuration for commit hierarchy access control
499
- #
500
- # @param invoice_contract [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::InvoiceContract] The contract that this commit will be billed on.
501
- #
502
- # @param invoice_schedule [MetronomeSDK::Models::SchedulePointInTime] The schedule that the customer will be invoiced for this commit.
503
- #
504
- # @param ledger [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitRolloverLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitExpirationLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCanceledLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCreditedLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitRolloverLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitTrueupLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitManualLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitManualLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitExpirationLedgerEntry>] A list of ordered events that impact the balance of a commit. For example, an in
505
- #
506
- # @param name [String]
507
- #
508
- # @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
509
- #
510
- # @param priority [Float] If multiple credits or commits are applicable, the one with the lower priority w
511
- #
512
- # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::RateType]
513
- #
514
- # @param rolled_over_from [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::RolledOverFrom]
515
- #
516
- # @param rollover_fraction [Float]
517
- #
518
- # @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
519
- #
520
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
521
-
522
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit#product
523
- class Product < MetronomeSDK::Internal::Type::BaseModel
524
- # @!attribute id
525
- #
526
- # @return [String]
527
- required :id, String
528
-
529
- # @!attribute name
530
- #
531
- # @return [String]
532
- required :name, String
533
-
534
- # @!method initialize(id:, name:)
535
- # @param id [String]
536
- # @param name [String]
537
- end
538
-
539
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit#type
540
- module Type
541
- extend MetronomeSDK::Internal::Type::Enum
542
-
543
- PREPAID = :PREPAID
544
- POSTPAID = :POSTPAID
545
-
546
- # @!method self.values
547
- # @return [Array<Symbol>]
548
- end
549
-
550
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit#contract
551
- class Contract < MetronomeSDK::Internal::Type::BaseModel
552
- # @!attribute id
553
- #
554
- # @return [String]
555
- required :id, String
556
-
557
- # @!method initialize(id:)
558
- # @param id [String]
559
- end
560
-
561
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit#hierarchy_configuration
562
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
563
- # @!attribute child_access
564
- #
565
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
566
- required :child_access,
567
- union: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess }
568
-
569
- # @!method initialize(child_access:)
570
- # Optional configuration for commit hierarchy access control
571
- #
572
- # @param child_access [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
573
-
574
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration#child_access
575
- module ChildAccess
576
- extend MetronomeSDK::Internal::Type::Union
577
-
578
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll }
579
-
580
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone }
581
-
582
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs }
583
-
584
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
585
- # @!attribute type
586
- #
587
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
588
- required :type,
589
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type }
590
-
591
- # @!method initialize(type:)
592
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
593
-
594
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
595
- module Type
596
- extend MetronomeSDK::Internal::Type::Enum
597
-
598
- ALL = :ALL
599
-
600
- # @!method self.values
601
- # @return [Array<Symbol>]
602
- end
603
- end
604
-
605
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
606
- # @!attribute type
607
- #
608
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
609
- required :type,
610
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type }
611
-
612
- # @!method initialize(type:)
613
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
614
-
615
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
616
- module Type
617
- extend MetronomeSDK::Internal::Type::Enum
618
-
619
- NONE = :NONE
620
-
621
- # @!method self.values
622
- # @return [Array<Symbol>]
623
- end
624
- end
625
-
626
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
627
- # @!attribute contract_ids
628
- #
629
- # @return [Array<String>]
630
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
631
-
632
- # @!attribute type
633
- #
634
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
635
- required :type,
636
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type }
637
-
638
- # @!method initialize(contract_ids:, type:)
639
- # @param contract_ids [Array<String>]
640
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
641
-
642
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
643
- module Type
644
- extend MetronomeSDK::Internal::Type::Enum
645
-
646
- CONTRACT_IDS = :CONTRACT_IDS
647
-
648
- # @!method self.values
649
- # @return [Array<Symbol>]
650
- end
651
- end
652
-
653
- # @!method self.variants
654
- # @return [Array(MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
655
- end
656
- end
657
-
658
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit#invoice_contract
659
- class InvoiceContract < MetronomeSDK::Internal::Type::BaseModel
660
- # @!attribute id
661
- #
662
- # @return [String]
663
- required :id, String
664
-
665
- # @!method initialize(id:)
666
- # The contract that this commit will be billed on.
667
- #
668
- # @param id [String]
669
- end
670
-
671
- module Ledger
672
- extend MetronomeSDK::Internal::Type::Union
673
-
674
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry }
675
-
676
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry }
677
-
678
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitRolloverLedgerEntry }
679
-
680
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitExpirationLedgerEntry }
681
-
682
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCanceledLedgerEntry }
683
-
684
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCreditedLedgerEntry }
685
-
686
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry }
687
-
688
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry }
689
-
690
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry }
691
-
692
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitRolloverLedgerEntry }
693
-
694
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitTrueupLedgerEntry }
695
-
696
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitManualLedgerEntry }
697
-
698
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitManualLedgerEntry }
699
-
700
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitExpirationLedgerEntry }
701
-
702
- class PrepaidCommitSegmentStartLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
703
- # @!attribute amount
704
- #
705
- # @return [Float]
706
- required :amount, Float
707
-
708
- # @!attribute segment_id
709
- #
710
- # @return [String]
711
- required :segment_id, String
712
-
713
- # @!attribute timestamp
714
- #
715
- # @return [Time]
716
- required :timestamp, Time
717
-
718
- # @!attribute type
719
- #
720
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry::Type]
721
- required :type,
722
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry::Type }
723
-
724
- # @!method initialize(amount:, segment_id:, timestamp:, type:)
725
- # @param amount [Float]
726
- # @param segment_id [String]
727
- # @param timestamp [Time]
728
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry::Type]
729
-
730
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry#type
731
- module Type
732
- extend MetronomeSDK::Internal::Type::Enum
733
-
734
- PREPAID_COMMIT_SEGMENT_START = :PREPAID_COMMIT_SEGMENT_START
735
-
736
- # @!method self.values
737
- # @return [Array<Symbol>]
738
- end
739
- end
740
-
741
- class PrepaidCommitAutomatedInvoiceDeductionLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
742
- # @!attribute amount
743
- #
744
- # @return [Float]
745
- required :amount, Float
746
-
747
- # @!attribute invoice_id
748
- #
749
- # @return [String]
750
- required :invoice_id, String
751
-
752
- # @!attribute segment_id
753
- #
754
- # @return [String]
755
- required :segment_id, String
756
-
757
- # @!attribute timestamp
758
- #
759
- # @return [Time]
760
- required :timestamp, Time
761
-
762
- # @!attribute type
763
- #
764
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry::Type]
765
- required :type,
766
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry::Type }
767
-
768
- # @!attribute contract_id
769
- #
770
- # @return [String, nil]
771
- optional :contract_id, String
772
-
773
- # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
774
- # @param amount [Float]
775
- # @param invoice_id [String]
776
- # @param segment_id [String]
777
- # @param timestamp [Time]
778
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry::Type]
779
- # @param contract_id [String]
780
-
781
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry#type
782
- module Type
783
- extend MetronomeSDK::Internal::Type::Enum
784
-
785
- PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION = :PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION
786
-
787
- # @!method self.values
788
- # @return [Array<Symbol>]
789
- end
790
- end
791
-
792
- class PrepaidCommitRolloverLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
793
- # @!attribute amount
794
- #
795
- # @return [Float]
796
- required :amount, Float
797
-
798
- # @!attribute new_contract_id
799
- #
800
- # @return [String]
801
- required :new_contract_id, String
802
-
803
- # @!attribute segment_id
804
- #
805
- # @return [String]
806
- required :segment_id, String
807
-
808
- # @!attribute timestamp
809
- #
810
- # @return [Time]
811
- required :timestamp, Time
812
-
813
- # @!attribute type
814
- #
815
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitRolloverLedgerEntry::Type]
816
- required :type,
817
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitRolloverLedgerEntry::Type }
818
-
819
- # @!method initialize(amount:, new_contract_id:, segment_id:, timestamp:, type:)
820
- # @param amount [Float]
821
- # @param new_contract_id [String]
822
- # @param segment_id [String]
823
- # @param timestamp [Time]
824
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitRolloverLedgerEntry::Type]
825
-
826
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitRolloverLedgerEntry#type
827
- module Type
828
- extend MetronomeSDK::Internal::Type::Enum
829
-
830
- PREPAID_COMMIT_ROLLOVER = :PREPAID_COMMIT_ROLLOVER
831
-
832
- # @!method self.values
833
- # @return [Array<Symbol>]
834
- end
835
- end
836
-
837
- class PrepaidCommitExpirationLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
838
- # @!attribute amount
839
- #
840
- # @return [Float]
841
- required :amount, Float
842
-
843
- # @!attribute segment_id
844
- #
845
- # @return [String]
846
- required :segment_id, String
847
-
848
- # @!attribute timestamp
849
- #
850
- # @return [Time]
851
- required :timestamp, Time
852
-
853
- # @!attribute type
854
- #
855
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitExpirationLedgerEntry::Type]
856
- required :type,
857
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitExpirationLedgerEntry::Type }
858
-
859
- # @!method initialize(amount:, segment_id:, timestamp:, type:)
860
- # @param amount [Float]
861
- # @param segment_id [String]
862
- # @param timestamp [Time]
863
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitExpirationLedgerEntry::Type]
864
-
865
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitExpirationLedgerEntry#type
866
- module Type
867
- extend MetronomeSDK::Internal::Type::Enum
868
-
869
- PREPAID_COMMIT_EXPIRATION = :PREPAID_COMMIT_EXPIRATION
870
-
871
- # @!method self.values
872
- # @return [Array<Symbol>]
873
- end
874
- end
875
-
876
- class PrepaidCommitCanceledLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
877
- # @!attribute amount
878
- #
879
- # @return [Float]
880
- required :amount, Float
881
-
882
- # @!attribute invoice_id
883
- #
884
- # @return [String]
885
- required :invoice_id, String
886
-
887
- # @!attribute segment_id
888
- #
889
- # @return [String]
890
- required :segment_id, String
891
-
892
- # @!attribute timestamp
893
- #
894
- # @return [Time]
895
- required :timestamp, Time
896
-
897
- # @!attribute type
898
- #
899
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCanceledLedgerEntry::Type]
900
- required :type,
901
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCanceledLedgerEntry::Type }
902
-
903
- # @!attribute contract_id
904
- #
905
- # @return [String, nil]
906
- optional :contract_id, String
907
-
908
- # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
909
- # @param amount [Float]
910
- # @param invoice_id [String]
911
- # @param segment_id [String]
912
- # @param timestamp [Time]
913
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCanceledLedgerEntry::Type]
914
- # @param contract_id [String]
915
-
916
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCanceledLedgerEntry#type
917
- module Type
918
- extend MetronomeSDK::Internal::Type::Enum
919
-
920
- PREPAID_COMMIT_CANCELED = :PREPAID_COMMIT_CANCELED
921
-
922
- # @!method self.values
923
- # @return [Array<Symbol>]
924
- end
925
- end
926
-
927
- class PrepaidCommitCreditedLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
928
- # @!attribute amount
929
- #
930
- # @return [Float]
931
- required :amount, Float
932
-
933
- # @!attribute invoice_id
934
- #
935
- # @return [String]
936
- required :invoice_id, String
937
-
938
- # @!attribute segment_id
939
- #
940
- # @return [String]
941
- required :segment_id, String
942
-
943
- # @!attribute timestamp
944
- #
945
- # @return [Time]
946
- required :timestamp, Time
947
-
948
- # @!attribute type
949
- #
950
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCreditedLedgerEntry::Type]
951
- required :type,
952
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCreditedLedgerEntry::Type }
953
-
954
- # @!attribute contract_id
955
- #
956
- # @return [String, nil]
957
- optional :contract_id, String
958
-
959
- # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
960
- # @param amount [Float]
961
- # @param invoice_id [String]
962
- # @param segment_id [String]
963
- # @param timestamp [Time]
964
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCreditedLedgerEntry::Type]
965
- # @param contract_id [String]
966
-
967
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCreditedLedgerEntry#type
968
- module Type
969
- extend MetronomeSDK::Internal::Type::Enum
970
-
971
- PREPAID_COMMIT_CREDITED = :PREPAID_COMMIT_CREDITED
972
-
973
- # @!method self.values
974
- # @return [Array<Symbol>]
975
- end
976
- end
977
-
978
- class PrepaidCommitSeatBasedAdjustmentLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
979
- # @!attribute amount
980
- #
981
- # @return [Float]
982
- required :amount, Float
983
-
984
- # @!attribute segment_id
985
- #
986
- # @return [String]
987
- required :segment_id, String
988
-
989
- # @!attribute timestamp
990
- #
991
- # @return [Time]
992
- required :timestamp, Time
993
-
994
- # @!attribute type
995
- #
996
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry::Type]
997
- required :type,
998
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry::Type }
999
-
1000
- # @!method initialize(amount:, segment_id:, timestamp:, type:)
1001
- # @param amount [Float]
1002
- # @param segment_id [String]
1003
- # @param timestamp [Time]
1004
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry::Type]
1005
-
1006
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry#type
1007
- module Type
1008
- extend MetronomeSDK::Internal::Type::Enum
1009
-
1010
- PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT = :PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT
1011
-
1012
- # @!method self.values
1013
- # @return [Array<Symbol>]
1014
- end
1015
- end
1016
-
1017
- class PostpaidCommitInitialBalanceLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
1018
- # @!attribute amount
1019
- #
1020
- # @return [Float]
1021
- required :amount, Float
1022
-
1023
- # @!attribute timestamp
1024
- #
1025
- # @return [Time]
1026
- required :timestamp, Time
1027
-
1028
- # @!attribute type
1029
- #
1030
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry::Type]
1031
- required :type,
1032
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry::Type }
1033
-
1034
- # @!method initialize(amount:, timestamp:, type:)
1035
- # @param amount [Float]
1036
- # @param timestamp [Time]
1037
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry::Type]
1038
-
1039
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry#type
1040
- module Type
1041
- extend MetronomeSDK::Internal::Type::Enum
1042
-
1043
- POSTPAID_COMMIT_INITIAL_BALANCE = :POSTPAID_COMMIT_INITIAL_BALANCE
1044
-
1045
- # @!method self.values
1046
- # @return [Array<Symbol>]
1047
- end
1048
- end
1049
-
1050
- class PostpaidCommitAutomatedInvoiceDeductionLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
1051
- # @!attribute amount
1052
- #
1053
- # @return [Float]
1054
- required :amount, Float
1055
-
1056
- # @!attribute invoice_id
1057
- #
1058
- # @return [String]
1059
- required :invoice_id, String
1060
-
1061
- # @!attribute segment_id
1062
- #
1063
- # @return [String]
1064
- required :segment_id, String
1065
-
1066
- # @!attribute timestamp
1067
- #
1068
- # @return [Time]
1069
- required :timestamp, Time
1070
-
1071
- # @!attribute type
1072
- #
1073
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry::Type]
1074
- required :type,
1075
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry::Type }
1076
-
1077
- # @!attribute contract_id
1078
- #
1079
- # @return [String, nil]
1080
- optional :contract_id, String
1081
-
1082
- # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
1083
- # @param amount [Float]
1084
- # @param invoice_id [String]
1085
- # @param segment_id [String]
1086
- # @param timestamp [Time]
1087
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry::Type]
1088
- # @param contract_id [String]
1089
-
1090
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry#type
1091
- module Type
1092
- extend MetronomeSDK::Internal::Type::Enum
1093
-
1094
- POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION = :POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION
1095
-
1096
- # @!method self.values
1097
- # @return [Array<Symbol>]
1098
- end
1099
- end
1100
-
1101
- class PostpaidCommitRolloverLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
1102
- # @!attribute amount
1103
- #
1104
- # @return [Float]
1105
- required :amount, Float
1106
-
1107
- # @!attribute new_contract_id
1108
- #
1109
- # @return [String]
1110
- required :new_contract_id, String
1111
-
1112
- # @!attribute segment_id
1113
- #
1114
- # @return [String]
1115
- required :segment_id, String
1116
-
1117
- # @!attribute timestamp
1118
- #
1119
- # @return [Time]
1120
- required :timestamp, Time
1121
-
1122
- # @!attribute type
1123
- #
1124
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitRolloverLedgerEntry::Type]
1125
- required :type,
1126
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitRolloverLedgerEntry::Type }
1127
-
1128
- # @!method initialize(amount:, new_contract_id:, segment_id:, timestamp:, type:)
1129
- # @param amount [Float]
1130
- # @param new_contract_id [String]
1131
- # @param segment_id [String]
1132
- # @param timestamp [Time]
1133
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitRolloverLedgerEntry::Type]
1134
-
1135
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitRolloverLedgerEntry#type
1136
- module Type
1137
- extend MetronomeSDK::Internal::Type::Enum
1138
-
1139
- POSTPAID_COMMIT_ROLLOVER = :POSTPAID_COMMIT_ROLLOVER
1140
-
1141
- # @!method self.values
1142
- # @return [Array<Symbol>]
1143
- end
1144
- end
1145
-
1146
- class PostpaidCommitTrueupLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
1147
- # @!attribute amount
1148
- #
1149
- # @return [Float]
1150
- required :amount, Float
1151
-
1152
- # @!attribute invoice_id
1153
- #
1154
- # @return [String]
1155
- required :invoice_id, String
1156
-
1157
- # @!attribute timestamp
1158
- #
1159
- # @return [Time]
1160
- required :timestamp, Time
1161
-
1162
- # @!attribute type
1163
- #
1164
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitTrueupLedgerEntry::Type]
1165
- required :type,
1166
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitTrueupLedgerEntry::Type }
1167
-
1168
- # @!attribute contract_id
1169
- #
1170
- # @return [String, nil]
1171
- optional :contract_id, String
1172
-
1173
- # @!method initialize(amount:, invoice_id:, timestamp:, type:, contract_id: nil)
1174
- # @param amount [Float]
1175
- # @param invoice_id [String]
1176
- # @param timestamp [Time]
1177
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitTrueupLedgerEntry::Type]
1178
- # @param contract_id [String]
1179
-
1180
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitTrueupLedgerEntry#type
1181
- module Type
1182
- extend MetronomeSDK::Internal::Type::Enum
1183
-
1184
- POSTPAID_COMMIT_TRUEUP = :POSTPAID_COMMIT_TRUEUP
1185
-
1186
- # @!method self.values
1187
- # @return [Array<Symbol>]
1188
- end
1189
- end
1190
-
1191
- class PrepaidCommitManualLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
1192
- # @!attribute amount
1193
- #
1194
- # @return [Float]
1195
- required :amount, Float
1196
-
1197
- # @!attribute reason
1198
- #
1199
- # @return [String]
1200
- required :reason, String
1201
-
1202
- # @!attribute timestamp
1203
- #
1204
- # @return [Time]
1205
- required :timestamp, Time
1206
-
1207
- # @!attribute type
1208
- #
1209
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitManualLedgerEntry::Type]
1210
- required :type,
1211
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitManualLedgerEntry::Type }
1212
-
1213
- # @!method initialize(amount:, reason:, timestamp:, type:)
1214
- # @param amount [Float]
1215
- # @param reason [String]
1216
- # @param timestamp [Time]
1217
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitManualLedgerEntry::Type]
1218
-
1219
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitManualLedgerEntry#type
1220
- module Type
1221
- extend MetronomeSDK::Internal::Type::Enum
1222
-
1223
- PREPAID_COMMIT_MANUAL = :PREPAID_COMMIT_MANUAL
1224
-
1225
- # @!method self.values
1226
- # @return [Array<Symbol>]
1227
- end
1228
- end
1229
-
1230
- class PostpaidCommitManualLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
1231
- # @!attribute amount
1232
- #
1233
- # @return [Float]
1234
- required :amount, Float
1235
-
1236
- # @!attribute reason
1237
- #
1238
- # @return [String]
1239
- required :reason, String
1240
-
1241
- # @!attribute timestamp
1242
- #
1243
- # @return [Time]
1244
- required :timestamp, Time
1245
-
1246
- # @!attribute type
1247
- #
1248
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitManualLedgerEntry::Type]
1249
- required :type,
1250
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitManualLedgerEntry::Type }
1251
-
1252
- # @!method initialize(amount:, reason:, timestamp:, type:)
1253
- # @param amount [Float]
1254
- # @param reason [String]
1255
- # @param timestamp [Time]
1256
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitManualLedgerEntry::Type]
1257
-
1258
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitManualLedgerEntry#type
1259
- module Type
1260
- extend MetronomeSDK::Internal::Type::Enum
1261
-
1262
- POSTPAID_COMMIT_MANUAL = :POSTPAID_COMMIT_MANUAL
1263
-
1264
- # @!method self.values
1265
- # @return [Array<Symbol>]
1266
- end
1267
- end
1268
-
1269
- class PostpaidCommitExpirationLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
1270
- # @!attribute amount
1271
- #
1272
- # @return [Float]
1273
- required :amount, Float
1274
-
1275
- # @!attribute timestamp
1276
- #
1277
- # @return [Time]
1278
- required :timestamp, Time
1279
-
1280
- # @!attribute type
1281
- #
1282
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitExpirationLedgerEntry::Type]
1283
- required :type,
1284
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitExpirationLedgerEntry::Type }
1285
-
1286
- # @!method initialize(amount:, timestamp:, type:)
1287
- # @param amount [Float]
1288
- # @param timestamp [Time]
1289
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitExpirationLedgerEntry::Type]
1290
-
1291
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitExpirationLedgerEntry#type
1292
- module Type
1293
- extend MetronomeSDK::Internal::Type::Enum
1294
-
1295
- POSTPAID_COMMIT_EXPIRATION = :POSTPAID_COMMIT_EXPIRATION
1296
-
1297
- # @!method self.values
1298
- # @return [Array<Symbol>]
1299
- end
1300
- end
1301
-
1302
- # @!method self.variants
1303
- # @return [Array(MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitRolloverLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitExpirationLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCanceledLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCreditedLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitRolloverLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitTrueupLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitManualLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitManualLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitExpirationLedgerEntry)]
1304
- end
1305
-
1306
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit#rate_type
1307
- module RateType
1308
- extend MetronomeSDK::Internal::Type::Enum
1309
-
1310
- COMMIT_RATE = :COMMIT_RATE
1311
- LIST_RATE = :LIST_RATE
1312
-
1313
- # @!method self.values
1314
- # @return [Array<Symbol>]
1315
- end
1316
-
1317
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit#rolled_over_from
1318
- class RolledOverFrom < MetronomeSDK::Internal::Type::BaseModel
1319
- # @!attribute commit_id
1320
- #
1321
- # @return [String]
1322
- required :commit_id, String
1323
-
1324
- # @!attribute contract_id
1325
- #
1326
- # @return [String]
1327
- required :contract_id, String
1328
-
1329
- # @!method initialize(commit_id:, contract_id:)
1330
- # @param commit_id [String]
1331
- # @param contract_id [String]
1332
- end
1333
-
1334
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
1335
- # @!attribute presentation_group_values
1336
- #
1337
- # @return [Hash{Symbol=>String}, nil]
1338
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1339
-
1340
- # @!attribute pricing_group_values
1341
- #
1342
- # @return [Hash{Symbol=>String}, nil]
1343
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1344
-
1345
- # @!attribute product_id
1346
- # If provided, the specifier will only apply to the product with the specified ID.
1347
- #
1348
- # @return [String, nil]
1349
- optional :product_id, String
1350
-
1351
- # @!attribute product_tags
1352
- # If provided, the specifier will only apply to products with all the specified
1353
- # tags.
1354
- #
1355
- # @return [Array<String>, nil]
1356
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1357
-
1358
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
1359
- # Some parameter documentations has been truncated, see
1360
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Specifier}
1361
- # for more details.
1362
- #
1363
- # @param presentation_group_values [Hash{Symbol=>String}]
1364
- #
1365
- # @param pricing_group_values [Hash{Symbol=>String}]
1366
- #
1367
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
1368
- #
1369
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
1370
- end
1371
- end
1372
-
1373
- class Override < MetronomeSDK::Internal::Type::BaseModel
1374
- # @!attribute id
1375
- #
1376
- # @return [String]
1377
- required :id, String
1378
-
1379
- # @!attribute starting_at
1380
- #
1381
- # @return [Time]
1382
- required :starting_at, Time
1383
-
1384
- # @!attribute applicable_product_tags
1385
- #
1386
- # @return [Array<String>, nil]
1387
- optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1388
-
1389
- # @!attribute ending_before
1390
- #
1391
- # @return [Time, nil]
1392
- optional :ending_before, Time
1393
-
1394
- # @!attribute entitled
1395
- #
1396
- # @return [Boolean, nil]
1397
- optional :entitled, MetronomeSDK::Internal::Type::Boolean
1398
-
1399
- # @!attribute is_commit_specific
1400
- #
1401
- # @return [Boolean, nil]
1402
- optional :is_commit_specific, MetronomeSDK::Internal::Type::Boolean
1403
-
1404
- # @!attribute multiplier
1405
- #
1406
- # @return [Float, nil]
1407
- optional :multiplier, Float
1408
-
1409
- # @!attribute override_specifiers
1410
- #
1411
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverrideSpecifier>, nil]
1412
- optional :override_specifiers,
1413
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverrideSpecifier] }
1414
-
1415
- # @!attribute override_tiers
1416
- #
1417
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverrideTier>, nil]
1418
- optional :override_tiers,
1419
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverrideTier] }
1420
-
1421
- # @!attribute overwrite_rate
1422
- #
1423
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverwriteRate, nil]
1424
- optional :overwrite_rate,
1425
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverwriteRate }
1426
-
1427
- # @!attribute priority
1428
- #
1429
- # @return [Float, nil]
1430
- optional :priority, Float
1431
-
1432
- # @!attribute product
1433
- #
1434
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::Product, nil]
1435
- optional :product, -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::Product }
1436
-
1437
- # @!attribute target
1438
- #
1439
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::Target, nil]
1440
- optional :target, enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::Target }
1441
-
1442
- # @!attribute type
1443
- #
1444
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::Type, nil]
1445
- optional :type, enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::Type }
1446
-
1447
- # @!method initialize(id:, starting_at:, applicable_product_tags: nil, ending_before: nil, entitled: nil, is_commit_specific: nil, multiplier: nil, override_specifiers: nil, override_tiers: nil, overwrite_rate: nil, priority: nil, product: nil, target: nil, type: nil)
1448
- # @param id [String]
1449
- # @param starting_at [Time]
1450
- # @param applicable_product_tags [Array<String>]
1451
- # @param ending_before [Time]
1452
- # @param entitled [Boolean]
1453
- # @param is_commit_specific [Boolean]
1454
- # @param multiplier [Float]
1455
- # @param override_specifiers [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverrideSpecifier>]
1456
- # @param override_tiers [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverrideTier>]
1457
- # @param overwrite_rate [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverwriteRate]
1458
- # @param priority [Float]
1459
- # @param product [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::Product]
1460
- # @param target [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::Target]
1461
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::Type]
1462
-
1463
- class OverrideSpecifier < MetronomeSDK::Internal::Type::BaseModel
1464
- # @!attribute billing_frequency
1465
- #
1466
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverrideSpecifier::BillingFrequency, nil]
1467
- optional :billing_frequency,
1468
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverrideSpecifier::BillingFrequency }
1469
-
1470
- # @!attribute commit_ids
1471
- #
1472
- # @return [Array<String>, nil]
1473
- optional :commit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1474
-
1475
- # @!attribute presentation_group_values
1476
- #
1477
- # @return [Hash{Symbol=>String, nil}, nil]
1478
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String, nil?: true]
1479
-
1480
- # @!attribute pricing_group_values
1481
- #
1482
- # @return [Hash{Symbol=>String}, nil]
1483
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1484
-
1485
- # @!attribute product_id
1486
- #
1487
- # @return [String, nil]
1488
- optional :product_id, String
1489
-
1490
- # @!attribute product_tags
1491
- #
1492
- # @return [Array<String>, nil]
1493
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1494
-
1495
- # @!attribute recurring_commit_ids
1496
- #
1497
- # @return [Array<String>, nil]
1498
- optional :recurring_commit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1499
-
1500
- # @!attribute recurring_credit_ids
1501
- #
1502
- # @return [Array<String>, nil]
1503
- optional :recurring_credit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1504
-
1505
- # @!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)
1506
- # @param billing_frequency [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverrideSpecifier::BillingFrequency]
1507
- # @param commit_ids [Array<String>]
1508
- # @param presentation_group_values [Hash{Symbol=>String, nil}]
1509
- # @param pricing_group_values [Hash{Symbol=>String}]
1510
- # @param product_id [String]
1511
- # @param product_tags [Array<String>]
1512
- # @param recurring_commit_ids [Array<String>]
1513
- # @param recurring_credit_ids [Array<String>]
1514
-
1515
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverrideSpecifier#billing_frequency
1516
- module BillingFrequency
1517
- extend MetronomeSDK::Internal::Type::Enum
1518
-
1519
- MONTHLY = :MONTHLY
1520
- QUARTERLY = :QUARTERLY
1521
- ANNUAL = :ANNUAL
1522
- WEEKLY = :WEEKLY
1523
-
1524
- # @!method self.values
1525
- # @return [Array<Symbol>]
1526
- end
1527
- end
1528
-
1529
- class OverrideTier < MetronomeSDK::Internal::Type::BaseModel
1530
- # @!attribute multiplier
1531
- #
1532
- # @return [Float]
1533
- required :multiplier, Float
1534
-
1535
- # @!attribute size
1536
- #
1537
- # @return [Float, nil]
1538
- optional :size, Float
1539
-
1540
- # @!method initialize(multiplier:, size: nil)
1541
- # @param multiplier [Float]
1542
- # @param size [Float]
1543
- end
1544
-
1545
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override#overwrite_rate
1546
- class OverwriteRate < MetronomeSDK::Internal::Type::BaseModel
1547
- # @!attribute rate_type
1548
- #
1549
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverwriteRate::RateType]
1550
- required :rate_type,
1551
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverwriteRate::RateType }
1552
-
1553
- # @!attribute credit_type
1554
- #
1555
- # @return [MetronomeSDK::Models::CreditTypeData, nil]
1556
- optional :credit_type, -> { MetronomeSDK::CreditTypeData }
1557
-
1558
- # @!attribute custom_rate
1559
- # Only set for CUSTOM rate_type. This field is interpreted by custom rate
1560
- # processors.
1561
- #
1562
- # @return [Hash{Symbol=>Object}, nil]
1563
- optional :custom_rate,
1564
- MetronomeSDK::Internal::Type::HashOf[MetronomeSDK::Internal::Type::Unknown]
1565
-
1566
- # @!attribute is_prorated
1567
- # Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
1568
- # set to true.
1569
- #
1570
- # @return [Boolean, nil]
1571
- optional :is_prorated, MetronomeSDK::Internal::Type::Boolean
1572
-
1573
- # @!attribute price
1574
- # Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
1575
- # this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
1576
- #
1577
- # @return [Float, nil]
1578
- optional :price, Float
1579
-
1580
- # @!attribute quantity
1581
- # Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
1582
- #
1583
- # @return [Float, nil]
1584
- optional :quantity, Float
1585
-
1586
- # @!attribute tiers
1587
- # Only set for TIERED rate_type.
1588
- #
1589
- # @return [Array<MetronomeSDK::Models::Tier>, nil]
1590
- optional :tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Tier] }
1591
-
1592
- # @!method initialize(rate_type:, credit_type: nil, custom_rate: nil, is_prorated: nil, price: nil, quantity: nil, tiers: nil)
1593
- # Some parameter documentations has been truncated, see
1594
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverwriteRate}
1595
- # for more details.
1596
- #
1597
- # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverwriteRate::RateType]
1598
- #
1599
- # @param credit_type [MetronomeSDK::Models::CreditTypeData]
1600
- #
1601
- # @param custom_rate [Hash{Symbol=>Object}] Only set for CUSTOM rate_type. This field is interpreted by custom rate processo
1602
- #
1603
- # @param is_prorated [Boolean] Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
1604
- #
1605
- # @param price [Float] Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type, t
1606
- #
1607
- # @param quantity [Float] Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
1608
- #
1609
- # @param tiers [Array<MetronomeSDK::Models::Tier>] Only set for TIERED rate_type.
1610
-
1611
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override::OverwriteRate#rate_type
1612
- module RateType
1613
- extend MetronomeSDK::Internal::Type::Enum
1614
-
1615
- FLAT = :FLAT
1616
- PERCENTAGE = :PERCENTAGE
1617
- SUBSCRIPTION = :SUBSCRIPTION
1618
- TIERED = :TIERED
1619
- CUSTOM = :CUSTOM
1620
-
1621
- # @!method self.values
1622
- # @return [Array<Symbol>]
1623
- end
1624
- end
1625
-
1626
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override#product
1627
- class Product < MetronomeSDK::Internal::Type::BaseModel
1628
- # @!attribute id
1629
- #
1630
- # @return [String]
1631
- required :id, String
1632
-
1633
- # @!attribute name
1634
- #
1635
- # @return [String]
1636
- required :name, String
1637
-
1638
- # @!method initialize(id:, name:)
1639
- # @param id [String]
1640
- # @param name [String]
1641
- end
1642
-
1643
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override#target
1644
- module Target
1645
- extend MetronomeSDK::Internal::Type::Enum
1646
-
1647
- COMMIT_RATE = :COMMIT_RATE
1648
- LIST_RATE = :LIST_RATE
1649
-
1650
- # @!method self.values
1651
- # @return [Array<Symbol>]
1652
- end
1653
-
1654
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Override#type
1655
- module Type
1656
- extend MetronomeSDK::Internal::Type::Enum
1657
-
1658
- OVERWRITE = :OVERWRITE
1659
- MULTIPLIER = :MULTIPLIER
1660
- TIERED = :TIERED
1661
-
1662
- # @!method self.values
1663
- # @return [Array<Symbol>]
1664
- end
1665
- end
1666
-
1667
- class Transition < MetronomeSDK::Internal::Type::BaseModel
1668
- # @!attribute from_contract_id
1669
- #
1670
- # @return [String]
1671
- required :from_contract_id, String
1672
-
1673
- # @!attribute to_contract_id
1674
- #
1675
- # @return [String]
1676
- required :to_contract_id, String
1677
-
1678
- # @!attribute type
1679
- #
1680
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Transition::Type]
1681
- required :type, enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Transition::Type }
1682
-
1683
- # @!method initialize(from_contract_id:, to_contract_id:, type:)
1684
- # @param from_contract_id [String]
1685
- # @param to_contract_id [String]
1686
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Transition::Type]
1687
-
1688
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Transition#type
1689
- module Type
1690
- extend MetronomeSDK::Internal::Type::Enum
1691
-
1692
- SUPERSEDE = :SUPERSEDE
1693
- RENEWAL = :RENEWAL
1694
-
1695
- # @!method self.values
1696
- # @return [Array<Symbol>]
1697
- end
1698
- end
1699
-
1700
- class UsageFilter < MetronomeSDK::Internal::Type::BaseModel
1701
- # @!attribute group_key
1702
- #
1703
- # @return [String]
1704
- required :group_key, String
1705
-
1706
- # @!attribute group_values
1707
- #
1708
- # @return [Array<String>]
1709
- required :group_values, MetronomeSDK::Internal::Type::ArrayOf[String]
1710
-
1711
- # @!attribute starting_at
1712
- # This will match contract starting_at value if usage filter is active from the
1713
- # beginning of the contract.
1714
- #
1715
- # @return [Time]
1716
- required :starting_at, Time
1717
-
1718
- # @!attribute ending_before
1719
- # This will match contract ending_before value if usage filter is active until the
1720
- # end of the contract. It will be undefined if the contract is open-ended.
1721
- #
1722
- # @return [Time, nil]
1723
- optional :ending_before, Time
1724
-
1725
- # @!method initialize(group_key:, group_values:, starting_at:, ending_before: nil)
1726
- # Some parameter documentations has been truncated, see
1727
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::UsageFilter} for more
1728
- # details.
1729
- #
1730
- # @param group_key [String]
1731
- #
1732
- # @param group_values [Array<String>]
1733
- #
1734
- # @param starting_at [Time] This will match contract starting_at value if usage filter is active from the be
1735
- #
1736
- # @param ending_before [Time] This will match contract ending_before value if usage filter is active until the
1737
- end
1738
-
1739
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data#usage_statement_schedule
1740
- class UsageStatementSchedule < MetronomeSDK::Internal::Type::BaseModel
1741
- # @!attribute billing_anchor_date
1742
- # Contract usage statements follow a selected cadence based on this date.
1743
- #
1744
- # @return [Time]
1745
- required :billing_anchor_date, Time
1746
-
1747
- # @!attribute frequency
1748
- #
1749
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::UsageStatementSchedule::Frequency]
1750
- required :frequency,
1751
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::UsageStatementSchedule::Frequency }
1752
-
1753
- # @!method initialize(billing_anchor_date:, frequency:)
1754
- # @param billing_anchor_date [Time] Contract usage statements follow a selected cadence based on this date.
1755
- #
1756
- # @param frequency [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::UsageStatementSchedule::Frequency]
1757
-
1758
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::UsageStatementSchedule#frequency
1759
- module Frequency
1760
- extend MetronomeSDK::Internal::Type::Enum
1761
-
1762
- MONTHLY = :MONTHLY
1763
- QUARTERLY = :QUARTERLY
1764
- ANNUAL = :ANNUAL
1765
- WEEKLY = :WEEKLY
1766
-
1767
- # @!method self.values
1768
- # @return [Array<Symbol>]
1769
- end
1770
- end
1771
-
1772
- class Credit < MetronomeSDK::Internal::Type::BaseModel
1773
- # @!attribute id
1774
- #
1775
- # @return [String]
1776
- required :id, String
1777
-
1778
- # @!attribute product
1779
- #
1780
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Product]
1781
- required :product, -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Product }
1782
-
1783
- # @!attribute type
1784
- #
1785
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Type]
1786
- required :type, enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Type }
1787
-
1788
- # @!attribute access_schedule
1789
- # The schedule that the customer will gain access to the credits.
1790
- #
1791
- # @return [MetronomeSDK::Models::ScheduleDuration, nil]
1792
- optional :access_schedule, -> { MetronomeSDK::ScheduleDuration }
1793
-
1794
- # @!attribute applicable_contract_ids
1795
- #
1796
- # @return [Array<String>, nil]
1797
- optional :applicable_contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1798
-
1799
- # @!attribute applicable_product_ids
1800
- #
1801
- # @return [Array<String>, nil]
1802
- optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1803
-
1804
- # @!attribute applicable_product_tags
1805
- #
1806
- # @return [Array<String>, nil]
1807
- optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1808
-
1809
- # @!attribute balance
1810
- # The current balance of the credit or commit. This balance reflects the amount of
1811
- # credit or commit that the customer has access to use at this moment - thus,
1812
- # expired and upcoming credit or commit segments contribute 0 to the balance. The
1813
- # balance will match the sum of all ledger entries with the exception of the case
1814
- # where the sum of negative manual ledger entries exceeds the positive amount
1815
- # remaining on the credit or commit - in that case, the balance will be 0. All
1816
- # manual ledger entries associated with active credit or commit segments are
1817
- # included in the balance, including future-dated manual ledger entries.
1818
- #
1819
- # @return [Float, nil]
1820
- optional :balance, Float
1821
-
1822
- # @!attribute contract
1823
- #
1824
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Contract, nil]
1825
- optional :contract, -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Contract }
1826
-
1827
- # @!attribute custom_fields
1828
- #
1829
- # @return [Hash{Symbol=>String}, nil]
1830
- optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
1831
-
1832
- # @!attribute description
1833
- #
1834
- # @return [String, nil]
1835
- optional :description, String
1836
-
1837
- # @!attribute hierarchy_configuration
1838
- # Optional configuration for credit hierarchy access control
1839
- #
1840
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration, nil]
1841
- optional :hierarchy_configuration,
1842
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration }
1843
-
1844
- # @!attribute ledger
1845
- # A list of ordered events that impact the balance of a credit. For example, an
1846
- # invoice deduction or an expiration.
1847
- #
1848
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditSegmentStartLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditExpirationLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCanceledLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCreditedLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditManualLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry>, nil]
1849
- optional :ledger,
1850
- -> { MetronomeSDK::Internal::Type::ArrayOf[union: MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger] }
1851
-
1852
- # @!attribute name
1853
- #
1854
- # @return [String, nil]
1855
- optional :name, String
1856
-
1857
- # @!attribute netsuite_sales_order_id
1858
- # This field's availability is dependent on your client's configuration.
1859
- #
1860
- # @return [String, nil]
1861
- optional :netsuite_sales_order_id, String
1862
-
1863
- # @!attribute priority
1864
- # If multiple credits or commits are applicable, the one with the lower priority
1865
- # will apply first.
1866
- #
1867
- # @return [Float, nil]
1868
- optional :priority, Float
1869
-
1870
- # @!attribute salesforce_opportunity_id
1871
- # This field's availability is dependent on your client's configuration.
1872
- #
1873
- # @return [String, nil]
1874
- optional :salesforce_opportunity_id, String
1875
-
1876
- # @!attribute specifiers
1877
- # List of filters that determine what kind of customer usage draws down a commit
1878
- # or credit. A customer's usage needs to meet the condition of at least one of the
1879
- # specifiers to contribute to a commit's or credit's drawdown.
1880
- #
1881
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Specifier>, nil]
1882
- optional :specifiers,
1883
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Specifier] }
1884
-
1885
- # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, balance: nil, contract: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, salesforce_opportunity_id: nil, specifiers: nil)
1886
- # Some parameter documentations has been truncated, see
1887
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit} for more
1888
- # details.
1889
- #
1890
- # @param id [String]
1891
- #
1892
- # @param product [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Product]
1893
- #
1894
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Type]
1895
- #
1896
- # @param access_schedule [MetronomeSDK::Models::ScheduleDuration] The schedule that the customer will gain access to the credits.
1897
- #
1898
- # @param applicable_contract_ids [Array<String>]
1899
- #
1900
- # @param applicable_product_ids [Array<String>]
1901
- #
1902
- # @param applicable_product_tags [Array<String>]
1903
- #
1904
- # @param balance [Float] The current balance of the credit or commit. This balance reflects the amount of
1905
- #
1906
- # @param contract [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Contract]
1907
- #
1908
- # @param custom_fields [Hash{Symbol=>String}]
1909
- #
1910
- # @param description [String]
1911
- #
1912
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration] Optional configuration for credit hierarchy access control
1913
- #
1914
- # @param ledger [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditSegmentStartLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditExpirationLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCanceledLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCreditedLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditManualLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry>] A list of ordered events that impact the balance of a credit. For example, an in
1915
- #
1916
- # @param name [String]
1917
- #
1918
- # @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
1919
- #
1920
- # @param priority [Float] If multiple credits or commits are applicable, the one with the lower priority w
1921
- #
1922
- # @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
1923
- #
1924
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
1925
-
1926
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit#product
1927
- class Product < MetronomeSDK::Internal::Type::BaseModel
1928
- # @!attribute id
1929
- #
1930
- # @return [String]
1931
- required :id, String
1932
-
1933
- # @!attribute name
1934
- #
1935
- # @return [String]
1936
- required :name, String
1937
-
1938
- # @!method initialize(id:, name:)
1939
- # @param id [String]
1940
- # @param name [String]
1941
- end
1942
-
1943
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit#type
1944
- module Type
1945
- extend MetronomeSDK::Internal::Type::Enum
1946
-
1947
- CREDIT = :CREDIT
1948
-
1949
- # @!method self.values
1950
- # @return [Array<Symbol>]
1951
- end
1952
-
1953
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit#contract
1954
- class Contract < MetronomeSDK::Internal::Type::BaseModel
1955
- # @!attribute id
1956
- #
1957
- # @return [String]
1958
- required :id, String
1959
-
1960
- # @!method initialize(id:)
1961
- # @param id [String]
1962
- end
1963
-
1964
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit#hierarchy_configuration
1965
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
1966
- # @!attribute child_access
1967
- #
1968
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
1969
- required :child_access,
1970
- union: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess }
1971
-
1972
- # @!method initialize(child_access:)
1973
- # Optional configuration for credit hierarchy access control
1974
- #
1975
- # @param child_access [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
1976
-
1977
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration#child_access
1978
- module ChildAccess
1979
- extend MetronomeSDK::Internal::Type::Union
1980
-
1981
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll }
1982
-
1983
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone }
1984
-
1985
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs }
1986
-
1987
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
1988
- # @!attribute type
1989
- #
1990
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
1991
- required :type,
1992
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type }
1993
-
1994
- # @!method initialize(type:)
1995
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
1996
-
1997
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
1998
- module Type
1999
- extend MetronomeSDK::Internal::Type::Enum
2000
-
2001
- ALL = :ALL
2002
-
2003
- # @!method self.values
2004
- # @return [Array<Symbol>]
2005
- end
2006
- end
2007
-
2008
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
2009
- # @!attribute type
2010
- #
2011
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
2012
- required :type,
2013
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type }
2014
-
2015
- # @!method initialize(type:)
2016
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
2017
-
2018
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
2019
- module Type
2020
- extend MetronomeSDK::Internal::Type::Enum
2021
-
2022
- NONE = :NONE
2023
-
2024
- # @!method self.values
2025
- # @return [Array<Symbol>]
2026
- end
2027
- end
2028
-
2029
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
2030
- # @!attribute contract_ids
2031
- #
2032
- # @return [Array<String>]
2033
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
2034
-
2035
- # @!attribute type
2036
- #
2037
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
2038
- required :type,
2039
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type }
2040
-
2041
- # @!method initialize(contract_ids:, type:)
2042
- # @param contract_ids [Array<String>]
2043
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
2044
-
2045
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
2046
- module Type
2047
- extend MetronomeSDK::Internal::Type::Enum
2048
-
2049
- CONTRACT_IDS = :CONTRACT_IDS
2050
-
2051
- # @!method self.values
2052
- # @return [Array<Symbol>]
2053
- end
2054
- end
2055
-
2056
- # @!method self.variants
2057
- # @return [Array(MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
2058
- end
2059
- end
2060
-
2061
- module Ledger
2062
- extend MetronomeSDK::Internal::Type::Union
2063
-
2064
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditSegmentStartLedgerEntry }
2065
-
2066
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry }
2067
-
2068
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditExpirationLedgerEntry }
2069
-
2070
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCanceledLedgerEntry }
2071
-
2072
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCreditedLedgerEntry }
2073
-
2074
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditManualLedgerEntry }
2075
-
2076
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry }
2077
-
2078
- class CreditSegmentStartLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
2079
- # @!attribute amount
2080
- #
2081
- # @return [Float]
2082
- required :amount, Float
2083
-
2084
- # @!attribute segment_id
2085
- #
2086
- # @return [String]
2087
- required :segment_id, String
2088
-
2089
- # @!attribute timestamp
2090
- #
2091
- # @return [Time]
2092
- required :timestamp, Time
2093
-
2094
- # @!attribute type
2095
- #
2096
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditSegmentStartLedgerEntry::Type]
2097
- required :type,
2098
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditSegmentStartLedgerEntry::Type }
2099
-
2100
- # @!method initialize(amount:, segment_id:, timestamp:, type:)
2101
- # @param amount [Float]
2102
- # @param segment_id [String]
2103
- # @param timestamp [Time]
2104
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditSegmentStartLedgerEntry::Type]
2105
-
2106
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditSegmentStartLedgerEntry#type
2107
- module Type
2108
- extend MetronomeSDK::Internal::Type::Enum
2109
-
2110
- CREDIT_SEGMENT_START = :CREDIT_SEGMENT_START
2111
-
2112
- # @!method self.values
2113
- # @return [Array<Symbol>]
2114
- end
2115
- end
2116
-
2117
- class CreditAutomatedInvoiceDeductionLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
2118
- # @!attribute amount
2119
- #
2120
- # @return [Float]
2121
- required :amount, Float
2122
-
2123
- # @!attribute invoice_id
2124
- #
2125
- # @return [String]
2126
- required :invoice_id, String
2127
-
2128
- # @!attribute segment_id
2129
- #
2130
- # @return [String]
2131
- required :segment_id, String
2132
-
2133
- # @!attribute timestamp
2134
- #
2135
- # @return [Time]
2136
- required :timestamp, Time
2137
-
2138
- # @!attribute type
2139
- #
2140
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry::Type]
2141
- required :type,
2142
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry::Type }
2143
-
2144
- # @!attribute contract_id
2145
- #
2146
- # @return [String, nil]
2147
- optional :contract_id, String
2148
-
2149
- # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
2150
- # @param amount [Float]
2151
- # @param invoice_id [String]
2152
- # @param segment_id [String]
2153
- # @param timestamp [Time]
2154
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry::Type]
2155
- # @param contract_id [String]
2156
-
2157
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry#type
2158
- module Type
2159
- extend MetronomeSDK::Internal::Type::Enum
2160
-
2161
- CREDIT_AUTOMATED_INVOICE_DEDUCTION = :CREDIT_AUTOMATED_INVOICE_DEDUCTION
2162
-
2163
- # @!method self.values
2164
- # @return [Array<Symbol>]
2165
- end
2166
- end
2167
-
2168
- class CreditExpirationLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
2169
- # @!attribute amount
2170
- #
2171
- # @return [Float]
2172
- required :amount, Float
2173
-
2174
- # @!attribute segment_id
2175
- #
2176
- # @return [String]
2177
- required :segment_id, String
2178
-
2179
- # @!attribute timestamp
2180
- #
2181
- # @return [Time]
2182
- required :timestamp, Time
2183
-
2184
- # @!attribute type
2185
- #
2186
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditExpirationLedgerEntry::Type]
2187
- required :type,
2188
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditExpirationLedgerEntry::Type }
2189
-
2190
- # @!method initialize(amount:, segment_id:, timestamp:, type:)
2191
- # @param amount [Float]
2192
- # @param segment_id [String]
2193
- # @param timestamp [Time]
2194
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditExpirationLedgerEntry::Type]
2195
-
2196
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditExpirationLedgerEntry#type
2197
- module Type
2198
- extend MetronomeSDK::Internal::Type::Enum
2199
-
2200
- CREDIT_EXPIRATION = :CREDIT_EXPIRATION
2201
-
2202
- # @!method self.values
2203
- # @return [Array<Symbol>]
2204
- end
2205
- end
2206
-
2207
- class CreditCanceledLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
2208
- # @!attribute amount
2209
- #
2210
- # @return [Float]
2211
- required :amount, Float
2212
-
2213
- # @!attribute invoice_id
2214
- #
2215
- # @return [String]
2216
- required :invoice_id, String
2217
-
2218
- # @!attribute segment_id
2219
- #
2220
- # @return [String]
2221
- required :segment_id, String
2222
-
2223
- # @!attribute timestamp
2224
- #
2225
- # @return [Time]
2226
- required :timestamp, Time
2227
-
2228
- # @!attribute type
2229
- #
2230
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCanceledLedgerEntry::Type]
2231
- required :type,
2232
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCanceledLedgerEntry::Type }
2233
-
2234
- # @!attribute contract_id
2235
- #
2236
- # @return [String, nil]
2237
- optional :contract_id, String
2238
-
2239
- # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
2240
- # @param amount [Float]
2241
- # @param invoice_id [String]
2242
- # @param segment_id [String]
2243
- # @param timestamp [Time]
2244
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCanceledLedgerEntry::Type]
2245
- # @param contract_id [String]
2246
-
2247
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCanceledLedgerEntry#type
2248
- module Type
2249
- extend MetronomeSDK::Internal::Type::Enum
2250
-
2251
- CREDIT_CANCELED = :CREDIT_CANCELED
2252
-
2253
- # @!method self.values
2254
- # @return [Array<Symbol>]
2255
- end
2256
- end
2257
-
2258
- class CreditCreditedLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
2259
- # @!attribute amount
2260
- #
2261
- # @return [Float]
2262
- required :amount, Float
2263
-
2264
- # @!attribute invoice_id
2265
- #
2266
- # @return [String]
2267
- required :invoice_id, String
2268
-
2269
- # @!attribute segment_id
2270
- #
2271
- # @return [String]
2272
- required :segment_id, String
2273
-
2274
- # @!attribute timestamp
2275
- #
2276
- # @return [Time]
2277
- required :timestamp, Time
2278
-
2279
- # @!attribute type
2280
- #
2281
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCreditedLedgerEntry::Type]
2282
- required :type,
2283
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCreditedLedgerEntry::Type }
2284
-
2285
- # @!attribute contract_id
2286
- #
2287
- # @return [String, nil]
2288
- optional :contract_id, String
2289
-
2290
- # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
2291
- # @param amount [Float]
2292
- # @param invoice_id [String]
2293
- # @param segment_id [String]
2294
- # @param timestamp [Time]
2295
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCreditedLedgerEntry::Type]
2296
- # @param contract_id [String]
2297
-
2298
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCreditedLedgerEntry#type
2299
- module Type
2300
- extend MetronomeSDK::Internal::Type::Enum
2301
-
2302
- CREDIT_CREDITED = :CREDIT_CREDITED
2303
-
2304
- # @!method self.values
2305
- # @return [Array<Symbol>]
2306
- end
2307
- end
2308
-
2309
- class CreditManualLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
2310
- # @!attribute amount
2311
- #
2312
- # @return [Float]
2313
- required :amount, Float
2314
-
2315
- # @!attribute reason
2316
- #
2317
- # @return [String]
2318
- required :reason, String
2319
-
2320
- # @!attribute timestamp
2321
- #
2322
- # @return [Time]
2323
- required :timestamp, Time
2324
-
2325
- # @!attribute type
2326
- #
2327
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditManualLedgerEntry::Type]
2328
- required :type,
2329
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditManualLedgerEntry::Type }
2330
-
2331
- # @!method initialize(amount:, reason:, timestamp:, type:)
2332
- # @param amount [Float]
2333
- # @param reason [String]
2334
- # @param timestamp [Time]
2335
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditManualLedgerEntry::Type]
2336
-
2337
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditManualLedgerEntry#type
2338
- module Type
2339
- extend MetronomeSDK::Internal::Type::Enum
2340
-
2341
- CREDIT_MANUAL = :CREDIT_MANUAL
2342
-
2343
- # @!method self.values
2344
- # @return [Array<Symbol>]
2345
- end
2346
- end
2347
-
2348
- class CreditSeatBasedAdjustmentLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
2349
- # @!attribute amount
2350
- #
2351
- # @return [Float]
2352
- required :amount, Float
2353
-
2354
- # @!attribute segment_id
2355
- #
2356
- # @return [String]
2357
- required :segment_id, String
2358
-
2359
- # @!attribute timestamp
2360
- #
2361
- # @return [Time]
2362
- required :timestamp, Time
2363
-
2364
- # @!attribute type
2365
- #
2366
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry::Type]
2367
- required :type,
2368
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry::Type }
2369
-
2370
- # @!method initialize(amount:, segment_id:, timestamp:, type:)
2371
- # @param amount [Float]
2372
- # @param segment_id [String]
2373
- # @param timestamp [Time]
2374
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry::Type]
2375
-
2376
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry#type
2377
- module Type
2378
- extend MetronomeSDK::Internal::Type::Enum
2379
-
2380
- CREDIT_SEAT_BASED_ADJUSTMENT = :CREDIT_SEAT_BASED_ADJUSTMENT
2381
-
2382
- # @!method self.values
2383
- # @return [Array<Symbol>]
2384
- end
2385
- end
2386
-
2387
- # @!method self.variants
2388
- # @return [Array(MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditSegmentStartLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditExpirationLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCanceledLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCreditedLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditManualLedgerEntry, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry)]
2389
- end
2390
-
2391
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
2392
- # @!attribute presentation_group_values
2393
- #
2394
- # @return [Hash{Symbol=>String}, nil]
2395
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
2396
-
2397
- # @!attribute pricing_group_values
2398
- #
2399
- # @return [Hash{Symbol=>String}, nil]
2400
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
2401
-
2402
- # @!attribute product_id
2403
- # If provided, the specifier will only apply to the product with the specified ID.
2404
- #
2405
- # @return [String, nil]
2406
- optional :product_id, String
2407
-
2408
- # @!attribute product_tags
2409
- # If provided, the specifier will only apply to products with all the specified
2410
- # tags.
2411
- #
2412
- # @return [Array<String>, nil]
2413
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
2414
-
2415
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
2416
- # Some parameter documentations has been truncated, see
2417
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Specifier}
2418
- # for more details.
2419
- #
2420
- # @param presentation_group_values [Hash{Symbol=>String}]
2421
- #
2422
- # @param pricing_group_values [Hash{Symbol=>String}]
2423
- #
2424
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
2425
- #
2426
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
2427
- end
2428
- end
2429
-
2430
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data#customer_billing_provider_configuration
2431
- class CustomerBillingProviderConfiguration < MetronomeSDK::Internal::Type::BaseModel
2432
- # @!attribute id
2433
- # ID of Customer's billing provider configuration.
2434
- #
2435
- # @return [String]
2436
- required :id, String
2437
-
2438
- # @!attribute billing_provider
2439
- #
2440
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::CustomerBillingProviderConfiguration::BillingProvider]
2441
- required :billing_provider,
2442
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::CustomerBillingProviderConfiguration::BillingProvider }
2443
-
2444
- # @!attribute delivery_method
2445
- #
2446
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::CustomerBillingProviderConfiguration::DeliveryMethod]
2447
- required :delivery_method,
2448
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::CustomerBillingProviderConfiguration::DeliveryMethod }
2449
-
2450
- # @!method initialize(id:, billing_provider:, delivery_method:)
2451
- # This field's availability is dependent on your client's configuration.
2452
- #
2453
- # @param id [String] ID of Customer's billing provider configuration.
2454
- #
2455
- # @param billing_provider [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::CustomerBillingProviderConfiguration::BillingProvider]
2456
- #
2457
- # @param delivery_method [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::CustomerBillingProviderConfiguration::DeliveryMethod]
2458
-
2459
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::CustomerBillingProviderConfiguration#billing_provider
2460
- module BillingProvider
2461
- extend MetronomeSDK::Internal::Type::Enum
2462
-
2463
- AWS_MARKETPLACE = :aws_marketplace
2464
- STRIPE = :stripe
2465
- NETSUITE = :netsuite
2466
- CUSTOM = :custom
2467
- AZURE_MARKETPLACE = :azure_marketplace
2468
- QUICKBOOKS_ONLINE = :quickbooks_online
2469
- WORKDAY = :workday
2470
- GCP_MARKETPLACE = :gcp_marketplace
2471
-
2472
- # @!method self.values
2473
- # @return [Array<Symbol>]
2474
- end
2475
-
2476
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::CustomerBillingProviderConfiguration#delivery_method
2477
- module DeliveryMethod
2478
- extend MetronomeSDK::Internal::Type::Enum
2479
-
2480
- DIRECT_TO_BILLING_PROVIDER = :direct_to_billing_provider
2481
- AWS_SQS = :aws_sqs
2482
- TACKLE = :tackle
2483
- AWS_SNS = :aws_sns
2484
-
2485
- # @!method self.values
2486
- # @return [Array<Symbol>]
2487
- end
2488
- end
2489
-
2490
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data#has_more
2491
- class HasMore < MetronomeSDK::Internal::Type::BaseModel
2492
- # @!attribute commits
2493
- # Whether there are more commits on this contract than the limit for this
2494
- # endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
2495
- # of commits.
2496
- #
2497
- # @return [Boolean]
2498
- required :commits, MetronomeSDK::Internal::Type::Boolean
2499
-
2500
- # @!attribute credits
2501
- # Whether there are more credits on this contract than the limit for this
2502
- # endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
2503
- # of credits.
2504
- #
2505
- # @return [Boolean]
2506
- required :credits, MetronomeSDK::Internal::Type::Boolean
2507
-
2508
- # @!method initialize(commits:, credits:)
2509
- # Some parameter documentations has been truncated, see
2510
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HasMore} for more
2511
- # details.
2512
- #
2513
- # Indicates whether there are more items than the limit for this endpoint. Use the
2514
- # respective list endpoints to get the full lists.
2515
- #
2516
- # @param commits [Boolean] Whether there are more commits on this contract than the limit for this endpoint
2517
- #
2518
- # @param credits [Boolean] Whether there are more credits on this contract than the limit for this endpoint
2519
- end
2520
-
2521
- # Either a **parent** configuration with a list of children or a **child**
2522
- # configuration with a single parent.
2523
- #
2524
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data#hierarchy_configuration
2525
- module HierarchyConfiguration
2526
- extend MetronomeSDK::Internal::Type::Union
2527
-
2528
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HierarchyConfiguration::ParentHierarchyConfiguration }
2529
-
2530
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HierarchyConfiguration::ChildHierarchyConfiguration }
2531
-
2532
- class ParentHierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
2533
- # @!attribute children
2534
- # List of contracts that belong to this parent.
2535
- #
2536
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HierarchyConfiguration::ParentHierarchyConfiguration::Child>]
2537
- required :children,
2538
- -> do
2539
- MetronomeSDK::Internal::Type::ArrayOf[
2540
- MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HierarchyConfiguration::ParentHierarchyConfiguration::Child
2541
- ]
2542
- end
2543
-
2544
- # @!method initialize(children:)
2545
- # @param children [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HierarchyConfiguration::ParentHierarchyConfiguration::Child>] List of contracts that belong to this parent.
2546
-
2547
- class Child < MetronomeSDK::Internal::Type::BaseModel
2548
- # @!attribute contract_id
2549
- #
2550
- # @return [String]
2551
- required :contract_id, String
2552
-
2553
- # @!attribute customer_id
2554
- #
2555
- # @return [String]
2556
- required :customer_id, String
2557
-
2558
- # @!method initialize(contract_id:, customer_id:)
2559
- # @param contract_id [String]
2560
- # @param customer_id [String]
2561
- end
2562
- end
2563
-
2564
- class ChildHierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
2565
- # @!attribute parent
2566
- # The single parent contract/customer for this child.
2567
- #
2568
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HierarchyConfiguration::ChildHierarchyConfiguration::Parent]
2569
- required :parent,
2570
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HierarchyConfiguration::ChildHierarchyConfiguration::Parent }
2571
-
2572
- # @!method initialize(parent:)
2573
- # @param parent [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HierarchyConfiguration::ChildHierarchyConfiguration::Parent] The single parent contract/customer for this child.
2574
-
2575
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HierarchyConfiguration::ChildHierarchyConfiguration#parent
2576
- class Parent < MetronomeSDK::Internal::Type::BaseModel
2577
- # @!attribute contract_id
2578
- #
2579
- # @return [String]
2580
- required :contract_id, String
2581
-
2582
- # @!attribute customer_id
2583
- #
2584
- # @return [String]
2585
- required :customer_id, String
2586
-
2587
- # @!method initialize(contract_id:, customer_id:)
2588
- # The single parent contract/customer for this child.
2589
- #
2590
- # @param contract_id [String]
2591
- # @param customer_id [String]
2592
- end
2593
- end
2594
-
2595
- # @!method self.variants
2596
- # @return [Array(MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HierarchyConfiguration::ParentHierarchyConfiguration, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::HierarchyConfiguration::ChildHierarchyConfiguration)]
2597
- end
2598
-
2599
- # Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
2600
- # prices automatically. EXPLICIT prioritization requires specifying priorities for
2601
- # each multiplier; the one with the lowest priority value will be prioritized
2602
- # first.
2603
- #
2604
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data#multiplier_override_prioritization
2605
- module MultiplierOverridePrioritization
2606
- extend MetronomeSDK::Internal::Type::Enum
2607
-
2608
- LOWEST_MULTIPLIER = :LOWEST_MULTIPLIER
2609
- EXPLICIT = :EXPLICIT
2610
-
2611
- # @!method self.values
2612
- # @return [Array<Symbol>]
2613
- end
2614
-
2615
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data#prepaid_balance_threshold_configuration
2616
- class PrepaidBalanceThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
2617
- # @!attribute commit
2618
- #
2619
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::Commit]
2620
- required :commit,
2621
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::Commit }
2622
-
2623
- # @!attribute is_enabled
2624
- # When set to false, the contract will not be evaluated against the
2625
- # threshold_amount. Toggling to true will result an immediate evaluation,
2626
- # regardless of prior state.
2627
- #
2628
- # @return [Boolean]
2629
- required :is_enabled, MetronomeSDK::Internal::Type::Boolean
2630
-
2631
- # @!attribute payment_gate_config
2632
- #
2633
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig]
2634
- required :payment_gate_config,
2635
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig }
2636
-
2637
- # @!attribute recharge_to_amount
2638
- # Specify the amount the balance should be recharged to.
2639
- #
2640
- # @return [Float]
2641
- required :recharge_to_amount, Float
2642
-
2643
- # @!attribute threshold_amount
2644
- # Specify the threshold amount for the contract. Each time the contract's balance
2645
- # lowers to this amount, a threshold charge will be initiated.
2646
- #
2647
- # @return [Float]
2648
- required :threshold_amount, Float
2649
-
2650
- # @!attribute custom_credit_type_id
2651
- # If provided, the threshold, recharge-to amount, and the resulting threshold
2652
- # commit amount will be in terms of this credit type instead of the fiat currency.
2653
- #
2654
- # @return [String, nil]
2655
- optional :custom_credit_type_id, String
2656
-
2657
- # @!method initialize(commit:, is_enabled:, payment_gate_config:, recharge_to_amount:, threshold_amount:, custom_credit_type_id: nil)
2658
- # Some parameter documentations has been truncated, see
2659
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration}
2660
- # for more details.
2661
- #
2662
- # @param commit [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::Commit]
2663
- #
2664
- # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
2665
- #
2666
- # @param payment_gate_config [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig]
2667
- #
2668
- # @param recharge_to_amount [Float] Specify the amount the balance should be recharged to.
2669
- #
2670
- # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's balance
2671
- #
2672
- # @param custom_credit_type_id [String] If provided, the threshold, recharge-to amount, and the resulting threshold comm
2673
-
2674
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration#commit
2675
- class Commit < MetronomeSDK::Internal::Type::BaseModel
2676
- # @!attribute product_id
2677
- # The commit product that will be used to generate the line item for commit
2678
- # payment.
2679
- #
2680
- # @return [String]
2681
- required :product_id, String
2682
-
2683
- # @!attribute applicable_product_ids
2684
- # Which products the threshold commit applies to. If applicable_product_ids,
2685
- # applicable_product_tags or specifiers are not provided, the commit applies to
2686
- # all products.
2687
- #
2688
- # @return [Array<String>, nil]
2689
- optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
2690
-
2691
- # @!attribute applicable_product_tags
2692
- # Which tags the threshold commit applies to. If applicable_product_ids,
2693
- # applicable_product_tags or specifiers are not provided, the commit applies to
2694
- # all products.
2695
- #
2696
- # @return [Array<String>, nil]
2697
- optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
2698
-
2699
- # @!attribute description
2700
- #
2701
- # @return [String, nil]
2702
- optional :description, String
2703
-
2704
- # @!attribute name
2705
- # Specify the name of the line item for the threshold charge. If left blank, it
2706
- # will default to the commit product name.
2707
- #
2708
- # @return [String, nil]
2709
- optional :name, String
2710
-
2711
- # @!attribute specifiers
2712
- # List of filters that determine what kind of customer usage draws down a commit
2713
- # or credit. A customer's usage needs to meet the condition of at least one of the
2714
- # specifiers to contribute to a commit's or credit's drawdown. This field cannot
2715
- # be used together with `applicable_product_ids` or `applicable_product_tags`.
2716
- # Instead, to target usage by product or product tag, pass those values in the
2717
- # body of `specifiers`.
2718
- #
2719
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::Commit::Specifier>, nil]
2720
- optional :specifiers,
2721
- -> do
2722
- MetronomeSDK::Internal::Type::ArrayOf[
2723
- MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::Commit::Specifier
2724
- ]
2725
- end
2726
-
2727
- # @!method initialize(product_id:, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, name: nil, specifiers: nil)
2728
- # Some parameter documentations has been truncated, see
2729
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::Commit}
2730
- # for more details.
2731
- #
2732
- # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
2733
- #
2734
- # @param applicable_product_ids [Array<String>] Which products the threshold commit applies to. If applicable_product_ids, appli
2735
- #
2736
- # @param applicable_product_tags [Array<String>] Which tags the threshold commit applies to. If applicable_product_ids, applicabl
2737
- #
2738
- # @param description [String]
2739
- #
2740
- # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
2741
- #
2742
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::Commit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
2743
-
2744
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
2745
- # @!attribute presentation_group_values
2746
- #
2747
- # @return [Hash{Symbol=>String}, nil]
2748
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
2749
-
2750
- # @!attribute pricing_group_values
2751
- #
2752
- # @return [Hash{Symbol=>String}, nil]
2753
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
2754
-
2755
- # @!attribute product_id
2756
- # If provided, the specifier will only apply to the product with the specified ID.
2757
- #
2758
- # @return [String, nil]
2759
- optional :product_id, String
2760
-
2761
- # @!attribute product_tags
2762
- # If provided, the specifier will only apply to products with all the specified
2763
- # tags.
2764
- #
2765
- # @return [Array<String>, nil]
2766
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
2767
-
2768
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
2769
- # Some parameter documentations has been truncated, see
2770
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::Commit::Specifier}
2771
- # for more details.
2772
- #
2773
- # @param presentation_group_values [Hash{Symbol=>String}]
2774
- #
2775
- # @param pricing_group_values [Hash{Symbol=>String}]
2776
- #
2777
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
2778
- #
2779
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
2780
- end
2781
- end
2782
-
2783
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration#payment_gate_config
2784
- class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
2785
- # @!attribute payment_gate_type
2786
- # Gate access to the commit balance based on successful collection of payment.
2787
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
2788
- # facilitate payment using your own payment integration. Select NONE if you do not
2789
- # wish to payment gate the commit balance.
2790
- #
2791
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType]
2792
- required :payment_gate_type,
2793
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType }
2794
-
2795
- # @!attribute precalculated_tax_config
2796
- # Only applicable if using PRECALCULATED as your tax type.
2797
- #
2798
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
2799
- optional :precalculated_tax_config,
2800
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig }
2801
-
2802
- # @!attribute stripe_config
2803
- # Only applicable if using STRIPE as your payment gateway type.
2804
- #
2805
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
2806
- optional :stripe_config,
2807
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig }
2808
-
2809
- # @!attribute tax_type
2810
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
2811
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
2812
- # will default to NONE.
2813
- #
2814
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType, nil]
2815
- optional :tax_type,
2816
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType }
2817
-
2818
- # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
2819
- # Some parameter documentations has been truncated, see
2820
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig}
2821
- # for more details.
2822
- #
2823
- # @param payment_gate_type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
2824
- #
2825
- # @param precalculated_tax_config [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
2826
- #
2827
- # @param stripe_config [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gateway type.
2828
- #
2829
- # @param tax_type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
2830
-
2831
- # Gate access to the commit balance based on successful collection of payment.
2832
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
2833
- # facilitate payment using your own payment integration. Select NONE if you do not
2834
- # wish to payment gate the commit balance.
2835
- #
2836
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig#payment_gate_type
2837
- module PaymentGateType
2838
- extend MetronomeSDK::Internal::Type::Enum
2839
-
2840
- NONE = :NONE
2841
- STRIPE = :STRIPE
2842
- EXTERNAL = :EXTERNAL
2843
-
2844
- # @!method self.values
2845
- # @return [Array<Symbol>]
2846
- end
2847
-
2848
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
2849
- class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
2850
- # @!attribute tax_amount
2851
- # Amount of tax to be applied. This should be in the same currency and
2852
- # denomination as the commit's invoice schedule
2853
- #
2854
- # @return [Float]
2855
- required :tax_amount, Float
2856
-
2857
- # @!attribute tax_name
2858
- # Name of the tax to be applied. This may be used in an invoice line item
2859
- # description.
2860
- #
2861
- # @return [String, nil]
2862
- optional :tax_name, String
2863
-
2864
- # @!method initialize(tax_amount:, tax_name: nil)
2865
- # Some parameter documentations has been truncated, see
2866
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
2867
- # for more details.
2868
- #
2869
- # Only applicable if using PRECALCULATED as your tax type.
2870
- #
2871
- # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
2872
- #
2873
- # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
2874
- end
2875
-
2876
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig#stripe_config
2877
- class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
2878
- # @!attribute payment_type
2879
- # If left blank, will default to INVOICE
2880
- #
2881
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
2882
- required :payment_type,
2883
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType }
2884
-
2885
- # @!attribute invoice_metadata
2886
- # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
2887
- # your payment type.
2888
- #
2889
- # @return [Hash{Symbol=>String}, nil]
2890
- optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
2891
-
2892
- # @!method initialize(payment_type:, invoice_metadata: nil)
2893
- # Some parameter documentations has been truncated, see
2894
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig}
2895
- # for more details.
2896
- #
2897
- # Only applicable if using STRIPE as your payment gateway type.
2898
- #
2899
- # @param payment_type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
2900
- #
2901
- # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
2902
-
2903
- # If left blank, will default to INVOICE
2904
- #
2905
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
2906
- module PaymentType
2907
- extend MetronomeSDK::Internal::Type::Enum
2908
-
2909
- INVOICE = :INVOICE
2910
- PAYMENT_INTENT = :PAYMENT_INTENT
2911
-
2912
- # @!method self.values
2913
- # @return [Array<Symbol>]
2914
- end
2915
- end
2916
-
2917
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
2918
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
2919
- # will default to NONE.
2920
- #
2921
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::PaymentGateConfig#tax_type
2922
- module TaxType
2923
- extend MetronomeSDK::Internal::Type::Enum
2924
-
2925
- NONE = :NONE
2926
- STRIPE = :STRIPE
2927
- ANROK = :ANROK
2928
- PRECALCULATED = :PRECALCULATED
2929
-
2930
- # @!method self.values
2931
- # @return [Array<Symbol>]
2932
- end
2933
- end
2934
- end
2935
-
2936
- class RecurringCommit < MetronomeSDK::Internal::Type::BaseModel
2937
- # @!attribute id
2938
- #
2939
- # @return [String]
2940
- required :id, String
2941
-
2942
- # @!attribute access_amount
2943
- # The amount of commit to grant.
2944
- #
2945
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::AccessAmount]
2946
- required :access_amount,
2947
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::AccessAmount }
2948
-
2949
- # @!attribute commit_duration
2950
- # The amount of time the created commits will be valid for
2951
- #
2952
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::CommitDuration]
2953
- required :commit_duration,
2954
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::CommitDuration }
2955
-
2956
- # @!attribute priority
2957
- # Will be passed down to the individual commits
2958
- #
2959
- # @return [Float]
2960
- required :priority, Float
2961
-
2962
- # @!attribute product
2963
- #
2964
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::Product]
2965
- required :product,
2966
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::Product }
2967
-
2968
- # @!attribute rate_type
2969
- # Whether the created commits will use the commit rate or list rate
2970
- #
2971
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::RateType]
2972
- required :rate_type,
2973
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::RateType }
2974
-
2975
- # @!attribute starting_at
2976
- # Determines the start time for the first commit
2977
- #
2978
- # @return [Time]
2979
- required :starting_at, Time
2980
-
2981
- # @!attribute applicable_product_ids
2982
- # Will be passed down to the individual commits
2983
- #
2984
- # @return [Array<String>, nil]
2985
- optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
2986
-
2987
- # @!attribute applicable_product_tags
2988
- # Will be passed down to the individual commits
2989
- #
2990
- # @return [Array<String>, nil]
2991
- optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
2992
-
2993
- # @!attribute contract
2994
- #
2995
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::Contract, nil]
2996
- optional :contract,
2997
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::Contract }
2998
-
2999
- # @!attribute description
3000
- # Will be passed down to the individual commits
3001
- #
3002
- # @return [String, nil]
3003
- optional :description, String
3004
-
3005
- # @!attribute ending_before
3006
- # Determines when the contract will stop creating recurring commits. Optional
3007
- #
3008
- # @return [Time, nil]
3009
- optional :ending_before, Time
3010
-
3011
- # @!attribute hierarchy_configuration
3012
- # Optional configuration for recurring credit hierarchy access control
3013
- #
3014
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration, nil]
3015
- optional :hierarchy_configuration,
3016
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration }
3017
-
3018
- # @!attribute invoice_amount
3019
- # The amount the customer should be billed for the commit. Not required.
3020
- #
3021
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::InvoiceAmount, nil]
3022
- optional :invoice_amount,
3023
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::InvoiceAmount }
3024
-
3025
- # @!attribute name
3026
- # Displayed on invoices. Will be passed through to the individual commits
3027
- #
3028
- # @return [String, nil]
3029
- optional :name, String
3030
-
3031
- # @!attribute netsuite_sales_order_id
3032
- # Will be passed down to the individual commits
3033
- #
3034
- # @return [String, nil]
3035
- optional :netsuite_sales_order_id, String
3036
-
3037
- # @!attribute proration
3038
- # Determines whether the first and last commit will be prorated. If not provided,
3039
- # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
3040
- #
3041
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::Proration, nil]
3042
- optional :proration,
3043
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::Proration }
3044
-
3045
- # @!attribute recurrence_frequency
3046
- # The frequency at which the recurring commits will be created. If not provided: -
3047
- # The commits will be created on the usage invoice frequency. If provided: - The
3048
- # period defined in the duration will correspond to this frequency. - Commits will
3049
- # be created aligned with the recurring commit's starting_at rather than the usage
3050
- # invoice dates.
3051
- #
3052
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::RecurrenceFrequency, nil]
3053
- optional :recurrence_frequency,
3054
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::RecurrenceFrequency }
3055
-
3056
- # @!attribute rollover_fraction
3057
- # Will be passed down to the individual commits. This controls how much of an
3058
- # individual unexpired commit will roll over upon contract transition. Must be
3059
- # between 0 and 1.
3060
- #
3061
- # @return [Float, nil]
3062
- optional :rollover_fraction, Float
3063
-
3064
- # @!attribute specifiers
3065
- # List of filters that determine what kind of customer usage draws down a commit
3066
- # or credit. A customer's usage needs to meet the condition of at least one of the
3067
- # specifiers to contribute to a commit's or credit's drawdown.
3068
- #
3069
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::Specifier>, nil]
3070
- optional :specifiers,
3071
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::Specifier] }
3072
-
3073
- # @!attribute subscription_config
3074
- # Attach a subscription to the recurring commit/credit.
3075
- #
3076
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig, nil]
3077
- optional :subscription_config,
3078
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig }
3079
-
3080
- # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, invoice_amount: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
3081
- # Some parameter documentations has been truncated, see
3082
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit} for
3083
- # more details.
3084
- #
3085
- # @param id [String]
3086
- #
3087
- # @param access_amount [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::AccessAmount] The amount of commit to grant.
3088
- #
3089
- # @param commit_duration [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::CommitDuration] The amount of time the created commits will be valid for
3090
- #
3091
- # @param priority [Float] Will be passed down to the individual commits
3092
- #
3093
- # @param product [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::Product]
3094
- #
3095
- # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::RateType] Whether the created commits will use the commit rate or list rate
3096
- #
3097
- # @param starting_at [Time] Determines the start time for the first commit
3098
- #
3099
- # @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
3100
- #
3101
- # @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
3102
- #
3103
- # @param contract [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::Contract]
3104
- #
3105
- # @param description [String] Will be passed down to the individual commits
3106
- #
3107
- # @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
3108
- #
3109
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
3110
- #
3111
- # @param invoice_amount [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::InvoiceAmount] The amount the customer should be billed for the commit. Not required.
3112
- #
3113
- # @param name [String] Displayed on invoices. Will be passed through to the individual commits
3114
- #
3115
- # @param netsuite_sales_order_id [String] Will be passed down to the individual commits
3116
- #
3117
- # @param proration [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::Proration] Determines whether the first and last commit will be prorated. If not provided,
3118
- #
3119
- # @param recurrence_frequency [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
3120
- #
3121
- # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
3122
- #
3123
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
3124
- #
3125
- # @param subscription_config [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig] Attach a subscription to the recurring commit/credit.
3126
-
3127
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit#access_amount
3128
- class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
3129
- # @!attribute credit_type_id
3130
- #
3131
- # @return [String]
3132
- required :credit_type_id, String
3133
-
3134
- # @!attribute unit_price
3135
- #
3136
- # @return [Float]
3137
- required :unit_price, Float
3138
-
3139
- # @!attribute quantity
3140
- #
3141
- # @return [Float, nil]
3142
- optional :quantity, Float
3143
-
3144
- # @!method initialize(credit_type_id:, unit_price:, quantity: nil)
3145
- # The amount of commit to grant.
3146
- #
3147
- # @param credit_type_id [String]
3148
- # @param unit_price [Float]
3149
- # @param quantity [Float]
3150
- end
3151
-
3152
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit#commit_duration
3153
- class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
3154
- # @!attribute value
3155
- #
3156
- # @return [Float]
3157
- required :value, Float
3158
-
3159
- # @!attribute unit
3160
- #
3161
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::CommitDuration::Unit, nil]
3162
- optional :unit,
3163
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::CommitDuration::Unit }
3164
-
3165
- # @!method initialize(value:, unit: nil)
3166
- # The amount of time the created commits will be valid for
3167
- #
3168
- # @param value [Float]
3169
- # @param unit [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::CommitDuration::Unit]
3170
-
3171
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::CommitDuration#unit
3172
- module Unit
3173
- extend MetronomeSDK::Internal::Type::Enum
3174
-
3175
- PERIODS = :PERIODS
3176
-
3177
- # @!method self.values
3178
- # @return [Array<Symbol>]
3179
- end
3180
- end
3181
-
3182
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit#product
3183
- class Product < MetronomeSDK::Internal::Type::BaseModel
3184
- # @!attribute id
3185
- #
3186
- # @return [String]
3187
- required :id, String
3188
-
3189
- # @!attribute name
3190
- #
3191
- # @return [String]
3192
- required :name, String
3193
-
3194
- # @!method initialize(id:, name:)
3195
- # @param id [String]
3196
- # @param name [String]
3197
- end
3198
-
3199
- # Whether the created commits will use the commit rate or list rate
3200
- #
3201
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit#rate_type
3202
- module RateType
3203
- extend MetronomeSDK::Internal::Type::Enum
3204
-
3205
- COMMIT_RATE = :COMMIT_RATE
3206
- LIST_RATE = :LIST_RATE
3207
-
3208
- # @!method self.values
3209
- # @return [Array<Symbol>]
3210
- end
3211
-
3212
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit#contract
3213
- class Contract < MetronomeSDK::Internal::Type::BaseModel
3214
- # @!attribute id
3215
- #
3216
- # @return [String]
3217
- required :id, String
3218
-
3219
- # @!method initialize(id:)
3220
- # @param id [String]
3221
- end
3222
-
3223
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit#hierarchy_configuration
3224
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
3225
- # @!attribute child_access
3226
- #
3227
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
3228
- required :child_access,
3229
- union: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess }
3230
-
3231
- # @!method initialize(child_access:)
3232
- # Optional configuration for recurring credit hierarchy access control
3233
- #
3234
- # @param child_access [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
3235
-
3236
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration#child_access
3237
- module ChildAccess
3238
- extend MetronomeSDK::Internal::Type::Union
3239
-
3240
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll }
3241
-
3242
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone }
3243
-
3244
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs }
3245
-
3246
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
3247
- # @!attribute type
3248
- #
3249
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
3250
- required :type,
3251
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type }
3252
-
3253
- # @!method initialize(type:)
3254
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
3255
-
3256
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
3257
- module Type
3258
- extend MetronomeSDK::Internal::Type::Enum
3259
-
3260
- ALL = :ALL
3261
-
3262
- # @!method self.values
3263
- # @return [Array<Symbol>]
3264
- end
3265
- end
3266
-
3267
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
3268
- # @!attribute type
3269
- #
3270
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
3271
- required :type,
3272
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type }
3273
-
3274
- # @!method initialize(type:)
3275
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
3276
-
3277
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
3278
- module Type
3279
- extend MetronomeSDK::Internal::Type::Enum
3280
-
3281
- NONE = :NONE
3282
-
3283
- # @!method self.values
3284
- # @return [Array<Symbol>]
3285
- end
3286
- end
3287
-
3288
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
3289
- # @!attribute contract_ids
3290
- #
3291
- # @return [Array<String>]
3292
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
3293
-
3294
- # @!attribute type
3295
- #
3296
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
3297
- required :type,
3298
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type }
3299
-
3300
- # @!method initialize(contract_ids:, type:)
3301
- # @param contract_ids [Array<String>]
3302
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
3303
-
3304
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
3305
- module Type
3306
- extend MetronomeSDK::Internal::Type::Enum
3307
-
3308
- CONTRACT_IDS = :CONTRACT_IDS
3309
-
3310
- # @!method self.values
3311
- # @return [Array<Symbol>]
3312
- end
3313
- end
3314
-
3315
- # @!method self.variants
3316
- # @return [Array(MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
3317
- end
3318
- end
3319
-
3320
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit#invoice_amount
3321
- class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
3322
- # @!attribute credit_type_id
3323
- #
3324
- # @return [String]
3325
- required :credit_type_id, String
3326
-
3327
- # @!attribute quantity
3328
- #
3329
- # @return [Float]
3330
- required :quantity, Float
3331
-
3332
- # @!attribute unit_price
3333
- #
3334
- # @return [Float]
3335
- required :unit_price, Float
3336
-
3337
- # @!method initialize(credit_type_id:, quantity:, unit_price:)
3338
- # The amount the customer should be billed for the commit. Not required.
3339
- #
3340
- # @param credit_type_id [String]
3341
- # @param quantity [Float]
3342
- # @param unit_price [Float]
3343
- end
3344
-
3345
- # Determines whether the first and last commit will be prorated. If not provided,
3346
- # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
3347
- #
3348
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit#proration
3349
- module Proration
3350
- extend MetronomeSDK::Internal::Type::Enum
3351
-
3352
- NONE = :NONE
3353
- FIRST = :FIRST
3354
- LAST = :LAST
3355
- FIRST_AND_LAST = :FIRST_AND_LAST
3356
-
3357
- # @!method self.values
3358
- # @return [Array<Symbol>]
3359
- end
3360
-
3361
- # The frequency at which the recurring commits will be created. If not provided: -
3362
- # The commits will be created on the usage invoice frequency. If provided: - The
3363
- # period defined in the duration will correspond to this frequency. - Commits will
3364
- # be created aligned with the recurring commit's starting_at rather than the usage
3365
- # invoice dates.
3366
- #
3367
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit#recurrence_frequency
3368
- module RecurrenceFrequency
3369
- extend MetronomeSDK::Internal::Type::Enum
3370
-
3371
- MONTHLY = :MONTHLY
3372
- QUARTERLY = :QUARTERLY
3373
- ANNUAL = :ANNUAL
3374
- WEEKLY = :WEEKLY
3375
-
3376
- # @!method self.values
3377
- # @return [Array<Symbol>]
3378
- end
3379
-
3380
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
3381
- # @!attribute presentation_group_values
3382
- #
3383
- # @return [Hash{Symbol=>String}, nil]
3384
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
3385
-
3386
- # @!attribute pricing_group_values
3387
- #
3388
- # @return [Hash{Symbol=>String}, nil]
3389
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
3390
-
3391
- # @!attribute product_id
3392
- # If provided, the specifier will only apply to the product with the specified ID.
3393
- #
3394
- # @return [String, nil]
3395
- optional :product_id, String
3396
-
3397
- # @!attribute product_tags
3398
- # If provided, the specifier will only apply to products with all the specified
3399
- # tags.
3400
- #
3401
- # @return [Array<String>, nil]
3402
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
3403
-
3404
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
3405
- # Some parameter documentations has been truncated, see
3406
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::Specifier}
3407
- # for more details.
3408
- #
3409
- # @param presentation_group_values [Hash{Symbol=>String}]
3410
- #
3411
- # @param pricing_group_values [Hash{Symbol=>String}]
3412
- #
3413
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
3414
- #
3415
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
3416
- end
3417
-
3418
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit#subscription_config
3419
- class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
3420
- # @!attribute allocation
3421
- #
3422
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig::Allocation]
3423
- required :allocation,
3424
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig::Allocation }
3425
-
3426
- # @!attribute apply_seat_increase_config
3427
- #
3428
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig]
3429
- required :apply_seat_increase_config,
3430
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig }
3431
-
3432
- # @!attribute subscription_id
3433
- #
3434
- # @return [String]
3435
- required :subscription_id, String
3436
-
3437
- # @!method initialize(allocation:, apply_seat_increase_config:, subscription_id:)
3438
- # Attach a subscription to the recurring commit/credit.
3439
- #
3440
- # @param allocation [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig::Allocation]
3441
- # @param apply_seat_increase_config [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig]
3442
- # @param subscription_id [String]
3443
-
3444
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig#allocation
3445
- module Allocation
3446
- extend MetronomeSDK::Internal::Type::Enum
3447
-
3448
- INDIVIDUAL = :INDIVIDUAL
3449
- POOLED = :POOLED
3450
-
3451
- # @!method self.values
3452
- # @return [Array<Symbol>]
3453
- end
3454
-
3455
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig#apply_seat_increase_config
3456
- class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
3457
- # @!attribute is_prorated
3458
- # Indicates whether a mid-period seat increase should be prorated.
3459
- #
3460
- # @return [Boolean]
3461
- required :is_prorated, MetronomeSDK::Internal::Type::Boolean
3462
-
3463
- # @!method initialize(is_prorated:)
3464
- # @param is_prorated [Boolean] Indicates whether a mid-period seat increase should be prorated.
3465
- end
3466
- end
3467
- end
3468
-
3469
- class RecurringCredit < MetronomeSDK::Internal::Type::BaseModel
3470
- # @!attribute id
3471
- #
3472
- # @return [String]
3473
- required :id, String
3474
-
3475
- # @!attribute access_amount
3476
- # The amount of commit to grant.
3477
- #
3478
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::AccessAmount]
3479
- required :access_amount,
3480
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::AccessAmount }
3481
-
3482
- # @!attribute commit_duration
3483
- # The amount of time the created commits will be valid for
3484
- #
3485
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::CommitDuration]
3486
- required :commit_duration,
3487
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::CommitDuration }
3488
-
3489
- # @!attribute priority
3490
- # Will be passed down to the individual commits
3491
- #
3492
- # @return [Float]
3493
- required :priority, Float
3494
-
3495
- # @!attribute product
3496
- #
3497
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::Product]
3498
- required :product,
3499
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::Product }
3500
-
3501
- # @!attribute rate_type
3502
- # Whether the created commits will use the commit rate or list rate
3503
- #
3504
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::RateType]
3505
- required :rate_type,
3506
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::RateType }
3507
-
3508
- # @!attribute starting_at
3509
- # Determines the start time for the first commit
3510
- #
3511
- # @return [Time]
3512
- required :starting_at, Time
3513
-
3514
- # @!attribute applicable_product_ids
3515
- # Will be passed down to the individual commits
3516
- #
3517
- # @return [Array<String>, nil]
3518
- optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
3519
-
3520
- # @!attribute applicable_product_tags
3521
- # Will be passed down to the individual commits
3522
- #
3523
- # @return [Array<String>, nil]
3524
- optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
3525
-
3526
- # @!attribute contract
3527
- #
3528
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::Contract, nil]
3529
- optional :contract,
3530
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::Contract }
3531
-
3532
- # @!attribute description
3533
- # Will be passed down to the individual commits
3534
- #
3535
- # @return [String, nil]
3536
- optional :description, String
3537
-
3538
- # @!attribute ending_before
3539
- # Determines when the contract will stop creating recurring commits. Optional
3540
- #
3541
- # @return [Time, nil]
3542
- optional :ending_before, Time
3543
-
3544
- # @!attribute hierarchy_configuration
3545
- # Optional configuration for recurring credit hierarchy access control
3546
- #
3547
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration, nil]
3548
- optional :hierarchy_configuration,
3549
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration }
3550
-
3551
- # @!attribute name
3552
- # Displayed on invoices. Will be passed through to the individual commits
3553
- #
3554
- # @return [String, nil]
3555
- optional :name, String
3556
-
3557
- # @!attribute netsuite_sales_order_id
3558
- # Will be passed down to the individual commits
3559
- #
3560
- # @return [String, nil]
3561
- optional :netsuite_sales_order_id, String
3562
-
3563
- # @!attribute proration
3564
- # Determines whether the first and last commit will be prorated. If not provided,
3565
- # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
3566
- #
3567
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::Proration, nil]
3568
- optional :proration,
3569
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::Proration }
3570
-
3571
- # @!attribute recurrence_frequency
3572
- # The frequency at which the recurring commits will be created. If not provided: -
3573
- # The commits will be created on the usage invoice frequency. If provided: - The
3574
- # period defined in the duration will correspond to this frequency. - Commits will
3575
- # be created aligned with the recurring commit's starting_at rather than the usage
3576
- # invoice dates.
3577
- #
3578
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::RecurrenceFrequency, nil]
3579
- optional :recurrence_frequency,
3580
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::RecurrenceFrequency }
3581
-
3582
- # @!attribute rollover_fraction
3583
- # Will be passed down to the individual commits. This controls how much of an
3584
- # individual unexpired commit will roll over upon contract transition. Must be
3585
- # between 0 and 1.
3586
- #
3587
- # @return [Float, nil]
3588
- optional :rollover_fraction, Float
3589
-
3590
- # @!attribute specifiers
3591
- # List of filters that determine what kind of customer usage draws down a commit
3592
- # or credit. A customer's usage needs to meet the condition of at least one of the
3593
- # specifiers to contribute to a commit's or credit's drawdown.
3594
- #
3595
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::Specifier>, nil]
3596
- optional :specifiers,
3597
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::Specifier] }
3598
-
3599
- # @!attribute subscription_config
3600
- # Attach a subscription to the recurring commit/credit.
3601
- #
3602
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig, nil]
3603
- optional :subscription_config,
3604
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig }
3605
-
3606
- # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
3607
- # Some parameter documentations has been truncated, see
3608
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit} for
3609
- # more details.
3610
- #
3611
- # @param id [String]
3612
- #
3613
- # @param access_amount [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::AccessAmount] The amount of commit to grant.
3614
- #
3615
- # @param commit_duration [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::CommitDuration] The amount of time the created commits will be valid for
3616
- #
3617
- # @param priority [Float] Will be passed down to the individual commits
3618
- #
3619
- # @param product [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::Product]
3620
- #
3621
- # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::RateType] Whether the created commits will use the commit rate or list rate
3622
- #
3623
- # @param starting_at [Time] Determines the start time for the first commit
3624
- #
3625
- # @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
3626
- #
3627
- # @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
3628
- #
3629
- # @param contract [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::Contract]
3630
- #
3631
- # @param description [String] Will be passed down to the individual commits
3632
- #
3633
- # @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
3634
- #
3635
- # @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
3636
- #
3637
- # @param name [String] Displayed on invoices. Will be passed through to the individual commits
3638
- #
3639
- # @param netsuite_sales_order_id [String] Will be passed down to the individual commits
3640
- #
3641
- # @param proration [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::Proration] Determines whether the first and last commit will be prorated. If not provided,
3642
- #
3643
- # @param recurrence_frequency [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
3644
- #
3645
- # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
3646
- #
3647
- # @param specifiers [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
3648
- #
3649
- # @param subscription_config [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig] Attach a subscription to the recurring commit/credit.
3650
-
3651
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit#access_amount
3652
- class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
3653
- # @!attribute credit_type_id
3654
- #
3655
- # @return [String]
3656
- required :credit_type_id, String
3657
-
3658
- # @!attribute unit_price
3659
- #
3660
- # @return [Float]
3661
- required :unit_price, Float
3662
-
3663
- # @!attribute quantity
3664
- #
3665
- # @return [Float, nil]
3666
- optional :quantity, Float
3667
-
3668
- # @!method initialize(credit_type_id:, unit_price:, quantity: nil)
3669
- # The amount of commit to grant.
3670
- #
3671
- # @param credit_type_id [String]
3672
- # @param unit_price [Float]
3673
- # @param quantity [Float]
3674
- end
3675
-
3676
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit#commit_duration
3677
- class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
3678
- # @!attribute value
3679
- #
3680
- # @return [Float]
3681
- required :value, Float
3682
-
3683
- # @!attribute unit
3684
- #
3685
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::CommitDuration::Unit, nil]
3686
- optional :unit,
3687
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::CommitDuration::Unit }
3688
-
3689
- # @!method initialize(value:, unit: nil)
3690
- # The amount of time the created commits will be valid for
3691
- #
3692
- # @param value [Float]
3693
- # @param unit [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::CommitDuration::Unit]
3694
-
3695
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::CommitDuration#unit
3696
- module Unit
3697
- extend MetronomeSDK::Internal::Type::Enum
3698
-
3699
- PERIODS = :PERIODS
3700
-
3701
- # @!method self.values
3702
- # @return [Array<Symbol>]
3703
- end
3704
- end
3705
-
3706
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit#product
3707
- class Product < MetronomeSDK::Internal::Type::BaseModel
3708
- # @!attribute id
3709
- #
3710
- # @return [String]
3711
- required :id, String
3712
-
3713
- # @!attribute name
3714
- #
3715
- # @return [String]
3716
- required :name, String
3717
-
3718
- # @!method initialize(id:, name:)
3719
- # @param id [String]
3720
- # @param name [String]
3721
- end
3722
-
3723
- # Whether the created commits will use the commit rate or list rate
3724
- #
3725
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit#rate_type
3726
- module RateType
3727
- extend MetronomeSDK::Internal::Type::Enum
3728
-
3729
- COMMIT_RATE = :COMMIT_RATE
3730
- LIST_RATE = :LIST_RATE
3731
-
3732
- # @!method self.values
3733
- # @return [Array<Symbol>]
3734
- end
3735
-
3736
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit#contract
3737
- class Contract < MetronomeSDK::Internal::Type::BaseModel
3738
- # @!attribute id
3739
- #
3740
- # @return [String]
3741
- required :id, String
3742
-
3743
- # @!method initialize(id:)
3744
- # @param id [String]
3745
- end
3746
-
3747
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit#hierarchy_configuration
3748
- class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
3749
- # @!attribute child_access
3750
- #
3751
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
3752
- required :child_access,
3753
- union: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess }
3754
-
3755
- # @!method initialize(child_access:)
3756
- # Optional configuration for recurring credit hierarchy access control
3757
- #
3758
- # @param child_access [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
3759
-
3760
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration#child_access
3761
- module ChildAccess
3762
- extend MetronomeSDK::Internal::Type::Union
3763
-
3764
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll }
3765
-
3766
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone }
3767
-
3768
- variant -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs }
3769
-
3770
- class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
3771
- # @!attribute type
3772
- #
3773
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
3774
- required :type,
3775
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type }
3776
-
3777
- # @!method initialize(type:)
3778
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
3779
-
3780
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
3781
- module Type
3782
- extend MetronomeSDK::Internal::Type::Enum
3783
-
3784
- ALL = :ALL
3785
-
3786
- # @!method self.values
3787
- # @return [Array<Symbol>]
3788
- end
3789
- end
3790
-
3791
- class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
3792
- # @!attribute type
3793
- #
3794
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
3795
- required :type,
3796
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type }
3797
-
3798
- # @!method initialize(type:)
3799
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
3800
-
3801
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
3802
- module Type
3803
- extend MetronomeSDK::Internal::Type::Enum
3804
-
3805
- NONE = :NONE
3806
-
3807
- # @!method self.values
3808
- # @return [Array<Symbol>]
3809
- end
3810
- end
3811
-
3812
- class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
3813
- # @!attribute contract_ids
3814
- #
3815
- # @return [Array<String>]
3816
- required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
3817
-
3818
- # @!attribute type
3819
- #
3820
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
3821
- required :type,
3822
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type }
3823
-
3824
- # @!method initialize(contract_ids:, type:)
3825
- # @param contract_ids [Array<String>]
3826
- # @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
3827
-
3828
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
3829
- module Type
3830
- extend MetronomeSDK::Internal::Type::Enum
3831
-
3832
- CONTRACT_IDS = :CONTRACT_IDS
3833
-
3834
- # @!method self.values
3835
- # @return [Array<Symbol>]
3836
- end
3837
- end
3838
-
3839
- # @!method self.variants
3840
- # @return [Array(MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
3841
- end
3842
- end
3843
-
3844
- # Determines whether the first and last commit will be prorated. If not provided,
3845
- # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
3846
- #
3847
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit#proration
3848
- module Proration
3849
- extend MetronomeSDK::Internal::Type::Enum
3850
-
3851
- NONE = :NONE
3852
- FIRST = :FIRST
3853
- LAST = :LAST
3854
- FIRST_AND_LAST = :FIRST_AND_LAST
3855
-
3856
- # @!method self.values
3857
- # @return [Array<Symbol>]
3858
- end
3859
-
3860
- # The frequency at which the recurring commits will be created. If not provided: -
3861
- # The commits will be created on the usage invoice frequency. If provided: - The
3862
- # period defined in the duration will correspond to this frequency. - Commits will
3863
- # be created aligned with the recurring commit's starting_at rather than the usage
3864
- # invoice dates.
3865
- #
3866
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit#recurrence_frequency
3867
- module RecurrenceFrequency
3868
- extend MetronomeSDK::Internal::Type::Enum
3869
-
3870
- MONTHLY = :MONTHLY
3871
- QUARTERLY = :QUARTERLY
3872
- ANNUAL = :ANNUAL
3873
- WEEKLY = :WEEKLY
3874
-
3875
- # @!method self.values
3876
- # @return [Array<Symbol>]
3877
- end
3878
-
3879
- class Specifier < MetronomeSDK::Internal::Type::BaseModel
3880
- # @!attribute presentation_group_values
3881
- #
3882
- # @return [Hash{Symbol=>String}, nil]
3883
- optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
3884
-
3885
- # @!attribute pricing_group_values
3886
- #
3887
- # @return [Hash{Symbol=>String}, nil]
3888
- optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
3889
-
3890
- # @!attribute product_id
3891
- # If provided, the specifier will only apply to the product with the specified ID.
3892
- #
3893
- # @return [String, nil]
3894
- optional :product_id, String
3895
-
3896
- # @!attribute product_tags
3897
- # If provided, the specifier will only apply to products with all the specified
3898
- # tags.
3899
- #
3900
- # @return [Array<String>, nil]
3901
- optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
3902
-
3903
- # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
3904
- # Some parameter documentations has been truncated, see
3905
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::Specifier}
3906
- # for more details.
3907
- #
3908
- # @param presentation_group_values [Hash{Symbol=>String}]
3909
- #
3910
- # @param pricing_group_values [Hash{Symbol=>String}]
3911
- #
3912
- # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
3913
- #
3914
- # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
3915
- end
3916
-
3917
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit#subscription_config
3918
- class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
3919
- # @!attribute allocation
3920
- #
3921
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig::Allocation]
3922
- required :allocation,
3923
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig::Allocation }
3924
-
3925
- # @!attribute apply_seat_increase_config
3926
- #
3927
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig]
3928
- required :apply_seat_increase_config,
3929
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig }
3930
-
3931
- # @!attribute subscription_id
3932
- #
3933
- # @return [String]
3934
- required :subscription_id, String
3935
-
3936
- # @!method initialize(allocation:, apply_seat_increase_config:, subscription_id:)
3937
- # Attach a subscription to the recurring commit/credit.
3938
- #
3939
- # @param allocation [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig::Allocation]
3940
- # @param apply_seat_increase_config [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig]
3941
- # @param subscription_id [String]
3942
-
3943
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig#allocation
3944
- module Allocation
3945
- extend MetronomeSDK::Internal::Type::Enum
3946
-
3947
- INDIVIDUAL = :INDIVIDUAL
3948
- POOLED = :POOLED
3949
-
3950
- # @!method self.values
3951
- # @return [Array<Symbol>]
3952
- end
3953
-
3954
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig#apply_seat_increase_config
3955
- class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
3956
- # @!attribute is_prorated
3957
- # Indicates whether a mid-period seat increase should be prorated.
3958
- #
3959
- # @return [Boolean]
3960
- required :is_prorated, MetronomeSDK::Internal::Type::Boolean
3961
-
3962
- # @!method initialize(is_prorated:)
3963
- # @param is_prorated [Boolean] Indicates whether a mid-period seat increase should be prorated.
3964
- end
3965
- end
3966
- end
3967
-
3968
- class ResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
3969
- # @!attribute reseller_type
3970
- #
3971
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ResellerRoyalty::ResellerType]
3972
- required :reseller_type,
3973
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ResellerRoyalty::ResellerType }
3974
-
3975
- # @!attribute segments
3976
- #
3977
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ResellerRoyalty::Segment>]
3978
- required :segments,
3979
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ResellerRoyalty::Segment] }
3980
-
3981
- # @!method initialize(reseller_type:, segments:)
3982
- # @param reseller_type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ResellerRoyalty::ResellerType]
3983
- # @param segments [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ResellerRoyalty::Segment>]
3984
-
3985
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ResellerRoyalty#reseller_type
3986
- module ResellerType
3987
- extend MetronomeSDK::Internal::Type::Enum
3988
-
3989
- AWS = :AWS
3990
- AWS_PRO_SERVICE = :AWS_PRO_SERVICE
3991
- GCP = :GCP
3992
- GCP_PRO_SERVICE = :GCP_PRO_SERVICE
3993
-
3994
- # @!method self.values
3995
- # @return [Array<Symbol>]
3996
- end
3997
-
3998
- class Segment < MetronomeSDK::Internal::Type::BaseModel
3999
- # @!attribute fraction
4000
- #
4001
- # @return [Float]
4002
- required :fraction, Float
4003
-
4004
- # @!attribute netsuite_reseller_id
4005
- #
4006
- # @return [String]
4007
- required :netsuite_reseller_id, String
4008
-
4009
- # @!attribute reseller_type
4010
- #
4011
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ResellerRoyalty::Segment::ResellerType]
4012
- required :reseller_type,
4013
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ResellerRoyalty::Segment::ResellerType }
4014
-
4015
- # @!attribute starting_at
4016
- #
4017
- # @return [Time]
4018
- required :starting_at, Time
4019
-
4020
- # @!attribute applicable_product_ids
4021
- #
4022
- # @return [Array<String>, nil]
4023
- optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
4024
-
4025
- # @!attribute applicable_product_tags
4026
- #
4027
- # @return [Array<String>, nil]
4028
- optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
4029
-
4030
- # @!attribute aws_account_number
4031
- #
4032
- # @return [String, nil]
4033
- optional :aws_account_number, String
4034
-
4035
- # @!attribute aws_offer_id
4036
- #
4037
- # @return [String, nil]
4038
- optional :aws_offer_id, String
4039
-
4040
- # @!attribute aws_payer_reference_id
4041
- #
4042
- # @return [String, nil]
4043
- optional :aws_payer_reference_id, String
4044
-
4045
- # @!attribute ending_before
4046
- #
4047
- # @return [Time, nil]
4048
- optional :ending_before, Time
4049
-
4050
- # @!attribute gcp_account_id
4051
- #
4052
- # @return [String, nil]
4053
- optional :gcp_account_id, String
4054
-
4055
- # @!attribute gcp_offer_id
4056
- #
4057
- # @return [String, nil]
4058
- optional :gcp_offer_id, String
4059
-
4060
- # @!attribute reseller_contract_value
4061
- #
4062
- # @return [Float, nil]
4063
- optional :reseller_contract_value, Float
4064
-
4065
- # @!method initialize(fraction:, netsuite_reseller_id:, reseller_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, aws_account_number: nil, aws_offer_id: nil, aws_payer_reference_id: nil, ending_before: nil, gcp_account_id: nil, gcp_offer_id: nil, reseller_contract_value: nil)
4066
- # @param fraction [Float]
4067
- # @param netsuite_reseller_id [String]
4068
- # @param reseller_type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ResellerRoyalty::Segment::ResellerType]
4069
- # @param starting_at [Time]
4070
- # @param applicable_product_ids [Array<String>]
4071
- # @param applicable_product_tags [Array<String>]
4072
- # @param aws_account_number [String]
4073
- # @param aws_offer_id [String]
4074
- # @param aws_payer_reference_id [String]
4075
- # @param ending_before [Time]
4076
- # @param gcp_account_id [String]
4077
- # @param gcp_offer_id [String]
4078
- # @param reseller_contract_value [Float]
4079
-
4080
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::ResellerRoyalty::Segment#reseller_type
4081
- module ResellerType
4082
- extend MetronomeSDK::Internal::Type::Enum
4083
-
4084
- AWS = :AWS
4085
- AWS_PRO_SERVICE = :AWS_PRO_SERVICE
4086
- GCP = :GCP
4087
- GCP_PRO_SERVICE = :GCP_PRO_SERVICE
4088
-
4089
- # @!method self.values
4090
- # @return [Array<Symbol>]
4091
- end
4092
- end
4093
- end
4094
-
4095
- # Determines which scheduled and commit charges to consolidate onto the Contract's
4096
- # usage invoice. The charge's `timestamp` must match the usage invoice's
4097
- # `ending_before` date for consolidation to occur. This field cannot be modified
4098
- # after a Contract has been created. If this field is omitted, charges will appear
4099
- # on a separate invoice from usage charges.
4100
- #
4101
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data#scheduled_charges_on_usage_invoices
4102
- module ScheduledChargesOnUsageInvoices
4103
- extend MetronomeSDK::Internal::Type::Enum
4104
-
4105
- ALL = :ALL
4106
-
4107
- # @!method self.values
4108
- # @return [Array<Symbol>]
4109
- end
4110
-
4111
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data#spend_threshold_configuration
4112
- class SpendThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
4113
- # @!attribute commit
4114
- #
4115
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::Commit]
4116
- required :commit,
4117
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::Commit }
4118
-
4119
- # @!attribute is_enabled
4120
- # When set to false, the contract will not be evaluated against the
4121
- # threshold_amount. Toggling to true will result an immediate evaluation,
4122
- # regardless of prior state.
4123
- #
4124
- # @return [Boolean]
4125
- required :is_enabled, MetronomeSDK::Internal::Type::Boolean
4126
-
4127
- # @!attribute payment_gate_config
4128
- #
4129
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig]
4130
- required :payment_gate_config,
4131
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig }
4132
-
4133
- # @!attribute threshold_amount
4134
- # Specify the threshold amount for the contract. Each time the contract's usage
4135
- # hits this amount, a threshold charge will be initiated.
4136
- #
4137
- # @return [Float]
4138
- required :threshold_amount, Float
4139
-
4140
- # @!method initialize(commit:, is_enabled:, payment_gate_config:, threshold_amount:)
4141
- # Some parameter documentations has been truncated, see
4142
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration}
4143
- # for more details.
4144
- #
4145
- # @param commit [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::Commit]
4146
- #
4147
- # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
4148
- #
4149
- # @param payment_gate_config [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig]
4150
- #
4151
- # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's usage hi
4152
-
4153
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration#commit
4154
- class Commit < MetronomeSDK::Internal::Type::BaseModel
4155
- # @!attribute product_id
4156
- # The commit product that will be used to generate the line item for commit
4157
- # payment.
4158
- #
4159
- # @return [String]
4160
- required :product_id, String
4161
-
4162
- # @!attribute description
4163
- #
4164
- # @return [String, nil]
4165
- optional :description, String
4166
-
4167
- # @!attribute name
4168
- # Specify the name of the line item for the threshold charge. If left blank, it
4169
- # will default to the commit product name.
4170
- #
4171
- # @return [String, nil]
4172
- optional :name, String
4173
-
4174
- # @!method initialize(product_id:, description: nil, name: nil)
4175
- # Some parameter documentations has been truncated, see
4176
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::Commit}
4177
- # for more details.
4178
- #
4179
- # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
4180
- #
4181
- # @param description [String]
4182
- #
4183
- # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
4184
- end
4185
-
4186
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration#payment_gate_config
4187
- class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
4188
- # @!attribute payment_gate_type
4189
- # Gate access to the commit balance based on successful collection of payment.
4190
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
4191
- # facilitate payment using your own payment integration. Select NONE if you do not
4192
- # wish to payment gate the commit balance.
4193
- #
4194
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType]
4195
- required :payment_gate_type,
4196
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType }
4197
-
4198
- # @!attribute precalculated_tax_config
4199
- # Only applicable if using PRECALCULATED as your tax type.
4200
- #
4201
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
4202
- optional :precalculated_tax_config,
4203
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig }
4204
-
4205
- # @!attribute stripe_config
4206
- # Only applicable if using STRIPE as your payment gateway type.
4207
- #
4208
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
4209
- optional :stripe_config,
4210
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig }
4211
-
4212
- # @!attribute tax_type
4213
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
4214
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
4215
- # will default to NONE.
4216
- #
4217
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::TaxType, nil]
4218
- optional :tax_type,
4219
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::TaxType }
4220
-
4221
- # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
4222
- # Some parameter documentations has been truncated, see
4223
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig}
4224
- # for more details.
4225
- #
4226
- # @param payment_gate_type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
4227
- #
4228
- # @param precalculated_tax_config [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
4229
- #
4230
- # @param stripe_config [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gateway type.
4231
- #
4232
- # @param tax_type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
4233
-
4234
- # Gate access to the commit balance based on successful collection of payment.
4235
- # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
4236
- # facilitate payment using your own payment integration. Select NONE if you do not
4237
- # wish to payment gate the commit balance.
4238
- #
4239
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig#payment_gate_type
4240
- module PaymentGateType
4241
- extend MetronomeSDK::Internal::Type::Enum
4242
-
4243
- NONE = :NONE
4244
- STRIPE = :STRIPE
4245
- EXTERNAL = :EXTERNAL
4246
-
4247
- # @!method self.values
4248
- # @return [Array<Symbol>]
4249
- end
4250
-
4251
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
4252
- class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
4253
- # @!attribute tax_amount
4254
- # Amount of tax to be applied. This should be in the same currency and
4255
- # denomination as the commit's invoice schedule
4256
- #
4257
- # @return [Float]
4258
- required :tax_amount, Float
4259
-
4260
- # @!attribute tax_name
4261
- # Name of the tax to be applied. This may be used in an invoice line item
4262
- # description.
4263
- #
4264
- # @return [String, nil]
4265
- optional :tax_name, String
4266
-
4267
- # @!method initialize(tax_amount:, tax_name: nil)
4268
- # Some parameter documentations has been truncated, see
4269
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
4270
- # for more details.
4271
- #
4272
- # Only applicable if using PRECALCULATED as your tax type.
4273
- #
4274
- # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
4275
- #
4276
- # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
4277
- end
4278
-
4279
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig#stripe_config
4280
- class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
4281
- # @!attribute payment_type
4282
- # If left blank, will default to INVOICE
4283
- #
4284
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
4285
- required :payment_type,
4286
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType }
4287
-
4288
- # @!attribute invoice_metadata
4289
- # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
4290
- # your payment type.
4291
- #
4292
- # @return [Hash{Symbol=>String}, nil]
4293
- optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
4294
-
4295
- # @!method initialize(payment_type:, invoice_metadata: nil)
4296
- # Some parameter documentations has been truncated, see
4297
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig}
4298
- # for more details.
4299
- #
4300
- # Only applicable if using STRIPE as your payment gateway type.
4301
- #
4302
- # @param payment_type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
4303
- #
4304
- # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
4305
-
4306
- # If left blank, will default to INVOICE
4307
- #
4308
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
4309
- module PaymentType
4310
- extend MetronomeSDK::Internal::Type::Enum
4311
-
4312
- INVOICE = :INVOICE
4313
- PAYMENT_INTENT = :PAYMENT_INTENT
4314
-
4315
- # @!method self.values
4316
- # @return [Array<Symbol>]
4317
- end
4318
- end
4319
-
4320
- # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
4321
- # not wish Metronome to calculate tax on your behalf. Leaving this field blank
4322
- # will default to NONE.
4323
- #
4324
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::SpendThresholdConfiguration::PaymentGateConfig#tax_type
4325
- module TaxType
4326
- extend MetronomeSDK::Internal::Type::Enum
4327
-
4328
- NONE = :NONE
4329
- STRIPE = :STRIPE
4330
- ANROK = :ANROK
4331
- PRECALCULATED = :PRECALCULATED
4332
-
4333
- # @!method self.values
4334
- # @return [Array<Symbol>]
4335
- end
4336
- end
4337
- end
4338
-
4339
- class Subscription < MetronomeSDK::Internal::Type::BaseModel
4340
- # @!attribute collection_schedule
4341
- #
4342
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::CollectionSchedule]
4343
- required :collection_schedule,
4344
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::CollectionSchedule }
4345
-
4346
- # @!attribute proration
4347
- #
4348
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::Proration]
4349
- required :proration,
4350
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::Proration }
4351
-
4352
- # @!attribute quantity_schedule
4353
- # List of quantity schedule items for the subscription. Only includes the current
4354
- # quantity and future quantity changes.
4355
- #
4356
- # @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::QuantitySchedule>]
4357
- required :quantity_schedule,
4358
- -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::QuantitySchedule] }
4359
-
4360
- # @!attribute starting_at
4361
- #
4362
- # @return [Time]
4363
- required :starting_at, Time
4364
-
4365
- # @!attribute subscription_rate
4366
- #
4367
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::SubscriptionRate]
4368
- required :subscription_rate,
4369
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::SubscriptionRate }
4370
-
4371
- # @!attribute id
4372
- #
4373
- # @return [String, nil]
4374
- optional :id, String
4375
-
4376
- # @!attribute custom_fields
4377
- #
4378
- # @return [Hash{Symbol=>String}, nil]
4379
- optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
4380
-
4381
- # @!attribute description
4382
- #
4383
- # @return [String, nil]
4384
- optional :description, String
4385
-
4386
- # @!attribute ending_before
4387
- #
4388
- # @return [Time, nil]
4389
- optional :ending_before, Time
4390
-
4391
- # @!attribute fiat_credit_type_id
4392
- #
4393
- # @return [String, nil]
4394
- optional :fiat_credit_type_id, String
4395
-
4396
- # @!attribute name
4397
- #
4398
- # @return [String, nil]
4399
- optional :name, String
4400
-
4401
- # @!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)
4402
- # Some parameter documentations has been truncated, see
4403
- # {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription} for
4404
- # more details.
4405
- #
4406
- # @param collection_schedule [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::CollectionSchedule]
4407
- #
4408
- # @param proration [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::Proration]
4409
- #
4410
- # @param quantity_schedule [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::QuantitySchedule>] List of quantity schedule items for the subscription. Only includes the current
4411
- #
4412
- # @param starting_at [Time]
4413
- #
4414
- # @param subscription_rate [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::SubscriptionRate]
4415
- #
4416
- # @param id [String]
4417
- #
4418
- # @param custom_fields [Hash{Symbol=>String}]
4419
- #
4420
- # @param description [String]
4421
- #
4422
- # @param ending_before [Time]
4423
- #
4424
- # @param fiat_credit_type_id [String]
4425
- #
4426
- # @param name [String]
4427
-
4428
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription#collection_schedule
4429
- module CollectionSchedule
4430
- extend MetronomeSDK::Internal::Type::Enum
4431
-
4432
- ADVANCE = :ADVANCE
4433
- ARREARS = :ARREARS
4434
-
4435
- # @!method self.values
4436
- # @return [Array<Symbol>]
4437
- end
4438
-
4439
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription#proration
4440
- class Proration < MetronomeSDK::Internal::Type::BaseModel
4441
- # @!attribute invoice_behavior
4442
- #
4443
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::Proration::InvoiceBehavior]
4444
- required :invoice_behavior,
4445
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::Proration::InvoiceBehavior }
4446
-
4447
- # @!attribute is_prorated
4448
- #
4449
- # @return [Boolean]
4450
- required :is_prorated, MetronomeSDK::Internal::Type::Boolean
4451
-
4452
- # @!method initialize(invoice_behavior:, is_prorated:)
4453
- # @param invoice_behavior [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::Proration::InvoiceBehavior]
4454
- # @param is_prorated [Boolean]
4455
-
4456
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::Proration#invoice_behavior
4457
- module InvoiceBehavior
4458
- extend MetronomeSDK::Internal::Type::Enum
4459
-
4460
- BILL_IMMEDIATELY = :BILL_IMMEDIATELY
4461
- BILL_ON_NEXT_COLLECTION_DATE = :BILL_ON_NEXT_COLLECTION_DATE
4462
-
4463
- # @!method self.values
4464
- # @return [Array<Symbol>]
4465
- end
4466
- end
4467
-
4468
- class QuantitySchedule < MetronomeSDK::Internal::Type::BaseModel
4469
- # @!attribute quantity
4470
- #
4471
- # @return [Float]
4472
- required :quantity, Float
4473
-
4474
- # @!attribute starting_at
4475
- #
4476
- # @return [Time]
4477
- required :starting_at, Time
4478
-
4479
- # @!attribute ending_before
4480
- #
4481
- # @return [Time, nil]
4482
- optional :ending_before, Time
4483
-
4484
- # @!method initialize(quantity:, starting_at:, ending_before: nil)
4485
- # @param quantity [Float]
4486
- # @param starting_at [Time]
4487
- # @param ending_before [Time]
4488
- end
4489
-
4490
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription#subscription_rate
4491
- class SubscriptionRate < MetronomeSDK::Internal::Type::BaseModel
4492
- # @!attribute billing_frequency
4493
- #
4494
- # @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::SubscriptionRate::BillingFrequency]
4495
- required :billing_frequency,
4496
- enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::SubscriptionRate::BillingFrequency }
4497
-
4498
- # @!attribute product
4499
- #
4500
- # @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::SubscriptionRate::Product]
4501
- required :product,
4502
- -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::SubscriptionRate::Product }
4503
-
4504
- # @!method initialize(billing_frequency:, product:)
4505
- # @param billing_frequency [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::SubscriptionRate::BillingFrequency]
4506
- # @param product [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::SubscriptionRate::Product]
4507
-
4508
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::SubscriptionRate#billing_frequency
4509
- module BillingFrequency
4510
- extend MetronomeSDK::Internal::Type::Enum
4511
-
4512
- MONTHLY = :MONTHLY
4513
- QUARTERLY = :QUARTERLY
4514
- ANNUAL = :ANNUAL
4515
- WEEKLY = :WEEKLY
4516
-
4517
- # @!method self.values
4518
- # @return [Array<Symbol>]
4519
- end
4520
-
4521
- # @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Subscription::SubscriptionRate#product
4522
- class Product < MetronomeSDK::Internal::Type::BaseModel
4523
- # @!attribute id
4524
- #
4525
- # @return [String]
4526
- required :id, String
4527
-
4528
- # @!attribute name
4529
- #
4530
- # @return [String]
4531
- required :name, String
4532
-
4533
- # @!method initialize(id:, name:)
4534
- # @param id [String]
4535
- # @param name [String]
4536
- end
4537
- end
4538
- end
4539
- end
14
+ # @param data [MetronomeSDK::Models::ContractV2]
4540
15
  end
4541
16
  end
4542
17
  end