metronome-sdk 0.2.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +61 -0
  3. data/README.md +9 -9
  4. data/lib/metronome_sdk/internal/body_cursor_page.rb +86 -0
  5. data/lib/metronome_sdk/internal/cursor_page_without_limit.rb +86 -0
  6. data/lib/metronome_sdk/internal/transport/base_client.rb +1 -4
  7. data/lib/metronome_sdk/internal/transport/pooled_net_requester.rb +1 -9
  8. data/lib/metronome_sdk/internal/type/array_of.rb +1 -0
  9. data/lib/metronome_sdk/internal/type/base_model.rb +9 -14
  10. data/lib/metronome_sdk/internal/type/converter.rb +27 -0
  11. data/lib/metronome_sdk/internal/type/hash_of.rb +1 -0
  12. data/lib/metronome_sdk/internal/type/union.rb +20 -7
  13. data/lib/metronome_sdk/internal/util.rb +1 -1
  14. data/lib/metronome_sdk/models/base_threshold_commit.rb +36 -0
  15. data/lib/metronome_sdk/models/commit.rb +26 -170
  16. data/lib/metronome_sdk/models/commit_hierarchy_configuration.rb +98 -0
  17. data/lib/metronome_sdk/models/commit_rate.rb +48 -0
  18. data/lib/metronome_sdk/models/commit_specifier.rb +42 -0
  19. data/lib/metronome_sdk/models/commit_specifier_input.rb +42 -0
  20. data/lib/metronome_sdk/models/contract.rb +404 -0
  21. data/lib/metronome_sdk/models/contract_v2.rb +2919 -0
  22. data/lib/metronome_sdk/models/contract_without_amendments.rb +36 -1126
  23. data/lib/metronome_sdk/models/credit.rb +9 -156
  24. data/lib/metronome_sdk/models/discount.rb +2 -1
  25. data/lib/metronome_sdk/models/hierarchy_configuration.rb +76 -0
  26. data/lib/metronome_sdk/models/override.rb +6 -101
  27. data/lib/metronome_sdk/models/override_tier.rb +21 -0
  28. data/lib/metronome_sdk/models/overwrite_rate.rb +82 -0
  29. data/lib/metronome_sdk/models/payment_gate_config.rb +149 -0
  30. data/lib/metronome_sdk/models/payment_gate_config_v2.rb +149 -0
  31. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +100 -0
  32. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +102 -0
  33. data/lib/metronome_sdk/models/pro_service.rb +2 -1
  34. data/lib/metronome_sdk/models/recurring_commit_subscription_config.rb +51 -0
  35. data/lib/metronome_sdk/models/schedule_point_in_time.rb +14 -1
  36. data/lib/metronome_sdk/models/scheduled_charge.rb +2 -1
  37. data/lib/metronome_sdk/models/spend_threshold_configuration.rb +44 -0
  38. data/lib/metronome_sdk/models/spend_threshold_configuration_v2.rb +44 -0
  39. data/lib/metronome_sdk/models/subscription.rb +227 -0
  40. data/lib/metronome_sdk/models/update_base_threshold_commit.rb +36 -0
  41. data/lib/metronome_sdk/models/v1/alert_create_params.rb +4 -6
  42. data/lib/metronome_sdk/models/v1/billable_metric_create_params.rb +1 -2
  43. data/lib/metronome_sdk/models/v1/billable_metric_list_response.rb +3 -3
  44. data/lib/metronome_sdk/models/v1/billable_metric_retrieve_response.rb +4 -7
  45. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +110 -415
  46. data/lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb +7 -16
  47. data/lib/metronome_sdk/models/v1/contract_create_params.rb +287 -1480
  48. data/lib/metronome_sdk/models/v1/contract_list_balances_response.rb +6 -23
  49. data/lib/metronome_sdk/models/v1/contract_list_response.rb +3 -1153
  50. data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_params.rb +2 -6
  51. data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rb +5 -50
  52. data/lib/metronome_sdk/models/v1/contract_retrieve_response.rb +3 -1154
  53. data/lib/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_params.rb +1 -3
  54. data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +9 -1
  55. data/lib/metronome_sdk/models/v1/contracts/product_list_response.rb +8 -1
  56. data/lib/metronome_sdk/models/v1/contracts/product_retrieve_response.rb +8 -1
  57. data/lib/metronome_sdk/models/v1/contracts/quantity_rounding.rb +1 -4
  58. data/lib/metronome_sdk/models/v1/contracts/rate_card_create_params.rb +4 -7
  59. data/lib/metronome_sdk/models/v1/contracts/rate_card_list_response.rb +10 -1
  60. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_params.rb +2 -6
  61. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rb +5 -50
  62. data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rb +10 -1
  63. data/lib/metronome_sdk/models/v1/contracts/rate_card_update_params.rb +1 -3
  64. data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_params.rb +1 -3
  65. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +6 -61
  66. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +3 -49
  67. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rb +4 -51
  68. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_params.rb +2 -6
  69. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rb +5 -49
  70. data/lib/metronome_sdk/models/v1/credit_grant_list_entries_response.rb +103 -123
  71. data/lib/metronome_sdk/models/v1/credit_grant_list_response.rb +3 -5
  72. data/lib/metronome_sdk/models/v1/custom_field_list_keys_params.rb +1 -3
  73. data/lib/metronome_sdk/models/v1/custom_field_list_keys_response.rb +41 -58
  74. data/lib/metronome_sdk/models/v1/custom_field_set_values_params.rb +5 -1
  75. data/lib/metronome_sdk/models/v1/customer.rb +2 -1
  76. data/lib/metronome_sdk/models/v1/customer_create_params.rb +37 -11
  77. data/lib/metronome_sdk/models/v1/customer_detail.rb +2 -1
  78. data/lib/metronome_sdk/models/v1/customer_list_billable_metrics_response.rb +3 -3
  79. data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +1 -3
  80. data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rb +28 -0
  81. data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rb +128 -0
  82. data/lib/metronome_sdk/models/v1/customer_set_billing_configurations_params.rb +143 -0
  83. data/lib/metronome_sdk/models/v1/customers/alert_list_params.rb +1 -3
  84. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +30 -1
  85. data/lib/metronome_sdk/models/v1/customers/billing_config_create_params.rb +2 -0
  86. data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +2 -0
  87. data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +20 -61
  88. data/lib/metronome_sdk/models/v1/customers/credit_create_params.rb +6 -48
  89. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +8 -16
  90. data/lib/metronome_sdk/models/v1/customers/invoice.rb +68 -43
  91. data/lib/metronome_sdk/models/v1/customers/invoice_list_breakdowns_params.rb +1 -4
  92. data/lib/metronome_sdk/models/v1/customers/plan_add_params.rb +2 -6
  93. data/lib/metronome_sdk/models/v1/customers/plan_list_response.rb +2 -1
  94. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +4 -11
  95. data/lib/metronome_sdk/models/v1/plan_detail.rb +9 -5
  96. data/lib/metronome_sdk/models/v1/plan_list_charges_response.rb +2 -1
  97. data/lib/metronome_sdk/models/v1/plan_list_customers_response.rb +2 -1
  98. data/lib/metronome_sdk/models/v1/plan_list_response.rb +5 -1
  99. data/lib/metronome_sdk/models/v1/usage_ingest_params.rb +1 -4
  100. data/lib/metronome_sdk/models/v1/usage_list_params.rb +1 -3
  101. data/lib/metronome_sdk/models/v1/usage_list_response.rb +45 -62
  102. data/lib/metronome_sdk/models/v1/usage_search_response.rb +4 -7
  103. data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +38 -58
  104. data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +35 -49
  105. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +469 -2302
  106. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +358 -2414
  107. data/lib/metronome_sdk/models/v2/contract_list_response.rb +3 -4520
  108. data/lib/metronome_sdk/models/v2/contract_retrieve_response.rb +3 -4528
  109. data/lib/metronome_sdk/models.rb +38 -0
  110. data/lib/metronome_sdk/resources/v1/alerts.rb +72 -2
  111. data/lib/metronome_sdk/resources/v1/audit_logs.rb +39 -4
  112. data/lib/metronome_sdk/resources/v1/billable_metrics.rb +54 -4
  113. data/lib/metronome_sdk/resources/v1/contracts/products.rb +27 -6
  114. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rb +7 -2
  115. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +10 -2
  116. data/lib/metronome_sdk/resources/v1/contracts/rate_cards.rb +109 -10
  117. data/lib/metronome_sdk/resources/v1/contracts.rb +254 -18
  118. data/lib/metronome_sdk/resources/v1/credit_grants.rb +2 -1
  119. data/lib/metronome_sdk/resources/v1/custom_fields.rb +51 -14
  120. data/lib/metronome_sdk/resources/v1/customers/alerts.rb +103 -8
  121. data/lib/metronome_sdk/resources/v1/customers/commits.rb +119 -9
  122. data/lib/metronome_sdk/resources/v1/customers/credits.rb +104 -8
  123. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +124 -8
  124. data/lib/metronome_sdk/resources/v1/customers.rb +169 -12
  125. data/lib/metronome_sdk/resources/v1/dashboards.rb +29 -3
  126. data/lib/metronome_sdk/resources/v1/invoices.rb +23 -2
  127. data/lib/metronome_sdk/resources/v1/pricing_units.rb +6 -1
  128. data/lib/metronome_sdk/resources/v1/services.rb +6 -4
  129. data/lib/metronome_sdk/resources/v1/usage.rb +185 -12
  130. data/lib/metronome_sdk/resources/v2/contracts.rb +118 -18
  131. data/lib/metronome_sdk/version.rb +1 -1
  132. data/lib/metronome_sdk.rb +24 -3
  133. data/rbi/metronome_sdk/errors.rbi +2 -2
  134. data/rbi/metronome_sdk/internal/body_cursor_page.rbi +22 -0
  135. data/rbi/metronome_sdk/internal/cursor_page_without_limit.rbi +22 -0
  136. data/rbi/metronome_sdk/internal/type/converter.rbi +58 -0
  137. data/rbi/metronome_sdk/internal/type/union.rbi +9 -2
  138. data/rbi/metronome_sdk/models/base_threshold_commit.rbi +58 -0
  139. data/rbi/metronome_sdk/models/commit.rbi +26 -348
  140. data/rbi/metronome_sdk/models/commit_hierarchy_configuration.rbi +280 -0
  141. data/rbi/metronome_sdk/models/commit_rate.rbi +85 -0
  142. data/rbi/metronome_sdk/models/commit_specifier.rbi +71 -0
  143. data/rbi/metronome_sdk/models/commit_specifier_input.rbi +74 -0
  144. data/rbi/metronome_sdk/models/contract.rbi +768 -0
  145. data/rbi/metronome_sdk/models/contract_v2.rbi +5822 -0
  146. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +184 -2507
  147. data/rbi/metronome_sdk/models/credit.rbi +10 -348
  148. data/rbi/metronome_sdk/models/discount.rbi +2 -0
  149. data/rbi/metronome_sdk/models/hierarchy_configuration.rbi +180 -0
  150. data/rbi/metronome_sdk/models/override.rbi +8 -193
  151. data/rbi/metronome_sdk/models/override_tier.rbi +29 -0
  152. data/rbi/metronome_sdk/models/overwrite_rate.rbi +137 -0
  153. data/rbi/metronome_sdk/models/payment_gate_config.rbi +312 -0
  154. data/rbi/metronome_sdk/models/payment_gate_config_v2.rbi +321 -0
  155. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +183 -0
  156. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +188 -0
  157. data/rbi/metronome_sdk/models/pro_service.rbi +2 -0
  158. data/rbi/metronome_sdk/models/recurring_commit_subscription_config.rbi +125 -0
  159. data/rbi/metronome_sdk/models/schedule_point_in_time.rbi +17 -1
  160. data/rbi/metronome_sdk/models/scheduled_charge.rbi +2 -0
  161. data/rbi/metronome_sdk/models/spend_threshold_configuration.rbi +76 -0
  162. data/rbi/metronome_sdk/models/spend_threshold_configuration_v2.rbi +78 -0
  163. data/rbi/metronome_sdk/models/subscription.rbi +460 -0
  164. data/rbi/metronome_sdk/models/update_base_threshold_commit.rbi +61 -0
  165. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +6 -3
  166. data/rbi/metronome_sdk/models/v1/billable_metric_list_response.rbi +2 -0
  167. data/rbi/metronome_sdk/models/v1/billable_metric_retrieve_response.rbi +2 -0
  168. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +120 -771
  169. data/rbi/metronome_sdk/models/v1/contract_create_historical_invoices_params.rbi +2 -0
  170. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +1613 -4069
  171. data/rbi/metronome_sdk/models/v1/contract_list_balances_response.rbi +8 -59
  172. data/rbi/metronome_sdk/models/v1/contract_list_response.rbi +5 -2420
  173. data/rbi/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbi +6 -129
  174. data/rbi/metronome_sdk/models/v1/contract_retrieve_response.rbi +4 -2419
  175. data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +11 -0
  176. data/rbi/metronome_sdk/models/v1/contracts/product_list_response.rbi +2 -0
  177. data/rbi/metronome_sdk/models/v1/contracts/product_retrieve_response.rbi +2 -0
  178. data/rbi/metronome_sdk/models/v1/contracts/rate_card_create_params.rbi +2 -0
  179. data/rbi/metronome_sdk/models/v1/contracts/rate_card_list_response.rbi +2 -0
  180. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbi +6 -129
  181. data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rbi +2 -0
  182. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +4 -129
  183. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +4 -129
  184. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbi +4 -129
  185. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbi +6 -129
  186. data/rbi/metronome_sdk/models/v1/credit_grant_list_entries_response.rbi +147 -198
  187. data/rbi/metronome_sdk/models/v1/credit_grant_list_response.rbi +2 -0
  188. data/rbi/metronome_sdk/models/v1/custom_field_list_keys_response.rbi +117 -165
  189. data/rbi/metronome_sdk/models/v1/custom_field_set_values_params.rbi +8 -1
  190. data/rbi/metronome_sdk/models/v1/customer.rbi +2 -0
  191. data/rbi/metronome_sdk/models/v1/customer_create_params.rbi +88 -3
  192. data/rbi/metronome_sdk/models/v1/customer_detail.rbi +2 -0
  193. data/rbi/metronome_sdk/models/v1/customer_list_billable_metrics_response.rbi +2 -0
  194. data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rbi +51 -0
  195. data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbi +265 -0
  196. data/rbi/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbi +348 -0
  197. data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +60 -0
  198. data/rbi/metronome_sdk/models/v1/customers/billing_config_create_params.rbi +10 -0
  199. data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +10 -0
  200. data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +19 -90
  201. data/rbi/metronome_sdk/models/v1/customers/credit_create_params.rbi +6 -90
  202. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +6 -3
  203. data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +76 -0
  204. data/rbi/metronome_sdk/models/v1/customers/plan_list_response.rbi +2 -0
  205. data/rbi/metronome_sdk/models/v1/plan_detail.rbi +2 -0
  206. data/rbi/metronome_sdk/models/v1/plan_list_charges_response.rbi +2 -0
  207. data/rbi/metronome_sdk/models/v1/plan_list_customers_response.rbi +2 -0
  208. data/rbi/metronome_sdk/models/v1/plan_list_response.rbi +8 -1
  209. data/rbi/metronome_sdk/models/v1/usage_list_response.rbi +45 -86
  210. data/rbi/metronome_sdk/models/v1/usage_search_response.rbi +2 -0
  211. data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +66 -76
  212. data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +66 -76
  213. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +3563 -7329
  214. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1181 -6070
  215. data/rbi/metronome_sdk/models/v2/contract_list_response.rbi +5 -9867
  216. data/rbi/metronome_sdk/models/v2/contract_retrieve_response.rbi +6 -9866
  217. data/rbi/metronome_sdk/models.rbi +44 -0
  218. data/rbi/metronome_sdk/resources/v1/alerts.rbi +72 -2
  219. data/rbi/metronome_sdk/resources/v1/audit_logs.rbi +39 -4
  220. data/rbi/metronome_sdk/resources/v1/billable_metrics.rbi +54 -4
  221. data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +27 -5
  222. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rbi +7 -2
  223. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +10 -3
  224. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards.rbi +109 -9
  225. data/rbi/metronome_sdk/resources/v1/contracts.rbi +257 -16
  226. data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +5 -1
  227. data/rbi/metronome_sdk/resources/v1/custom_fields.rbi +57 -14
  228. data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +108 -5
  229. data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +119 -10
  230. data/rbi/metronome_sdk/resources/v1/customers/credits.rbi +104 -9
  231. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +123 -7
  232. data/rbi/metronome_sdk/resources/v1/customers.rbi +156 -11
  233. data/rbi/metronome_sdk/resources/v1/dashboards.rbi +29 -3
  234. data/rbi/metronome_sdk/resources/v1/invoices.rbi +23 -2
  235. data/rbi/metronome_sdk/resources/v1/pricing_units.rbi +6 -1
  236. data/rbi/metronome_sdk/resources/v1/services.rbi +6 -4
  237. data/rbi/metronome_sdk/resources/v1/usage.rbi +188 -12
  238. data/rbi/metronome_sdk/resources/v2/contracts.rbi +128 -23
  239. data/sig/metronome_sdk/internal/body_cursor_page.rbs +13 -0
  240. data/sig/metronome_sdk/internal/cursor_page_without_limit.rbs +13 -0
  241. data/sig/metronome_sdk/internal/type/converter.rbs +17 -0
  242. data/sig/metronome_sdk/internal/type/union.rbs +2 -2
  243. data/sig/metronome_sdk/models/base_threshold_commit.rbs +26 -0
  244. data/sig/metronome_sdk/models/commit.rbs +17 -170
  245. data/sig/metronome_sdk/models/commit_hierarchy_configuration.rbs +117 -0
  246. data/sig/metronome_sdk/models/commit_rate.rbs +48 -0
  247. data/sig/metronome_sdk/models/commit_specifier.rbs +47 -0
  248. data/sig/metronome_sdk/models/commit_specifier_input.rbs +47 -0
  249. data/sig/metronome_sdk/models/contract.rbs +398 -0
  250. data/sig/metronome_sdk/models/contract_v2.rbs +2881 -0
  251. data/sig/metronome_sdk/models/contract_without_amendments.rbs +54 -976
  252. data/sig/metronome_sdk/models/credit.rbs +12 -170
  253. data/sig/metronome_sdk/models/hierarchy_configuration.rbs +71 -0
  254. data/sig/metronome_sdk/models/override.rbs +12 -101
  255. data/sig/metronome_sdk/models/override_tier.rbs +17 -0
  256. data/sig/metronome_sdk/models/overwrite_rate.rbs +78 -0
  257. data/sig/metronome_sdk/models/payment_gate_config.rbs +123 -0
  258. data/sig/metronome_sdk/models/payment_gate_config_v2.rbs +123 -0
  259. data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +82 -0
  260. data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +82 -0
  261. data/sig/metronome_sdk/models/recurring_commit_subscription_config.rbs +51 -0
  262. data/sig/metronome_sdk/models/schedule_point_in_time.rbs +7 -0
  263. data/sig/metronome_sdk/models/spend_threshold_configuration.rbs +35 -0
  264. data/sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs +35 -0
  265. data/sig/metronome_sdk/models/subscription.rbs +215 -0
  266. data/sig/metronome_sdk/models/update_base_threshold_commit.rbs +28 -0
  267. data/sig/metronome_sdk/models/v1/alert_create_params.rbs +4 -2
  268. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +62 -343
  269. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +218 -1234
  270. data/sig/metronome_sdk/models/v1/contract_list_balances_response.rbs +4 -25
  271. data/sig/metronome_sdk/models/v1/contract_list_response.rbs +4 -1041
  272. data/sig/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbs +6 -54
  273. data/sig/metronome_sdk/models/v1/contract_retrieve_response.rbs +4 -1041
  274. data/sig/metronome_sdk/models/v1/contracts/product_create_params.rbs +7 -0
  275. data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbs +6 -54
  276. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +6 -54
  277. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +6 -54
  278. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbs +6 -54
  279. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbs +6 -54
  280. data/sig/metronome_sdk/models/v1/credit_grant_list_entries_response.rbs +72 -94
  281. data/sig/metronome_sdk/models/v1/custom_field_list_keys_response.rbs +53 -75
  282. data/sig/metronome_sdk/models/v1/customer_create_params.rbs +31 -4
  283. data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rbs +32 -0
  284. data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbs +113 -0
  285. data/sig/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbs +133 -0
  286. data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +21 -0
  287. data/sig/metronome_sdk/models/v1/customers/billing_config_create_params.rbs +7 -1
  288. data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbs +6 -1
  289. data/sig/metronome_sdk/models/v1/customers/commit_create_params.rbs +13 -50
  290. data/sig/metronome_sdk/models/v1/customers/credit_create_params.rbs +6 -50
  291. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +4 -2
  292. data/sig/metronome_sdk/models/v1/customers/invoice.rbs +5 -0
  293. data/sig/metronome_sdk/models/v1/usage_list_response.rbs +33 -55
  294. data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +24 -43
  295. data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +24 -43
  296. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +400 -1911
  297. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +256 -2249
  298. data/sig/metronome_sdk/models/v2/contract_list_response.rbs +4 -4426
  299. data/sig/metronome_sdk/models/v2/contract_retrieve_response.rbs +4 -4426
  300. data/sig/metronome_sdk/models.rbs +38 -0
  301. data/sig/metronome_sdk/resources/v1/contracts/products.rbs +1 -0
  302. data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +1 -1
  303. data/sig/metronome_sdk/resources/v1/contracts.rbs +3 -3
  304. data/sig/metronome_sdk/resources/v1/credit_grants.rbs +1 -1
  305. data/sig/metronome_sdk/resources/v1/custom_fields.rbs +1 -1
  306. data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +2 -1
  307. data/sig/metronome_sdk/resources/v1/customers/commits.rbs +2 -2
  308. data/sig/metronome_sdk/resources/v1/customers/credits.rbs +2 -2
  309. data/sig/metronome_sdk/resources/v1/customers.rbs +11 -0
  310. data/sig/metronome_sdk/resources/v1/usage.rbs +1 -1
  311. data/sig/metronome_sdk/resources/v2/contracts.rbs +9 -4
  312. metadata +74 -11
  313. data/lib/metronome_sdk/models/v1/customers/alert_list_response.rb +0 -29
  314. data/lib/metronome_sdk/models/v1/customers/commit_list_response.rb +0 -26
  315. data/lib/metronome_sdk/models/v1/customers/credit_list_response.rb +0 -26
  316. data/rbi/metronome_sdk/models/v1/customers/alert_list_response.rbi +0 -46
  317. data/rbi/metronome_sdk/models/v1/customers/commit_list_response.rbi +0 -45
  318. data/rbi/metronome_sdk/models/v1/customers/credit_list_response.rbi +0 -45
  319. data/sig/metronome_sdk/models/v1/customers/alert_list_response.rbs +0 -29
  320. data/sig/metronome_sdk/models/v1/customers/commit_list_response.rbs +0 -26
  321. data/sig/metronome_sdk/models/v1/customers/credit_list_response.rbs +0 -26
