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
@@ -14,21 +14,24 @@ module MetronomeSDK
14
14
  required :customer_id, String
15
15
 
16
16
  # @!attribute events
17
+ # Array of usage events to include in the preview calculation. Must contain at
18
+ # least one event in `merge` mode.
17
19
  #
18
20
  # @return [Array<MetronomeSDK::Models::V1::CustomerPreviewEventsParams::Event>]
19
21
  required :events,
20
22
  -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::CustomerPreviewEventsParams::Event] }
21
23
 
22
24
  # @!attribute mode
23
- # If set to "replace", the preview will be generated as if those were the only
24
- # events for the specified customer. If set to "merge", the events will be merged
25
- # with any existing events for the specified customer. Defaults to "replace".
25
+ # Controls how the provided events are combined with existing usage data. Use
26
+ # `replace` to calculate the preview as if these are the only events for the
27
+ # customer, ignoring all historical usage. Use `merge` to combine these events
28
+ # with the customer's existing usage. Defaults to `replace`.
26
29
  #
27
30
  # @return [Symbol, MetronomeSDK::Models::V1::CustomerPreviewEventsParams::Mode, nil]
28
31
  optional :mode, enum: -> { MetronomeSDK::V1::CustomerPreviewEventsParams::Mode }
29
32
 
30
33
  # @!attribute skip_zero_qty_line_items
31
- # If set, all zero quantity line items will be filtered out of the response.
34
+ # When `true`, line items with zero quantity are excluded from the response.
32
35
  #
33
36
  # @return [Boolean, nil]
34
37
  optional :skip_zero_qty_line_items, MetronomeSDK::Internal::Type::Boolean
@@ -39,11 +42,11 @@ module MetronomeSDK
39
42
  #
40
43
  # @param customer_id [String]
41
44
  #
42
- # @param events [Array<MetronomeSDK::Models::V1::CustomerPreviewEventsParams::Event>]
45
+ # @param events [Array<MetronomeSDK::Models::V1::CustomerPreviewEventsParams::Event>] Array of usage events to include in the preview calculation. Must contain at lea
43
46
  #
44
- # @param mode [Symbol, MetronomeSDK::Models::V1::CustomerPreviewEventsParams::Mode] If set to "replace", the preview will be generated as if those were the only eve
47
+ # @param mode [Symbol, MetronomeSDK::Models::V1::CustomerPreviewEventsParams::Mode] Controls how the provided events are combined with existing usage data. Use `rep
45
48
  #
46
- # @param skip_zero_qty_line_items [Boolean] If set, all zero quantity line items will be filtered out of the response.
49
+ # @param skip_zero_qty_line_items [Boolean] When `true`, line items with zero quantity are excluded from the response.
47
50
  #
48
51
  # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
49
52
 
@@ -53,14 +56,6 @@ module MetronomeSDK
53
56
  # @return [String]
54
57
  required :event_type, String
55
58
 
56
- # @!attribute customer_id
57
- # This has no effect for preview events, but may be set for consistency with Event
58
- # objects. They will be processed even if they do not match the customer's ID or
59
- # ingest aliases.
60
- #
61
- # @return [String, nil]
62
- optional :customer_id, String
63
-
64
59
  # @!attribute properties
65
60
  #
66
61
  # @return [Hash{Symbol=>Object}, nil]
@@ -73,31 +68,30 @@ module MetronomeSDK
73
68
  optional :timestamp, String
74
69
 
75
70
  # @!attribute transaction_id
76
- # This has no effect for preview events, but may be set for consistency with Event
77
- # objects. Duplicate transaction_ids are NOT filtered out, even within the same
78
- # request.
71
+ # Optional unique identifier for event deduplication. When provided, preview
72
+ # events are automatically deduplicated against historical events from the past 34
73
+ # days. Duplicate transaction IDs within the same request will return an error.
79
74
  #
80
75
  # @return [String, nil]
81
76
  optional :transaction_id, String
82
77
 
