metronome-sdk 0.1.0.pre.alpha.3 → 0.1.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 (417) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +56 -0
  3. data/README.md +1 -1
  4. data/lib/metronome_sdk/errors.rb +22 -0
  5. data/lib/metronome_sdk/internal/cursor_page.rb +1 -1
  6. data/lib/metronome_sdk/internal/transport/base_client.rb +10 -2
  7. data/lib/metronome_sdk/internal/type/array_of.rb +6 -1
  8. data/lib/metronome_sdk/internal/type/base_model.rb +82 -26
  9. data/lib/metronome_sdk/internal/type/boolean.rb +7 -1
  10. data/lib/metronome_sdk/internal/type/converter.rb +42 -34
  11. data/lib/metronome_sdk/internal/type/enum.rb +16 -5
  12. data/lib/metronome_sdk/internal/type/file_input.rb +6 -1
  13. data/lib/metronome_sdk/internal/type/hash_of.rb +6 -1
  14. data/lib/metronome_sdk/internal/type/union.rb +17 -9
  15. data/lib/metronome_sdk/internal/type/unknown.rb +7 -1
  16. data/lib/metronome_sdk/internal/util.rb +8 -9
  17. data/lib/metronome_sdk/models/base_usage_filter.rb +27 -0
  18. data/lib/metronome_sdk/models/commit.rb +1053 -0
  19. data/lib/metronome_sdk/models/contract_without_amendments.rb +2043 -0
  20. data/lib/metronome_sdk/models/credit.rb +677 -0
  21. data/lib/metronome_sdk/models/credit_type_data.rb +21 -0
  22. data/lib/metronome_sdk/models/discount.rb +68 -0
  23. data/lib/metronome_sdk/models/event_type_filter.rb +33 -0
  24. data/lib/metronome_sdk/models/id.rb +15 -0
  25. data/lib/metronome_sdk/models/override.rb +381 -0
  26. data/lib/metronome_sdk/models/pro_service.rb +73 -0
  27. data/lib/metronome_sdk/models/property_filter.rb +52 -0
  28. data/lib/metronome_sdk/models/rate.rb +101 -0
  29. data/lib/metronome_sdk/models/schedule_duration.rb +50 -0
  30. data/lib/metronome_sdk/models/schedule_point_in_time.rb +62 -0
  31. data/lib/metronome_sdk/models/scheduled_charge.rb +76 -0
  32. data/lib/metronome_sdk/models/tier.rb +21 -0
  33. data/lib/metronome_sdk/models/v1/alert_archive_response.rb +3 -14
  34. data/lib/metronome_sdk/models/v1/alert_create_params.rb +4 -1
  35. data/lib/metronome_sdk/models/v1/alert_create_response.rb +3 -14
  36. data/lib/metronome_sdk/models/v1/billable_metric_archive_params.rb +2 -8
  37. data/lib/metronome_sdk/models/v1/billable_metric_archive_response.rb +3 -14
  38. data/lib/metronome_sdk/models/v1/billable_metric_create_params.rb +6 -86
  39. data/lib/metronome_sdk/models/v1/billable_metric_create_response.rb +3 -14
  40. data/lib/metronome_sdk/models/v1/billable_metric_list_response.rb +6 -85
  41. data/lib/metronome_sdk/models/v1/billable_metric_retrieve_response.rb +8 -85
  42. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +312 -35
  43. data/lib/metronome_sdk/models/v1/contract_amend_response.rb +3 -14
  44. data/lib/metronome_sdk/models/v1/contract_archive_response.rb +3 -14
  45. data/lib/metronome_sdk/models/v1/contract_create_historical_invoices_response.rb +3 -1276
  46. data/lib/metronome_sdk/models/v1/contract_create_params.rb +792 -104
  47. data/lib/metronome_sdk/models/v1/contract_create_response.rb +3 -14
  48. data/lib/metronome_sdk/models/v1/contract_list_balances_params.rb +9 -1
  49. data/lib/metronome_sdk/models/v1/contract_list_balances_response.rb +5 -1645
  50. data/lib/metronome_sdk/models/v1/contract_list_response.rb +253 -10692
  51. data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rb +9 -295
  52. data/lib/metronome_sdk/models/v1/contract_retrieve_response.rb +254 -10721
  53. data/lib/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_response.rb +3 -1276
  54. data/lib/metronome_sdk/models/v1/contract_update_end_date_response.rb +3 -14
  55. data/lib/metronome_sdk/models/v1/contracts/product_archive_response.rb +3 -14
  56. data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +6 -97
  57. data/lib/metronome_sdk/models/v1/contracts/product_create_response.rb +3 -14
  58. data/lib/metronome_sdk/models/v1/contracts/product_list_item_state.rb +148 -0
  59. data/lib/metronome_sdk/models/v1/contracts/product_list_response.rb +12 -561
  60. data/lib/metronome_sdk/models/v1/contracts/product_retrieve_params.rb +2 -8
  61. data/lib/metronome_sdk/models/v1/contracts/product_retrieve_response.rb +14 -559
  62. data/lib/metronome_sdk/models/v1/contracts/product_update_params.rb +6 -97
  63. data/lib/metronome_sdk/models/v1/contracts/product_update_response.rb +3 -14
  64. data/lib/metronome_sdk/models/v1/contracts/quantity_conversion.rb +57 -0
  65. data/lib/metronome_sdk/models/v1/contracts/quantity_rounding.rb +45 -0
  66. data/lib/metronome_sdk/models/v1/contracts/rate_card_archive_params.rb +2 -8
  67. data/lib/metronome_sdk/models/v1/contracts/rate_card_archive_response.rb +3 -14
  68. data/lib/metronome_sdk/models/v1/contracts/rate_card_create_response.rb +3 -14
  69. data/lib/metronome_sdk/models/v1/contracts/rate_card_list_response.rb +6 -42
  70. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_params.rb +2 -8
  71. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rb +6 -159
  72. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rb +6 -42
  73. data/lib/metronome_sdk/models/v1/contracts/rate_card_update_response.rb +3 -14
  74. data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_set_response.rb +3 -14
  75. data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_response.rb +3 -14
  76. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +6 -44
  77. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_response.rb +3 -16
  78. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +6 -44
  79. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rb +9 -61
  80. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rb +6 -158
  81. data/lib/metronome_sdk/models/v1/credit_grant_create_params.rb +5 -77
  82. data/lib/metronome_sdk/models/v1/credit_grant_create_response.rb +3 -14
  83. data/lib/metronome_sdk/models/v1/credit_grant_edit_response.rb +3 -14
  84. data/lib/metronome_sdk/models/v1/credit_grant_list_entries_params.rb +20 -1
  85. data/lib/metronome_sdk/models/v1/credit_grant_list_entries_response.rb +11 -153
  86. data/lib/metronome_sdk/models/v1/credit_grant_list_response.rb +14 -175
  87. data/lib/metronome_sdk/models/v1/credit_grant_void_response.rb +3 -14
  88. data/lib/metronome_sdk/models/v1/credit_ledger_entry.rb +69 -0
  89. data/lib/metronome_sdk/models/v1/customer.rb +53 -0
  90. data/lib/metronome_sdk/models/v1/customer_archive_params.rb +2 -8
  91. data/lib/metronome_sdk/models/v1/customer_archive_response.rb +3 -14
  92. data/lib/metronome_sdk/models/v1/customer_create_response.rb +3 -50
  93. data/lib/metronome_sdk/models/v1/{customer_list_response.rb → customer_detail.rb} +14 -15
  94. data/lib/metronome_sdk/models/v1/customer_list_billable_metrics_response.rb +6 -86
  95. data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +115 -0
  96. data/lib/metronome_sdk/models/v1/customer_preview_events_response.rb +18 -0
  97. data/lib/metronome_sdk/models/v1/customer_retrieve_response.rb +3 -126
  98. data/lib/metronome_sdk/models/v1/customer_set_name_response.rb +3 -50
  99. data/lib/metronome_sdk/models/v1/customers/alert_list_response.rb +5 -276
  100. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_response.rb +3 -279
  101. data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +9 -1
  102. data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +8 -6
  103. data/lib/metronome_sdk/models/v1/customers/commit_create_response.rb +3 -14
  104. data/lib/metronome_sdk/models/v1/customers/commit_list_params.rb +9 -1
  105. data/lib/metronome_sdk/models/v1/customers/commit_list_response.rb +3 -1047
  106. data/lib/metronome_sdk/models/v1/customers/commit_update_end_date_response.rb +3 -14
  107. data/lib/metronome_sdk/models/v1/customers/credit_create_response.rb +3 -14
  108. data/lib/metronome_sdk/models/v1/customers/credit_list_params.rb +9 -1
  109. data/lib/metronome_sdk/models/v1/customers/credit_list_response.rb +3 -593
  110. data/lib/metronome_sdk/models/v1/customers/credit_update_end_date_response.rb +3 -14
  111. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +270 -0
  112. data/lib/metronome_sdk/models/v1/customers/{invoice_list_response.rb → invoice.rb} +119 -303
  113. data/lib/metronome_sdk/models/v1/customers/invoice_list_breakdowns_response.rb +2 -1271
  114. data/lib/metronome_sdk/models/v1/customers/invoice_retrieve_response.rb +3 -1276
  115. data/lib/metronome_sdk/models/v1/customers/plan_add_response.rb +3 -14
  116. data/lib/metronome_sdk/models/v1/customers/plan_list_response.rb +3 -21
  117. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +1 -0
  118. data/lib/metronome_sdk/models/v1/plan_detail.rb +200 -0
  119. data/lib/metronome_sdk/models/v1/plan_get_details_response.rb +3 -286
  120. data/lib/metronome_sdk/models/v1/plan_list_charges_response.rb +3 -20
  121. data/lib/metronome_sdk/models/v1/plan_list_customers_response.rb +3 -128
  122. data/lib/metronome_sdk/models/v1/rollover_amount_max_amount.rb +38 -0
  123. data/lib/metronome_sdk/models/v1/rollover_amount_max_percentage.rb +38 -0
  124. data/lib/metronome_sdk/models/v1/usage_search_params.rb +24 -0
  125. data/lib/metronome_sdk/models/v1/usage_search_response.rb +249 -0
  126. data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +11 -8
  127. data/lib/metronome_sdk/models/v2/contract_edit_commit_response.rb +3 -14
  128. data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +3 -2
  129. data/lib/metronome_sdk/models/v2/contract_edit_credit_response.rb +3 -14
  130. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +1127 -105
  131. data/lib/metronome_sdk/models/v2/contract_edit_response.rb +3 -14
  132. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +577 -643
  133. data/lib/metronome_sdk/models/v2/contract_list_response.rb +917 -746
  134. data/lib/metronome_sdk/models/v2/contract_retrieve_response.rb +917 -748
  135. data/lib/metronome_sdk/models.rb +36 -4
  136. data/lib/metronome_sdk/resources/v1/alerts.rb +1 -1
  137. data/lib/metronome_sdk/resources/v1/billable_metrics.rb +2 -2
  138. data/lib/metronome_sdk/resources/v1/contracts/products.rb +4 -4
  139. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +1 -1
  140. data/lib/metronome_sdk/resources/v1/contracts.rb +11 -5
  141. data/lib/metronome_sdk/resources/v1/credit_grants.rb +4 -2
  142. data/lib/metronome_sdk/resources/v1/customers/commits.rb +5 -3
  143. data/lib/metronome_sdk/resources/v1/customers/credits.rb +3 -1
  144. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +2 -2
  145. data/lib/metronome_sdk/resources/v1/customers.rb +40 -2
  146. data/lib/metronome_sdk/resources/v1/usage.rb +25 -0
  147. data/lib/metronome_sdk/resources/v2/contracts.rb +11 -9
  148. data/lib/metronome_sdk/version.rb +1 -1
  149. data/lib/metronome_sdk.rb +31 -2
  150. data/rbi/metronome_sdk/errors.rbi +16 -0
  151. data/rbi/metronome_sdk/internal/type/boolean.rbi +2 -0
  152. data/rbi/metronome_sdk/internal/type/converter.rbi +15 -15
  153. data/rbi/metronome_sdk/internal/type/union.rbi +5 -0
  154. data/rbi/metronome_sdk/internal/type/unknown.rbi +2 -0
  155. data/rbi/metronome_sdk/internal/util.rbi +2 -0
  156. data/rbi/metronome_sdk/models/base_usage_filter.rbi +46 -0
  157. data/rbi/metronome_sdk/models/commit.rbi +2046 -0
  158. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +4260 -0
  159. data/rbi/metronome_sdk/models/credit.rbi +1314 -0
  160. data/rbi/metronome_sdk/models/credit_type_data.rbi +26 -0
  161. data/rbi/metronome_sdk/models/discount.rbi +106 -0
  162. data/rbi/metronome_sdk/models/event_type_filter.rbi +57 -0
  163. data/rbi/metronome_sdk/models/id.rbi +23 -0
  164. data/rbi/metronome_sdk/models/override.rbi +675 -0
  165. data/rbi/metronome_sdk/models/pro_service.rbi +98 -0
  166. data/rbi/metronome_sdk/models/property_filter.rbi +88 -0
  167. data/rbi/metronome_sdk/models/rate.rbi +155 -0
  168. data/rbi/metronome_sdk/models/schedule_duration.rbi +89 -0
  169. data/rbi/metronome_sdk/models/schedule_point_in_time.rbi +121 -0
  170. data/rbi/metronome_sdk/models/scheduled_charge.rbi +119 -0
  171. data/rbi/metronome_sdk/models/tier.rbi +29 -0
  172. data/rbi/metronome_sdk/models/v1/alert_archive_response.rbi +4 -37
  173. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +6 -0
  174. data/rbi/metronome_sdk/models/v1/alert_create_response.rbi +4 -37
  175. data/rbi/metronome_sdk/models/v1/billable_metric_archive_params.rbi +6 -12
  176. data/rbi/metronome_sdk/models/v1/billable_metric_archive_response.rbi +4 -44
  177. data/rbi/metronome_sdk/models/v1/billable_metric_create_params.rbi +8 -177
  178. data/rbi/metronome_sdk/models/v1/billable_metric_create_response.rbi +4 -43
  179. data/rbi/metronome_sdk/models/v1/billable_metric_list_response.rbi +8 -177
  180. data/rbi/metronome_sdk/models/v1/billable_metric_retrieve_response.rbi +8 -175
  181. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +712 -68
  182. data/rbi/metronome_sdk/models/v1/contract_amend_response.rbi +4 -37
  183. data/rbi/metronome_sdk/models/v1/contract_archive_response.rbi +4 -39
  184. data/rbi/metronome_sdk/models/v1/contract_create_historical_invoices_response.rbi +3 -2595
  185. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +1738 -210
  186. data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +4 -37
  187. data/rbi/metronome_sdk/models/v1/contract_list_balances_params.rbi +11 -0
  188. data/rbi/metronome_sdk/models/v1/contract_list_balances_response.rbi +3 -3366
  189. data/rbi/metronome_sdk/models/v1/contract_list_response.rbi +375 -22523
  190. data/rbi/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbi +12 -632
  191. data/rbi/metronome_sdk/models/v1/contract_retrieve_response.rbi +375 -22523
  192. data/rbi/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_response.rbi +3 -2595
  193. data/rbi/metronome_sdk/models/v1/contract_update_end_date_response.rbi +4 -44
  194. data/rbi/metronome_sdk/models/v1/contracts/product_archive_response.rbi +4 -44
  195. data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +8 -209
  196. data/rbi/metronome_sdk/models/v1/contracts/product_create_response.rbi +4 -44
  197. data/rbi/metronome_sdk/models/v1/contracts/product_list_item_state.rbi +237 -0
  198. data/rbi/metronome_sdk/models/v1/contracts/product_list_response.rbi +76 -1143
  199. data/rbi/metronome_sdk/models/v1/contracts/product_retrieve_params.rbi +3 -9
  200. data/rbi/metronome_sdk/models/v1/contracts/product_retrieve_response.rbi +76 -1137
  201. data/rbi/metronome_sdk/models/v1/contracts/product_update_params.rbi +8 -209
  202. data/rbi/metronome_sdk/models/v1/contracts/product_update_response.rbi +4 -44
  203. data/rbi/metronome_sdk/models/v1/contracts/quantity_conversion.rbi +111 -0
  204. data/rbi/metronome_sdk/models/v1/contracts/quantity_rounding.rbi +94 -0
  205. data/rbi/metronome_sdk/models/v1/contracts/rate_card_archive_params.rbi +3 -9
  206. data/rbi/metronome_sdk/models/v1/contracts/rate_card_archive_response.rbi +4 -44
  207. data/rbi/metronome_sdk/models/v1/contracts/rate_card_create_response.rbi +4 -44
  208. data/rbi/metronome_sdk/models/v1/contracts/rate_card_list_response.rbi +8 -74
  209. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_params.rbi +3 -9
  210. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbi +8 -344
  211. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rbi +8 -74
  212. data/rbi/metronome_sdk/models/v1/contracts/rate_card_update_response.rbi +4 -44
  213. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/product_order_set_response.rbi +4 -44
  214. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_response.rbi +4 -44
  215. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +8 -108
  216. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_response.rbi +4 -45
  217. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +8 -108
  218. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbi +12 -149
  219. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbi +8 -344
  220. data/rbi/metronome_sdk/models/v1/credit_grant_create_params.rbi +8 -166
  221. data/rbi/metronome_sdk/models/v1/credit_grant_create_response.rbi +4 -41
  222. data/rbi/metronome_sdk/models/v1/credit_grant_edit_response.rbi +4 -39
  223. data/rbi/metronome_sdk/models/v1/credit_grant_list_entries_params.rbi +58 -0
  224. data/rbi/metronome_sdk/models/v1/credit_grant_list_entries_response.rbi +10 -231
  225. data/rbi/metronome_sdk/models/v1/credit_grant_list_response.rbi +14 -281
  226. data/rbi/metronome_sdk/models/v1/credit_grant_void_response.rbi +4 -39
  227. data/rbi/metronome_sdk/models/v1/credit_ledger_entry.rbi +90 -0
  228. data/rbi/metronome_sdk/models/v1/customer.rbi +74 -0
  229. data/rbi/metronome_sdk/models/v1/customer_archive_params.rbi +6 -12
  230. data/rbi/metronome_sdk/models/v1/customer_archive_response.rbi +4 -39
  231. data/rbi/metronome_sdk/models/v1/customer_create_response.rbi +6 -84
  232. data/rbi/metronome_sdk/models/v1/{customer_list_response.rbi → customer_detail.rbi} +19 -26
  233. data/rbi/metronome_sdk/models/v1/customer_list_billable_metrics_response.rbi +8 -177
  234. data/rbi/metronome_sdk/models/v1/customer_preview_events_params.rbi +214 -0
  235. data/rbi/metronome_sdk/models/v1/customer_preview_events_response.rbi +35 -0
  236. data/rbi/metronome_sdk/models/v1/customer_retrieve_response.rbi +6 -255
  237. data/rbi/metronome_sdk/models/v1/customer_set_name_response.rbi +6 -86
  238. data/rbi/metronome_sdk/models/v1/customers/alert_list_response.rbi +3 -623
  239. data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_response.rbi +4 -622
  240. data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +11 -0
  241. data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +12 -8
  242. data/rbi/metronome_sdk/models/v1/customers/commit_create_response.rbi +4 -44
  243. data/rbi/metronome_sdk/models/v1/customers/commit_list_params.rbi +11 -0
  244. data/rbi/metronome_sdk/models/v1/customers/commit_list_response.rbi +3 -2164
  245. data/rbi/metronome_sdk/models/v1/customers/commit_update_end_date_response.rbi +4 -44
  246. data/rbi/metronome_sdk/models/v1/customers/credit_create_response.rbi +4 -44
  247. data/rbi/metronome_sdk/models/v1/customers/credit_list_params.rbi +11 -0
  248. data/rbi/metronome_sdk/models/v1/customers/credit_list_response.rbi +3 -1224
  249. data/rbi/metronome_sdk/models/v1/customers/credit_update_end_date_response.rbi +4 -44
  250. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +572 -0
  251. data/rbi/metronome_sdk/models/v1/customers/{invoice_list_response.rbi → invoice.rbi} +182 -589
  252. data/rbi/metronome_sdk/models/v1/customers/invoice_list_breakdowns_response.rbi +4 -2561
  253. data/rbi/metronome_sdk/models/v1/customers/invoice_retrieve_response.rbi +6 -2612
  254. data/rbi/metronome_sdk/models/v1/customers/plan_add_response.rbi +4 -41
  255. data/rbi/metronome_sdk/models/v1/customers/plan_list_response.rbi +4 -39
  256. data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +5 -0
  257. data/rbi/metronome_sdk/models/v1/plan_detail.rbi +349 -0
  258. data/rbi/metronome_sdk/models/v1/plan_get_details_response.rbi +6 -560
  259. data/rbi/metronome_sdk/models/v1/plan_list_charges_response.rbi +4 -37
  260. data/rbi/metronome_sdk/models/v1/plan_list_customers_response.rbi +4 -248
  261. data/rbi/metronome_sdk/models/v1/rollover_amount_max_amount.rbi +79 -0
  262. data/rbi/metronome_sdk/models/v1/rollover_amount_max_percentage.rbi +80 -0
  263. data/rbi/metronome_sdk/models/v1/usage_search_params.rbi +48 -0
  264. data/rbi/metronome_sdk/models/v1/usage_search_response.rbi +438 -0
  265. data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +23 -23
  266. data/rbi/metronome_sdk/models/v2/contract_edit_commit_response.rbi +4 -41
  267. data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +11 -15
  268. data/rbi/metronome_sdk/models/v2/contract_edit_credit_response.rbi +4 -41
  269. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +2463 -206
  270. data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +4 -37
  271. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1381 -1550
  272. data/rbi/metronome_sdk/models/v2/contract_list_response.rbi +2017 -1466
  273. data/rbi/metronome_sdk/models/v2/contract_retrieve_response.rbi +2017 -1466
  274. data/rbi/metronome_sdk/models.rbi +32 -0
  275. data/rbi/metronome_sdk/resources/v1/alerts.rbi +3 -0
  276. data/rbi/metronome_sdk/resources/v1/billable_metrics.rbi +2 -6
  277. data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +4 -4
  278. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +1 -4
  279. data/rbi/metronome_sdk/resources/v1/contracts.rbi +13 -4
  280. data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +4 -0
  281. data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +9 -4
  282. data/rbi/metronome_sdk/resources/v1/customers/credits.rbi +3 -0
  283. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +1 -1
  284. data/rbi/metronome_sdk/resources/v1/customers.rbi +34 -3
  285. data/rbi/metronome_sdk/resources/v1/usage.rbi +17 -0
  286. data/rbi/metronome_sdk/resources/v2/contracts.rbi +24 -14
  287. data/sig/metronome_sdk/errors.rbs +9 -0
  288. data/sig/metronome_sdk/internal/type/converter.rbs +7 -1
  289. data/sig/metronome_sdk/models/base_usage_filter.rbs +28 -0
  290. data/sig/metronome_sdk/models/commit.rbs +1063 -0
  291. data/sig/metronome_sdk/models/contract_without_amendments.rbs +1828 -0
  292. data/sig/metronome_sdk/models/credit.rbs +686 -0
  293. data/sig/metronome_sdk/models/credit_type_data.rbs +15 -0
  294. data/sig/metronome_sdk/models/discount.rbs +63 -0
  295. data/sig/metronome_sdk/models/event_type_filter.rbs +26 -0
  296. data/sig/metronome_sdk/models/id.rbs +13 -0
  297. data/sig/metronome_sdk/models/override.rbs +399 -0
  298. data/sig/metronome_sdk/models/pro_service.rbs +61 -0
  299. data/sig/metronome_sdk/models/property_filter.rbs +41 -0
  300. data/sig/metronome_sdk/models/rate.rbs +94 -0
  301. data/sig/metronome_sdk/models/schedule_duration.rbs +56 -0
  302. data/sig/metronome_sdk/models/schedule_point_in_time.rbs +75 -0
  303. data/sig/metronome_sdk/models/scheduled_charge.rbs +70 -0
  304. data/sig/metronome_sdk/models/tier.rbs +17 -0
  305. data/sig/metronome_sdk/models/v1/alert_archive_response.rbs +4 -19
  306. data/sig/metronome_sdk/models/v1/alert_create_response.rbs +4 -19
  307. data/sig/metronome_sdk/models/v1/billable_metric_archive_params.rbs +4 -12
  308. data/sig/metronome_sdk/models/v1/billable_metric_archive_response.rbs +4 -19
  309. data/sig/metronome_sdk/models/v1/billable_metric_create_params.rbs +12 -73
  310. data/sig/metronome_sdk/models/v1/billable_metric_create_response.rbs +4 -19
  311. data/sig/metronome_sdk/models/v1/billable_metric_list_response.rbs +12 -73
  312. data/sig/metronome_sdk/models/v1/billable_metric_retrieve_response.rbs +12 -73
  313. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +291 -24
  314. data/sig/metronome_sdk/models/v1/contract_amend_response.rbs +4 -19
  315. data/sig/metronome_sdk/models/v1/contract_archive_response.rbs +4 -19
  316. data/sig/metronome_sdk/models/v1/contract_create_historical_invoices_response.rbs +4 -1291
  317. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +694 -84
  318. data/sig/metronome_sdk/models/v1/contract_create_response.rbs +4 -19
  319. data/sig/metronome_sdk/models/v1/contract_list_balances_params.rbs +7 -0
  320. data/sig/metronome_sdk/models/v1/contract_list_balances_response.rbs +1 -1642
  321. data/sig/metronome_sdk/models/v1/contract_list_response.rbs +188 -10437
  322. data/sig/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbs +15 -271
  323. data/sig/metronome_sdk/models/v1/contract_retrieve_response.rbs +188 -10437
  324. data/sig/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_response.rbs +4 -1291
  325. data/sig/metronome_sdk/models/v1/contract_update_end_date_response.rbs +4 -19
  326. data/sig/metronome_sdk/models/v1/contracts/product_archive_response.rbs +4 -21
  327. data/sig/metronome_sdk/models/v1/contracts/product_create_params.rbs +8 -82
  328. data/sig/metronome_sdk/models/v1/contracts/product_create_response.rbs +4 -21
  329. data/sig/metronome_sdk/models/v1/contracts/product_list_item_state.rbs +121 -0
  330. data/sig/metronome_sdk/models/v1/contracts/product_list_response.rbs +16 -466
  331. data/sig/metronome_sdk/models/v1/contracts/product_retrieve_params.rbs +4 -12
  332. data/sig/metronome_sdk/models/v1/contracts/product_retrieve_response.rbs +16 -466
  333. data/sig/metronome_sdk/models/v1/contracts/product_update_params.rbs +8 -82
  334. data/sig/metronome_sdk/models/v1/contracts/product_update_response.rbs +4 -21
  335. data/sig/metronome_sdk/models/v1/contracts/quantity_conversion.rbs +47 -0
  336. data/sig/metronome_sdk/models/v1/contracts/quantity_rounding.rbs +41 -0
  337. data/sig/metronome_sdk/models/v1/contracts/rate_card_archive_params.rbs +4 -12
  338. data/sig/metronome_sdk/models/v1/contracts/rate_card_archive_response.rbs +4 -21
  339. data/sig/metronome_sdk/models/v1/contracts/rate_card_create_response.rbs +4 -21
  340. data/sig/metronome_sdk/models/v1/contracts/rate_card_list_response.rbs +10 -34
  341. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_params.rbs +4 -12
  342. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbs +10 -144
  343. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rbs +10 -34
  344. data/sig/metronome_sdk/models/v1/contracts/rate_card_update_response.rbs +4 -21
  345. data/sig/metronome_sdk/models/v1/contracts/rate_cards/product_order_set_response.rbs +4 -21
  346. data/sig/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_response.rbs +4 -21
  347. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +12 -40
  348. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_response.rbs +4 -21
  349. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +12 -40
  350. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbs +18 -58
  351. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbs +10 -144
  352. data/sig/metronome_sdk/models/v1/credit_grant_create_params.rbs +2 -66
  353. data/sig/metronome_sdk/models/v1/credit_grant_create_response.rbs +4 -19
  354. data/sig/metronome_sdk/models/v1/credit_grant_edit_response.rbs +4 -19
  355. data/sig/metronome_sdk/models/v1/credit_grant_list_entries_params.rbs +20 -0
  356. data/sig/metronome_sdk/models/v1/credit_grant_list_entries_response.rbs +12 -118
  357. data/sig/metronome_sdk/models/v1/credit_grant_list_response.rbs +16 -140
  358. data/sig/metronome_sdk/models/v1/credit_grant_void_response.rbs +4 -19
  359. data/sig/metronome_sdk/models/v1/credit_ledger_entry.rbs +52 -0
  360. data/sig/metronome_sdk/models/v1/customer.rbs +44 -0
  361. data/sig/metronome_sdk/models/v1/customer_archive_params.rbs +4 -12
  362. data/sig/metronome_sdk/models/v1/customer_archive_response.rbs +4 -19
  363. data/sig/metronome_sdk/models/v1/customer_create_response.rbs +4 -48
  364. data/sig/metronome_sdk/models/v1/{customer_list_response.rbs → customer_detail.rbs} +17 -17
  365. data/sig/metronome_sdk/models/v1/customer_list_billable_metrics_response.rbs +12 -73
  366. data/sig/metronome_sdk/models/v1/customer_preview_events_params.rbs +105 -0
  367. data/sig/metronome_sdk/models/v1/customer_preview_events_response.rbs +16 -0
  368. data/sig/metronome_sdk/models/v1/customer_retrieve_response.rbs +4 -112
  369. data/sig/metronome_sdk/models/v1/customer_set_name_response.rbs +4 -48
  370. data/sig/metronome_sdk/models/v1/customers/alert_list_response.rbs +4 -243
  371. data/sig/metronome_sdk/models/v1/customers/alert_retrieve_response.rbs +4 -247
  372. data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbs +7 -0
  373. data/sig/metronome_sdk/models/v1/customers/commit_create_response.rbs +4 -21
  374. data/sig/metronome_sdk/models/v1/customers/commit_list_params.rbs +7 -0
  375. data/sig/metronome_sdk/models/v1/customers/commit_list_response.rbs +4 -1057
  376. data/sig/metronome_sdk/models/v1/customers/commit_update_end_date_response.rbs +4 -21
  377. data/sig/metronome_sdk/models/v1/customers/credit_create_response.rbs +4 -21
  378. data/sig/metronome_sdk/models/v1/customers/credit_list_params.rbs +7 -0
  379. data/sig/metronome_sdk/models/v1/customers/credit_list_response.rbs +4 -596
  380. data/sig/metronome_sdk/models/v1/customers/credit_update_end_date_response.rbs +4 -21
  381. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +234 -0
  382. data/sig/metronome_sdk/models/v1/customers/{invoice_list_response.rbs → invoice.rbs} +147 -305
  383. data/sig/metronome_sdk/models/v1/customers/invoice_list_breakdowns_response.rbs +8 -1278
  384. data/sig/metronome_sdk/models/v1/customers/invoice_retrieve_response.rbs +4 -1294
  385. data/sig/metronome_sdk/models/v1/customers/plan_add_response.rbs +4 -19
  386. data/sig/metronome_sdk/models/v1/customers/plan_list_response.rbs +4 -16
  387. data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +2 -1
  388. data/sig/metronome_sdk/models/v1/plan_detail.rbs +203 -0
  389. data/sig/metronome_sdk/models/v1/plan_get_details_response.rbs +4 -267
  390. data/sig/metronome_sdk/models/v1/plan_list_charges_response.rbs +4 -16
  391. data/sig/metronome_sdk/models/v1/plan_list_customers_response.rbs +4 -108
  392. data/sig/metronome_sdk/models/v1/rollover_amount_max_amount.rbs +37 -0
  393. data/sig/metronome_sdk/models/v1/rollover_amount_max_percentage.rbs +37 -0
  394. data/sig/metronome_sdk/models/v1/usage_search_params.rbs +26 -0
  395. data/sig/metronome_sdk/models/v1/usage_search_response.rbs +230 -0
  396. data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +4 -8
  397. data/sig/metronome_sdk/models/v2/contract_edit_commit_response.rbs +4 -19
  398. data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +4 -8
  399. data/sig/metronome_sdk/models/v2/contract_edit_credit_response.rbs +4 -19
  400. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +989 -77
  401. data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +4 -19
  402. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +510 -655
  403. data/sig/metronome_sdk/models/v2/contract_list_response.rbs +970 -809
  404. data/sig/metronome_sdk/models/v2/contract_retrieve_response.rbs +970 -809
  405. data/sig/metronome_sdk/models.rbs +32 -0
  406. data/sig/metronome_sdk/resources/v1/billable_metrics.rbs +2 -2
  407. data/sig/metronome_sdk/resources/v1/contracts/products.rbs +4 -4
  408. data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +1 -1
  409. data/sig/metronome_sdk/resources/v1/contracts.rbs +4 -1
  410. data/sig/metronome_sdk/resources/v1/credit_grants.rbs +1 -0
  411. data/sig/metronome_sdk/resources/v1/customers/commits.rbs +1 -0
  412. data/sig/metronome_sdk/resources/v1/customers/credits.rbs +1 -0
  413. data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +1 -1
  414. data/sig/metronome_sdk/resources/v1/customers.rbs +9 -1
  415. data/sig/metronome_sdk/resources/v1/usage.rbs +5 -0
  416. data/sig/metronome_sdk/resources/v2/contracts.rbs +3 -2
  417. metadata +97 -10