@@ -5,7 +5,68 @@ module MetronomeSDK
5
5
  class V1
6
6
  class Customers
7
7
  class Commits
8
- # Create a new commit at the customer level.
8
+ # Creates customer-level commits that establish spending commitments for customers
9
+ # across their Metronome usage. Commits represent contracted spending obligations
10
+ # that can be either prepaid (paid upfront) or postpaid (billed later).
11
+ #
12
+ # Note: In most cases, you should add commitments directly to customer contracts
13
+ # using the contract/create or contract/edit APIs.
14
+ #
15
+ # ### Use this endpoint to:
16
+ #
17
+ # Use this endpoint when you need to establish customer-level spending commitments
18
+ # that can be applied across multiple contracts or scoped to specific contracts.
19
+ # Customer-level commits are ideal for:
20
+ #
21
+ # - Enterprise-wide minimum spending agreements that span multiple contracts
22
+ # - Multi-contract volume commitments with shared spending pools
23
+ # - Cross-contract discount tiers based on aggregate usage
24
+ #
25
+ # #### Commit type Requirements:
26
+ #
27
+ # - You must specify either "prepaid" or "postpaid" as the commit type:
28
+ # - Prepaid commits: Customer pays upfront; invoice_schedule is optional (if
29
+ # omitted, creates a commit without an invoice)
30
+ # - Postpaid commits: Customer pays when the commitment expires (the end of the
31
+ # access_schedule); invoice_schedule is required and must match access_schedule
32
+ # totals.
33
+ #
34
+ # #### Billing configuration:
35
+ #
36
+ # - invoice_contract_id is required for postpaid commits and for prepaid commits
37
+ # with billing (only optional for free prepaid commits)
38
+ # - For postpaid commits: access_schedule and invoice_schedule must have matching
39
+ # amounts
40
+ # - For postpaid commits: only one schedule item is allowed in both schedules.
41
+ #
42
+ # #### Scoping flexibility:
43
+ #
44
+ # Customer-level commits can be configured in a few ways:
45
+ #
46
+ # - Contract-specific: Use the `applicable_contract_ids` field to limit the commit
47
+ # to specific contracts
48
+ # - Cross-contract: Leave `applicable_contract_ids` empty to allow the commit to
49
+ # be used across all of the customer's contracts
50
+ #
51
+ # #### Product targeting:
52
+ #
53
+ # Commits can be scoped to specific products using applicable_product_ids,
54
+ # applicable_product_tags, or specifiers, or left unrestricted to apply to all
55
+ # products.
56
+ #
57
+ # #### Priority considerations:
58
+ #
59
+ # When multiple commits are applicable, the one with the lower priority value will
60
+ # be consumed first. If there is a tie, contract level commits and credits will be
61
+ # applied before customer level commits and credits. Plan your priority scheme
62
+ # carefully to ensure commits are applied in the desired order.
63
+ #
64
+ # ### Usage guidelines:
65
+ #
66
+ # ⚠️ Preferred Alternative: In most cases, you should add commits directly to
67
+ # contracts using the create contract or edit contract APIs instead of creating
68
+ # customer-level commits. Contract-level commits provide better organization and
69
+ # are the recommended approach for standard use cases.
9
70
  sig do