83
- # @!method initialize(event_type:, customer_id: nil, properties: nil, timestamp: nil, transaction_id: nil)
78
+ # @!method initialize(event_type:, properties: nil, timestamp: nil, transaction_id: nil)
84
79
  # Some parameter documentations has been truncated, see
85
80
  # {MetronomeSDK::Models::V1::CustomerPreviewEventsParams::Event} for more details.
86
81
  #
87
82
  # @param event_type [String]
88
83
  #
89
- # @param customer_id [String] This has no effect for preview events, but may be set for consistency with Event
90
- #
91
84
  # @param properties [Hash{Symbol=>Object}]
92
85
  #
93
86
  # @param timestamp [String] RFC 3339 formatted. If not provided, the current time will be used.
94
87
  #
95
- # @param transaction_id [String] This has no effect for preview events, but may be set for consistency with Event
88
+ # @param transaction_id [String] Optional unique identifier for event deduplication. When provided, preview event
96
89
  end
97
90
 
98
- # If set to "replace", the preview will be generated as if those were the only
99
- # events for the specified customer. If set to "merge", the events will be merged
100
- # with any existing events for the specified customer. Defaults to "replace".
91
+ # Controls how the provided events are combined with existing usage data. Use
92
+ # `replace` to calculate the preview as if these are the only events for the
93
+ # customer, ignoring all historical usage. Use `merge` to combine these events
94
+ # with the customer's existing usage. Defaults to `replace`.
101
95
  module Mode
102
96
  extend MetronomeSDK::Internal::Type::Enum
103
97
 
@@ -7,11 +7,11 @@ module MetronomeSDK
7
7
  class CustomerPreviewEventsResponse < MetronomeSDK::Internal::Type::BaseModel
8
8
  # @!attribute data
9
9
  #
10
- # @return [MetronomeSDK::Models::V1::Customers::Invoice]
11
- required :data, -> { MetronomeSDK::V1::Customers::Invoice }
10
+ # @return [Array<MetronomeSDK::Models::V1::Customers::Invoice>]
11
+ required :data, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::Invoice] }
12
12
 
13
13
  # @!method initialize(data:)
14
- # @param data [MetronomeSDK::Models::V1::Customers::Invoice]
14
+ # @param data [Array<MetronomeSDK::Models::V1::Customers::Invoice>]
15
15
  end
16
16
  end
17
17
  end
@@ -102,6 +102,7 @@ module MetronomeSDK
102
102
  QUICKBOOKS_ONLINE = :quickbooks_online
103
103
  WORKDAY = :workday
104
104
  GCP_MARKETPLACE = :gcp_marketplace
105
+ METRONOME = :metronome
105
106
 
106
107
  # @!method self.values
107
108
  # @return [Array<Symbol>]
@@ -99,6 +99,7 @@ module MetronomeSDK
99
99
  QUICKBOOKS_ONLINE = :quickbooks_online
100
100
  WORKDAY = :workday
101
101
  GCP_MARKETPLACE = :gcp_marketplace
102
+ METRONOME = :metronome
102
103
 
103
104
  # @!method self.values
104
105
  # @return [Array<Symbol>]
@@ -22,8 +22,8 @@ module MetronomeSDK
22
22
  optional :next_page, String
23
23
 
24
24
  # @!attribute alert_statuses
25
- # Optionally filter by alert status. If absent, only enabled alerts will be
26
- # returned.
25
+ # Optionally filter by threshold notification status. If absent, only enabled
26
+ # notifications will be returned.
27
27
  #
28
28
  # @return [Array<Symbol, MetronomeSDK::Models::V1::Customers::AlertListParams::AlertStatus>, nil]
29
29
  optional :alert_statuses,
@@ -37,7 +37,7 @@ module MetronomeSDK
37
37
  #
38
38
  # @param next_page [String] Cursor that indicates where the next page of results should start.
39
39
  #
40
- # @param alert_statuses [Array<Symbol, MetronomeSDK::Models::V1::Customers::AlertListParams::AlertStatus>] Optionally filter by alert status. If absent, only enabled alerts will be return
40
+ # @param alert_statuses [Array<Symbol, MetronomeSDK::Models::V1::Customers::AlertListParams::AlertStatus>] Optionally filter by threshold notification status. If absent, only enabled noti
41
41
  #
