metronome-sdk 1.0.0 → 2.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 (193) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +91 -0
  3. data/README.md +1 -1
  4. data/lib/metronome_sdk/errors.rb +25 -11
  5. data/lib/metronome_sdk/file_part.rb +10 -7
  6. data/lib/metronome_sdk/internal/body_cursor_page.rb +1 -1
  7. data/lib/metronome_sdk/internal/cursor_page.rb +1 -1
  8. data/lib/metronome_sdk/internal/cursor_page_without_limit.rb +1 -1
  9. data/lib/metronome_sdk/internal/transport/base_client.rb +11 -7
  10. data/lib/metronome_sdk/internal/transport/pooled_net_requester.rb +34 -31
  11. data/lib/metronome_sdk/internal/type/base_page.rb +1 -1
  12. data/lib/metronome_sdk/internal/type/enum.rb +25 -0
  13. data/lib/metronome_sdk/internal/type/file_input.rb +7 -4
  14. data/lib/metronome_sdk/internal/util.rb +8 -7
  15. data/lib/metronome_sdk/models/contract.rb +1 -0
  16. data/lib/metronome_sdk/models/contract_v2.rb +275 -6
  17. data/lib/metronome_sdk/models/contract_without_amendments.rb +2 -2
  18. data/lib/metronome_sdk/models/hierarchy_configuration.rb +123 -2
  19. data/lib/metronome_sdk/models/payment_gate_config.rb +1 -0
  20. data/lib/metronome_sdk/models/payment_gate_config_v2.rb +1 -0
  21. data/lib/metronome_sdk/models/subscription.rb +95 -1
  22. data/lib/metronome_sdk/models/v1/alert_archive_params.rb +8 -4
  23. data/lib/metronome_sdk/models/v1/alert_create_params.rb +38 -36
  24. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +1 -0
  25. data/lib/metronome_sdk/models/v1/contract_create_params.rb +157 -9
  26. data/lib/metronome_sdk/models/v1/contract_list_balances_params.rb +9 -1
  27. data/lib/metronome_sdk/models/v1/customer_create_params.rb +11 -1
  28. data/lib/metronome_sdk/models/v1/customer_detail.rb +9 -1
  29. data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +19 -25
  30. data/lib/metronome_sdk/models/v1/customer_preview_events_response.rb +3 -3
  31. data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rb +1 -0
  32. data/lib/metronome_sdk/models/v1/customer_set_billing_configurations_params.rb +1 -0
  33. data/lib/metronome_sdk/models/v1/customers/alert_list_params.rb +3 -3
  34. data/lib/metronome_sdk/models/v1/customers/alert_reset_params.rb +2 -2
  35. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +12 -12
  36. data/lib/metronome_sdk/models/v1/customers/billing_config_create_params.rb +6 -1
  37. data/lib/metronome_sdk/models/v1/customers/billing_config_delete_params.rb +1 -0
  38. data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_params.rb +1 -0
  39. data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +6 -1
  40. data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +1 -1
  41. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +41 -38
  42. data/lib/metronome_sdk/models/v1/customers/invoice.rb +256 -16
  43. data/lib/metronome_sdk/models/v1/customers/invoice_retrieve_pdf_params.rb +30 -0
  44. data/lib/metronome_sdk/models/v1/payment.rb +157 -0
  45. data/lib/metronome_sdk/models/v1/payment_attempt_params.rb +28 -0
  46. data/lib/metronome_sdk/models/v1/payment_attempt_response.rb +18 -0
  47. data/lib/metronome_sdk/models/v1/payment_cancel_params.rb +28 -0
  48. data/lib/metronome_sdk/models/v1/payment_cancel_response.rb +18 -0
  49. data/lib/metronome_sdk/models/v1/payment_list_params.rb +53 -0
  50. data/lib/metronome_sdk/models/v1/payment_status.rb +19 -0
  51. data/lib/metronome_sdk/models/v1/setting_upsert_avalara_credentials_params.rb +65 -0
  52. data/lib/metronome_sdk/models/v1/setting_upsert_avalara_credentials_response.rb +12 -0
  53. data/lib/metronome_sdk/models/v1/settings/billing_provider_create_params.rb +73 -0
  54. data/lib/metronome_sdk/models/v1/settings/billing_provider_create_response.rb +31 -0
  55. data/lib/metronome_sdk/models/v1/settings/billing_provider_list_params.rb +26 -0
  56. data/lib/metronome_sdk/models/v1/settings/billing_provider_list_response.rb +105 -0
  57. data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +9 -1
  58. data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +9 -1
  59. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +219 -9
  60. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +195 -8
  61. data/lib/metronome_sdk/resources/v1/alerts.rb +57 -53
  62. data/lib/metronome_sdk/resources/v1/contracts.rb +8 -5
  63. data/lib/metronome_sdk/resources/v1/credit_grants.rb +10 -5
  64. data/lib/metronome_sdk/resources/v1/customers/alerts.rb +70 -51
  65. data/lib/metronome_sdk/resources/v1/customers/billing_config.rb +7 -4
  66. data/lib/metronome_sdk/resources/v1/customers/commits.rb +2 -1
  67. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +57 -1
  68. data/lib/metronome_sdk/resources/v1/customers/plans.rb +8 -4
  69. data/lib/metronome_sdk/resources/v1/customers.rb +13 -8
  70. data/lib/metronome_sdk/resources/v1/payments.rb +102 -0
  71. data/lib/metronome_sdk/resources/v1/plans.rb +8 -4
  72. data/lib/metronome_sdk/resources/v1/settings/billing_providers.rb +75 -0
  73. data/lib/metronome_sdk/resources/v1/settings.rb +55 -0
  74. data/lib/metronome_sdk/resources/v1/usage.rb +4 -2
  75. data/lib/metronome_sdk/resources/v1.rb +8 -0
  76. data/lib/metronome_sdk/resources/v2/contracts.rb +9 -3
  77. data/lib/metronome_sdk/version.rb +1 -1
  78. data/lib/metronome_sdk.rb +17 -0
  79. data/rbi/metronome_sdk/errors.rbi +29 -2
  80. data/rbi/metronome_sdk/file_part.rbi +1 -1
  81. data/rbi/metronome_sdk/internal/transport/base_client.rbi +4 -5
  82. data/rbi/metronome_sdk/internal/type/base_page.rbi +1 -1
  83. data/rbi/metronome_sdk/internal/util.rbi +1 -1
  84. data/rbi/metronome_sdk/models/contract.rbi +5 -0
  85. data/rbi/metronome_sdk/models/contract_v2.rbi +635 -10
  86. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +2 -2
  87. data/rbi/metronome_sdk/models/hierarchy_configuration.rbi +286 -6
  88. data/rbi/metronome_sdk/models/payment_gate_config.rbi +5 -0
  89. data/rbi/metronome_sdk/models/payment_gate_config_v2.rbi +5 -0
  90. data/rbi/metronome_sdk/models/subscription.rbi +190 -0
  91. data/rbi/metronome_sdk/models/v1/alert_archive_params.rbi +6 -4
  92. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +51 -47
  93. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +5 -0
  94. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +326 -10
  95. data/rbi/metronome_sdk/models/v1/contract_list_balances_params.rbi +11 -0
  96. data/rbi/metronome_sdk/models/v1/customer_create_params.rbi +11 -0
  97. data/rbi/metronome_sdk/models/v1/customer_detail.rbi +8 -0
  98. data/rbi/metronome_sdk/models/v1/customer_preview_events_params.rbi +24 -32
  99. data/rbi/metronome_sdk/models/v1/customer_preview_events_response.rbi +10 -9
  100. data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbi +5 -0
  101. data/rbi/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbi +5 -0
  102. data/rbi/metronome_sdk/models/v1/customers/alert_list_params.rbi +4 -4
  103. data/rbi/metronome_sdk/models/v1/customers/alert_reset_params.rbi +2 -2
  104. data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +14 -14
  105. data/rbi/metronome_sdk/models/v1/customers/billing_config_create_params.rbi +11 -0
  106. data/rbi/metronome_sdk/models/v1/customers/billing_config_delete_params.rbi +5 -0
  107. data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_params.rbi +5 -0
  108. data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +6 -0
  109. data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +2 -2
  110. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +53 -44
  111. data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +462 -38
  112. data/rbi/metronome_sdk/models/v1/customers/invoice_retrieve_pdf_params.rbi +50 -0
  113. data/rbi/metronome_sdk/models/v1/payment.rbi +324 -0
  114. data/rbi/metronome_sdk/models/v1/payment_attempt_params.rbi +48 -0
  115. data/rbi/metronome_sdk/models/v1/payment_attempt_response.rbi +35 -0
  116. data/rbi/metronome_sdk/models/v1/payment_cancel_params.rbi +48 -0
  117. data/rbi/metronome_sdk/models/v1/payment_cancel_response.rbi +35 -0
  118. data/rbi/metronome_sdk/models/v1/payment_list_params.rbi +91 -0
  119. data/rbi/metronome_sdk/models/v1/payment_status.rbi +33 -0
  120. data/rbi/metronome_sdk/models/v1/setting_upsert_avalara_credentials_params.rbi +115 -0
  121. data/rbi/metronome_sdk/models/v1/setting_upsert_avalara_credentials_response.rbi +25 -0
  122. data/rbi/metronome_sdk/models/v1/settings/billing_provider_create_params.rbi +157 -0
  123. data/rbi/metronome_sdk/models/v1/settings/billing_provider_create_response.rbi +75 -0
  124. data/rbi/metronome_sdk/models/v1/settings/billing_provider_list_params.rbi +50 -0
  125. data/rbi/metronome_sdk/models/v1/settings/billing_provider_list_response.rbi +245 -0
  126. data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +18 -0
  127. data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +18 -0
  128. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +536 -12
  129. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +462 -14
  130. data/rbi/metronome_sdk/resources/v1/alerts.rbi +68 -64
  131. data/rbi/metronome_sdk/resources/v1/contracts.rbi +8 -4
  132. data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +10 -5
  133. data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +73 -54
  134. data/rbi/metronome_sdk/resources/v1/customers/billing_config.rbi +8 -4
  135. data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +3 -2
  136. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +38 -1
  137. data/rbi/metronome_sdk/resources/v1/customers/plans.rbi +8 -4
  138. data/rbi/metronome_sdk/resources/v1/customers.rbi +17 -11
  139. data/rbi/metronome_sdk/resources/v1/payments.rbi +72 -0
  140. data/rbi/metronome_sdk/resources/v1/plans.rbi +8 -4
  141. data/rbi/metronome_sdk/resources/v1/settings/billing_providers.rbi +63 -0
  142. data/rbi/metronome_sdk/resources/v1/settings.rbi +47 -0
  143. data/rbi/metronome_sdk/resources/v1/usage.rbi +4 -2
  144. data/rbi/metronome_sdk/resources/v1.rbi +6 -0
  145. data/rbi/metronome_sdk/resources/v2/contracts.rbi +14 -0
  146. data/sig/metronome_sdk/errors.rbs +7 -0
  147. data/sig/metronome_sdk/file_part.rbs +1 -1
  148. data/sig/metronome_sdk/models/contract.rbs +2 -0
  149. data/sig/metronome_sdk/models/contract_v2.rbs +241 -12
  150. data/sig/metronome_sdk/models/hierarchy_configuration.rbs +87 -6
  151. data/sig/metronome_sdk/models/payment_gate_config.rbs +2 -1
  152. data/sig/metronome_sdk/models/payment_gate_config_v2.rbs +2 -1
  153. data/sig/metronome_sdk/models/subscription.rbs +80 -0
  154. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +2 -1
  155. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +91 -5
  156. data/sig/metronome_sdk/models/v1/contract_list_balances_params.rbs +7 -0
  157. data/sig/metronome_sdk/models/v1/customer_create_params.rbs +2 -0
  158. data/sig/metronome_sdk/models/v1/customer_detail.rbs +5 -0
  159. data/sig/metronome_sdk/models/v1/customer_preview_events_params.rbs +0 -7
  160. data/sig/metronome_sdk/models/v1/customer_preview_events_response.rbs +6 -4
  161. data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbs +2 -0
  162. data/sig/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbs +2 -0
  163. data/sig/metronome_sdk/models/v1/customers/billing_config_create_params.rbs +2 -0
  164. data/sig/metronome_sdk/models/v1/customers/billing_config_delete_params.rbs +2 -0
  165. data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_params.rbs +2 -0
  166. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +2 -0
  167. data/sig/metronome_sdk/models/v1/customers/invoice.rbs +244 -19
  168. data/sig/metronome_sdk/models/v1/customers/invoice_retrieve_pdf_params.rbs +32 -0
  169. data/sig/metronome_sdk/models/v1/payment.rbs +198 -0
  170. data/sig/metronome_sdk/models/v1/payment_attempt_params.rbs +30 -0
  171. data/sig/metronome_sdk/models/v1/payment_attempt_response.rbs +15 -0
  172. data/sig/metronome_sdk/models/v1/payment_cancel_params.rbs +30 -0
  173. data/sig/metronome_sdk/models/v1/payment_cancel_response.rbs +15 -0
  174. data/sig/metronome_sdk/models/v1/payment_list_params.rbs +56 -0
  175. data/sig/metronome_sdk/models/v1/payment_status.rbs +19 -0
  176. data/sig/metronome_sdk/models/v1/setting_upsert_avalara_credentials_params.rbs +54 -0
  177. data/sig/metronome_sdk/models/v1/setting_upsert_avalara_credentials_response.rbs +13 -0
  178. data/sig/metronome_sdk/models/v1/settings/billing_provider_create_params.rbs +64 -0
  179. data/sig/metronome_sdk/models/v1/settings/billing_provider_create_response.rbs +34 -0
  180. data/sig/metronome_sdk/models/v1/settings/billing_provider_list_params.rbs +28 -0
  181. data/sig/metronome_sdk/models/v1/settings/billing_provider_list_response.rbs +102 -0
  182. data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +9 -0
  183. data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +9 -0
  184. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +184 -7
  185. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +221 -18
  186. data/sig/metronome_sdk/resources/v1/contracts.rbs +1 -0
  187. data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +6 -0
  188. data/sig/metronome_sdk/resources/v1/payments.rbs +30 -0
  189. data/sig/metronome_sdk/resources/v1/settings/billing_providers.rbs +23 -0
  190. data/sig/metronome_sdk/resources/v1/settings.rbs +19 -0
  191. data/sig/metronome_sdk/resources/v1.rbs +4 -0
  192. data/sig/metronome_sdk/resources/v2/contracts.rbs +3 -0
  193. metadata +53 -2
