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
@@ -50,8 +50,16 @@ module MetronomeSDK
50
50
  # @!attribute billable_status
51
51
  # This field's availability is dependent on your client's configuration.
52
52
  #
53
- # @return [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::BillableStatus, nil]
54
- optional :billable_status, enum: -> { MetronomeSDK::V1::Customers::Invoice::BillableStatus }
53
+ # @return [Object, nil]
54
+ optional :billable_status, MetronomeSDK::Internal::Type::Unknown
55
+
56
+ # @!attribute constituent_invoices
57
+ # Account hierarchy M3 - Required on invoices with type USAGE_CONSOLIDATED. List
58
+ # of constituent invoices that were consolidated to create this invoice.
59
+ #
60
+ # @return [Array<MetronomeSDK::Models::V1::Customers::Invoice::ConstituentInvoice>, nil]
61
+ optional :constituent_invoices,
62
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::Invoice::ConstituentInvoice] }
55
63
 
56
64
  # @!attribute contract_custom_fields
57
65
  # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
@@ -121,6 +129,13 @@ module MetronomeSDK
121
129
  # @return [String, nil]
122
130
  optional :netsuite_sales_order_id, String
123
131
 
132
+ # @!attribute payer
133
+ # Account hierarchy M3 - Required for account hierarchy usage invoices. An object
134
+ # containing the contract and customer UUIDs that pay for this invoice.
135
+ #
136
+ # @return [MetronomeSDK::Models::V1::Customers::Invoice::Payer, nil]
137
+ optional :payer, -> { MetronomeSDK::V1::Customers::Invoice::Payer }
138
+
124
139
  # @!attribute plan_custom_fields
125
140
  # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
126
141
  #
@@ -160,7 +175,7 @@ module MetronomeSDK
160
175
  # @return [Float, nil]
161
176
  optional :subtotal, Float
162
177
 
163
- # @!method initialize(id:, credit_type:, customer_id:, line_items:, status:, total:, type:, amendment_id: nil, billable_status: nil, contract_custom_fields: nil, contract_id: nil, correction_record: nil, created_at: nil, custom_fields: nil, customer_custom_fields: nil, end_timestamp: nil, external_invoice: nil, invoice_adjustments: nil, issued_at: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, plan_custom_fields: nil, plan_id: nil, plan_name: nil, reseller_royalty: nil, salesforce_opportunity_id: nil, start_timestamp: nil, subtotal: nil)
178
+ # @!method initialize(id:, credit_type:, customer_id:, line_items:, status:, total:, type:, amendment_id: nil, billable_status: nil, constituent_invoices: nil, contract_custom_fields: nil, contract_id: nil, correction_record: nil, created_at: nil, custom_fields: nil, customer_custom_fields: nil, end_timestamp: nil, external_invoice: nil, invoice_adjustments: nil, issued_at: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, payer: nil, plan_custom_fields: nil, plan_id: nil, plan_name: nil, reseller_royalty: nil, salesforce_opportunity_id: nil, start_timestamp: nil, subtotal: nil)
164
179
  # Some parameter documentations has been truncated, see
165
180
  # {MetronomeSDK::Models::V1::Customers::Invoice} for more details.
166
181
  #
@@ -180,7 +195,9 @@ module MetronomeSDK
180
195
  #
181
196
  # @param amendment_id [String]
182
197
  #
183
- # @param billable_status [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::BillableStatus] This field's availability is dependent on your client's configuration.
198
+ # @param billable_status [Object] This field's availability is dependent on your client's configuration.
199
+ #
200
+ # @param constituent_invoices [Array<MetronomeSDK::Models::V1::Customers::Invoice::ConstituentInvoice>] Account hierarchy M3 - Required on invoices with type USAGE_CONSOLIDATED. List o
184
201
  #
185
202
  # @param contract_custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
186
203
  #
@@ -206,6 +223,8 @@ module MetronomeSDK
206
223
  #
207
224
  # @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