42
42
  # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
43
43
 
@@ -10,7 +10,7 @@ module MetronomeSDK
10
10
  include MetronomeSDK::Internal::Type::RequestParameters
11
11
 
12
12
  # @!attribute alert_id
13
- # The Metronome ID of the alert
13
+ # The Metronome ID of the threshold notification
14
14
  #
15
15
  # @return [String]
16
16
  required :alert_id, String
@@ -22,7 +22,7 @@ module MetronomeSDK
22
22
  required :customer_id, String
23
23
 
24
24
  # @!method initialize(alert_id:, customer_id:, request_options: {})
25
- # @param alert_id [String] The Metronome ID of the alert
25
+ # @param alert_id [String] The Metronome ID of the threshold notification
26
26
  #
27
27
  # @param customer_id [String] The Metronome ID of the customer
28
28
  #
@@ -10,7 +10,7 @@ module MetronomeSDK
10
10
  include MetronomeSDK::Internal::Type::RequestParameters
11
11
 
12
12
  # @!attribute alert_id
13
- # The Metronome ID of the alert
13
+ # The Metronome ID of the threshold notification
14
14
  #
15
15
  # @return [String]
16
16
  required :alert_id, String
@@ -22,16 +22,16 @@ module MetronomeSDK
22
22
  required :customer_id, String
23
23
 
24
24
  # @!attribute group_values
25
- # Only present for `spend_threshold_reached` alerts. Retrieve the alert for a
26
- # specific group key-value pair.
25
+ # Only present for `spend_threshold_reached` notifications. Retrieve the
26
+ # notification for a specific group key-value pair.
27
27
  #
28
28
  # @return [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::GroupValue>, nil]
29
29
  optional :group_values,
30
30
  -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::AlertRetrieveParams::GroupValue] }
31
31
 
32
32
  # @!attribute plans_or_contracts
33
- # When parallel alerts are enabled during migration, this flag denotes whether to
34
- # fetch alerts for plans or contracts.
33
+ # When parallel threshold notifications are enabled during migration, this flag
34
+ # denotes whether to fetch notifications for plans or contracts.
35
35
  #
36
36
  # @return [Symbol, MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::PlansOrContracts, nil]
37
37
  optional :plans_or_contracts,
@@ -41,13 +41,13 @@ module MetronomeSDK
41
41
  # Some parameter documentations has been truncated, see
42
42
  # {MetronomeSDK::Models::V1::Customers::AlertRetrieveParams} for more details.
43
43
  #
44
- # @param alert_id [String] The Metronome ID of the alert
44
+ # @param alert_id [String] The Metronome ID of the threshold notification
45
45
  #
46
46
  # @param customer_id [String] The Metronome ID of the customer
47
47
  #
48
- # @param group_values [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::GroupValue>] Only present for `spend_threshold_reached` alerts. Retrieve the alert for a spec
48
+ # @param group_values [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::GroupValue>] Only present for `spend_threshold_reached` notifications. Retrieve the notificat
49
49
  #
50
- # @param plans_or_contracts [Symbol, MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::PlansOrContracts] When parallel alerts are enabled during migration, this flag denotes whether to
50
+ # @param plans_or_contracts [Symbol, MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::PlansOrContracts] When parallel threshold notifications are enabled during migration, this flag de
51
51
  #
52
52
  # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
53
53
 
@@ -63,15 +63,15 @@ module MetronomeSDK
63
63
  required :value, String
64
64
 
65
65
  # @!method initialize(key:, value:)
66
- # Scopes alert evaluation to a specific presentation group key on individual line
67
- # items. Only present for spend alerts.
66
+ # Scopes threshold notification evaluation to a specific presentation group key on
67
+ # individual line items. Only present for spend notifications.
68
68
  #
69
69
  # @param key [String]
70
70
  # @param value [String]
71
71
  end
72
72
 