@@ -7,16 +7,15 @@ module MetronomeSDK
7
7
  # Some parameter documentations has been truncated, see
8
8
  # {MetronomeSDK::Models::V1::AlertCreateParams} for more details.
9
9
  #
10
- # Create a new alert to monitor customer spending, balances, and billing metrics
11
- # in real-time. Metronome's alert system provides industry-leading speed with
12
- # immediate evaluation capabilities, enabling you to proactively manage customer
13
- # accounts and prevent revenue leakage.
10
+ # Create a new threshold notification to monitor customer spending, balances, and
11
+ # billing metrics in real-time. Metronome's notification system provides
12
+ # industry-leading speed with immediate evaluation capabilities, enabling you to
13
+ # proactively manage customer accounts and prevent revenue leakage.
14
14
  #
15
- # This endpoint creates configurable alerts that continuously monitor various
16
- # billing thresholds including spend limits, credit balances, commitment
17
- # utilization, and invoice totals. Alerts can be configured globally for all
18
- # customers or targeted to specific customer accounts. Custom fields can be used
19
- # on certain alert types to further target alerts to groups of customers.
15
+ # This endpoint creates configurable threshold notifications that continuously
16
+ # monitor various billing thresholds including spend limits, credit balances,
17
+ # commitment utilization, and invoice totals. Threshold notifications can be
18
+ # configured globally for all customers or targeted to specific customer accounts.
20
19
  #