208
225
  #
226
+ # @param payer [MetronomeSDK::Models::V1::Customers::Invoice::Payer] Account hierarchy M3 - Required for account hierarchy usage invoices. An object
227
+ #
209
228
  # @param plan_custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
210
229
  #
211
230
  # @param plan_id [String]
@@ -380,6 +399,14 @@ module MetronomeSDK
380
399
  # @return [String, nil]
381
400
  optional :netsuite_item_id, String
382
401
 
402
+ # @!attribute origin
403
+ # Account hierarchy M3 - Present on line items from invoices with type
404
+ # USAGE_CONSOLIDATED. Indicates the original customer, contract, invoice and line
405
+ # item from which this line item was copied.
406
+ #
407
+ # @return [MetronomeSDK::Models::V1::Customers::Invoice::LineItem::Origin, nil]
408
+ optional :origin, -> { MetronomeSDK::V1::Customers::Invoice::LineItem::Origin }
409
+
383
410
  # @!attribute postpaid_commit
384
411
  # Only present for line items paying for a postpaid commit true-up.
385
412
  #
@@ -492,7 +519,7 @@ module MetronomeSDK
492
519
  # @return [Float, nil]
493
520
  optional :unit_price, Float
494
521
 
495
- # @!method initialize(credit_type:, name:, total:, type:, applied_commit_or_credit: nil, commit_custom_fields: nil, commit_id: nil, commit_netsuite_item_id: nil, commit_netsuite_sales_order_id: nil, commit_segment_id: nil, commit_type: nil, custom_fields: nil, discount_custom_fields: nil, discount_id: nil, ending_before: nil, group_key: nil, group_value: nil, is_prorated: nil, list_price: nil, metadata: nil, netsuite_invoice_billing_end: nil, netsuite_invoice_billing_start: nil, netsuite_item_id: nil, postpaid_commit: nil, presentation_group_values: nil, pricing_group_values: nil, product_custom_fields: nil, product_id: nil, product_tags: nil, product_type: nil, professional_service_custom_fields: nil, professional_service_id: nil, quantity: nil, reseller_type: nil, scheduled_charge_custom_fields: nil, scheduled_charge_id: nil, starting_at: nil, sub_line_items: nil, subscription_custom_fields: nil, tier: nil, unit_price: nil)
522
+ # @!method initialize(credit_type:, name:, total:, type:, applied_commit_or_credit: nil, commit_custom_fields: nil, commit_id: nil, commit_netsuite_item_id: nil, commit_netsuite_sales_order_id: nil, commit_segment_id: nil, commit_type: nil, custom_fields: nil, discount_custom_fields: nil, discount_id: nil, ending_before: nil, group_key: nil, group_value: nil, is_prorated: nil, list_price: nil, metadata: nil, netsuite_invoice_billing_end: nil, netsuite_invoice_billing_start: nil, netsuite_item_id: nil, origin: nil, postpaid_commit: nil, presentation_group_values: nil, pricing_group_values: nil, product_custom_fields: nil, product_id: nil, product_tags: nil, product_type: nil, professional_service_custom_fields: nil, professional_service_id: nil, quantity: nil, reseller_type: nil, scheduled_charge_custom_fields: nil, scheduled_charge_id: nil, starting_at: nil, sub_line_items: nil, subscription_custom_fields: nil, tier: nil, unit_price: nil)
496
523
  # Some parameter documentations has been truncated, see
497
524
  # {MetronomeSDK::Models::V1::Customers::Invoice::LineItem} for more details.
498
525
  #
@@ -542,6 +569,8 @@ module MetronomeSDK
542
569
  #
543
570
  # @param netsuite_item_id [String]
544
571
  #
572
+ # @param origin [MetronomeSDK::Models::V1::Customers::Invoice::LineItem::Origin] Account hierarchy M3 - Present on line items from invoices with type USAGE_CONSO
573
+ #
545
574
  # @param postpaid_commit [MetronomeSDK::Models::V1::Customers::Invoice::LineItem::PostpaidCommit] Only present for line items paying for a postpaid commit true-up.