10
71
  params(
11
72
  access_schedule:
@@ -28,10 +89,7 @@ module MetronomeSDK
28
89
  rate_type:
29
90
  MetronomeSDK::V1::Customers::CommitCreateParams::RateType::OrSymbol,
30
91
  salesforce_opportunity_id: String,
31
- specifiers:
32
- T::Array[
33
- MetronomeSDK::V1::Customers::CommitCreateParams::Specifier::OrHash
34
- ],
92
+ specifiers: T::Array[MetronomeSDK::CommitSpecifierInput::OrHash],
35
93
  uniqueness_key: String,
36
94
  request_options: MetronomeSDK::RequestOptions::OrHash
37
95
  ).returns(MetronomeSDK::Models::V1::Customers::CommitCreateResponse)
@@ -59,6 +117,7 @@ module MetronomeSDK
59
117
  # applicable_product_tags or specifiers are not provided, the commit applies to
60
118
  # all products.
61
119
  applicable_product_tags: nil,
120
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
62
121
  custom_fields: nil,
63
122
  # Used only in UI/API. It is not exposed to end customers.
64
123
  description: nil,
@@ -92,7 +151,49 @@ module MetronomeSDK
92
151
  )
93
152
  end
94
153
 
95
- # List commits.
154
+ # Retrieve all commit agreements for a customer, including both prepaid and
155
+ # postpaid commitments. This endpoint provides comprehensive visibility into
156
+ # contractual spending obligations, enabling you to track commitment utilization
157
+ # and manage customer contracts effectively.
158
+ #
159
+ # ### Use this endpoint to:
160
+ #
161
+ # - Display commitment balances and utilization in customer dashboards
162
+ # - Track prepaid commitment drawdown and remaining balances
163
+ # - Monitor postpaid commitment progress toward minimum thresholds
164
+ # - Build commitment tracking and forecasting tools
165
+ # - Show commitment history with optional ledger details
166
+ # - Manage rollover balances between contract periods
167
+ #
168
+ # ### Key response fields:
169
+ #
170
+ # An array of Commit objects containing:
171
+ #
172
+ # - Commit type: PREPAID (pay upfront) or POSTPAID (pay at true-up)
173
+ # - Rate type: COMMIT_RATE (discounted) or LIST_RATE (standard pricing)
174
+ # - Access schedule: When commitment funds become available
175
+ # - Invoice schedule: When the customer is billed
176
+ # - Product targeting: Which product(s) usage is eligible to draw from this commit
177
+ # - Optional ledger entries: Transaction history (if `include_ledgers=true`)
178
+ # - Balance information: Current available amount (if `include_balance=true`)
179
+ # - Rollover settings: Fraction of unused amount that carries forward
180
+ #
181
+ # ### Usage guidelines:
182
+ #
183
+ # - Pagination: Results limited to 25 commits per page; use 'next_page' for more
184
+ # - Date filtering options:
185
+ # - `covering_date`: Commits active on a specific date
186
+ # - `starting_at`: Commits with access on/after a date
187
+ # - `effective_before`: Commits with access before a date (exclusive)
188
+ # - Scope options:
189
+ # - `include_contract_commits`: Include contract-level commits (not just
190
+ # customer-level)
191
+ # - `include_archived`: Include archived commits and commits from archived
192
+ # contracts
193
+ # - Performance considerations:
194
+ # - include_ledgers: Adds detailed transaction history (slower)
195
+ # - include_balance: Adds current balance calculation (slower)
196
+ # - Optional filtering: Use commit_id to retrieve a specific commit
96
197
  sig do