21
20
  # ### Use this endpoint to:
22
21
  #
@@ -32,52 +31,53 @@ module MetronomeSDK
32
31
  #
33
32
  # A successful response returns a CustomerAlert object containing:
34
33
  #
35
- # - The alert configuration with its unique ID and current status
34
+ # - The threshold notification configuration with its unique ID and current status
36
35
  # - The customer's evaluation status (ok, in_alarm, or evaluating)
37
- # - Alert metadata including type, threshold values, and update timestamps
36
+ # - Threshold notification metadata including type, threshold values, and update
37
+ # timestamps
38
38
  #
39
39
  # ### Usage guidelines:
40
40
  #
41
41
  # - Immediate evaluation: Set `evaluate_on_create` : `true` (default) for instant
42
42
  # evaluation against existing customers
43
- # - Uniqueness constraints: Each alert must have a unique `uniqueness_key` within
44
- # your organization. Use `release_uniqueness_key` : `true` when archiving to
45
- # reuse keys
46
- # - Alert type requirements: Different alert types require specific fields (e.g.,
47
- # `billable_metric_id` for usage alerts, `credit_type_id` for credit-based
48
- # alerts)
49
- # - Webhook delivery: Alerts trigger webhook notifications for real-time
50
- # integration with your systems. Configure webhook endpoints before creating
51
- # alerts
52
- # - Performance at scale: Metronome's event-driven architecture processes alert
53
- # evaluations in real-time as usage events stream in, unlike competitors who
54
- # rely on periodic polling or batch evaluation cycles
43
+ # - Uniqueness constraints: Each threshold notification must have a unique
44
+ # `uniqueness_key` within your organization. Use `release_uniqueness_key` :
45
+ # `true` when archiving to reuse keys
46
+ # - Notification type requirements: Different threshold notification types require
47
+ # specific fields (e.g., `billable_metric_id` for usage notifications,
48
+ # `credit_type_id` for credit-based threshold notifications)
49
+ # - Webhook delivery: Threshold notifications trigger webhook notifications for
50
+ # real-time integration with your systems. Configure webhook endpoints before
51
+ # creating threshold notifications
52
+ # - Performance at scale: Metronome's event-driven architecture processes
53
+ # threshold notification evaluations in real-time as usage events stream in,
54
+ # unlike competitors who rely on periodic polling or batch evaluation cycles
55
55
  #