546
575
  #
547
576
  # @param presentation_group_values [Hash{Symbol=>String, nil}] Includes the presentation group values associated with this line item if present
@@ -611,6 +640,39 @@ module MetronomeSDK
611
640
  end
612
641
  end
613
642
 
643
+ # @see MetronomeSDK::Models::V1::Customers::Invoice::LineItem#origin
644
+ class Origin < MetronomeSDK::Internal::Type::BaseModel
645
+ # @!attribute contract_id
646
+ #
647
+ # @return [String]
648
+ required :contract_id, String
649
+
650
+ # @!attribute customer_id
651
+ #
652
+ # @return [String]
653
+ required :customer_id, String
654
+
655
+ # @!attribute invoice_id
656
+ #
657
+ # @return [String]
658
+ required :invoice_id, String
659
+
660
+ # @!attribute line_item_id
661
+ #
662
+ # @return [String]
663
+ required :line_item_id, String
664
+
665
+ # @!method initialize(contract_id:, customer_id:, invoice_id:, line_item_id:)
666
+ # Account hierarchy M3 - Present on line items from invoices with type
667
+ # USAGE_CONSOLIDATED. Indicates the original customer, contract, invoice and line
668
+ # item from which this line item was copied.
669
+ #
670
+ # @param contract_id [String]
671
+ # @param customer_id [String]
672
+ # @param invoice_id [String]
673
+ # @param line_item_id [String]
674
+ end
675
+
614
676
  # @see MetronomeSDK::Models::V1::Customers::Invoice::LineItem#postpaid_commit
615
677
  class PostpaidCommit < MetronomeSDK::Internal::Type::BaseModel
616
678
  # @!attribute id
@@ -805,17 +867,26 @@ module MetronomeSDK
805
867
  end
806
868
  end
807
869
 
808
- # This field's availability is dependent on your client's configuration.
809
- #
810
- # @see MetronomeSDK::Models::V1::Customers::Invoice#billable_status
811
- module BillableStatus
812
- extend MetronomeSDK::Internal::Type::Enum
870
+ class ConstituentInvoice < MetronomeSDK::Internal::Type::BaseModel
871
+ # @!attribute contract_id
872
+ #
873
+ # @return [String]
874
+ required :contract_id, String
813
875
 
814
- BILLABLE = :billable
815
- UNBILLABLE = :unbillable
876
+ # @!attribute customer_id
877
+ #
878
+ # @return [String]
879
+ required :customer_id, String
816
880
 
817
- # @!method self.values
818
- # @return [Array<Symbol>]
881
+ # @!attribute invoice_id
882
+ #
883
+ # @return [String]
884
+ required :invoice_id, String
885
+
886
+ # @!method initialize(contract_id:, customer_id:, invoice_id:)
887
+ # @param contract_id [String]
888
+ # @param customer_id [String]
889
+ # @param invoice_id [String]
819
890
  end
820
891
 
821
892
  # @see MetronomeSDK::Models::V1::Customers::Invoice#correction_record
@@ -855,6 +926,12 @@ module MetronomeSDK
855
926
  required :billing_provider_type,
856
927
  enum: -> { MetronomeSDK::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::BillingProviderType }
857
928
 
929
+ # @!attribute billing_provider_error
930
+ # Error message from the billing provider, if available.
931
+ #
932
+ # @return [String, nil]
933
+ optional :billing_provider_error, String
934
+
858
935
  # @!attribute external_status
859
936
  #
860
937
  # @return [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::ExternalStatus, nil]
@@ -866,16 +943,54 @@ module MetronomeSDK
866
943
  # @return [String, nil]
867
944
  optional :invoice_id, String
868
945
 