97
198
  params(
98
199
  customer_id: String,
@@ -107,7 +208,9 @@ module MetronomeSDK
107
208
  next_page: String,
108
209
  starting_at: Time,
109
210
  request_options: MetronomeSDK::RequestOptions::OrHash
110
- ).returns(MetronomeSDK::Models::V1::Customers::CommitListResponse)
211
+ ).returns(
212
+ MetronomeSDK::Internal::BodyCursorPage[MetronomeSDK::Commit]
213
+ )
111
214
  end
112
215
  def list(
113
216
  customer_id:,
@@ -136,9 +239,15 @@ module MetronomeSDK
136
239
  )
137
240
  end
138
241
 
139
- # Pull forward the end date of a prepaid commit. Use the "edit a commit" endpoint
140
- # to extend the end date of a prepaid commit, or to make other edits to the
141
- # commit.
242
+ # Shortens the end date of a prepaid commit to terminate it earlier than
243
+ # originally scheduled. Use this endpoint when you need to cancel or reduce the
244
+ # duration of an existing prepaid commit. Only works with prepaid commit types and
245
+ # can only move the end date forward (earlier), not extend it.
246
+ #
247
+ # ### Usage guidelines:
248
+ #
249
+ # To extend commit end dates or make other comprehensive edits, use the 'edit
250
+ # commit' endpoint instead.
142
251
  sig do