56
56
  # @overload create(alert_type:, name:, threshold:, billable_metric_id: nil, credit_grant_type_filters: nil, credit_type_id: nil, custom_field_filters: nil, customer_id: nil, evaluate_on_create: nil, group_values: nil, invoice_types_filter: nil, plan_id: nil, uniqueness_key: nil, request_options: {})
57
57
  #
58
- # @param alert_type [Symbol, MetronomeSDK::Models::V1::AlertCreateParams::AlertType] Type of the alert
58
+ # @param alert_type [Symbol, MetronomeSDK::Models::V1::AlertCreateParams::AlertType] Type of the threshold notification
59
59
  #
60
- # @param name [String] Name of the alert
60
+ # @param name [String] Name of the threshold notification
61
61
  #
62
- # @param threshold [Float] Threshold value of the alert policy. Depending upon the alert type, this number
62
+ # @param threshold [Float] Threshold value of the notification policy. Depending upon the notification typ
63
63
  #
64
- # @param billable_metric_id [String] For alerts of type `usage_threshold_reached`, specifies which billable metric to
64
+ # @param billable_metric_id [String] For threshold notifications of type `usage_threshold_reached`, specifies which b
65
65
  #
66
- # @param credit_grant_type_filters [Array<String>] An array of strings, representing a way to filter the credit grant this alert ap
66
+ # @param credit_grant_type_filters [Array<String>] An array of strings, representing a way to filter the credit grant this threshol
67
67
  #
68
- # @param credit_type_id [String] ID of the credit's currency, defaults to USD. If the specific alert type require
68
+ # @param credit_type_id [String] ID of the credit's currency, defaults to USD. If the specific notification type
69
69
  #
70
- # @param custom_field_filters [Array<MetronomeSDK::Models::V1::AlertCreateParams::CustomFieldFilter>] A list of custom field filters for alert types that support advanced filtering.
70
+ # @param custom_field_filters [Array<MetronomeSDK::Models::V1::AlertCreateParams::CustomFieldFilter>] A list of custom field filters for threshold notification types that support adv
71
71
  #
72
- # @param customer_id [String] If provided, will create this alert for this specific customer. To create an ale
72
+ # @param customer_id [String] If provided, will create this threshold notification for this specific customer.
73
73
  #
74
- # @param evaluate_on_create [Boolean] If true, the alert will evaluate immediately on customers that already meet the
74
+ # @param evaluate_on_create [Boolean] If true, the threshold notification will evaluate immediately on customers that
75
75
  #
76
- # @param group_values [Array<MetronomeSDK::Models::V1::AlertCreateParams::GroupValue>] Only present for `spend_threshold_reached` alerts. Scope alert to a specific gro
76
+ # @param group_values [Array<MetronomeSDK::Models::V1::AlertCreateParams::GroupValue>] Only present for `spend_threshold_reached` notifications. Scope notification to
77
77
  #
78
- # @param invoice_types_filter [Array<String>] Only supported for invoice_total_reached alerts. A list of invoice types to eval
78
+ # @param invoice_types_filter [Array<String>] Only supported for invoice_total_reached threshold notifications. A list of invo
79
79
  #
80
- # @param plan_id [String] If provided, will create this alert for this specific plan. To create an alert f
80
+ # @param plan_id [String] If provided, will create this threshold notification for this specific plan. To
81
81
  #
82
82
  # @param uniqueness_key [String] Prevents the creation of duplicates. If a request to create a record is made wit
83
83
  #
@@ -97,39 +97,43 @@ module MetronomeSDK
97
97
  )
98
98
  end
99
99
 
100
- # Permanently disable an alert and remove it from active monitoring across all
101
- # customers. Archived alerts stop evaluating immediately and can optionally
102
- # release their uniqueness key for reuse in future alert configurations.
100
+ # Some parameter documentations has been truncated, see
101
+ # {MetronomeSDK::Models::V1::AlertArchiveParams} for more details.
102
+ #
103
+ # Permanently disable a threshold notification and remove it from active
104
+ # monitoring across all customers. Archived threshold notifications stop
105
+ # evaluating immediately and can optionally release their uniqueness key for reuse
106
+ # in future threshold notification configurations.
103
107
  #
104
108
  # ### Use this endpoint to:
105
109
  #
106
- # - Decommission alerts that are no longer needed
107
- # - Clean up test or deprecated alert configurations
108
- # - Free up uniqueness keys for reuse with new alerts
109
- # - Stop alert evaluations without losing historical configuration data
110
+ # - Decommission threshold notifications that are no longer needed
111
+ # - Clean up test or deprecated threshold notification configurations
112
+ # - Free up uniqueness keys for reuse with new threshold notifications
113
+ # - Stop threshold notification evaluations without losing historical
114
+ # configuration data
110
115
  # - Disable outdated monitoring rules during pricing model transitions
111
116
  #
112
117
  # ### Key response fields:
113
118
  #
114
- # - data: Object containing the archived alert's ID
115
- # - Alert evaluation stops immediately for all affected customers
116
- # - Historical alert data and configurations remain accessible for audit purposes
119
+ # - data: Object containing the archived threshold notification's ID
117
120
  #
118
121
  # ### Usage guidelines:
119
122
  #
120
- # - Irreversible for evaluation: Archived alerts cannot be re-enabled; create a
121
- # new alert to resume monitoring
123
+ # - Irreversible for evaluation: Archived threshold notifications cannot be
124
+ # re-enabled; create a new threshold notification to resume monitoring
122
125
  # - Uniqueness key handling: Set `release_uniqueness_key` : `true` to reuse the
123
- # key in future alerts
124
- # - Immediate effect: Alert evaluation stops instantly across all customers
125
- # - Historical preservation: Archive operation maintains alert history and
126
- # configuration for compliance and auditing
126
+ # key in future threshold notifications
127
+ # - Immediate effect: Threshold notification evaluation stops instantly across all
128
+ # customers
129
+ # - Historical preservation: Archive operation maintains threshold notification
130
+ # history and configuration for compliance and auditing
127
131
  #
128
132
  # @overload archive(id:, release_uniqueness_key: nil, request_options: {})
129
133
  #
130
- # @param id [String] The Metronome ID of the alert
134
+ # @param id [String] The Metronome ID of the threshold notification
131
135
  #
132
- # @param release_uniqueness_key [Boolean] If true, resets the uniqueness key on this alert so it can be re-used
136
+ # @param release_uniqueness_key [Boolean] If true, resets the uniqueness key on this threshold notification so it can be r
133
137
  #