946
+ # @!attribute invoiced_sub_total
947
+ # The subtotal amount invoiced, if available from the billing provider.
948
+ #
949
+ # @return [Float, nil]
950
+ optional :invoiced_sub_total, Float
951
+
952
+ # @!attribute invoiced_total
953
+ # The total amount invoiced, if available from the billing provider.
954
+ #
955
+ # @return [Float, nil]
956
+ optional :invoiced_total, Float
957
+
869
958
  # @!attribute issued_at_timestamp
870
959
  #
871
960
  # @return [Time, nil]
872
961
  optional :issued_at_timestamp, Time
873
962
 
874
- # @!method initialize(billing_provider_type:, external_status: nil, invoice_id: nil, issued_at_timestamp: nil)
963
+ # @!attribute pdf_url
964
+ # A URL to the PDF of the invoice, if available from the billing provider.
965
+ #
966
+ # @return [String, nil]
967
+ optional :pdf_url, String
968
+
969
+ # @!attribute tax
970
+ # Tax details for the invoice, if available from the billing provider.
971
+ #
972
+ # @return [MetronomeSDK::Models::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::Tax, nil]
973
+ optional :tax,
974
+ -> { MetronomeSDK::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::Tax }
975
+
976
+ # @!method initialize(billing_provider_type:, billing_provider_error: nil, external_status: nil, invoice_id: nil, invoiced_sub_total: nil, invoiced_total: nil, issued_at_timestamp: nil, pdf_url: nil, tax: nil)
875
977
  # @param billing_provider_type [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::BillingProviderType]
978
+ #
979
+ # @param billing_provider_error [String] Error message from the billing provider, if available.
980
+ #
876
981
  # @param external_status [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::ExternalStatus]
982
+ #
877
983
  # @param invoice_id [String]
984
+ #
985
+ # @param invoiced_sub_total [Float] The subtotal amount invoiced, if available from the billing provider.
986
+ #
987
+ # @param invoiced_total [Float] The total amount invoiced, if available from the billing provider.
988
+ #
878
989
  # @param issued_at_timestamp [Time]
990
+ #
991
+ # @param pdf_url [String] A URL to the PDF of the invoice, if available from the billing provider.
992
+ #
993
+ # @param tax [MetronomeSDK::Models::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::Tax] Tax details for the invoice, if available from the billing provider.
879
994
 
880
995
  # @see MetronomeSDK::Models::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice#billing_provider_type
881
996
  module BillingProviderType
@@ -889,6 +1004,7 @@ module MetronomeSDK
889
1004
  QUICKBOOKS_ONLINE = :quickbooks_online
890
1005
  WORKDAY = :workday
891
1006
  GCP_MARKETPLACE = :gcp_marketplace
1007
+ METRONOME = :metronome
892
1008
 
893
1009
  # @!method self.values
894
1010
  # @return [Array<Symbol>]
@@ -913,6 +1029,36 @@ module MetronomeSDK
913
1029
  # @!method self.values
914
1030
  # @return [Array<Symbol>]
915
1031
  end
1032
+
1033
+ # @see MetronomeSDK::Models::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice#tax
1034
+ class Tax < MetronomeSDK::Internal::Type::BaseModel
1035
+ # @!attribute total_tax_amount
1036
+ # The total tax amount applied to the invoice.
1037
+ #
1038
+ # @return [Float, nil]
1039
+ optional :total_tax_amount, Float
1040
+
1041
+ # @!attribute total_taxable_amount
1042
+ # The total taxable amount of the invoice.
1043
+ #
1044
+ # @return [Float, nil]
1045
+ optional :total_taxable_amount, Float
1046
+
1047
+ # @!attribute transaction_id
1048
+ # The transaction ID associated with the tax calculation.
1049
+ #
1050
+ # @return [String, nil]
1051
+ optional :transaction_id, String
1052
+
1053
+ # @!method initialize(total_tax_amount: nil, total_taxable_amount: nil, transaction_id: nil)
1054
+ # Tax details for the invoice, if available from the billing provider.
1055
+ #
1056
+ # @param total_tax_amount [Float] The total tax amount applied to the invoice.
1057
+ #
1058
+ # @param total_taxable_amount [Float] The total taxable amount of the invoice.
1059
+ #
1060
+ # @param transaction_id [String] The transaction ID associated with the tax calculation.
1061
+ end
916
1062
  end