143
252
  params(
144
253
  commit_id: String,
@@ -5,7 +5,55 @@ module MetronomeSDK
5
5
  class V1
6
6
  class Customers
7
7
  class Credits
8
- # Create a new credit at the customer level.
8
+ # Creates customer-level credits that provide spending allowances or free credit
9
+ # balances for customers across their Metronome usage. Note: In most cases, you
10
+ # should add credits directly to customer contracts using the contract/create or
11
+ # contract/edit APIs.
12
+ #
13
+ # ### Use this endpoint to:
14
+ #
15
+ # Use this endpoint when you need to provision credits directly at the customer
16
+ # level that can be applied across multiple contracts or scoped to specific
17
+ # contracts. Customer-level credits are ideal for:
18
+ #
19
+ # - Customer onboarding incentives that apply globally
20
+ # - Flexible spending allowances that aren't tied to a single contract
21
+ # - Migration scenarios where you need to preserve existing customer balances
22
+ #
23
+ # #### Scoping flexibility:
24
+ #
25
+ # Customer-level credits can be configured in two ways:
26
+ #
27
+ # - Contract-specific: Use the applicable_contract_ids field to limit the credit
28
+ # to specific contracts
29
+ # - Cross-contract: Leave applicable_contract_ids empty to allow the credit to be
30
+ # used across all of the customer's contracts
31
+ #
32
+ # #### Product Targeting:
33
+ #
34
+ # Credits can be scoped to specific products using `applicable_product_ids` or
35
+ # `applicable_product_tags`, or left unrestricted to apply to all products.
36
+ #
37
+ # #### Priority considerations:
38
+ #
39
+ # When multiple credits are applicable, the one with the lower priority value will
40
+ # be consumed first. If there is a tie, contract level commits and credits will be
41
+ # applied before customer level commits and credits. Plan your priority scheme
42
+ # carefully to ensure credits are applied in the desired order.
43
+ #
44
+ # #### Access Schedule Required:
45
+ #
46
+ # You must provide an `access_schedule` that defines when and how much credit
47
+ # becomes available to the customer over time. This usually is aligned to the
48
+ # contract schedule or starts immediately and is set to expire in the future.
49
+ #
50
+ # ### Usage Guidelines:
51
+ #
52
+ # ⚠️ Preferred Alternative: In most cases, you should add credits directly to
53
+ # contracts using the contract/create or contract/edit APIs instead of creating
54
+ # customer-level credits. Contract-level credits provide better organization, and
55
+ # are easier for finance teams to recognize revenue, and are the recommended
56
+ # approach for most use cases.
9
57
  sig do
10
58
  params(
11
59
  access_schedule:
@@ -23,10 +71,7 @@ module MetronomeSDK
23
71
  rate_type:
24
72
  MetronomeSDK::V1::Customers::CreditCreateParams::RateType::OrSymbol,
25
73
  salesforce_opportunity_id: String,
26
- specifiers:
27
- T::Array[
28
- MetronomeSDK::V1::Customers::CreditCreateParams::Specifier::OrHash
29
- ],
74
+ specifiers: T::Array[MetronomeSDK::CommitSpecifierInput::OrHash],
30
75
  uniqueness_key: String,
31
76
  request_options: MetronomeSDK::RequestOptions::OrHash
32
77
  ).returns(MetronomeSDK::Models::V1::Customers::CreditCreateResponse)
@@ -48,6 +93,7 @@ module MetronomeSDK
48
93
  # Which tags the credit applies to. If both applicable_product_ids and
49
94
  # applicable_product_tags are not provided, the credit applies to all products.
50
95
  applicable_product_tags: nil,
96
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
51
97
  custom_fields: nil,
52
98
  # Used only in UI/API. It is not exposed to end customers.
53
99
  description: nil,
@@ -72,7 +118,50 @@ module MetronomeSDK
72
118
  )