134
138
  # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
135
139
  #
@@ -352,7 +352,7 @@ module MetronomeSDK
352
352
 
353
353
  # Amendments will be replaced by Contract editing. New clients should implement
354
354
  # using the `editContract` endpoint. Read more about the migration to contract
355
- # editing [here](https://docs.metronome.com/migrate-amendments-to-edits/) and
355
+ # editing [here](/guides/implement-metronome/migrate-amendments-to-edits/) and
356
356
  # reach out to your Metronome representative for more details. Once contract
357
357
  # editing is enabled, access to this endpoint will be removed.
358
358
  #
@@ -514,7 +514,7 @@ module MetronomeSDK
514
514
  # segments
515
515
  # - Manual adjustments: Includes all manual ledger entries, even future-dated ones
516
516
  #
517
- # @overload list_balances(customer_id:, id: nil, covering_date: nil, effective_before: nil, include_archived: nil, include_balance: nil, include_contract_balances: nil, include_ledgers: nil, limit: nil, next_page: nil, starting_at: nil, request_options: {})
517
+ # @overload list_balances(customer_id:, id: nil, covering_date: nil, effective_before: nil, exclude_zero_balances: nil, include_archived: nil, include_balance: nil, include_contract_balances: nil, include_ledgers: nil, limit: nil, next_page: nil, starting_at: nil, request_options: {})
518
518
  #
519
519
  # @param customer_id [String]
520
520
  #
@@ -524,6 +524,8 @@ module MetronomeSDK
524
524
  #
525
525
  # @param effective_before [Time] Include only balances that have any access before the provided date (exclusive)
526
526
  #
527
+ # @param exclude_zero_balances [Boolean] Exclude balances with zero amounts from the response.
528
+ #
527
529
  # @param include_archived [Boolean] Include archived credits and credits from archived contracts.
528
530
  #
529
531
  # @param include_balance [Boolean] Include the balance of credits and commits in the response. Setting this flag ma
@@ -709,11 +711,12 @@ module MetronomeSDK
709
711
  # Some parameter documentations has been truncated, see
710
712
  # {MetronomeSDK::Models::V1::ContractUpdateEndDateParams} for more details.
711
713
  #
712
- # Update or and an end date to a contract. Ending a contract early will impact
714
+ # Update or add an end date to a contract. Ending a contract early will impact
713
715
  # draft usage statements, truncate any terms, and remove upcoming scheduled
714
716
  # invoices. Moving the date into the future will only extend the contract length.
715
- # Terms and scheduled invoices are not extended. Use this if a contract's end date
716
- # has changed or if a perpetual contract ends.
717
+ # Terms and scheduled invoices are not extended. In-advance subscriptions will not
718
+ # be extended. Use this if a contract's end date has changed or if a perpetual
719
+ # contract ends.
717
720
  #
718
721
  # @overload update_end_date(contract_id:, customer_id:, allow_ending_before_finalized_invoice: nil, ending_before: nil, request_options: {})
719
722
  #
@@ -7,7 +7,8 @@ module MetronomeSDK
7
7
  # Some parameter documentations has been truncated, see
8
8
  # {MetronomeSDK::Models::V1::CreditGrantCreateParams} for more details.
9
9
  #
10
- # Create a new credit grant
10
+ # Create a new credit grant. This is a Plans (deprecated) endpoint. New clients
11
+ # should implement using Contracts.
11
12
  #
12
13
  # @overload create(customer_id:, expires_at:, grant_amount:, name:, paid_amount:, priority:, credit_grant_type: nil, custom_fields: nil, effective_at: nil, invoice_date: nil, product_ids: nil, reason: nil, rollover_settings: nil, uniqueness_key: nil, request_options: {})
13
14
  #
@@ -58,7 +59,8 @@ module MetronomeSDK
58
59
  # Some parameter documentations has been truncated, see
59
60
  # {MetronomeSDK::Models::V1::CreditGrantListParams} for more details.
60
61
  #
61
- # List credit grants. This list does not included voided grants.
62
+ # List credit grants. This list does not included voided grants. This is a Plans
63
+ # (deprecated) endpoint. New clients should implement using Contracts.
62
64
  #
63
65
  # @overload list(limit: nil, next_page: nil, credit_grant_ids: nil, credit_type_ids: nil, customer_ids: nil, effective_before: nil, not_expiring_before: nil, request_options: {})
64
66
  #
@@ -95,7 +97,8 @@ module MetronomeSDK
95
97
  )
96
98
  end
97
99
 
98
- # Edit an existing credit grant
100
+ # Edit an existing credit grant. This is a Plans (deprecated) endpoint. New
101
+ # clients should implement using Contracts.
99
102
  #
100
103
  # @overload edit(id:, credit_grant_type: nil, expires_at: nil, name: nil, request_options: {})
101
104
  #
@@ -128,7 +131,8 @@ module MetronomeSDK
128
131
  #
129
132
  # Fetches a list of credit ledger entries. Returns lists of ledgers per customer.
130
133
  # Ledger entries are returned in chronological order. Ledger entries associated
131
- # with voided credit grants are not included.
134
+ # with voided credit grants are not included. This is a Plans (deprecated)
135
+ # endpoint. New clients should implement using Contracts.
132
136
  #
133
137
  # @overload list_entries(next_page: nil, sort: nil, credit_type_ids: nil, customer_ids: nil, ending_before: nil, starting_on: nil, request_options: {})
134
138
  #
@@ -164,7 +168,8 @@ module MetronomeSDK
164
168
  )
165
169
  end
166
170
 
167
- # Void a credit grant
171
+ # Void a credit grant. This is a Plans (deprecated) endpoint. New clients should
172
+ # implement using Contracts.
168
173
  #
169
174
  # @overload void(id:, release_uniqueness_key: nil, void_credit_purchase_invoice: nil, request_options: {})
170
175
  #
@@ -8,17 +8,26 @@ module MetronomeSDK
8
8
  # Some parameter documentations has been truncated, see
9
9
  # {MetronomeSDK::Models::V1::Customers::AlertRetrieveParams} for more details.
10
10
  #