917
1063
  end
918
1064
 
@@ -924,6 +1070,12 @@ module MetronomeSDK
924
1070
  required :billing_provider_type,
925
1071
  enum: -> { MetronomeSDK::V1::Customers::Invoice::ExternalInvoice::BillingProviderType }
926
1072
 
1073
+ # @!attribute billing_provider_error
1074
+ # Error message from the billing provider, if available.
1075
+ #
1076
+ # @return [String, nil]
1077
+ optional :billing_provider_error, String
1078
+
927
1079
  # @!attribute external_status
928
1080
  #
929
1081
  # @return [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::ExternalInvoice::ExternalStatus, nil]
@@ -935,16 +1087,53 @@ module MetronomeSDK
935
1087
  # @return [String, nil]
936
1088
  optional :invoice_id, String
937
1089
 
1090
+ # @!attribute invoiced_sub_total
1091
+ # The subtotal amount invoiced, if available from the billing provider.
1092
+ #
1093
+ # @return [Float, nil]
1094
+ optional :invoiced_sub_total, Float
1095
+
1096
+ # @!attribute invoiced_total
1097
+ # The total amount invoiced, if available from the billing provider.
1098
+ #
1099
+ # @return [Float, nil]
1100
+ optional :invoiced_total, Float
1101
+
938
1102
  # @!attribute issued_at_timestamp
939
1103
  #
940
1104
  # @return [Time, nil]
941
1105
  optional :issued_at_timestamp, Time
942
1106
 
943
- # @!method initialize(billing_provider_type:, external_status: nil, invoice_id: nil, issued_at_timestamp: nil)
1107
+ # @!attribute pdf_url
1108
+ # A URL to the PDF of the invoice, if available from the billing provider.
1109
+ #
1110
+ # @return [String, nil]
1111
+ optional :pdf_url, String
1112
+
1113
+ # @!attribute tax
1114
+ # Tax details for the invoice, if available from the billing provider.
1115
+ #
1116
+ # @return [MetronomeSDK::Models::V1::Customers::Invoice::ExternalInvoice::Tax, nil]
1117
+ optional :tax, -> { MetronomeSDK::V1::Customers::Invoice::ExternalInvoice::Tax }
1118
+
1119
+ # @!method initialize(billing_provider_type:, billing_provider_error: nil, external_status: nil, invoice_id: nil, invoiced_sub_total: nil, invoiced_total: nil, issued_at_timestamp: nil, pdf_url: nil, tax: nil)
944
1120
  # @param billing_provider_type [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::ExternalInvoice::BillingProviderType]
1121
+ #
1122
+ # @param billing_provider_error [String] Error message from the billing provider, if available.
1123
+ #
945
1124
  # @param external_status [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::ExternalInvoice::ExternalStatus]
1125
+ #
946
1126
  # @param invoice_id [String]
1127
+ #
1128
+ # @param invoiced_sub_total [Float] The subtotal amount invoiced, if available from the billing provider.
1129
+ #
1130
+ # @param invoiced_total [Float] The total amount invoiced, if available from the billing provider.
1131
+ #
947
1132
  # @param issued_at_timestamp [Time]
1133
+ #
1134
+ # @param pdf_url [String] A URL to the PDF of the invoice, if available from the billing provider.
1135
+ #
1136
+ # @param tax [MetronomeSDK::Models::V1::Customers::Invoice::ExternalInvoice::Tax] Tax details for the invoice, if available from the billing provider.
948
1137
 
949
1138
  # @see MetronomeSDK::Models::V1::Customers::Invoice::ExternalInvoice#billing_provider_type