@@ -0,0 +1,2043 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MetronomeSDK
4
+ module Models
5
+ class ContractWithoutAmendments < MetronomeSDK::Internal::Type::BaseModel
6
+ # @!attribute commits
7
+ #
8
+ # @return [Array<MetronomeSDK::Models::Commit>]
9
+ required :commits, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Commit] }
10
+
11
+ # @!attribute created_at
12
+ #
13
+ # @return [Time]
14
+ required :created_at, Time
15
+
16
+ # @!attribute created_by
17
+ #
18
+ # @return [String]
19
+ required :created_by, String
20
+
21
+ # @!attribute overrides
22
+ #
23
+ # @return [Array<MetronomeSDK::Models::Override>]
24
+ required :overrides, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Override] }
25
+
26
+ # @!attribute scheduled_charges
27
+ #
28
+ # @return [Array<MetronomeSDK::Models::ScheduledCharge>]
29
+ required :scheduled_charges, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ScheduledCharge] }
30
+
31
+ # @!attribute starting_at
32
+ #
33
+ # @return [Time]
34
+ required :starting_at, Time
35
+
36
+ # @!attribute transitions
37
+ #
38
+ # @return [Array<MetronomeSDK::Models::ContractWithoutAmendments::Transition>]
39
+ required :transitions,
40
+ -> {
41
+ MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractWithoutAmendments::Transition]
42
+ }
43
+
44
+ # @!attribute usage_statement_schedule
45
+ #
46
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::UsageStatementSchedule]
47
+ required :usage_statement_schedule,
48
+ -> {
49
+ MetronomeSDK::ContractWithoutAmendments::UsageStatementSchedule
50
+ }
51
+
52
+ # @!attribute credits
53
+ #
54
+ # @return [Array<MetronomeSDK::Models::Credit>, nil]
55
+ optional :credits, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Credit] }
56
+
57
+ # @!attribute discounts
58
+ # This field's availability is dependent on your client's configuration.
59
+ #
60
+ # @return [Array<MetronomeSDK::Models::Discount>, nil]
61
+ optional :discounts, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Discount] }
62
+
63
+ # @!attribute ending_before
64
+ #
65
+ # @return [Time, nil]
66
+ optional :ending_before, Time
67
+
68
+ # @!attribute hierarchy_configuration
69
+ # Either a **parent** configuration with a list of children or a **child**
70
+ # configuration with a single parent.
71
+ #
72
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::HierarchyConfiguration::ParentHierarchyConfiguration, MetronomeSDK::Models::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration, nil]
73
+ optional :hierarchy_configuration,
74
+ union: -> { MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration }
75
+
76
+ # @!attribute name
77
+ #
78
+ # @return [String, nil]
79
+ optional :name, String
80
+
81
+ # @!attribute net_payment_terms_days
82
+ #
83
+ # @return [Float, nil]
84
+ optional :net_payment_terms_days, Float
85
+
86
+ # @!attribute netsuite_sales_order_id
87
+ # This field's availability is dependent on your client's configuration.
88
+ #
89
+ # @return [String, nil]
90
+ optional :netsuite_sales_order_id, String
91
+
92
+ # @!attribute prepaid_balance_threshold_configuration
93
+ #
94
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration, nil]
95
+ optional :prepaid_balance_threshold_configuration,
96
+ -> { MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration }
97
+
98
+ # @!attribute professional_services
99
+ # This field's availability is dependent on your client's configuration.
100
+ #
101
+ # @return [Array<MetronomeSDK::Models::ProService>, nil]
102
+ optional :professional_services, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ProService] }
103
+
104
+ # @!attribute rate_card_id
105
+ #
106
+ # @return [String, nil]
107
+ optional :rate_card_id, String
108
+
109
+ # @!attribute recurring_commits
110
+ #
111
+ # @return [Array<MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit>, nil]
112
+ optional :recurring_commits,
113
+ -> {
114
+ MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractWithoutAmendments::RecurringCommit]
115
+ }
116
+
117
+ # @!attribute recurring_credits
118
+ #
119
+ # @return [Array<MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit>, nil]
120
+ optional :recurring_credits,
121
+ -> {
122
+ MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractWithoutAmendments::RecurringCredit]
123
+ }
124
+
125
+ # @!attribute reseller_royalties
126
+ # This field's availability is dependent on your client's configuration.
127
+ #
128
+ # @return [Array<MetronomeSDK::Models::ContractWithoutAmendments::ResellerRoyalty>, nil]
129
+ optional :reseller_royalties,
130
+ -> {
131
+ MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty]
132
+ }
133
+
134
+ # @!attribute salesforce_opportunity_id
135
+ # This field's availability is dependent on your client's configuration.
136
+ #
137
+ # @return [String, nil]
138
+ optional :salesforce_opportunity_id, String
139
+
140
+ # @!attribute scheduled_charges_on_usage_invoices
141
+ # Determines which scheduled and commit charges to consolidate onto the Contract's
142
+ # usage invoice. The charge's `timestamp` must match the usage invoice's
143
+ # `ending_before` date for consolidation to occur. This field cannot be modified
144
+ # after a Contract has been created. If this field is omitted, charges will appear
145
+ # on a separate invoice from usage charges.
146
+ #
147
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::ScheduledChargesOnUsageInvoices, nil]
148
+ optional :scheduled_charges_on_usage_invoices,
149
+ enum: -> { MetronomeSDK::ContractWithoutAmendments::ScheduledChargesOnUsageInvoices }
150
+
151
+ # @!attribute spend_threshold_configuration
152
+ #
153
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration, nil]
154
+ optional :spend_threshold_configuration,
155
+ -> { MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration }
156
+
157
+ # @!attribute total_contract_value
158
+ # This field's availability is dependent on your client's configuration.
159
+ #
160
+ # @return [Float, nil]
161
+ optional :total_contract_value, Float
162
+
163
+ # @!attribute usage_filter
164
+ #
165
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::UsageFilter, nil]
166
+ optional :usage_filter, -> { MetronomeSDK::ContractWithoutAmendments::UsageFilter }
167
+
168
+ # @!method initialize(commits:, created_at:, created_by:, overrides:, scheduled_charges:, starting_at:, transitions:, usage_statement_schedule:, credits: nil, discounts: nil, ending_before: nil, hierarchy_configuration: nil, name: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, prepaid_balance_threshold_configuration: 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, total_contract_value: nil, usage_filter: nil)
169
+ # Some parameter documentations has been truncated, see
170
+ # {MetronomeSDK::Models::ContractWithoutAmendments} for more details.
171
+ #
172
+ # @param commits [Array<MetronomeSDK::Models::Commit>]
173
+ #
174
+ # @param created_at [Time]
175
+ #
176
+ # @param created_by [String]
177
+ #
178
+ # @param overrides [Array<MetronomeSDK::Models::Override>]
179
+ #
180
+ # @param scheduled_charges [Array<MetronomeSDK::Models::ScheduledCharge>]
181
+ #
182
+ # @param starting_at [Time]
183
+ #
184
+ # @param transitions [Array<MetronomeSDK::Models::ContractWithoutAmendments::Transition>]
185
+ #
186
+ # @param usage_statement_schedule [MetronomeSDK::Models::ContractWithoutAmendments::UsageStatementSchedule]
187
+ #
188
+ # @param credits [Array<MetronomeSDK::Models::Credit>]
189
+ #
190
+ # @param discounts [Array<MetronomeSDK::Models::Discount>] This field's availability is dependent on your client's configuration.
191
+ #
192
+ # @param ending_before [Time]
193
+ #
194
+ # @param hierarchy_configuration [MetronomeSDK::Models::ContractWithoutAmendments::HierarchyConfiguration::ParentHierarchyConfiguration, MetronomeSDK::Models::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration] Either a **parent** configuration with a list of children or a **child** configu
195
+ #
196
+ # @param name [String]
197
+ #
198
+ # @param net_payment_terms_days [Float]
199
+ #
200
+ # @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
201
+ #
202
+ # @param prepaid_balance_threshold_configuration [MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration]
203
+ #
204
+ # @param professional_services [Array<MetronomeSDK::Models::ProService>] This field's availability is dependent on your client's configuration.
205
+ #
206
+ # @param rate_card_id [String]
207
+ #
208
+ # @param recurring_commits [Array<MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit>]
209
+ #
210
+ # @param recurring_credits [Array<MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit>]
211
+ #
212
+ # @param reseller_royalties [Array<MetronomeSDK::Models::ContractWithoutAmendments::ResellerRoyalty>] This field's availability is dependent on your client's configuration.
213
+ #
214
+ # @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
215
+ #
216
+ # @param scheduled_charges_on_usage_invoices [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::ScheduledChargesOnUsageInvoices] Determines which scheduled and commit charges to consolidate onto the Contract's
217
+ #
218
+ # @param spend_threshold_configuration [MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration]
219
+ #
220
+ # @param total_contract_value [Float] This field's availability is dependent on your client's configuration.
221
+ #
222
+ # @param usage_filter [MetronomeSDK::Models::ContractWithoutAmendments::UsageFilter]
223
+
224
+ class Transition < MetronomeSDK::Internal::Type::BaseModel
225
+ # @!attribute from_contract_id
226
+ #
227
+ # @return [String]
228
+ required :from_contract_id, String
229
+
230
+ # @!attribute to_contract_id
231
+ #
232
+ # @return [String]
233
+ required :to_contract_id, String
234
+
235
+ # @!attribute type
236
+ #
237
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::Transition::Type]
238
+ required :type, enum: -> { MetronomeSDK::ContractWithoutAmendments::Transition::Type }
239
+
240
+ # @!method initialize(from_contract_id:, to_contract_id:, type:)
241
+ # @param from_contract_id [String]
242
+ # @param to_contract_id [String]
243
+ # @param type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::Transition::Type]
244
+
245
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::Transition#type
246
+ module Type
247
+ extend MetronomeSDK::Internal::Type::Enum
248
+
249
+ SUPERSEDE = :SUPERSEDE
250
+ RENEWAL = :RENEWAL
251
+
252
+ # @!method self.values
253
+ # @return [Array<Symbol>]
254
+ end
255
+ end
256
+
257
+ # @see MetronomeSDK::Models::ContractWithoutAmendments#usage_statement_schedule
258
+ class UsageStatementSchedule < MetronomeSDK::Internal::Type::BaseModel
259
+ # @!attribute billing_anchor_date
260
+ # Contract usage statements follow a selected cadence based on this date.
261
+ #
262
+ # @return [Time]
263
+ required :billing_anchor_date, Time
264
+
265
+ # @!attribute frequency
266
+ #
267
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::UsageStatementSchedule::Frequency]
268
+ required :frequency,
269
+ enum: -> { MetronomeSDK::ContractWithoutAmendments::UsageStatementSchedule::Frequency }
270
+
271
+ # @!method initialize(billing_anchor_date:, frequency:)
272
+ # @param billing_anchor_date [Time] Contract usage statements follow a selected cadence based on this date.
273
+ #
274
+ # @param frequency [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::UsageStatementSchedule::Frequency]
275
+
276
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::UsageStatementSchedule#frequency
277
+ module Frequency
278
+ extend MetronomeSDK::Internal::Type::Enum
279
+
280
+ MONTHLY = :MONTHLY
281
+ QUARTERLY = :QUARTERLY
282
+ ANNUAL = :ANNUAL
283
+ WEEKLY = :WEEKLY
284
+
285
+ # @!method self.values
286
+ # @return [Array<Symbol>]
287
+ end
288
+ end
289
+
290
+ # Either a **parent** configuration with a list of children or a **child**
291
+ # configuration with a single parent.
292
+ #
293
+ # @see MetronomeSDK::Models::ContractWithoutAmendments#hierarchy_configuration
294
+ module HierarchyConfiguration
295
+ extend MetronomeSDK::Internal::Type::Union
296
+
297
+ variant -> {
298
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ParentHierarchyConfiguration
299
+ }
300
+
301
+ variant -> {
302
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration
303
+ }
304
+
305
+ class ParentHierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
306
+ # @!attribute children
307
+ # List of contracts that belong to this parent.
308
+ #
309
+ # @return [Array<MetronomeSDK::Models::ContractWithoutAmendments::HierarchyConfiguration::ParentHierarchyConfiguration::Child>]
310
+ required :children,
311
+ -> {
312
+ MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ParentHierarchyConfiguration::Child]
313
+ }
314
+
315
+ # @!method initialize(children:)
316
+ # @param children [Array<MetronomeSDK::Models::ContractWithoutAmendments::HierarchyConfiguration::ParentHierarchyConfiguration::Child>] List of contracts that belong to this parent.
317
+
318
+ class Child < MetronomeSDK::Internal::Type::BaseModel
319
+ # @!attribute contract_id
320
+ #
321
+ # @return [String]
322
+ required :contract_id, String
323
+
324
+ # @!attribute customer_id
325
+ #
326
+ # @return [String]
327
+ required :customer_id, String
328
+
329
+ # @!method initialize(contract_id:, customer_id:)
330
+ # @param contract_id [String]
331
+ # @param customer_id [String]
332
+ end
333
+ end
334
+
335
+ class ChildHierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
336
+ # @!attribute parent
337
+ # The single parent contract/customer for this child.
338
+ #
339
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration::Parent]
340
+ required :parent,
341
+ -> {
342
+ MetronomeSDK::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration::Parent
343
+ }
344
+
345
+ # @!method initialize(parent:)
346
+ # @param parent [MetronomeSDK::Models::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration::Parent] The single parent contract/customer for this child.
347
+
348
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration#parent
349
+ class Parent < MetronomeSDK::Internal::Type::BaseModel
350
+ # @!attribute contract_id
351
+ #
352
+ # @return [String]
353
+ required :contract_id, String
354
+
355
+ # @!attribute customer_id
356
+ #
357
+ # @return [String]
358
+ required :customer_id, String
359
+
360
+ # @!method initialize(contract_id:, customer_id:)
361
+ # The single parent contract/customer for this child.
362
+ #
363
+ # @param contract_id [String]
364
+ # @param customer_id [String]
365
+ end
366
+ end
367
+
368
+ # @!method self.variants
369
+ # @return [Array(MetronomeSDK::Models::ContractWithoutAmendments::HierarchyConfiguration::ParentHierarchyConfiguration, MetronomeSDK::Models::ContractWithoutAmendments::HierarchyConfiguration::ChildHierarchyConfiguration)]
370
+ end
371
+
372
+ # @see MetronomeSDK::Models::ContractWithoutAmendments#prepaid_balance_threshold_configuration
373
+ class PrepaidBalanceThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
374
+ # @!attribute commit
375
+ #
376
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit]
377
+ required :commit,
378
+ -> { MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit }
379
+
380
+ # @!attribute is_enabled
381
+ # When set to false, the contract will not be evaluated against the
382
+ # threshold_amount. Toggling to true will result an immediate evaluation,
383
+ # regardless of prior state.
384
+ #
385
+ # @return [Boolean]
386
+ required :is_enabled, MetronomeSDK::Internal::Type::Boolean
387
+
388
+ # @!attribute payment_gate_config
389
+ #
390
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig]
391
+ required :payment_gate_config,
392
+ -> {
393
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig
394
+ }
395
+
396
+ # @!attribute recharge_to_amount
397
+ # Specify the amount the balance should be recharged to.
398
+ #
399
+ # @return [Float]
400
+ required :recharge_to_amount, Float
401
+
402
+ # @!attribute threshold_amount
403
+ # Specify the threshold amount for the contract. Each time the contract's prepaid
404
+ # balance lowers to this amount, a threshold charge will be initiated.
405
+ #
406
+ # @return [Float]
407
+ required :threshold_amount, Float
408
+
409
+ # @!attribute custom_credit_type_id
410
+ # If provided, the threshold, recharge-to amount, and the resulting threshold
411
+ # commit amount will be in terms of this credit type instead of the fiat currency.
412
+ #
413
+ # @return [String, nil]
414
+ optional :custom_credit_type_id, String
415
+
416
+ # @!method initialize(commit:, is_enabled:, payment_gate_config:, recharge_to_amount:, threshold_amount:, custom_credit_type_id: nil)
417
+ # Some parameter documentations has been truncated, see
418
+ # {MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration}
419
+ # for more details.
420
+ #
421
+ # @param commit [MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit]
422
+ #
423
+ # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
424
+ #
425
+ # @param payment_gate_config [MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig]
426
+ #
427
+ # @param recharge_to_amount [Float] Specify the amount the balance should be recharged to.
428
+ #
429
+ # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's prepaid
430
+ #
431
+ # @param custom_credit_type_id [String] If provided, the threshold, recharge-to amount, and the resulting threshold comm
432
+
433
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration#commit
434
+ class Commit < MetronomeSDK::Internal::Type::BaseModel
435
+ # @!attribute product_id
436
+ # The commit product that will be used to generate the line item for commit
437
+ # payment.
438
+ #
439
+ # @return [String]
440
+ required :product_id, String
441
+
442
+ # @!attribute applicable_product_ids
443
+ # Which products the threshold commit applies to. If applicable_product_ids,
444
+ # applicable_product_tags or specifiers are not provided, the commit applies to
445
+ # all products.
446
+ #
447
+ # @return [Array<String>, nil]
448
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
449
+
450
+ # @!attribute applicable_product_tags
451
+ # Which tags the threshold commit applies to. If applicable_product_ids,
452
+ # applicable_product_tags or specifiers are not provided, the commit applies to
453
+ # all products.
454
+ #
455
+ # @return [Array<String>, nil]
456
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
457
+
458
+ # @!attribute description
459
+ #
460
+ # @return [String, nil]
461
+ optional :description, String
462
+
463
+ # @!attribute name
464
+ # Specify the name of the line item for the threshold charge. If left blank, it
465
+ # will default to the commit product name.
466
+ #
467
+ # @return [String, nil]
468
+ optional :name, String
469
+
470
+ # @!attribute specifiers
471
+ # List of filters that determine what kind of customer usage draws down a commit
472
+ # or credit. A customer's usage needs to meet the condition of at least one of the
473
+ # specifiers to contribute to a commit's or credit's drawdown. This field cannot
474
+ # be used together with `applicable_product_ids` or `applicable_product_tags`.
475
+ #
476
+ # @return [Array<MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit::Specifier>, nil]
477
+ optional :specifiers,
478
+ -> {
479
+ MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit::Specifier]
480
+ }
481
+
482
+ # @!method initialize(product_id:, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, name: nil, specifiers: nil)
483
+ # Some parameter documentations has been truncated, see
484
+ # {MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit}
485
+ # for more details.
486
+ #
487
+ # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
488
+ #
489
+ # @param applicable_product_ids [Array<String>] Which products the threshold commit applies to. If applicable_product_ids, appli
490
+ #
491
+ # @param applicable_product_tags [Array<String>] Which tags the threshold commit applies to. If applicable_product_ids, applicabl
492
+ #
493
+ # @param description [String]
494
+ #
495
+ # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
496
+ #
497
+ # @param specifiers [Array<MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
498
+
499
+ class Specifier < MetronomeSDK::Internal::Type::BaseModel
500
+ # @!attribute presentation_group_values
501
+ #
502
+ # @return [Hash{Symbol=>String}, nil]
503
+ optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
504
+
505
+ # @!attribute pricing_group_values
506
+ #
507
+ # @return [Hash{Symbol=>String}, nil]
508
+ optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
509
+
510
+ # @!attribute product_id
511
+ # If provided, the specifier will only apply to the product with the specified ID.
512
+ #
513
+ # @return [String, nil]
514
+ optional :product_id, String
515
+
516
+ # @!attribute product_tags
517
+ # If provided, the specifier will only apply to products with all the specified
518
+ # tags.
519
+ #
520
+ # @return [Array<String>, nil]
521
+ optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
522
+
523
+ # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
524
+ # Some parameter documentations has been truncated, see
525
+ # {MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::Commit::Specifier}
526
+ # for more details.
527
+ #
528
+ # @param presentation_group_values [Hash{Symbol=>String}]
529
+ #
530
+ # @param pricing_group_values [Hash{Symbol=>String}]
531
+ #
532
+ # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
533
+ #
534
+ # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
535
+ end
536
+ end
537
+
538
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration#payment_gate_config
539
+ class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
540
+ # @!attribute payment_gate_type
541
+ # Gate access to the commit balance based on successful collection of payment.
542
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
543
+ # facilitate payment using your own payment integration. Select NONE if you do not
544
+ # wish to payment gate the commit balance.
545
+ #
546
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType]
547
+ required :payment_gate_type,
548
+ enum: -> {
549
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType
550
+ }
551
+
552
+ # @!attribute precalculated_tax_config
553
+ # Only applicable if using PRECALCULATED as your tax type.
554
+ #
555
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
556
+ optional :precalculated_tax_config,
557
+ -> {
558
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig
559
+ }
560
+
561
+ # @!attribute stripe_config
562
+ # Only applicable if using STRIPE as your payment gate type.
563
+ #
564
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
565
+ optional :stripe_config,
566
+ -> {
567
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig
568
+ }
569
+
570
+ # @!attribute tax_type
571
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
572
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
573
+ # will default to NONE.
574
+ #
575
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType, nil]
576
+ optional :tax_type,
577
+ enum: -> {
578
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType
579
+ }
580
+
581
+ # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
582
+ # Some parameter documentations has been truncated, see
583
+ # {MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig}
584
+ # for more details.
585
+ #
586
+ # @param payment_gate_type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
587
+ #
588
+ # @param precalculated_tax_config [MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
589
+ #
590
+ # @param stripe_config [MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gate type.
591
+ #
592
+ # @param tax_type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
593
+
594
+ # Gate access to the commit balance based on successful collection of payment.
595
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
596
+ # facilitate payment using your own payment integration. Select NONE if you do not
597
+ # wish to payment gate the commit balance.
598
+ #
599
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig#payment_gate_type
600
+ module PaymentGateType
601
+ extend MetronomeSDK::Internal::Type::Enum
602
+
603
+ NONE = :NONE
604
+ STRIPE = :STRIPE
605
+ EXTERNAL = :EXTERNAL
606
+
607
+ # @!method self.values
608
+ # @return [Array<Symbol>]
609
+ end
610
+
611
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
612
+ class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
613
+ # @!attribute tax_amount
614
+ # Amount of tax to be applied. This should be in the same currency and
615
+ # denomination as the commit's invoice schedule
616
+ #
617
+ # @return [Float]
618
+ required :tax_amount, Float
619
+
620
+ # @!attribute tax_name
621
+ # Name of the tax to be applied. This may be used in an invoice line item
622
+ # description.
623
+ #
624
+ # @return [String, nil]
625
+ optional :tax_name, String
626
+
627
+ # @!method initialize(tax_amount:, tax_name: nil)
628
+ # Some parameter documentations has been truncated, see
629
+ # {MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
630
+ # for more details.
631
+ #
632
+ # Only applicable if using PRECALCULATED as your tax type.
633
+ #
634
+ # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
635
+ #
636
+ # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
637
+ end
638
+
639
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig#stripe_config
640
+ class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
641
+ # @!attribute payment_type
642
+ # If left blank, will default to INVOICE
643
+ #
644
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
645
+ required :payment_type,
646
+ enum: -> {
647
+ MetronomeSDK::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType
648
+ }
649
+
650
+ # @!attribute invoice_metadata
651
+ # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
652
+ # your payment type.
653
+ #
654
+ # @return [Hash{Symbol=>String}, nil]
655
+ optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
656
+
657
+ # @!method initialize(payment_type:, invoice_metadata: nil)
658
+ # Some parameter documentations has been truncated, see
659
+ # {MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig}
660
+ # for more details.
661
+ #
662
+ # Only applicable if using STRIPE as your payment gate type.
663
+ #
664
+ # @param payment_type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
665
+ #
666
+ # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
667
+
668
+ # If left blank, will default to INVOICE
669
+ #
670
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
671
+ module PaymentType
672
+ extend MetronomeSDK::Internal::Type::Enum
673
+
674
+ INVOICE = :INVOICE
675
+ PAYMENT_INTENT = :PAYMENT_INTENT
676
+
677
+ # @!method self.values
678
+ # @return [Array<Symbol>]
679
+ end
680
+ end
681
+
682
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
683
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
684
+ # will default to NONE.
685
+ #
686
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::PrepaidBalanceThresholdConfiguration::PaymentGateConfig#tax_type
687
+ module TaxType
688
+ extend MetronomeSDK::Internal::Type::Enum
689
+
690
+ NONE = :NONE
691
+ STRIPE = :STRIPE
692
+ ANROK = :ANROK
693
+ PRECALCULATED = :PRECALCULATED
694
+
695
+ # @!method self.values
696
+ # @return [Array<Symbol>]
697
+ end
698
+ end
699
+ end
700
+
701
+ class RecurringCommit < MetronomeSDK::Internal::Type::BaseModel
702
+ # @!attribute id
703
+ #
704
+ # @return [String]
705
+ required :id, String
706
+
707
+ # @!attribute access_amount
708
+ # The amount of commit to grant.
709
+ #
710
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::AccessAmount]
711
+ required :access_amount, -> { MetronomeSDK::ContractWithoutAmendments::RecurringCommit::AccessAmount }
712
+
713
+ # @!attribute commit_duration
714
+ # The amount of time the created commits will be valid for
715
+ #
716
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::CommitDuration]
717
+ required :commit_duration,
718
+ -> {
719
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration
720
+ }
721
+
722
+ # @!attribute priority
723
+ # Will be passed down to the individual commits
724
+ #
725
+ # @return [Float]
726
+ required :priority, Float
727
+
728
+ # @!attribute product
729
+ #
730
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::Product]
731
+ required :product, -> { MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Product }
732
+
733
+ # @!attribute rate_type
734
+ # Whether the created commits will use the commit rate or list rate
735
+ #
736
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::RateType]
737
+ required :rate_type, enum: -> { MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RateType }
738
+
739
+ # @!attribute starting_at
740
+ # Determines the start time for the first commit
741
+ #
742
+ # @return [Time]
743
+ required :starting_at, Time
744
+
745
+ # @!attribute applicable_product_ids
746
+ # Will be passed down to the individual commits
747
+ #
748
+ # @return [Array<String>, nil]
749
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
750
+
751
+ # @!attribute applicable_product_tags
752
+ # Will be passed down to the individual commits
753
+ #
754
+ # @return [Array<String>, nil]
755
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
756
+
757
+ # @!attribute contract
758
+ #
759
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::Contract, nil]
760
+ optional :contract, -> { MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Contract }
761
+
762
+ # @!attribute description
763
+ # Will be passed down to the individual commits
764
+ #
765
+ # @return [String, nil]
766
+ optional :description, String
767
+
768
+ # @!attribute ending_before
769
+ # Determines when the contract will stop creating recurring commits. Optional
770
+ #
771
+ # @return [Time, nil]
772
+ optional :ending_before, Time
773
+
774
+ # @!attribute hierarchy_configuration
775
+ # Optional configuration for recurring commit/credit hierarchy access control
776
+ #
777
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration, nil]
778
+ optional :hierarchy_configuration,
779
+ -> { MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration }
780
+
781
+ # @!attribute invoice_amount
782
+ # The amount the customer should be billed for the commit. Not required.
783
+ #
784
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::InvoiceAmount, nil]
785
+ optional :invoice_amount,
786
+ -> {
787
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::InvoiceAmount
788
+ }
789
+
790
+ # @!attribute name
791
+ # Displayed on invoices. Will be passed through to the individual commits
792
+ #
793
+ # @return [String, nil]
794
+ optional :name, String
795
+
796
+ # @!attribute netsuite_sales_order_id
797
+ # Will be passed down to the individual commits
798
+ #
799
+ # @return [String, nil]
800
+ optional :netsuite_sales_order_id, String
801
+
802
+ # @!attribute proration
803
+ # Determines whether the first and last commit will be prorated. If not provided,
804
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
805
+ #
806
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::Proration, nil]
807
+ optional :proration, enum: -> { MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration }
808
+
809
+ # @!attribute recurrence_frequency
810
+ # The frequency at which the recurring commits will be created. If not provided: -
811
+ # The commits will be created on the usage invoice frequency. If provided: - The
812
+ # period defined in the duration will correspond to this frequency. - Commits will
813
+ # be created aligned with the recurring commit's starting_at rather than the usage
814
+ # invoice dates.
815
+ #
816
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency, nil]
817
+ optional :recurrence_frequency,
818
+ enum: -> { MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency }
819
+
820
+ # @!attribute rollover_fraction
821
+ # Will be passed down to the individual commits. This controls how much of an
822
+ # individual unexpired commit will roll over upon contract transition. Must be
823
+ # between 0 and 1.
824
+ #
825
+ # @return [Float, nil]
826
+ optional :rollover_fraction, Float
827
+
828
+ # @!attribute specifiers
829
+ # List of filters that determine what kind of customer usage draws down a commit
830
+ # or credit. A customer's usage needs to meet the condition of at least one of the
831
+ # specifiers to contribute to a commit's or credit's drawdown.
832
+ #
833
+ # @return [Array<MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::Specifier>, nil]
834
+ optional :specifiers,
835
+ -> {
836
+ MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Specifier]
837
+ }
838
+
839
+ # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, invoice_amount: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil)
840
+ # Some parameter documentations has been truncated, see
841
+ # {MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit} for more
842
+ # details.
843
+ #
844
+ # @param id [String]
845
+ #
846
+ # @param access_amount [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::AccessAmount] The amount of commit to grant.
847
+ #
848
+ # @param commit_duration [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::CommitDuration] The amount of time the created commits will be valid for
849
+ #
850
+ # @param priority [Float] Will be passed down to the individual commits
851
+ #
852
+ # @param product [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::Product]
853
+ #
854
+ # @param rate_type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::RateType] Whether the created commits will use the commit rate or list rate
855
+ #
856
+ # @param starting_at [Time] Determines the start time for the first commit
857
+ #
858
+ # @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
859
+ #
860
+ # @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
861
+ #
862
+ # @param contract [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::Contract]
863
+ #
864
+ # @param description [String] Will be passed down to the individual commits
865
+ #
866
+ # @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
867
+ #
868
+ # @param hierarchy_configuration [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration] Optional configuration for recurring commit/credit hierarchy access control
869
+ #
870
+ # @param invoice_amount [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::InvoiceAmount] The amount the customer should be billed for the commit. Not required.
871
+ #
872
+ # @param name [String] Displayed on invoices. Will be passed through to the individual commits
873
+ #
874
+ # @param netsuite_sales_order_id [String] Will be passed down to the individual commits
875
+ #
876
+ # @param proration [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::Proration] Determines whether the first and last commit will be prorated. If not provided,
877
+ #
878
+ # @param recurrence_frequency [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided:
879
+ #
880
+ # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
881
+ #
882
+ # @param specifiers [Array<MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
883
+
884
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit#access_amount
885
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
886
+ # @!attribute credit_type_id
887
+ #
888
+ # @return [String]
889
+ required :credit_type_id, String
890
+
891
+ # @!attribute unit_price
892
+ #
893
+ # @return [Float]
894
+ required :unit_price, Float
895
+
896
+ # @!attribute quantity
897
+ #
898
+ # @return [Float, nil]
899
+ optional :quantity, Float
900
+
901
+ # @!method initialize(credit_type_id:, unit_price:, quantity: nil)
902
+ # The amount of commit to grant.
903
+ #
904
+ # @param credit_type_id [String]
905
+ # @param unit_price [Float]
906
+ # @param quantity [Float]
907
+ end
908
+
909
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit#commit_duration
910
+ class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
911
+ # @!attribute value
912
+ #
913
+ # @return [Float]
914
+ required :value, Float
915
+
916
+ # @!attribute unit
917
+ #
918
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit, nil]
919
+ optional :unit,
920
+ enum: -> { MetronomeSDK::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit }
921
+
922
+ # @!method initialize(value:, unit: nil)
923
+ # The amount of time the created commits will be valid for
924
+ #
925
+ # @param value [Float]
926
+ # @param unit [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit]
927
+
928
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::CommitDuration#unit
929
+ module Unit
930
+ extend MetronomeSDK::Internal::Type::Enum
931
+
932
+ PERIODS = :PERIODS
933
+
934
+ # @!method self.values
935
+ # @return [Array<Symbol>]
936
+ end
937
+ end
938
+
939
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit#product
940
+ class Product < MetronomeSDK::Internal::Type::BaseModel
941
+ # @!attribute id
942
+ #
943
+ # @return [String]
944
+ required :id, String
945
+
946
+ # @!attribute name
947
+ #
948
+ # @return [String]
949
+ required :name, String
950
+
951
+ # @!method initialize(id:, name:)
952
+ # @param id [String]
953
+ # @param name [String]
954
+ end
955
+
956
+ # Whether the created commits will use the commit rate or list rate
957
+ #
958
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit#rate_type
959
+ module RateType
960
+ extend MetronomeSDK::Internal::Type::Enum
961
+
962
+ COMMIT_RATE = :COMMIT_RATE
963
+ LIST_RATE = :LIST_RATE
964
+
965
+ # @!method self.values
966
+ # @return [Array<Symbol>]
967
+ end
968
+
969
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit#contract
970
+ class Contract < MetronomeSDK::Internal::Type::BaseModel
971
+ # @!attribute id
972
+ #
973
+ # @return [String]
974
+ required :id, String
975
+
976
+ # @!method initialize(id:)
977
+ # @param id [String]
978
+ end
979
+
980
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit#hierarchy_configuration
981
+ class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
982
+ # @!attribute child_access
983
+ #
984
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
985
+ required :child_access,
986
+ union: -> {
987
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess
988
+ }
989
+
990
+ # @!method initialize(child_access:)
991
+ # Optional configuration for recurring commit/credit hierarchy access control
992
+ #
993
+ # @param child_access [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
994
+
995
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration#child_access
996
+ module ChildAccess
997
+ extend MetronomeSDK::Internal::Type::Union
998
+
999
+ variant -> {
1000
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll
1001
+ }
1002
+
1003
+ variant -> {
1004
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone
1005
+ }
1006
+
1007
+ variant -> {
1008
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
1009
+ }
1010
+
1011
+ class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
1012
+ # @!attribute type
1013
+ #
1014
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
1015
+ required :type,
1016
+ enum: -> {
1017
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type
1018
+ }
1019
+
1020
+ # @!method initialize(type:)
1021
+ # @param type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
1022
+
1023
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
1024
+ module Type
1025
+ extend MetronomeSDK::Internal::Type::Enum
1026
+
1027
+ ALL = :ALL
1028
+
1029
+ # @!method self.values
1030
+ # @return [Array<Symbol>]
1031
+ end
1032
+ end
1033
+
1034
+ class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
1035
+ # @!attribute type
1036
+ #
1037
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
1038
+ required :type,
1039
+ enum: -> {
1040
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type
1041
+ }
1042
+
1043
+ # @!method initialize(type:)
1044
+ # @param type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
1045
+
1046
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
1047
+ module Type
1048
+ extend MetronomeSDK::Internal::Type::Enum
1049
+
1050
+ NONE = :NONE
1051
+
1052
+ # @!method self.values
1053
+ # @return [Array<Symbol>]
1054
+ end
1055
+ end
1056
+
1057
+ class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
1058
+ # @!attribute contract_ids
1059
+ #
1060
+ # @return [Array<String>]
1061
+ required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1062
+
1063
+ # @!attribute type
1064
+ #
1065
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
1066
+ required :type,
1067
+ enum: -> {
1068
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type
1069
+ }
1070
+
1071
+ # @!method initialize(contract_ids:, type:)
1072
+ # @param contract_ids [Array<String>]
1073
+ # @param type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
1074
+
1075
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
1076
+ module Type
1077
+ extend MetronomeSDK::Internal::Type::Enum
1078
+
1079
+ CONTRACT_IDS = :CONTRACT_IDS
1080
+
1081
+ # @!method self.values
1082
+ # @return [Array<Symbol>]
1083
+ end
1084
+ end
1085
+
1086
+ # @!method self.variants
1087
+ # @return [Array(MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
1088
+ end
1089
+ end
1090
+
1091
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit#invoice_amount
1092
+ class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
1093
+ # @!attribute credit_type_id
1094
+ #
1095
+ # @return [String]
1096
+ required :credit_type_id, String
1097
+
1098
+ # @!attribute quantity
1099
+ #
1100
+ # @return [Float]
1101
+ required :quantity, Float
1102
+
1103
+ # @!attribute unit_price
1104
+ #
1105
+ # @return [Float]
1106
+ required :unit_price, Float
1107
+
1108
+ # @!method initialize(credit_type_id:, quantity:, unit_price:)
1109
+ # The amount the customer should be billed for the commit. Not required.
1110
+ #
1111
+ # @param credit_type_id [String]
1112
+ # @param quantity [Float]
1113
+ # @param unit_price [Float]
1114
+ end
1115
+
1116
+ # Determines whether the first and last commit will be prorated. If not provided,
1117
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1118
+ #
1119
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit#proration
1120
+ module Proration
1121
+ extend MetronomeSDK::Internal::Type::Enum
1122
+
1123
+ NONE = :NONE
1124
+ FIRST = :FIRST
1125
+ LAST = :LAST
1126
+ FIRST_AND_LAST = :FIRST_AND_LAST
1127
+
1128
+ # @!method self.values
1129
+ # @return [Array<Symbol>]
1130
+ end
1131
+
1132
+ # The frequency at which the recurring commits will be created. If not provided: -
1133
+ # The commits will be created on the usage invoice frequency. If provided: - The
1134
+ # period defined in the duration will correspond to this frequency. - Commits will
1135
+ # be created aligned with the recurring commit's starting_at rather than the usage
1136
+ # invoice dates.
1137
+ #
1138
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit#recurrence_frequency
1139
+ module RecurrenceFrequency
1140
+ extend MetronomeSDK::Internal::Type::Enum
1141
+
1142
+ MONTHLY = :MONTHLY
1143
+ QUARTERLY = :QUARTERLY
1144
+ ANNUAL = :ANNUAL
1145
+ WEEKLY = :WEEKLY
1146
+
1147
+ # @!method self.values
1148
+ # @return [Array<Symbol>]
1149
+ end
1150
+
1151
+ class Specifier < MetronomeSDK::Internal::Type::BaseModel
1152
+ # @!attribute presentation_group_values
1153
+ #
1154
+ # @return [Hash{Symbol=>String}, nil]
1155
+ optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1156
+
1157
+ # @!attribute pricing_group_values
1158
+ #
1159
+ # @return [Hash{Symbol=>String}, nil]
1160
+ optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1161
+
1162
+ # @!attribute product_id
1163
+ # If provided, the specifier will only apply to the product with the specified ID.
1164
+ #
1165
+ # @return [String, nil]
1166
+ optional :product_id, String
1167
+
1168
+ # @!attribute product_tags
1169
+ # If provided, the specifier will only apply to products with all the specified
1170
+ # tags.
1171
+ #
1172
+ # @return [Array<String>, nil]
1173
+ optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1174
+
1175
+ # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
1176
+ # Some parameter documentations has been truncated, see
1177
+ # {MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::Specifier}
1178
+ # for more details.
1179
+ #
1180
+ # @param presentation_group_values [Hash{Symbol=>String}]
1181
+ #
1182
+ # @param pricing_group_values [Hash{Symbol=>String}]
1183
+ #
1184
+ # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
1185
+ #
1186
+ # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
1187
+ end
1188
+ end
1189
+
1190
+ class RecurringCredit < MetronomeSDK::Internal::Type::BaseModel
1191
+ # @!attribute id
1192
+ #
1193
+ # @return [String]
1194
+ required :id, String
1195
+
1196
+ # @!attribute access_amount
1197
+ # The amount of commit to grant.
1198
+ #
1199
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::AccessAmount]
1200
+ required :access_amount, -> { MetronomeSDK::ContractWithoutAmendments::RecurringCredit::AccessAmount }
1201
+
1202
+ # @!attribute commit_duration
1203
+ # The amount of time the created commits will be valid for
1204
+ #
1205
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::CommitDuration]
1206
+ required :commit_duration,
1207
+ -> {
1208
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration
1209
+ }
1210
+
1211
+ # @!attribute priority
1212
+ # Will be passed down to the individual commits
1213
+ #
1214
+ # @return [Float]
1215
+ required :priority, Float
1216
+
1217
+ # @!attribute product
1218
+ #
1219
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::Product]
1220
+ required :product, -> { MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Product }
1221
+
1222
+ # @!attribute rate_type
1223
+ # Whether the created commits will use the commit rate or list rate
1224
+ #
1225
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::RateType]
1226
+ required :rate_type, enum: -> { MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RateType }
1227
+
1228
+ # @!attribute starting_at
1229
+ # Determines the start time for the first commit
1230
+ #
1231
+ # @return [Time]
1232
+ required :starting_at, Time
1233
+
1234
+ # @!attribute applicable_product_ids
1235
+ # Will be passed down to the individual commits
1236
+ #
1237
+ # @return [Array<String>, nil]
1238
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1239
+
1240
+ # @!attribute applicable_product_tags
1241
+ # Will be passed down to the individual commits
1242
+ #
1243
+ # @return [Array<String>, nil]
1244
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1245
+
1246
+ # @!attribute contract
1247
+ #
1248
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::Contract, nil]
1249
+ optional :contract, -> { MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Contract }
1250
+
1251
+ # @!attribute description
1252
+ # Will be passed down to the individual commits
1253
+ #
1254
+ # @return [String, nil]
1255
+ optional :description, String
1256
+
1257
+ # @!attribute ending_before
1258
+ # Determines when the contract will stop creating recurring commits. Optional
1259
+ #
1260
+ # @return [Time, nil]
1261
+ optional :ending_before, Time
1262
+
1263
+ # @!attribute hierarchy_configuration
1264
+ # Optional configuration for recurring commit/credit hierarchy access control
1265
+ #
1266
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration, nil]
1267
+ optional :hierarchy_configuration,
1268
+ -> { MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration }
1269
+
1270
+ # @!attribute name
1271
+ # Displayed on invoices. Will be passed through to the individual commits
1272
+ #
1273
+ # @return [String, nil]
1274
+ optional :name, String
1275
+
1276
+ # @!attribute netsuite_sales_order_id
1277
+ # Will be passed down to the individual commits
1278
+ #
1279
+ # @return [String, nil]
1280
+ optional :netsuite_sales_order_id, String
1281
+
1282
+ # @!attribute proration
1283
+ # Determines whether the first and last commit will be prorated. If not provided,
1284
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1285
+ #
1286
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::Proration, nil]
1287
+ optional :proration, enum: -> { MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration }
1288
+
1289
+ # @!attribute recurrence_frequency
1290
+ # The frequency at which the recurring commits will be created. If not provided: -
1291
+ # The commits will be created on the usage invoice frequency. If provided: - The
1292
+ # period defined in the duration will correspond to this frequency. - Commits will
1293
+ # be created aligned with the recurring commit's starting_at rather than the usage
1294
+ # invoice dates.
1295
+ #
1296
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency, nil]
1297
+ optional :recurrence_frequency,
1298
+ enum: -> { MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency }
1299
+
1300
+ # @!attribute rollover_fraction
1301
+ # Will be passed down to the individual commits. This controls how much of an
1302
+ # individual unexpired commit will roll over upon contract transition. Must be
1303
+ # between 0 and 1.
1304
+ #
1305
+ # @return [Float, nil]
1306
+ optional :rollover_fraction, Float
1307
+
1308
+ # @!attribute specifiers
1309
+ # List of filters that determine what kind of customer usage draws down a commit
1310
+ # or credit. A customer's usage needs to meet the condition of at least one of the
1311
+ # specifiers to contribute to a commit's or credit's drawdown.
1312
+ #
1313
+ # @return [Array<MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::Specifier>, nil]
1314
+ optional :specifiers,
1315
+ -> {
1316
+ MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Specifier]
1317
+ }
1318
+
1319
+ # @!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)
1320
+ # Some parameter documentations has been truncated, see
1321
+ # {MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit} for more
1322
+ # details.
1323
+ #
1324
+ # @param id [String]
1325
+ #
1326
+ # @param access_amount [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::AccessAmount] The amount of commit to grant.
1327
+ #
1328
+ # @param commit_duration [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::CommitDuration] The amount of time the created commits will be valid for
1329
+ #
1330
+ # @param priority [Float] Will be passed down to the individual commits
1331
+ #
1332
+ # @param product [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::Product]
1333
+ #
1334
+ # @param rate_type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::RateType] Whether the created commits will use the commit rate or list rate
1335
+ #
1336
+ # @param starting_at [Time] Determines the start time for the first commit
1337
+ #
1338
+ # @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
1339
+ #
1340
+ # @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
1341
+ #
1342
+ # @param contract [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::Contract]
1343
+ #
1344
+ # @param description [String] Will be passed down to the individual commits
1345
+ #
1346
+ # @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
1347
+ #
1348
+ # @param hierarchy_configuration [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration] Optional configuration for recurring commit/credit hierarchy access control
1349
+ #
1350
+ # @param name [String] Displayed on invoices. Will be passed through to the individual commits
1351
+ #
1352
+ # @param netsuite_sales_order_id [String] Will be passed down to the individual commits
1353
+ #
1354
+ # @param proration [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::Proration] Determines whether the first and last commit will be prorated. If not provided,
1355
+ #
1356
+ # @param recurrence_frequency [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided:
1357
+ #
1358
+ # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
1359
+ #
1360
+ # @param specifiers [Array<MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
1361
+
1362
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit#access_amount
1363
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
1364
+ # @!attribute credit_type_id
1365
+ #
1366
+ # @return [String]
1367
+ required :credit_type_id, String
1368
+
1369
+ # @!attribute unit_price
1370
+ #
1371
+ # @return [Float]
1372
+ required :unit_price, Float
1373
+
1374
+ # @!attribute quantity
1375
+ #
1376
+ # @return [Float, nil]
1377
+ optional :quantity, Float
1378
+
1379
+ # @!method initialize(credit_type_id:, unit_price:, quantity: nil)
1380
+ # The amount of commit to grant.
1381
+ #
1382
+ # @param credit_type_id [String]
1383
+ # @param unit_price [Float]
1384
+ # @param quantity [Float]
1385
+ end
1386
+
1387
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit#commit_duration
1388
+ class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
1389
+ # @!attribute value
1390
+ #
1391
+ # @return [Float]
1392
+ required :value, Float
1393
+
1394
+ # @!attribute unit
1395
+ #
1396
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit, nil]
1397
+ optional :unit,
1398
+ enum: -> { MetronomeSDK::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit }
1399
+
1400
+ # @!method initialize(value:, unit: nil)
1401
+ # The amount of time the created commits will be valid for
1402
+ #
1403
+ # @param value [Float]
1404
+ # @param unit [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit]
1405
+
1406
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::CommitDuration#unit
1407
+ module Unit
1408
+ extend MetronomeSDK::Internal::Type::Enum
1409
+
1410
+ PERIODS = :PERIODS
1411
+
1412
+ # @!method self.values
1413
+ # @return [Array<Symbol>]
1414
+ end
1415
+ end
1416
+
1417
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit#product
1418
+ class Product < MetronomeSDK::Internal::Type::BaseModel
1419
+ # @!attribute id
1420
+ #
1421
+ # @return [String]
1422
+ required :id, String
1423
+
1424
+ # @!attribute name
1425
+ #
1426
+ # @return [String]
1427
+ required :name, String
1428
+
1429
+ # @!method initialize(id:, name:)
1430
+ # @param id [String]
1431
+ # @param name [String]
1432
+ end
1433
+
1434
+ # Whether the created commits will use the commit rate or list rate
1435
+ #
1436
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit#rate_type
1437
+ module RateType
1438
+ extend MetronomeSDK::Internal::Type::Enum
1439
+
1440
+ COMMIT_RATE = :COMMIT_RATE
1441
+ LIST_RATE = :LIST_RATE
1442
+
1443
+ # @!method self.values
1444
+ # @return [Array<Symbol>]
1445
+ end
1446
+
1447
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit#contract
1448
+ class Contract < MetronomeSDK::Internal::Type::BaseModel
1449
+ # @!attribute id
1450
+ #
1451
+ # @return [String]
1452
+ required :id, String
1453
+
1454
+ # @!method initialize(id:)
1455
+ # @param id [String]
1456
+ end
1457
+
1458
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit#hierarchy_configuration
1459
+ class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
1460
+ # @!attribute child_access
1461
+ #
1462
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
1463
+ required :child_access,
1464
+ union: -> {
1465
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess
1466
+ }
1467
+
1468
+ # @!method initialize(child_access:)
1469
+ # Optional configuration for recurring commit/credit hierarchy access control
1470
+ #
1471
+ # @param child_access [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
1472
+
1473
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration#child_access
1474
+ module ChildAccess
1475
+ extend MetronomeSDK::Internal::Type::Union
1476
+
1477
+ variant -> {
1478
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll
1479
+ }
1480
+
1481
+ variant -> {
1482
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone
1483
+ }
1484
+
1485
+ variant -> {
1486
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
1487
+ }
1488
+
1489
+ class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
1490
+ # @!attribute type
1491
+ #
1492
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
1493
+ required :type,
1494
+ enum: -> {
1495
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type
1496
+ }
1497
+
1498
+ # @!method initialize(type:)
1499
+ # @param type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type]
1500
+
1501
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll#type
1502
+ module Type
1503
+ extend MetronomeSDK::Internal::Type::Enum
1504
+
1505
+ ALL = :ALL
1506
+
1507
+ # @!method self.values
1508
+ # @return [Array<Symbol>]
1509
+ end
1510
+ end
1511
+
1512
+ class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
1513
+ # @!attribute type
1514
+ #
1515
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
1516
+ required :type,
1517
+ enum: -> {
1518
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type
1519
+ }
1520
+
1521
+ # @!method initialize(type:)
1522
+ # @param type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type]
1523
+
1524
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone#type
1525
+ module Type
1526
+ extend MetronomeSDK::Internal::Type::Enum
1527
+
1528
+ NONE = :NONE
1529
+
1530
+ # @!method self.values
1531
+ # @return [Array<Symbol>]
1532
+ end
1533
+ end
1534
+
1535
+ class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
1536
+ # @!attribute contract_ids
1537
+ #
1538
+ # @return [Array<String>]
1539
+ required :contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1540
+
1541
+ # @!attribute type
1542
+ #
1543
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
1544
+ required :type,
1545
+ enum: -> {
1546
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type
1547
+ }
1548
+
1549
+ # @!method initialize(contract_ids:, type:)
1550
+ # @param contract_ids [Array<String>]
1551
+ # @param type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type]
1552
+
1553
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs#type
1554
+ module Type
1555
+ extend MetronomeSDK::Internal::Type::Enum
1556
+
1557
+ CONTRACT_IDS = :CONTRACT_IDS
1558
+
1559
+ # @!method self.values
1560
+ # @return [Array<Symbol>]
1561
+ end
1562
+ end
1563
+
1564
+ # @!method self.variants
1565
+ # @return [Array(MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs)]
1566
+ end
1567
+ end
1568
+
1569
+ # Determines whether the first and last commit will be prorated. If not provided,
1570
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1571
+ #
1572
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit#proration
1573
+ module Proration
1574
+ extend MetronomeSDK::Internal::Type::Enum
1575
+
1576
+ NONE = :NONE
1577
+ FIRST = :FIRST
1578
+ LAST = :LAST
1579
+ FIRST_AND_LAST = :FIRST_AND_LAST
1580
+
1581
+ # @!method self.values
1582
+ # @return [Array<Symbol>]
1583
+ end
1584
+
1585
+ # The frequency at which the recurring commits will be created. If not provided: -
1586
+ # The commits will be created on the usage invoice frequency. If provided: - The
1587
+ # period defined in the duration will correspond to this frequency. - Commits will
1588
+ # be created aligned with the recurring commit's starting_at rather than the usage
1589
+ # invoice dates.
1590
+ #
1591
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit#recurrence_frequency
1592
+ module RecurrenceFrequency
1593
+ extend MetronomeSDK::Internal::Type::Enum
1594
+
1595
+ MONTHLY = :MONTHLY
1596
+ QUARTERLY = :QUARTERLY
1597
+ ANNUAL = :ANNUAL
1598
+ WEEKLY = :WEEKLY
1599
+
1600
+ # @!method self.values
1601
+ # @return [Array<Symbol>]
1602
+ end
1603
+
1604
+ class Specifier < MetronomeSDK::Internal::Type::BaseModel
1605
+ # @!attribute presentation_group_values
1606
+ #
1607
+ # @return [Hash{Symbol=>String}, nil]
1608
+ optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1609
+
1610
+ # @!attribute pricing_group_values
1611
+ #
1612
+ # @return [Hash{Symbol=>String}, nil]
1613
+ optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
1614
+
1615
+ # @!attribute product_id
1616
+ # If provided, the specifier will only apply to the product with the specified ID.
1617
+ #
1618
+ # @return [String, nil]
1619
+ optional :product_id, String
1620
+
1621
+ # @!attribute product_tags
1622
+ # If provided, the specifier will only apply to products with all the specified
1623
+ # tags.
1624
+ #
1625
+ # @return [Array<String>, nil]
1626
+ optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1627
+
1628
+ # @!method initialize(presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil)
1629
+ # Some parameter documentations has been truncated, see
1630
+ # {MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::Specifier}
1631
+ # for more details.
1632
+ #
1633
+ # @param presentation_group_values [Hash{Symbol=>String}]
1634
+ #
1635
+ # @param pricing_group_values [Hash{Symbol=>String}]
1636
+ #
1637
+ # @param product_id [String] If provided, the specifier will only apply to the product with the specified ID.
1638
+ #
1639
+ # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
1640
+ end
1641
+ end
1642
+
1643
+ class ResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
1644
+ # @!attribute fraction
1645
+ #
1646
+ # @return [Float]
1647
+ required :fraction, Float
1648
+
1649
+ # @!attribute netsuite_reseller_id
1650
+ #
1651
+ # @return [String]
1652
+ required :netsuite_reseller_id, String
1653
+
1654
+ # @!attribute reseller_type
1655
+ #
1656
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::ResellerRoyalty::ResellerType]
1657
+ required :reseller_type,
1658
+ enum: -> { MetronomeSDK::ContractWithoutAmendments::ResellerRoyalty::ResellerType }
1659
+
1660
+ # @!attribute starting_at
1661
+ #
1662
+ # @return [Time]
1663
+ required :starting_at, Time
1664
+
1665
+ # @!attribute applicable_product_ids
1666
+ #
1667
+ # @return [Array<String>, nil]
1668
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1669
+
1670
+ # @!attribute applicable_product_tags
1671
+ #
1672
+ # @return [Array<String>, nil]
1673
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1674
+
1675
+ # @!attribute aws_account_number
1676
+ #
1677
+ # @return [String, nil]
1678
+ optional :aws_account_number, String
1679
+
1680
+ # @!attribute aws_offer_id
1681
+ #
1682
+ # @return [String, nil]
1683
+ optional :aws_offer_id, String
1684
+
1685
+ # @!attribute aws_payer_reference_id
1686
+ #
1687
+ # @return [String, nil]
1688
+ optional :aws_payer_reference_id, String
1689
+
1690
+ # @!attribute ending_before
1691
+ #
1692
+ # @return [Time, nil]
1693
+ optional :ending_before, Time
1694
+
1695
+ # @!attribute gcp_account_id
1696
+ #
1697
+ # @return [String, nil]
1698
+ optional :gcp_account_id, String
1699
+
1700
+ # @!attribute gcp_offer_id
1701
+ #
1702
+ # @return [String, nil]
1703
+ optional :gcp_offer_id, String
1704
+
1705
+ # @!attribute reseller_contract_value
1706
+ #
1707
+ # @return [Float, nil]
1708
+ optional :reseller_contract_value, Float
1709
+
1710
+ # @!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)
1711
+ # @param fraction [Float]
1712
+ # @param netsuite_reseller_id [String]
1713
+ # @param reseller_type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::ResellerRoyalty::ResellerType]
1714
+ # @param starting_at [Time]
1715
+ # @param applicable_product_ids [Array<String>]
1716
+ # @param applicable_product_tags [Array<String>]
1717
+ # @param aws_account_number [String]
1718
+ # @param aws_offer_id [String]
1719
+ # @param aws_payer_reference_id [String]
1720
+ # @param ending_before [Time]
1721
+ # @param gcp_account_id [String]
1722
+ # @param gcp_offer_id [String]
1723
+ # @param reseller_contract_value [Float]
1724
+
1725
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::ResellerRoyalty#reseller_type
1726
+ module ResellerType
1727
+ extend MetronomeSDK::Internal::Type::Enum
1728
+
1729
+ AWS = :AWS
1730
+ AWS_PRO_SERVICE = :AWS_PRO_SERVICE
1731
+ GCP = :GCP
1732
+ GCP_PRO_SERVICE = :GCP_PRO_SERVICE
1733
+
1734
+ # @!method self.values
1735
+ # @return [Array<Symbol>]
1736
+ end
1737
+ end
1738
+
1739
+ # Determines which scheduled and commit charges to consolidate onto the Contract's
1740
+ # usage invoice. The charge's `timestamp` must match the usage invoice's
1741
+ # `ending_before` date for consolidation to occur. This field cannot be modified
1742
+ # after a Contract has been created. If this field is omitted, charges will appear
1743
+ # on a separate invoice from usage charges.
1744
+ #
1745
+ # @see MetronomeSDK::Models::ContractWithoutAmendments#scheduled_charges_on_usage_invoices
1746
+ module ScheduledChargesOnUsageInvoices
1747
+ extend MetronomeSDK::Internal::Type::Enum
1748
+
1749
+ ALL = :ALL
1750
+
1751
+ # @!method self.values
1752
+ # @return [Array<Symbol>]
1753
+ end
1754
+
1755
+ # @see MetronomeSDK::Models::ContractWithoutAmendments#spend_threshold_configuration
1756
+ class SpendThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
1757
+ # @!attribute commit
1758
+ #
1759
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::Commit]
1760
+ required :commit, -> { MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::Commit }
1761
+
1762
+ # @!attribute is_enabled
1763
+ # When set to false, the contract will not be evaluated against the
1764
+ # threshold_amount. Toggling to true will result an immediate evaluation,
1765
+ # regardless of prior state.
1766
+ #
1767
+ # @return [Boolean]
1768
+ required :is_enabled, MetronomeSDK::Internal::Type::Boolean
1769
+
1770
+ # @!attribute payment_gate_config
1771
+ #
1772
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig]
1773
+ required :payment_gate_config,
1774
+ -> {
1775
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig
1776
+ }
1777
+
1778
+ # @!attribute threshold_amount
1779
+ # Specify the threshold amount for the contract. Each time the contract's usage
1780
+ # hits this amount, a threshold charge will be initiated.
1781
+ #
1782
+ # @return [Float]
1783
+ required :threshold_amount, Float
1784
+
1785
+ # @!method initialize(commit:, is_enabled:, payment_gate_config:, threshold_amount:)
1786
+ # Some parameter documentations has been truncated, see
1787
+ # {MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration}
1788
+ # for more details.
1789
+ #
1790
+ # @param commit [MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::Commit]
1791
+ #
1792
+ # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
1793
+ #
1794
+ # @param payment_gate_config [MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig]
1795
+ #
1796
+ # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's usage hi
1797
+
1798
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration#commit
1799
+ class Commit < MetronomeSDK::Internal::Type::BaseModel
1800
+ # @!attribute product_id
1801
+ # The commit product that will be used to generate the line item for commit
1802
+ # payment.
1803
+ #
1804
+ # @return [String]
1805
+ required :product_id, String
1806
+
1807
+ # @!attribute description
1808
+ #
1809
+ # @return [String, nil]
1810
+ optional :description, String
1811
+
1812
+ # @!attribute name
1813
+ # Specify the name of the line item for the threshold charge. If left blank, it
1814
+ # will default to the commit product name.
1815
+ #
1816
+ # @return [String, nil]
1817
+ optional :name, String
1818
+
1819
+ # @!method initialize(product_id:, description: nil, name: nil)
1820
+ # Some parameter documentations has been truncated, see
1821
+ # {MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::Commit}
1822
+ # for more details.
1823
+ #
1824
+ # @param product_id [String] The commit product that will be used to generate the line item for commit paymen
1825
+ #
1826
+ # @param description [String]
1827
+ #
1828
+ # @param name [String] Specify the name of the line item for the threshold charge. If left blank, it wi
1829
+ end
1830
+
1831
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration#payment_gate_config
1832
+ class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
1833
+ # @!attribute payment_gate_type
1834
+ # Gate access to the commit balance based on successful collection of payment.
1835
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
1836
+ # facilitate payment using your own payment integration. Select NONE if you do not
1837
+ # wish to payment gate the commit balance.
1838
+ #
1839
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType]
1840
+ required :payment_gate_type,
1841
+ enum: -> {
1842
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType
1843
+ }
1844
+
1845
+ # @!attribute precalculated_tax_config
1846
+ # Only applicable if using PRECALCULATED as your tax type.
1847
+ #
1848
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig, nil]
1849
+ optional :precalculated_tax_config,
1850
+ -> {
1851
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig
1852
+ }
1853
+
1854
+ # @!attribute stripe_config
1855
+ # Only applicable if using STRIPE as your payment gate type.
1856
+ #
1857
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig, nil]
1858
+ optional :stripe_config,
1859
+ -> {
1860
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig
1861
+ }
1862
+
1863
+ # @!attribute tax_type
1864
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
1865
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
1866
+ # will default to NONE.
1867
+ #
1868
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType, nil]
1869
+ optional :tax_type,
1870
+ enum: -> {
1871
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType
1872
+ }
1873
+
1874
+ # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
1875
+ # Some parameter documentations has been truncated, see
1876
+ # {MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig}
1877
+ # for more details.
1878
+ #
1879
+ # @param payment_gate_type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
1880
+ #
1881
+ # @param precalculated_tax_config [MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
1882
+ #
1883
+ # @param stripe_config [MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gate type.
1884
+ #
1885
+ # @param tax_type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
1886
+
1887
+ # Gate access to the commit balance based on successful collection of payment.
1888
+ # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
1889
+ # facilitate payment using your own payment integration. Select NONE if you do not
1890
+ # wish to payment gate the commit balance.
1891
+ #
1892
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig#payment_gate_type
1893
+ module PaymentGateType
1894
+ extend MetronomeSDK::Internal::Type::Enum
1895
+
1896
+ NONE = :NONE
1897
+ STRIPE = :STRIPE
1898
+ EXTERNAL = :EXTERNAL
1899
+
1900
+ # @!method self.values
1901
+ # @return [Array<Symbol>]
1902
+ end
1903
+
1904
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig#precalculated_tax_config
1905
+ class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
1906
+ # @!attribute tax_amount
1907
+ # Amount of tax to be applied. This should be in the same currency and
1908
+ # denomination as the commit's invoice schedule
1909
+ #
1910
+ # @return [Float]
1911
+ required :tax_amount, Float
1912
+
1913
+ # @!attribute tax_name
1914
+ # Name of the tax to be applied. This may be used in an invoice line item
1915
+ # description.
1916
+ #
1917
+ # @return [String, nil]
1918
+ optional :tax_name, String
1919
+
1920
+ # @!method initialize(tax_amount:, tax_name: nil)
1921
+ # Some parameter documentations has been truncated, see
1922
+ # {MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig}
1923
+ # for more details.
1924
+ #
1925
+ # Only applicable if using PRECALCULATED as your tax type.
1926
+ #
1927
+ # @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
1928
+ #
1929
+ # @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
1930
+ end
1931
+
1932
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig#stripe_config
1933
+ class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
1934
+ # @!attribute payment_type
1935
+ # If left blank, will default to INVOICE
1936
+ #
1937
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType]
1938
+ required :payment_type,
1939
+ enum: -> {
1940
+ MetronomeSDK::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType
1941
+ }
1942
+
1943
+ # @!attribute invoice_metadata
1944
+ # Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
1945
+ # your payment type.
1946
+ #
1947
+ # @return [Hash{Symbol=>String}, nil]
1948
+ optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
1949
+
1950
+ # @!method initialize(payment_type:, invoice_metadata: nil)
1951
+ # Some parameter documentations has been truncated, see
1952
+ # {MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig}
1953
+ # for more details.
1954
+ #
1955
+ # Only applicable if using STRIPE as your payment gate type.
1956
+ #
1957
+ # @param payment_type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
1958
+ #
1959
+ # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
1960
+
1961
+ # If left blank, will default to INVOICE
1962
+ #
1963
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig#payment_type
1964
+ module PaymentType
1965
+ extend MetronomeSDK::Internal::Type::Enum
1966
+
1967
+ INVOICE = :INVOICE
1968
+ PAYMENT_INTENT = :PAYMENT_INTENT
1969
+
1970
+ # @!method self.values
1971
+ # @return [Array<Symbol>]
1972
+ end
1973
+ end
1974
+
1975
+ # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
1976
+ # not wish Metronome to calculate tax on your behalf. Leaving this field blank
1977
+ # will default to NONE.
1978
+ #
1979
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::SpendThresholdConfiguration::PaymentGateConfig#tax_type
1980
+ module TaxType
1981
+ extend MetronomeSDK::Internal::Type::Enum
1982
+
1983
+ NONE = :NONE
1984
+ STRIPE = :STRIPE
1985
+ ANROK = :ANROK
1986
+ PRECALCULATED = :PRECALCULATED
1987
+
1988
+ # @!method self.values
1989
+ # @return [Array<Symbol>]
1990
+ end
1991
+ end
1992
+ end
1993
+
1994
+ # @see MetronomeSDK::Models::ContractWithoutAmendments#usage_filter
1995
+ class UsageFilter < MetronomeSDK::Internal::Type::BaseModel
1996
+ # @!attribute current
1997
+ #
1998
+ # @return [MetronomeSDK::Models::BaseUsageFilter, nil]
1999
+ required :current, -> { MetronomeSDK::BaseUsageFilter }, nil?: true
2000
+
2001
+ # @!attribute initial
2002
+ #
2003
+ # @return [MetronomeSDK::Models::BaseUsageFilter]
2004
+ required :initial, -> { MetronomeSDK::BaseUsageFilter }
2005
+
2006
+ # @!attribute updates
2007
+ #
2008
+ # @return [Array<MetronomeSDK::Models::ContractWithoutAmendments::UsageFilter::Update>]
2009
+ required :updates,
2010
+ -> {
2011
+ MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractWithoutAmendments::UsageFilter::Update]
2012
+ }
2013
+
2014
+ # @!method initialize(current:, initial:, updates:)
2015
+ # @param current [MetronomeSDK::Models::BaseUsageFilter, nil]
2016
+ # @param initial [MetronomeSDK::Models::BaseUsageFilter]
2017
+ # @param updates [Array<MetronomeSDK::Models::ContractWithoutAmendments::UsageFilter::Update>]
2018
+
2019
+ class Update < MetronomeSDK::Internal::Type::BaseModel
2020
+ # @!attribute group_key
2021
+ #
2022
+ # @return [String]
2023
+ required :group_key, String
2024
+
2025
+ # @!attribute group_values
2026
+ #
2027
+ # @return [Array<String>]
2028
+ required :group_values, MetronomeSDK::Internal::Type::ArrayOf[String]
2029
+
2030
+ # @!attribute starting_at
2031
+ #
2032
+ # @return [Time]
2033
+ required :starting_at, Time
2034
+
2035
+ # @!method initialize(group_key:, group_values:, starting_at:)
2036
+ # @param group_key [String]
2037
+ # @param group_values [Array<String>]
2038
+ # @param starting_at [Time]
2039
+ end
2040
+ end
2041
+ end
2042
+ end
2043
+ end