73
119
  end
74
120
 
75
- # List credits.
121
+ # Retrieve a detailed list of all credits available to a customer, including
122
+ # promotional credits and contract-specific credits. This endpoint provides
123
+ # comprehensive visibility into credit balances, access schedules, and usage
124
+ # rules, enabling you to build credit management interfaces and track available
125
+ # funding.
126
+ #
127
+ # ### Use this endpoint to:
128
+ #
129
+ # - Display all available credits in customer billing dashboards
130
+ # - Show credit balances and expiration dates
131
+ # - Track credit usage history with optional ledger details
132
+ # - Build credit management and reporting tools
133
+ # - Monitor promotional credit utilization • Support customer inquiries about
134
+ # available credits
135
+ #
136
+ # ### Key response fields:
137
+ #
138
+ # An array of Credit objects containing:
139
+ #
140
+ # - Credit details: Name, priority, and which applicable products/tags it applies
141
+ # to
142
+ # - Product ID: The `product_id` of the credit. This is for external mapping into
143
+ # your quote-to-cash stack, not the product it applies to.
144
+ # - Access schedule: When credits become available and expire
145
+ # - Optional ledger entries: Transaction history (if `include_ledgers=true`)
146
+ # - Balance information: Current available amount (if `include_balance=true`)
147
+ # - Metadata: Custom fields and usage specifiers
148
+ #
149
+ # ### Usage guidelines:
150
+ #
151
+ # - Pagination: Results limited to 25 commits per page; use next_page for more
152
+ # - Date filtering options:
153
+ # - `covering_date`: Credits active on a specific date
154
+ # - `starting_at`: Credits with access on/after a date
155
+ # - `effective_before`: Credits with access before a date (exclusive)
156
+ # - Scope options:
157
+ # - `include_contract_credits`: Include contract-level credits (not just
158
+ # customer-level)
159
+ # - `include_archived`: Include archived credits and credits from archived
160
+ # contracts
161
+ # - Performance considerations:
162
+ # - `include_ledgers`: Adds detailed transaction history (slower)
163
+ # - `include_balance`: Adds current balance calculation (slower)
164
+ # - Optional filtering: Use credit_id to retrieve a specific commit
76
165
  sig do