11
- # Retrieve the real-time evaluation status for a specific alert-customer pair.
12
- # This endpoint provides instant visibility into whether a customer has triggered
13
- # an alert condition, enabling you to monitor account health and take proactive
14
- # action based on current alert states.
11
+ # Retrieve the real-time evaluation status for a specific threshold
12
+ # notification-customer pair. This endpoint provides instant visibility into
13
+ # whether a customer has triggered a threshold notification condition, enabling
14
+ # you to monitor account health and take proactive action based on current
15
+ # threshold notification states.
15
16
  #
16
17
  # ### Use this endpoint to:
17
18
  #
18
- # - Check if a specific customer is currently violating an alert threshold
19
+ # - Check if a specific customer is currently violating an threshold notification
19
20
  # (`in_alarm` status)
20
- # - Verify alert configuration details and threshold values for a customer
21
- # - Integrate alert status checks into customer support tools or admin interfaces
21
+ # - Verify threshold notification configuration details and threshold values for a
22
+ # customer
23
+ # - Monitor the evaluation state of newly created or recently modified threshold
24
+ # notification
25
+ # - Build dashboards or automated workflows that respond to specific threshold
26
+ # notification conditions
27
+ # - Validate threshold notification behavior before deploying to production
28
+ # customers
29
+ # - Integrate threshold notification status checks into customer support tools or
30
+ # admin interfaces
22
31
  #
23
32
  # ### Key response fields:
24
33
  #
@@ -27,40 +36,43 @@ module MetronomeSDK
27
36
  # - `customer_status`: The current evaluation state
28
37
  #
29
38
  # - `ok` - Customer is within acceptable thresholds
30
- # - `in_alarm`- Customer has breached the alert threshold
31
- # - `evaluating` - Alert has yet to be evaluated (typically due to a customer or
32
- # alert having just been created)
33
- # - `null` - Alert has been archived
34
- # - `triggered_by`: Additional context about what caused the alert to trigger
35
- # (when applicable)
36
- # - alert: Complete alert configuration including:
37
- # - Alert ID, name, and type
39
+ # - `in_alarm` - Customer has breached the threshold for the notification
40
+ # - `evaluating` - Notification is currently being evaluated (typically during
41
+ # initial setup)
42
+ # - `null` - Notification has been archived
43
+ # - `triggered_by`: Additional context about what caused the notification to
44
+ # trigger (when applicable)
45
+ # - alert: Complete threshold notification configuration including:
46
+ # - Notification ID, name, and type
38
47
  # - Current threshold values and credit type information
39
- # - Alert status (enabled, disabled, or archived)
48
+ # - Notification status (enabled, disabled, or archived)
40
49
  # - Last update timestamp
41
50
  # - Any applied filters (credit grant types, custom fields, group values)
42
51
  #
43
52
  # ### Usage guidelines:
44
53
  #
45
54
  # - Customer status: Returns the current evaluation state, not historical data.
46
- # For alert history, use webhook notifications or event logs
47
- # - Archived alerts: Returns null for customer_status if the alert has been
48
- # archived, but still includes the alert configuration details
49
- # - Integration patterns: This endpoint can be used to check a customer's alert
50
- # status, but shouldn't be scraped. You should instead rely on the webhook
51
- # notification to understand when customers are moved to IN_ALARM.
52
- # - Error handling: Returns 404 if either the customer or alert ID doesn't exist
55
+ # For threshold notification history, use webhook notifications or event logs
56
+ # - Required parameters: Both customer_id and alert_id must be valid UUIDs that
57
+ # exist in your organization
58
+ # - Archived notifications: Returns null for customer_status if the notification
59
+ # has been archived, but still includes the notification configuration details
60
+ # - Performance considerations: This endpoint queries live evaluation state,
61
+ # making it ideal for real-time monitoring but not for bulk status checks
62
+ # - Integration patterns: Best used for on-demand status checks in response to
63
+ # user actions or as part of targeted monitoring workflows
64
+ # - Error handling: Returns 404 if either the customer or alert_id doesn't exist
53
65
  # or isn't accessible to your organization
54
66
  #
55
67
  # @overload retrieve(alert_id:, customer_id:, group_values: nil, plans_or_contracts: nil, request_options: {})
56
68
  #
57
- # @param alert_id [String] The Metronome ID of the alert
69
+ # @param alert_id [String] The Metronome ID of the threshold notification
58
70
  #
59
71
  # @param customer_id [String] The Metronome ID of the customer
60
72
  #
61
- # @param group_values [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::GroupValue>] Only present for `spend_threshold_reached` alerts. Retrieve the alert for a spec
73
+ # @param group_values [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::GroupValue>] Only present for `spend_threshold_reached` notifications. Retrieve the notificat
62
74
  #
63
- # @param plans_or_contracts [Symbol, MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::PlansOrContracts] When parallel alerts are enabled during migration, this flag denotes whether to
75
+ # @param plans_or_contracts [Symbol, MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::PlansOrContracts] When parallel threshold notifications are enabled during migration, this flag de
64
76
  #
65
77
  # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
66
78
  #
@@ -81,31 +93,37 @@ module MetronomeSDK
81
93
  # Some parameter documentations has been truncated, see
82
94
  # {MetronomeSDK::Models::V1::Customers::AlertListParams} for more details.
83
95
  #
84
- # Retrieve all alert configurations and their current statuses for a specific
85
- # customer in a single API call. This endpoint provides a comprehensive view of
86
- # all alerts monitoring a customer account.
96
+ # Retrieve all threshold notification configurations and their current statuses
97
+ # for a specific customer in a single API call. This endpoint provides a
98
+ # comprehensive view of all threshold notification monitoring a customer account.
87
99
  #
88
100
  # ### Use this endpoint to:
89
101
  #
90
- # - Display all active alerts for a customer in dashboards or admin panels
91
- # - Quickly identify which alerts a customer is currently triggering
92
- # - Audit alert coverage for specific accounts
93
- # - Filter alerts by status (enabled, disabled, or archived)
102
+ # - Display all active threshold notifications for a customer in dashboards or
103
+ # admin panels
104
+ # - Quickly identify which threshold notifications a customer is currently
105
+ # triggering
106
+ # - Audit threshold notification coverage for specific accounts
107
+ # - Filter threshold notifications by status (enabled, disabled, or archived)
94
108
  #