73
- # When parallel alerts are enabled during migration, this flag denotes whether to
74
- # fetch alerts for plans or contracts.
73
+ # When parallel threshold notifications are enabled during migration, this flag
74
+ # denotes whether to fetch notifications for plans or contracts.
75
75
  module PlansOrContracts
76
76
  extend MetronomeSDK::Internal::Type::Enum
77
77
 
@@ -38,6 +38,8 @@ module MetronomeSDK
38
38
  optional :aws_region, enum: -> { MetronomeSDK::V1::Customers::BillingConfigCreateParams::AwsRegion }
39
39
 
40
40
  # @!attribute stripe_collection_method
41
+ # The collection method for the customer's invoices. NOTE:
42
+ # `auto_charge_payment_intent` and `manually_charge_payment_intent` are in beta.
41
43
  #
42
44
  # @return [Symbol, MetronomeSDK::Models::V1::Customers::BillingConfigCreateParams::StripeCollectionMethod, nil]
43
45
  optional :stripe_collection_method,
@@ -58,7 +60,7 @@ module MetronomeSDK
58
60
  #
59
61
  # @param aws_region [Symbol, MetronomeSDK::Models::V1::Customers::BillingConfigCreateParams::AwsRegion]
60
62
  #
61
- # @param stripe_collection_method [Symbol, MetronomeSDK::Models::V1::Customers::BillingConfigCreateParams::StripeCollectionMethod]
63
+ # @param stripe_collection_method [Symbol, MetronomeSDK::Models::V1::Customers::BillingConfigCreateParams::StripeCollectionMethod] The collection method for the customer's invoices.
62
64
  #
63
65
  # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
64
66
 
@@ -73,6 +75,7 @@ module MetronomeSDK
73
75
  QUICKBOOKS_ONLINE = :quickbooks_online
74
76
  WORKDAY = :workday
75
77
  GCP_MARKETPLACE = :gcp_marketplace
78
+ METRONOME = :metronome
76
79
 
77
80
  # @!method self.values
78
81
  # @return [Array<Symbol>]
@@ -111,6 +114,8 @@ module MetronomeSDK
111
114
  # @return [Array<Symbol>]
112
115
  end
113
116
 
117
+ # The collection method for the customer's invoices. NOTE:
118
+ # `auto_charge_payment_intent` and `manually_charge_payment_intent` are in beta.
114
119
  module StripeCollectionMethod
115
120
  extend MetronomeSDK::Internal::Type::Enum
116
121
 
@@ -36,6 +36,7 @@ module MetronomeSDK
36
36
  QUICKBOOKS_ONLINE = :quickbooks_online
37
37
  WORKDAY = :workday
38
38
  GCP_MARKETPLACE = :gcp_marketplace
39
+ METRONOME = :metronome
39
40
 
40
41
  # @!method self.values
41
42
  # @return [Array<Symbol>]
@@ -36,6 +36,7 @@ module MetronomeSDK
36
36
  QUICKBOOKS_ONLINE = :quickbooks_online
37
37
  WORKDAY = :workday
38
38
  GCP_MARKETPLACE = :gcp_marketplace
39
+ METRONOME = :metronome
39
40
 
40
41
  # @!method self.values
41
42
  # @return [Array<Symbol>]
@@ -74,6 +74,8 @@ module MetronomeSDK
74
74
  optional :billing_provider_customer_id, String
75
75
 
76
76
  # @!attribute stripe_collection_method
77
+ # The collection method for the customer's invoices. NOTE:
78
+ # `auto_charge_payment_intent` and `manually_charge_payment_intent` are in beta.
77
79
  #
78
80
  # @return [Symbol, MetronomeSDK::Models::V1::Customers::BillingConfigRetrieveResponse::Data::StripeCollectionMethod, nil]
79
81
  optional :stripe_collection_method,
@@ -102,7 +104,7 @@ module MetronomeSDK
102
104
  #
103
105
  # @param billing_provider_customer_id [String]
104
106
  #