77
166
  params(
78
167
  customer_id: String,
@@ -87,7 +176,9 @@ module MetronomeSDK
87
176
  next_page: String,
88
177
  starting_at: Time,
89
178
  request_options: MetronomeSDK::RequestOptions::OrHash
90
- ).returns(MetronomeSDK::Models::V1::Customers::CreditListResponse)
179
+ ).returns(
180
+ MetronomeSDK::Internal::BodyCursorPage[MetronomeSDK::Credit]
181
+ )
91
182
  end
92
183
  def list(
93
184
  customer_id:,
@@ -116,8 +207,12 @@ module MetronomeSDK
116
207
  )
117
208
  end
118
209
 
119
- # Pull forward the end date of a credit. Use the "edit a credit" endpoint to
120
- # extend the end date of a credit, or to make other edits to the credit.
210
+ # Shortens the end date of an existing customer credit to terminate it earlier
211
+ # than originally scheduled. Only allows moving end dates forward (earlier), not
212
+ # extending them.
213
+ #
214
+ # Note: To extend credit end dates or make comprehensive edits, use the 'edit
215
+ # credit' endpoint instead.
121
216
  sig do
122
217
  params(
123
218
  access_ending_before: Time,
@@ -5,7 +5,46 @@ module MetronomeSDK
5
5
  class V1
6
6
  class Customers
7
7
  class Invoices
8
- # Fetch a specific invoice for a given customer.
8
+ # Retrieve detailed information for a specific invoice by its unique identifier.
9
+ # This endpoint returns comprehensive invoice data including line items, applied
10
+ # credits, totals, and billing period details for both finalized and draft
11
+ # invoices.
12
+ #
13
+ # ### Use this endpoint to:
14
+ #
15
+ # - Display historical invoice details in customer-facing dashboards or billing
16
+ # portals.
17
+ # - Retrieve current month draft invoices to show customers their month-to-date
18
+ # spend.
19
+ # - Access finalized invoices for historical billing records and payment
20
+ # reconciliation.
21
+ # - Validate customer pricing and credit applications for customer support
22
+ # queries.
23
+ #
24
+ # ### Key response fields:
25
+ #
26
+ # Invoice status (DRAFT, FINALIZED, VOID) Billing period start and end dates Total
27
+ # amount and amount due after credits Detailed line items broken down by:
28
+ #
29
+ # - Customer and contract information
30
+ # - Invoice line item type
31
+ # - Product/service name and ID
32
+ # - Quantity consumed
33
+ # - Unit and total price
34
+ # - Time period for usage-based charges
35
+ # - Applied credits or prepaid commitments
36
+ #
37
+ # ### Usage guidelines:
38
+ #
39
+ # - Draft invoices update in real-time as usage is reported and may change before
40
+ # finalization
41
+ # - The response includes both usage-based line items (e.g., API calls, data
42
+ # processed) and scheduled charges (e.g., monthly subscriptions, commitment
43
+ # fees)
44
+ # - Credit and commitment applications are shown as separate line items with
45
+ # negative amounts
46
+ # - For voided invoices, the response will indicate VOID status but retain all
47
+ # original line item details
9
48
  sig do
10
49
  params(
11
50
  customer_id: String,
@@ -28,8 +67,52 @@ module MetronomeSDK
28
67
  )
29
68
  end
30
69
 
31
- # List all invoices for a given customer, optionally filtered by status, date
32
- # range, and/or credit type.
70
+ # Retrieves a paginated list of invoices for a specific customer, with flexible
71
+ # filtering options to narrow results by status, date range, credit type, and
72
+ # more. This endpoint provides a comprehensive view of a customer's billing
73
+ # history and current charges, supporting both real-time billing dashboards and
74
+ # historical reporting needs.
75
+ #
76
+ # ### Use this endpoint to:
77
+ #
78
+ # - Display historical invoice details in customer-facing dashboards or billing
79
+ # portals.
80
+ # - Retrieve current month draft invoices to show customers their month-to-date
81
+ # spend.
82
+ # - Access finalized invoices for historical billing records and payment
83
+ # reconciliation.
84
+ # - Validate customer pricing and credit applications for customer support
85
+ # queries.
86
+ # - Generate financial reports by filtering invoices within specific date ranges
87
+ #
88
+ # ### Key response fields:
89
+ #
90
+ # Array of invoice objects containing:
91
+ #
92
+ # - Invoice ID and status (DRAFT, FINALIZED, VOID)
93
+ # - Invoice type (USAGE, SCHEDULED)
94
+ # - Billing period start and end dates
95
+ # - Issue date and due date
96
+ # - Total amount, subtotal, and amount due
97
+ # - Applied credits summary
98
+ # - Contract ID reference
99
+ # - External billing provider status (if integrated with Stripe, etc.)
100
+ # - Pagination metadata `next_page` cursor
101
+ #
102
+ # ### Usage guidelines:
103
+ #
104
+ # - The endpoint returns invoice summaries; use the Get Invoice endpoint for
105
+ # detailed line items
106
+ # - Draft invoices are continuously updated as new usage is reported and will show
107
+ # real-time spend
108
+ # - Results are ordered by creation date descending by default (newest first)
109
+ # - When filtering by date range, the filter applies to the billing period, not
110
+ # the issue date
111
+ # - For customers with many invoices, implement pagination to ensure all results
112
+ # are retrieved External billing provider statuses (like Stripe payment status)
113
+ # are included when applicable
114
+ # - Voided invoices are included in results by default unless filtered out by
115
+ # status
33
116
  sig do
34
117
  params(
35
118
  customer_id: String,
@@ -113,11 +196,44 @@ module MetronomeSDK
113
196
  )
114
197
  end
115
198
 
116
- # List daily or hourly invoice breakdowns for a given customer, optionally
117
- # filtered by status, date range, and/or credit type. Important considerations:
199
+ # Retrieve granular time-series breakdowns of invoice data at hourly or daily
200
+ # intervals. This endpoint transforms standard invoices into detailed timelines,
201
+ # enabling you to track usage patterns, identify consumption spikes, and provide
202
+ # customers with transparency into their billing details throughout the billing
203
+ # period.
204
+ #
205
+ # ### Use this endpoint to:
206
+ #
207
+ # - Build usage analytics dashboards showing daily or hourly consumption trends
208
+ # - Identify peak usage periods for capacity planning and cost optimization
209
+ # - Generate detailed billing reports for finance teams and customer success
210
+ # - Troubleshoot billing disputes by examining usage patterns at specific times
211
+ # - Power real-time cost monitoring and alerting systems
212
+ #
213
+ # ### Key response fields:
214
+ #
215
+ # An array of BreakdownInvoice objects, each containing:
216
+ #
217
+ # - All standard invoice fields (ID, customer, commit, line items, totals, status)
218
+ # - Line items with quantities and costs for that specific period
219
+ # - `breakdown_start_timestamp`: Start of the specific time window
220
+ # - `breakdown_end_timestamp`: End of the specific time window
221
+ # - `next_page`: Pagination cursor for large result sets
222
+ #
223
+ # ### Usage guidelines:
118
224
  #
119
- # - If we receive backdated usage after an invoice has been finalized, the
120
- # backdated usage will be included in the response and usage numbers may differ.
225
+ # - Time granularity: Set `window_size` to hour or day based on your analysis
226
+ # needs
227
+ # - Response limits: Daily breakdowns return up to 35 days; hourly breakdowns
228
+ # return up to 24 hours per request
229
+ # - Date filtering: Use `starting_on` and `ending_before` to focus on specific
230
+ # periods
231
+ # - Performance: For large date ranges, use pagination to retrieve all data
232
+ # efficiently
233
+ # - Backdated usage: If usage events arrive after invoice finalization, breakdowns
234
+ # will reflect the updated usage
235
+ # - Zero quantity filtering: Use `skip_zero_qty_line_items=true` to exclude
236
+ # periods with no usage
121
237
  sig do
122
238
  params(
123
239
  customer_id: String,