950
1139
  module BillingProviderType
@@ -958,6 +1147,7 @@ module MetronomeSDK
958
1147
  QUICKBOOKS_ONLINE = :quickbooks_online
959
1148
  WORKDAY = :workday
960
1149
  GCP_MARKETPLACE = :gcp_marketplace
1150
+ METRONOME = :metronome
961
1151
 
962
1152
  # @!method self.values
963
1153
  # @return [Array<Symbol>]
@@ -982,6 +1172,36 @@ module MetronomeSDK
982
1172
  # @!method self.values
983
1173
  # @return [Array<Symbol>]
984
1174
  end
1175
+
1176
+ # @see MetronomeSDK::Models::V1::Customers::Invoice::ExternalInvoice#tax
1177
+ class Tax < MetronomeSDK::Internal::Type::BaseModel
1178
+ # @!attribute total_tax_amount
1179
+ # The total tax amount applied to the invoice.
1180
+ #
1181
+ # @return [Float, nil]
1182
+ optional :total_tax_amount, Float
1183
+
1184
+ # @!attribute total_taxable_amount
1185
+ # The total taxable amount of the invoice.
1186
+ #
1187
+ # @return [Float, nil]
1188
+ optional :total_taxable_amount, Float
1189
+
1190
+ # @!attribute transaction_id
1191
+ # The transaction ID associated with the tax calculation.
1192
+ #
1193
+ # @return [String, nil]
1194
+ optional :transaction_id, String
1195
+
1196
+ # @!method initialize(total_tax_amount: nil, total_taxable_amount: nil, transaction_id: nil)
1197
+ # Tax details for the invoice, if available from the billing provider.
1198
+ #
1199
+ # @param total_tax_amount [Float] The total tax amount applied to the invoice.
1200
+ #
1201
+ # @param total_taxable_amount [Float] The total taxable amount of the invoice.
1202
+ #
1203
+ # @param transaction_id [String] The transaction ID associated with the tax calculation.
1204
+ end
985
1205
  end
986
1206
 
987
1207
  class InvoiceAdjustment < MetronomeSDK::Internal::Type::BaseModel
@@ -1023,6 +1243,26 @@ module MetronomeSDK
1023
1243
  # @param credit_grant_id [String]
1024
1244
  end
1025
1245
 
1246
+ # @see MetronomeSDK::Models::V1::Customers::Invoice#payer
1247
+ class Payer < MetronomeSDK::Internal::Type::BaseModel
1248
+ # @!attribute contract_id
1249
+ #
1250
+ # @return [String]
1251
+ required :contract_id, String
1252
+
1253
+ # @!attribute customer_id
1254
+ #
1255
+ # @return [String]
1256
+ required :customer_id, String
1257
+
1258
+ # @!method initialize(contract_id:, customer_id:)
1259
+ # Account hierarchy M3 - Required for account hierarchy usage invoices. An object
1260
+ # containing the contract and customer UUIDs that pay for this invoice.
1261
+ #
1262
+ # @param contract_id [String]
1263
+ # @param customer_id [String]
1264
+ end
1265
+
1026
1266
  # @see MetronomeSDK::Models::V1::Customers::Invoice#reseller_royalty
1027
1267
  class ResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