105
- # @param stripe_collection_method [Symbol, MetronomeSDK::Models::V1::Customers::BillingConfigRetrieveResponse::Data::StripeCollectionMethod]
107
+ # @param stripe_collection_method [Symbol, MetronomeSDK::Models::V1::Customers::BillingConfigRetrieveResponse::Data::StripeCollectionMethod] The collection method for the customer's invoices.
106
108
 
107
109
  # @see MetronomeSDK::Models::V1::Customers::BillingConfigRetrieveResponse::Data#aws_region
108
110
  module AwsRegion
@@ -151,6 +153,9 @@ module MetronomeSDK
151
153
  # @return [Array<Symbol>]
152
154
  end
153
155
 
156
+ # The collection method for the customer's invoices. NOTE:
157
+ # `auto_charge_payment_intent` and `manually_charge_payment_intent` are in beta.
158
+ #
154
159
  # @see MetronomeSDK::Models::V1::Customers::BillingConfigRetrieveResponse::Data#stripe_collection_method
155
160
  module StripeCollectionMethod
156
161
  extend MetronomeSDK::Internal::Type::Enum
@@ -78,7 +78,7 @@ module MetronomeSDK
78
78
  # @!attribute invoice_contract_id
79
79
  # The contract that this commit will be billed on. This is required for "POSTPAID"
80
80
  # commits and for "PREPAID" commits unless there is no invoice schedule above
81
- # (i.e., the commit is 'free').
81
+ # (i.e., the commit is 'free'), or if do_not_invoice is set to true.
82
82
  #
83
83
  # @return [String, nil]
84
84
  optional :invoice_contract_id, String
@@ -12,8 +12,8 @@ module MetronomeSDK
12
12
  required :alert, -> { MetronomeSDK::V1::Customers::CustomerAlert::Alert }
13
13
 
14
14
  # @!attribute customer_status
15
- # The status of the customer alert. If the alert is archived, null will be
16
- # returned.
15
+ # The status of the threshold notification. If the notification is archived, null
16
+ # will be returned.
17
17
  #
18
18
  # @return [Symbol, MetronomeSDK::Models::V1::Customers::CustomerAlert::CustomerStatus, nil]
19
19
  required :customer_status,
@@ -21,7 +21,7 @@ module MetronomeSDK
21
21
  nil?: true
22
22
 
23
23
  # @!attribute triggered_by
24
- # If present, indicates the reason the alert was triggered.
24
+ # If present, indicates the reason the threshold notification was triggered.
25
25
  #
26
26
  # @return [String, nil]
27
27
  optional :triggered_by, String, nil?: true
@@ -32,52 +32,53 @@ module MetronomeSDK
32
32
  #
33
33
  # @param alert [MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert]
34
34
  #
35
- # @param customer_status [Symbol, MetronomeSDK::Models::V1::Customers::CustomerAlert::CustomerStatus, nil] The status of the customer alert. If the alert is archived, null will be returne
35
+ # @param customer_status [Symbol, MetronomeSDK::Models::V1::Customers::CustomerAlert::CustomerStatus, nil] The status of the threshold notification. If the notification is archived, null
36
36
  #
37
- # @param triggered_by [String, nil] If present, indicates the reason the alert was triggered.
37
+ # @param triggered_by [String, nil] If present, indicates the reason the threshold notification was triggered.
38
38
 
39
39
  # @see MetronomeSDK::Models::V1::Customers::CustomerAlert#alert
40
40
  class Alert < MetronomeSDK::Internal::Type::BaseModel
41
41
  # @!attribute id
42
- # the Metronome ID of the alert
42
+ # the Metronome ID of the threshold notification
43
43
  #
44
44
  # @return [String]
45
45
  required :id, String
46
46
 
47
47
  # @!attribute name
48
- # Name of the alert
48
+ # Name of the threshold notification
49
49
  #
50
50
  # @return [String]
51
51
  required :name, String
52
52
 
53
53
  # @!attribute status
54
- # Status of the alert
54
+ # Status of the threshold notification
55
55
  #
56
56
  # @return [Symbol, MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::Status]
57
57
  required :status, enum: -> { MetronomeSDK::V1::Customers::CustomerAlert::Alert::Status }
58
58
 
59
59
  # @!attribute threshold