95
109
  # ### Key response fields:
96
110
  #
97
111
  # - data: Array of CustomerAlert objects, each containing:
98
112
  # - Current evaluation status (`ok`, `in_alarm`, `evaluating`, or `null`)
99
- # - Complete alert configuration and threshold details
100
- # - Alert metadata including type, name, and last update time
101
- # - `next_page`: Pagination cursor for retrieving additional results
113
+ # - Complete threshold notification configuration and threshold details
114
+ # - Threshold notification metadata including type, name, and last update time
115
+ # - next_page: Pagination cursor for retrieving additional results
102
116
  #
103
117
  # ### Usage guidelines:
104
118
  #
105
- # - Default behavior: Returns only enabled alerts unless alert_statuses filter is
106
- # specified
119
+ # - Default behavior: Returns only enabled threshold notifications unless
120
+ # `alert_statuses` filter is specified
107
121
  # - Pagination: Use the `next_page` cursor to retrieve all results for customers
108
- # with many alerts
122
+ # with many notifications
123
+ # - Performance: Efficiently retrieves multiple threshold notification statuses in
124
+ # a single request instead of making individual calls
125
+ # - Filtering: Pass the `alert_statuses` array to include disabled or archived
126
+ # threshold notifications in results
109
127
  #
110
128
  # @overload list(customer_id:, next_page: nil, alert_statuses: nil, request_options: {})
111
129
  #
@@ -113,7 +131,7 @@ module MetronomeSDK
113
131
  #
114
132
  # @param next_page [String] Query param: Cursor that indicates where the next page of results should start.
115
133
  #
116
- # @param alert_statuses [Array<Symbol, MetronomeSDK::Models::V1::Customers::AlertListParams::AlertStatus>] Body param: Optionally filter by alert status. If absent, only enabled alerts wi
134
+ # @param alert_statuses [Array<Symbol, MetronomeSDK::Models::V1::Customers::AlertListParams::AlertStatus>] Body param: Optionally filter by threshold notification status. If absent, only
117
135
  #
118
136
  # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
119
137
  #
@@ -134,23 +152,24 @@ module MetronomeSDK
134
152
  )
135
153
  end
136
154
 
137
- # Force an immediate re-evaluation of a specific alert for a customer, clearing
138
- # any previous state and triggering a fresh assessment against current thresholds.
139
- # This endpoint ensures alert accuracy after configuration changes or data
140
- # corrections.
155
+ # Force an immediate re-evaluation of a specific threshold notification for a
156
+ # customer, clearing any previous state and triggering a fresh assessment against
157
+ # current thresholds. This endpoint ensures threshold notification accuracy after
158
+ # configuration changes or data corrections.
141
159
  #
142
160
  # ### Use this endpoint to:
143
161
  #
144
- # - Clear false positive alerts after fixing data issues
145
- # - Re-evaluate alerts after adjusting customer balances or credits
146
- # - Test alert behavior during development and debugging
147
- # - Resolve stuck alerts that may be in an incorrect state
162
+ # - Clear false positive threshold notifications after fixing data issues
163
+ # - Re-evaluate threshold notifications after adjusting customer balances or
164
+ # credits
165
+ # - Test threshold notification behavior during development and debugging
166
+ # - Resolve stuck threshold notification that may be in an incorrect state
148
167
  # - Trigger immediate evaluation after threshold modifications
149
168
  #
150
169
  # ### Key response fields:
151
170
  #
152
- # - 200 Success: Confirmation that the alert has been reset and re-evaluation
153
- # initiated
171
+ # - 200 Success: Confirmation that the threshold notification has been reset and
172
+ # re-evaluation initiated
154
173
  # - No response body is returned - the operation completes asynchronously
155
174
  #
156
175
  # ### Usage guidelines:
@@ -165,7 +184,7 @@ module MetronomeSDK
165
184
  #
166
185
  # @overload reset(alert_id:, customer_id:, request_options: {})
167
186
  #
168
- # @param alert_id [String] The Metronome ID of the alert
187
+ # @param alert_id [String] The Metronome ID of the threshold notification
169
188
  #
170
189
  # @param customer_id [String] The Metronome ID of the customer
171
190
  #
@@ -9,7 +9,8 @@ module MetronomeSDK
9
9
  # {MetronomeSDK::Models::V1::Customers::BillingConfigCreateParams} for more
10
10
  # details.
11
11
  #
12
- # Set the billing configuration for a given customer.
12
+ # Set the billing configuration for a given customer. This is a Plans (deprecated)
13
+ # endpoint. New clients should implement using Contracts.
13
14
  #
14
15
  # @overload create(customer_id:, billing_provider_type:, billing_provider_customer_id:, aws_product_code: nil, aws_region: nil, stripe_collection_method: nil, request_options: {})
15
16
  #
@@ -23,7 +24,7 @@ module MetronomeSDK
23
24
  #
24
25
  # @param aws_region [Symbol, MetronomeSDK::Models::V1::Customers::BillingConfigCreateParams::AwsRegion] Body param:
25
26
  #
26
- # @param stripe_collection_method [Symbol, MetronomeSDK::Models::V1::Customers::BillingConfigCreateParams::StripeCollectionMethod] Body param:
27
+ # @param stripe_collection_method [Symbol, MetronomeSDK::Models::V1::Customers::BillingConfigCreateParams::StripeCollectionMethod] Body param: The collection method for the customer's invoices.
27
28
  #
28
29
  # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
29
30
  #
@@ -49,7 +50,8 @@ module MetronomeSDK
49
50
  )
50
51
  end
51
52
 
52
- # Fetch the billing configuration for the given customer.
53
+ # Fetch the billing configuration for the given customer. This is a Plans
54
+ # (deprecated) endpoint. New clients should implement using Contracts.
53
55
  #
54
56
  # @overload retrieve(customer_id:, billing_provider_type:, request_options: {})
55
57
  #
@@ -81,7 +83,8 @@ module MetronomeSDK
81
83
  end
82
84
 
83
85
  # Delete the billing configuration for a given customer. Note: this is unsupported
84
- # for Azure and AWS Marketplace customers.
86
+ # for Azure and AWS Marketplace customers. This is a Plans (deprecated) endpoint.
87
+ # New clients should implement using Contracts.
85
88
  #