1028
1268
  # @!attribute fraction
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MetronomeSDK
4
+ module Models
5
+ module V1
6
+ module Customers
7
+ # @see MetronomeSDK::Resources::V1::Customers::Invoices#retrieve_pdf
8
+ class InvoiceRetrievePdfParams < MetronomeSDK::Internal::Type::BaseModel
9
+ extend MetronomeSDK::Internal::Type::RequestParameters::Converter
10
+ include MetronomeSDK::Internal::Type::RequestParameters
11
+
12
+ # @!attribute customer_id
13
+ #
14
+ # @return [String]
15
+ required :customer_id, String
16
+
17
+ # @!attribute invoice_id
18
+ #
19
+ # @return [String]
20
+ required :invoice_id, String
21
+
22
+ # @!method initialize(customer_id:, invoice_id:, request_options: {})
23
+ # @param customer_id [String]
24
+ # @param invoice_id [String]
25
+ # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,157 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MetronomeSDK
4
+ module Models
5
+ module V1
6
+ # @see MetronomeSDK::Resources::V1::Payments#list
7
+ class Payment < MetronomeSDK::Internal::Type::BaseModel
8
+ # @!attribute id
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute amount
14
+ #
15
+ # @return [Float, nil]
16
+ optional :amount, Float
17
+
18
+ # @!attribute amount_paid
19
+ #
20
+ # @return [Float, nil]
21
+ optional :amount_paid, Float
22
+
23
+ # @!attribute contract_id
24
+ #
25
+ # @return [String, nil]
26
+ optional :contract_id, String
27
+
28
+ # @!attribute created_at
29
+ #
30
+ # @return [Time, nil]
31
+ optional :created_at, Time
32
+
33
+ # @!attribute customer_id
34
+ #
35
+ # @return [String, nil]
36
+ optional :customer_id, String
37
+
38
+ # @!attribute error_message
39
+ #
40
+ # @return [String, nil]
41
+ optional :error_message, String
42
+
43
+ # @!attribute fiat_credit_type
44
+ #
45
+ # @return [MetronomeSDK::Models::CreditTypeData, nil]
46
+ optional :fiat_credit_type, -> { MetronomeSDK::CreditTypeData }
47
+
48
+ # @!attribute invoice_id
49
+ #
50
+ # @return [String, nil]
51
+ optional :invoice_id, String
52
+
53
+ # @!attribute payment_gateway
54
+ #
55
+ # @return [MetronomeSDK::Models::V1::Payment::PaymentGateway, nil]
56
+ optional :payment_gateway, -> { MetronomeSDK::V1::Payment::PaymentGateway }
57
+
58
+ # @!attribute status
59
+ #
60
+ # @return [Symbol, MetronomeSDK::Models::V1::PaymentStatus, nil]
61
+ optional :status, enum: -> { MetronomeSDK::V1::PaymentStatus }
62
+
63
+ # @!attribute updated_at
64
+ #
65
+ # @return [Time, nil]
66
+ optional :updated_at, Time
67
+
68
+ # @!method initialize(id:, amount: nil, amount_paid: nil, contract_id: nil, created_at: nil, customer_id: nil, error_message: nil, fiat_credit_type: nil, invoice_id: nil, payment_gateway: nil, status: nil, updated_at: nil)
69
+ # @param id [String]
70
+ # @param amount [Float]
71
+ # @param amount_paid [Float]
72
+ # @param contract_id [String]
73
+ # @param created_at [Time]
74
+ # @param customer_id [String]
75
+ # @param error_message [String]
76
+ # @param fiat_credit_type [MetronomeSDK::Models::CreditTypeData]
77
+ # @param invoice_id [String]
78
+ # @param payment_gateway [MetronomeSDK::Models::V1::Payment::PaymentGateway]
79
+ # @param status [Symbol, MetronomeSDK::Models::V1::PaymentStatus]
80
+ # @param updated_at [Time]
81
+
82
+ # @see MetronomeSDK::Models::V1::Payment#payment_gateway
83
+ class PaymentGateway < MetronomeSDK::Internal::Type::BaseModel
84
+ # @!attribute stripe
85
+ #
86
+ # @return [MetronomeSDK::Models::V1::Payment::PaymentGateway::Stripe]
87
+ required :stripe, -> { MetronomeSDK::V1::Payment::PaymentGateway::Stripe }
88
+
89
+ # @!attribute type
90
+ #
91
+ # @return [Symbol, MetronomeSDK::Models::V1::Payment::PaymentGateway::Type]
92
+ required :type, enum: -> { MetronomeSDK::V1::Payment::PaymentGateway::Type }
93
+
94
+ # @!method initialize(stripe:, type:)
95
+ # @param stripe [MetronomeSDK::Models::V1::Payment::PaymentGateway::Stripe]
96
+ # @param type [Symbol, MetronomeSDK::Models::V1::Payment::PaymentGateway::Type]
97
+
98
+ # @see MetronomeSDK::Models::V1::Payment::PaymentGateway#stripe
99
+ class Stripe < MetronomeSDK::Internal::Type::BaseModel
100
+ # @!attribute payment_intent_id
101
+ #
102
+ # @return [String]
103
+ required :payment_intent_id, String
104
+
105
+ # @!attribute error
106
+ #
107
+ # @return [MetronomeSDK::Models::V1::Payment::PaymentGateway::Stripe::Error, nil]
108
+ optional :error, -> { MetronomeSDK::V1::Payment::PaymentGateway::Stripe::Error }
109
+
110
+ # @!attribute payment_method_id
111
+ #
112
+ # @return [String, nil]
113
+ optional :payment_method_id, String
114
+
115
+ # @!method initialize(payment_intent_id:, error: nil, payment_method_id: nil)
116
+ # @param payment_intent_id [String]
117
+ # @param error [MetronomeSDK::Models::V1::Payment::PaymentGateway::Stripe::Error]
118
+ # @param payment_method_id [String]
119
+
120
+ # @see MetronomeSDK::Models::V1::Payment::PaymentGateway::Stripe#error
121
+ class Error < MetronomeSDK::Internal::Type::BaseModel
122
+ # @!attribute code
123
+ #
124
+ # @return [String, nil]
125
+ optional :code, String
126
+
127
+ # @!attribute decline_code
128
+ #
129
+ # @return [String, nil]
130
+ optional :decline_code, String
131
+
132
+ # @!attribute type
133
+ #
134
+ # @return [String, nil]
135
+ optional :type, String
136
+
137
+ # @!method initialize(code: nil, decline_code: nil, type: nil)
138
+ # @param code [String]
139
+ # @param decline_code [String]
140
+ # @param type [String]
141
+ end
142
+ end
143
+
144
+ # @see MetronomeSDK::Models::V1::Payment::PaymentGateway#type
145
+ module Type
146
+ extend MetronomeSDK::Internal::Type::Enum
147
+
148
+ STRIPE = :stripe
149
+
150
+ # @!method self.values
151
+ # @return [Array<Symbol>]
152
+ end
153
+ end
154
+ end
155
+ end
156
+ end
157
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MetronomeSDK
4
+ module Models
5
+ module V1
6
+ # @see MetronomeSDK::Resources::V1::Payments#attempt
7
+ class PaymentAttemptParams < MetronomeSDK::Internal::Type::BaseModel
8
+ extend MetronomeSDK::Internal::Type::RequestParameters::Converter
9
+ include MetronomeSDK::Internal::Type::RequestParameters
10
+
11
+ # @!attribute customer_id
12
+ #
13
+ # @return [String]
14
+ required :customer_id, String
15
+
16
+ # @!attribute invoice_id
17
+ #
18
+ # @return [String]
19
+ required :invoice_id, String
20
+
21
+ # @!method initialize(customer_id:, invoice_id:, request_options: {})
22
+ # @param customer_id [String]
23
+ # @param invoice_id [String]
24
+ # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MetronomeSDK
4
+ module Models
5
+ module V1
6
+ # @see MetronomeSDK::Resources::V1::Payments#attempt
7
+ class PaymentAttemptResponse < MetronomeSDK::Internal::Type::BaseModel
8
+ # @!attribute data
9
+ #
10
+ # @return [MetronomeSDK::Models::V1::Payment]
11
+ required :data, -> { MetronomeSDK::V1::Payment }
12
+
13
+ # @!method initialize(data:)
14
+ # @param data [MetronomeSDK::Models::V1::Payment]
15
+ end
16
+ end
17
+ end
18
+ end