60
- # Threshold value of the alert policy
60
+ # Threshold value of the notification policy
61
61
  #
62
62
  # @return [Float]
63
63
  required :threshold, Float
64
64
 
65
65
  # @!attribute type
66
- # Type of the alert
66
+ # Type of the threshold notification
67
67
  #
68
68
  # @return [Symbol, MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::Type]
69
69
  required :type, enum: -> { MetronomeSDK::V1::Customers::CustomerAlert::Alert::Type }
70
70
 
71
71
  # @!attribute updated_at
72
- # Timestamp for when the alert was last updated
72
+ # Timestamp for when the threshold notification was last updated
73
73
  #
74
74
  # @return [Time]
75
75
  required :updated_at, Time
76
76
 
77
77
  # @!attribute credit_grant_type_filters
78
- # An array of strings, representing a way to filter the credit grant this alert
79
- # applies to, by looking at the credit_grant_type field on the credit grant. This
80
- # field is only defined for CreditPercentage and CreditBalance alerts
78
+ # An array of strings, representing a way to filter the credit grant this
79
+ # threshold notification applies to, by looking at the credit_grant_type field on
80
+ # the credit grant. This field is only defined for CreditPercentage and
81
+ # CreditBalance notifications
81
82
  #
82
83
  # @return [Array<String>, nil]
83
84
  optional :credit_grant_type_filters, MetronomeSDK::Internal::Type::ArrayOf[String]
@@ -88,30 +89,31 @@ module MetronomeSDK
88
89
  optional :credit_type, -> { MetronomeSDK::CreditTypeData }, nil?: true
89
90
 
90
91
  # @!attribute custom_field_filters
91
- # A list of custom field filters for alert types that support advanced filtering
92
+ # A list of custom field filters for notification types that support advanced
93
+ # filtering
92
94
  #
93
95
  # @return [Array<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::CustomFieldFilter>, nil]
94
96
  optional :custom_field_filters,
95
97
  -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::CustomerAlert::Alert::CustomFieldFilter] }
96
98
 
97
99
  # @!attribute group_key_filter
98
- # Scopes alert evaluation to a specific presentation group key on individual line
99
- # items. Only present for spend alerts.
100
+ # Scopes threshold notification evaluation to a specific presentation group key on
101
+ # individual line items. Only present for spend notifications.
100
102
  #
101
103
  # @return [MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::GroupKeyFilter, nil]
102
104
  optional :group_key_filter, -> { MetronomeSDK::V1::Customers::CustomerAlert::Alert::GroupKeyFilter }
103
105
 
104
106
  # @!attribute group_values
105
- # Only present for `spend_threshold_reached` alerts. Scope alert to a specific
106
- # group key on individual line items.
107
+ # Only present for `spend_threshold_reached` notifications. Scope notification to
108
+ # a specific group key on individual line items.
107
109
  #
108
110
  # @return [Array<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::GroupValue>, nil]
109
111
  optional :group_values,
110
112
  -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::CustomerAlert::Alert::GroupValue] }
111
113
 
112
114
  # @!attribute invoice_types_filter
113
- # Only supported for invoice_total_reached alerts. A list of invoice types to
114
- # evaluate.
115
+ # Only supported for invoice_total_reached threshold notifications. A list of
116
+ # invoice types to evaluate.
115
117
  #
116
118
  # @return [Array<String>, nil]
117
119
  optional :invoice_types_filter, MetronomeSDK::Internal::Type::ArrayOf[String]
@@ -128,33 +130,33 @@ module MetronomeSDK
128
130
  # Some parameter documentations has been truncated, see
129
131
  # {MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert} for more details.
130
132
  #
131
- # @param id [String] the Metronome ID of the alert
133
+ # @param id [String] the Metronome ID of the threshold notification
132
134
  #
133
- # @param name [String] Name of the alert
135
+ # @param name [String] Name of the threshold notification
134
136
  #
135
- # @param status [Symbol, MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::Status] Status of the alert
137
+ # @param status [Symbol, MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::Status] Status of the threshold notification
136
138
  #