86
89
  # @overload delete(customer_id:, billing_provider_type:, request_options: {})
87
90
  #
@@ -37,7 +37,8 @@ module MetronomeSDK
37
37
  # #### Billing configuration:
38
38
  #
39
39
  # - invoice_contract_id is required for postpaid commits and for prepaid commits
40
- # with billing (only optional for free prepaid commits)
40
+ # with billing (only optional for free prepaid commits) unless do_not_invoice is
41
+ # set to true
41
42
  # - For postpaid commits: access_schedule and invoice_schedule must have matching
42
43
  # amounts
43
44
  # - For postpaid commits: only one schedule item is allowed in both schedules.
@@ -175,7 +175,8 @@ module MetronomeSDK
175
175
  # Some parameter documentations has been truncated, see
176
176
  # {MetronomeSDK::Models::V1::Customers::InvoiceAddChargeParams} for more details.
177
177
  #
178
- # Add a one time charge to the specified invoice
178
+ # Add a one time charge to the specified invoice. This is a Plans (deprecated)
179
+ # endpoint. New clients should implement using Contracts.
179
180
  #
180
181
  # @overload add_charge(customer_id:, charge_id:, customer_plan_id:, description:, invoice_start_timestamp:, price:, quantity:, request_options: {})
181
182
  #
@@ -299,6 +300,61 @@ module MetronomeSDK
299
300
  )
300
301
  end
301
302
 
303
+ # Retrieve a PDF version of a specific invoice by its unique identifier. This
304
+ # endpoint generates a professionally formatted invoice document suitable for
305
+ # sharing with customers, accounting teams, or for record-keeping purposes.
306
+ #
307
+ # ### Use this endpoint to:
308
+ #
309
+ # - Provide customers with downloadable or emailable copies of their invoices
310
+ # - Support accounting and finance teams with official billing documents
311
+ # - Maintain accurate records of billing transactions for audits and compliance
312
+ #
313
+ # ### Key response details:
314
+ #
315
+ # - The response is a binary PDF file representing the full invoice
316
+ # - The PDF includes all standard invoice information such as line items, totals,
317
+ # billing period, and customer details
318
+ # - The document is formatted for clarity and professionalism, suitable for
319
+ # official use
320
+ #
321
+ # ### Usage guidelines:
322
+ #
323
+ # - Ensure the `invoice_id` corresponds to an existing invoice for the specified
324
+ # `customer_id`
325
+ # - The PDF is generated on-demand; frequent requests for the same invoice may
326
+ # impact performance
327
+ # - Use appropriate headers to handle the binary response in your application
328
+ # (e.g., setting `Content-Type: application/pdf`)
329
+ #
330
+ # @overload retrieve_pdf(customer_id:, invoice_id:, request_options: {})
331
+ #
332
+ # @param customer_id [String]
333
+ # @param invoice_id [String]
334
+ # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
335
+ #
336
+ # @return [StringIO]
337
+ #
338
+ # @see MetronomeSDK::Models::V1::Customers::InvoiceRetrievePdfParams
339
+ def retrieve_pdf(params)
340
+ parsed, options = MetronomeSDK::V1::Customers::InvoiceRetrievePdfParams.dump_request(params)
341
+ customer_id =
342
+ parsed.delete(:customer_id) do
343
+ raise ArgumentError.new("missing required path argument #{_1}")
344
+ end
345
+ invoice_id =
346
+ parsed.delete(:invoice_id) do
347
+ raise ArgumentError.new("missing required path argument #{_1}")
348
+ end
349
+ @client.request(
350
+ method: :get,
351
+ path: ["v1/customers/%1$s/invoices/%2$s/pdf", customer_id, invoice_id],
352
+ headers: {"accept" => "application/pdf"},
353
+ model: StringIO,
354
+ options: options
355
+ )
356
+ end
357
+
302
358
  # @api private
303
359
  #
304
360
  # @param client [MetronomeSDK::Client]
@@ -5,7 +5,8 @@ module MetronomeSDK
5
5
  class V1
6
6
  class Customers
7
7
  class Plans
8
- # List the given customer's plans in reverse-chronological order.
8
+ # List the given customer's plans in reverse-chronological order. This is a Plans
9
+ # (deprecated) endpoint. New clients should implement using Contracts.
9
10
  #
10
11
  # @overload list(customer_id:, limit: nil, next_page: nil, request_options: {})
11
12
  #
@@ -41,7 +42,8 @@ module MetronomeSDK
41
42
  #
42
43
  # Associate an existing customer with a plan for a specified date range. See the
43
44
  # [price adjustments documentation](https://plans-docs.metronome.com/pricing/managing-plans/#price-adjustments)
44
- # for details on the price adjustments.
45
+ # for details on the price adjustments. This is a Plans (deprecated) endpoint. New
46
+ # clients should implement using Contracts.
45
47
  #
46
48
  # @overload add(customer_id:, plan_id:, starting_on:, ending_before: nil, net_payment_terms_days: nil, overage_rate_adjustments: nil, price_adjustments: nil, trial_spec: nil, request_options: {})
47
49
  #
@@ -84,7 +86,8 @@ module MetronomeSDK
84
86
  # Some parameter documentations has been truncated, see
85
87
  # {MetronomeSDK::Models::V1::Customers::PlanEndParams} for more details.
86
88
  #
87
- # Change the end date of a customer's plan.
89
+ # Change the end date of a customer's plan. This is a Plans (deprecated) endpoint.
90
+ # New clients should implement using Contracts.
88
91
  #
89
92
  # @overload end_(customer_id:, customer_plan_id:, ending_before: nil, void_invoices: nil, void_stripe_invoices: nil, request_options: {})
90
93
  #
@@ -124,7 +127,8 @@ module MetronomeSDK
124
127
 
125
128
  # Lists a customer plans adjustments. See the
126
129
  # [price adjustments documentation](https://plans-docs.metronome.com/pricing/managing-plans/#price-adjustments)
127
- # for details.
130
+ # for details. This is a Plans (deprecated) endpoint. New clients should implement
131
+ # using Contracts.
128
132
  #
129
133
  # @overload list_price_adjustments(customer_id:, customer_plan_id:, limit: nil, next_page: nil, request_options: {})
130
134
  #