137
- # @param threshold [Float] Threshold value of the alert policy
139
+ # @param threshold [Float] Threshold value of the notification policy
138
140
  #
139
- # @param type [Symbol, MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::Type] Type of the alert
141
+ # @param type [Symbol, MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::Type] Type of the threshold notification
140
142
  #
141
- # @param updated_at [Time] Timestamp for when the alert was last updated
143
+ # @param updated_at [Time] Timestamp for when the threshold notification was last updated
142
144
  #
143
- # @param credit_grant_type_filters [Array<String>] An array of strings, representing a way to filter the credit grant this alert ap
145
+ # @param credit_grant_type_filters [Array<String>] An array of strings, representing a way to filter the credit grant this threshol
144
146
  #
145
147
  # @param credit_type [MetronomeSDK::Models::CreditTypeData, nil]
146
148
  #
147
- # @param custom_field_filters [Array<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::CustomFieldFilter>] A list of custom field filters for alert types that support advanced filtering
149
+ # @param custom_field_filters [Array<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::CustomFieldFilter>] A list of custom field filters for notification types that support advanced filt
148
150
  #
149
- # @param group_key_filter [MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::GroupKeyFilter] Scopes alert evaluation to a specific presentation group key on individual line
151
+ # @param group_key_filter [MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::GroupKeyFilter] Scopes threshold notification evaluation to a specific presentation group key on
150
152
  #
151
- # @param group_values [Array<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::GroupValue>] Only present for `spend_threshold_reached` alerts. Scope alert to a specific gro
153
+ # @param group_values [Array<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::GroupValue>] Only present for `spend_threshold_reached` notifications. Scope notification to
152
154
  #
153
- # @param invoice_types_filter [Array<String>] Only supported for invoice_total_reached alerts. A list of invoice types to eval
155
+ # @param invoice_types_filter [Array<String>] Only supported for invoice_total_reached threshold notifications. A list of invo
154
156
  #
155
157
  # @param uniqueness_key [String] Prevents the creation of duplicates. If a request to create a record is made wit
156
158
 
157
- # Status of the alert
159
+ # Status of the threshold notification
158
160
  #
159
161
  # @see MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert#status
160
162
  module Status
@@ -168,7 +170,7 @@ module MetronomeSDK
168
170
  # @return [Array<Symbol>]
169
171
  end
170
172
 
171
- # Type of the alert
173
+ # Type of the threshold notification
172
174
  #
173
175
  # @see MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert#type
174
176
  module Type
@@ -189,6 +191,7 @@ module MetronomeSDK
189
191
  LOW_REMAINING_CONTRACT_CREDIT_PERCENTAGE_REACHED = :low_remaining_contract_credit_percentage_reached
190
192
  LOW_REMAINING_CONTRACT_CREDIT_AND_COMMIT_BALANCE_REACHED =
191
193
  :low_remaining_contract_credit_and_commit_balance_reached
194
+ LOW_REMAINING_SEAT_BALANCE_REACHED = :low_remaining_seat_balance_reached
192
195
  INVOICE_TOTAL_REACHED = :invoice_total_reached
193
196
 
194
197
  # @!method self.values
@@ -243,8 +246,8 @@ module MetronomeSDK
243
246
  required :value, String
244
247
 
245
248
  # @!method initialize(key:, value:)
246
- # Scopes alert evaluation to a specific presentation group key on individual line
247
- # items. Only present for spend alerts.
249
+ # Scopes threshold notification evaluation to a specific presentation group key on
250
+ # individual line items. Only present for spend notifications.
248
251
  #
249
252
  # @param key [String]
250
253
  # @param value [String]
@@ -267,8 +270,8 @@ module MetronomeSDK
267
270
  end
268
271
  end
269
272
 
270
- # The status of the customer alert. If the alert is archived, null will be
271
- # returned.
273
+ # The status of the threshold notification. If the notification is archived, null
274
+ # will be returned.
272
275
  #
273
276
  # @see MetronomeSDK::Models::V1::Customers::CustomerAlert#customer_status
274
277
  module CustomerStatus