inttegro 9.3.0 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -2
  3. data/lib/inttegro/app/application.rb +11 -1
  4. data/lib/inttegro/app/capabilities.rb +11 -0
  5. data/lib/inttegro/app/capabilities_response.rb +28 -0
  6. data/lib/inttegro/app/capabilities_response_capabilities.rb +37 -0
  7. data/lib/inttegro/app/capability_projection.rb +39 -0
  8. data/lib/inttegro/app/capability_requirement.rb +41 -0
  9. data/lib/inttegro/app/capability_requirements.rb +28 -0
  10. data/lib/inttegro/app/enabled_capability.rb +35 -0
  11. data/lib/inttegro/app/enabled_capability_status.rb +25 -0
  12. data/lib/inttegro/app/looked_up.rb +18 -0
  13. data/lib/inttegro/app/looked_up_relationship.rb +58 -0
  14. data/lib/inttegro/app/looked_up_relationship_parent.rb +41 -0
  15. data/lib/inttegro/{checkout/invoice_view_format_receipt.rb → app/lookup_capabilities_request.rb} +4 -10
  16. data/lib/inttegro/app/pending_review_capability.rb +43 -0
  17. data/lib/inttegro/app/pending_review_capability_status.rb +25 -0
  18. data/lib/inttegro/app/pending_review_capability_status_reason.rb +34 -0
  19. data/lib/inttegro/app/relationship.rb +7 -63
  20. data/lib/inttegro/app/relationship_parent.rb +41 -0
  21. data/lib/inttegro/app/restricted_capability.rb +51 -0
  22. data/lib/inttegro/app/restricted_capability_status.rb +25 -0
  23. data/lib/inttegro/app/restricted_capability_status_reason.rb +34 -0
  24. data/lib/inttegro/app/updated.rb +10 -0
  25. data/lib/inttegro/balance/currency_snapshot.rb +11 -2
  26. data/lib/inttegro/balance/currency_snapshot_refund.rb +1 -1
  27. data/lib/inttegro/balance/currency_snapshot_reserved.rb +2 -1
  28. data/lib/inttegro/balance/holds.rb +43 -0
  29. data/lib/inttegro/balance/holds_payout.rb +27 -0
  30. data/lib/inttegro/balance/holds_refund.rb +27 -0
  31. data/lib/inttegro/checkout/invoice_view_format.rb +0 -8
  32. data/lib/inttegro/financial_account/compact.rb +5 -7
  33. data/lib/inttegro/financial_account/connected.rb +5 -7
  34. data/lib/inttegro/financial_account/created.rb +5 -7
  35. data/lib/inttegro/financial_account/details.rb +5 -7
  36. data/lib/inttegro/financial_account/financial_account.rb +5 -7
  37. data/lib/inttegro/financial_account/updated.rb +5 -7
  38. data/lib/inttegro/generated/enums.rb +8 -0
  39. data/lib/inttegro/generated/models.rb +21 -3
  40. data/lib/inttegro/generated/operations.rb +3 -0
  41. data/lib/inttegro/models.rb +1 -0
  42. data/lib/inttegro/order/invoice_format.rb +0 -8
  43. data/lib/inttegro/order/{receipt_document_format.rb → receipt.rb} +15 -7
  44. data/lib/inttegro/order/receipt_format.rb +35 -0
  45. data/lib/inttegro/payment/payment.rb +8 -0
  46. data/lib/inttegro/payout/amount_limits.rb +35 -0
  47. data/lib/inttegro/payout/balance_transaction.rb +11 -1
  48. data/lib/inttegro/payout/balance_transaction_status.rb +31 -0
  49. data/lib/inttegro/payout/cancellation.rb +42 -0
  50. data/lib/inttegro/payout/cancellation_reason.rb +30 -0
  51. data/lib/inttegro/payout/error.rb +1 -1
  52. data/lib/inttegro/payout/failure.rb +43 -0
  53. data/lib/inttegro/payout/failure_reason.rb +33 -0
  54. data/lib/inttegro/payout/payout.rb +19 -2
  55. data/lib/inttegro/payout/settings_limits.rb +28 -0
  56. data/lib/inttegro/payout/settings_lookup.rb +8 -0
  57. data/lib/inttegro/payout/settings_mutation.rb +8 -0
  58. data/lib/inttegro/payout/status.rb +2 -2
  59. data/lib/inttegro/resources/apps.rb +12 -0
  60. data/lib/inttegro/version.rb +1 -1
  61. data/rbi/inttegro/generated.rbi +3 -0
  62. metadata +32 -5
  63. data/lib/inttegro/app/relationship_policy.rb +0 -43
@@ -4,9 +4,14 @@
4
4
  # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
5
 
6
6
  require_relative "../app/credential_owner"
7
+ require_relative "../app/enabled_capability_status"
7
8
  require_relative "../app/management_role"
9
+ require_relative "../app/pending_review_capability_status"
10
+ require_relative "../app/pending_review_capability_status_reason"
8
11
  require_relative "../app/relationship_kind"
9
12
  require_relative "../app/relationship_status"
13
+ require_relative "../app/restricted_capability_status"
14
+ require_relative "../app/restricted_capability_status_reason"
10
15
  require_relative "../balance_transaction/allocation_base_type"
11
16
  require_relative "../balance_transaction/allocation_status"
12
17
  require_relative "../balance_transaction/payout_allocation_type"
@@ -65,6 +70,9 @@ require_relative "../payment_method/data_type"
65
70
  require_relative "../payment_method/tokenize_base_type"
66
71
  require_relative "../payment_method/tokenize_mobile_money_request_type"
67
72
  require_relative "../payment_method/type"
73
+ require_relative "../payout/balance_transaction_status"
74
+ require_relative "../payout/cancellation_reason"
75
+ require_relative "../payout/failure_reason"
68
76
  require_relative "../payout/status"
69
77
  require_relative "../price/type"
70
78
  require_relative "../product/line_item_type"
@@ -39,12 +39,23 @@ require_relative "../price/catalog_price"
39
39
  require_relative "../shared/error_payload"
40
40
  require_relative "../product/add_price_response"
41
41
  require_relative "../shared/address"
42
+ require_relative "../app/enabled_capability"
43
+ require_relative "../app/capability_requirement"
44
+ require_relative "../app/capability_requirements"
45
+ require_relative "../app/restricted_capability"
46
+ require_relative "../app/pending_review_capability"
47
+ require_relative "../app/capability_projection"
42
48
  require_relative "../app/secret_key"
43
- require_relative "../app/relationship_policy"
49
+ require_relative "../app/relationship_parent"
44
50
  require_relative "../app/relationship"
45
51
  require_relative "../app/application"
52
+ require_relative "../app/capabilities_response_capabilities"
53
+ require_relative "../app/capabilities_response"
46
54
  require_relative "../payment_method/archive_request"
47
55
  require_relative "../payment_method/archive_response"
56
+ require_relative "../balance/holds_payout"
57
+ require_relative "../balance/holds_refund"
58
+ require_relative "../balance/holds"
48
59
  require_relative "../balance/value"
49
60
  require_relative "../balance/currency_snapshot_refund"
50
61
  require_relative "../balance/currency_snapshot_reserved"
@@ -115,7 +126,6 @@ require_relative "../order/document_delivery_summary_channels"
115
126
  require_relative "../order/document_delivery_summary"
116
127
  require_relative "../checkout/invoice_view_format_web"
117
128
  require_relative "../checkout/invoice_view_format_pdf"
118
- require_relative "../checkout/invoice_view_format_receipt"
119
129
  require_relative "../checkout/invoice_view_format"
120
130
  require_relative "../checkout/invoice_view_beneficiary"
121
131
  require_relative "../checkout/invoice_view"
@@ -168,7 +178,6 @@ require_relative "../order/created_from"
168
178
  require_relative "../order/address"
169
179
  require_relative "../order/customer"
170
180
  require_relative "../order/document_format"
171
- require_relative "../order/receipt_document_format"
172
181
  require_relative "../order/invoice_format"
173
182
  require_relative "../order/invoice"
174
183
  require_relative "../refund/failure"
@@ -209,6 +218,8 @@ require_relative "../payment/method_snapshot_owner"
209
218
  require_relative "../payment/payment_method"
210
219
  require_relative "../payment/billing_details_owner"
211
220
  require_relative "../payment/billing_details"
221
+ require_relative "../order/receipt_format"
222
+ require_relative "../order/receipt"
212
223
  require_relative "../payment/customer"
213
224
  require_relative "../payment/latest_attempt_error"
214
225
  require_relative "../payment/latest_attempt"
@@ -320,6 +331,8 @@ require_relative "../secret_key/secret_key"
320
331
  require_relative "../secret_key/destroy_response"
321
332
  require_relative "../payout/disable_automatic_request"
322
333
  require_relative "../payout/destinations"
334
+ require_relative "../payout/amount_limits"
335
+ require_relative "../payout/settings_limits"
323
336
  require_relative "../payout/settings_mutation_schedule_spec"
324
337
  require_relative "../payout/settings_mutation_schedule"
325
338
  require_relative "../payout/settings_mutation"
@@ -399,7 +412,10 @@ require_relative "../otp/transmission"
399
412
  require_relative "../otp/transaction"
400
413
  require_relative "../otp/initiate_response"
401
414
  require_relative "../shared/list_country_specs_request"
415
+ require_relative "../app/looked_up_relationship_parent"
416
+ require_relative "../app/looked_up_relationship"
402
417
  require_relative "../app/looked_up"
418
+ require_relative "../app/lookup_capabilities_request"
403
419
  require_relative "../app/lookup_response"
404
420
  require_relative "../balance_transaction/lookup_request"
405
421
  require_relative "../balance/lookup_request"
@@ -499,7 +515,9 @@ require_relative "../payment_method/page_response"
499
515
  require_relative "../payment_method/tokenize_base"
500
516
  require_relative "../payment/result"
501
517
  require_relative "../payout/balance_transaction"
518
+ require_relative "../payout/cancellation"
502
519
  require_relative "../payout/error"
520
+ require_relative "../payout/failure"
503
521
  require_relative "../payout/payout"
504
522
  require_relative "../payout/page"
505
523
  require_relative "../payout/page_response"
@@ -53,6 +53,7 @@ module Inttegro
53
53
  "/refunds/lookup" => Inttegro::Refund::Response,
54
54
  "/refunds/page" => Inttegro::Refund::PageResponse,
55
55
  "/apps/create" => Inttegro::Application::CreateResponse,
56
+ "/apps/capabilities" => Inttegro::Application::CapabilitiesResponse,
56
57
  "/apps/lookup" => Inttegro::Application::LookupResponse,
57
58
  "/apps/update" => Inttegro::Application::UpdateResponse,
58
59
  "/keys/generate" => Inttegro::SecretKey::GenerateResponse,
@@ -181,6 +182,7 @@ module Inttegro
181
182
  "/refunds/lookup" => "Inttegro::Refund::LookupRequest",
182
183
  "/refunds/page" => "Inttegro::Refund::PageRequest",
183
184
  "/apps/create" => "Inttegro::Application::CreateRequest",
185
+ "/apps/capabilities" => "Inttegro::Application::LookupCapabilitiesRequest",
184
186
  "/apps/update" => "Inttegro::Application::UpdateRequest",
185
187
  "/keys/generate" => "Inttegro::SecretKey::GenerateRequest",
186
188
  "/keys/page" => "Inttegro::SecretKey::PageRequest",
@@ -307,6 +309,7 @@ module Inttegro
307
309
  "/refunds/lookup" => "lookupRefund",
308
310
  "/refunds/page" => "pageRefunds",
309
311
  "/apps/create" => "createApplication",
312
+ "/apps/capabilities" => "lookupApplicationCapabilities",
310
313
  "/apps/lookup" => "lookupApplication",
311
314
  "/apps/update" => "updateApplication",
312
315
  "/keys/generate" => "generateSecretKey",
@@ -3,6 +3,7 @@
3
3
 
4
4
  # Generated resource models are loaded in dependency order by this manifest.
5
5
  require_relative "generated/models"
6
+ require_relative "app/capabilities"
6
7
 
7
8
  # Hand-written behavior lives beside the resource it extends.
8
9
  require_relative "model_serialization"
@@ -5,7 +5,6 @@
5
5
 
6
6
  require_relative "base"
7
7
  require_relative "document_format"
8
- require_relative "receipt_document_format"
9
8
 
10
9
  module Inttegro
11
10
  class Order
@@ -28,16 +27,9 @@ module Inttegro
28
27
  #
29
28
  # Required in the API payload. Wire name: `pdf`.
30
29
  # @return [Inttegro::Order::DocumentFormat]
31
- #
32
- # @!attribute [r] receipt
33
- # Value of the `receipt` field in the Inttegro API payload.
34
- #
35
- # Optional in the API payload; omitted values default to `nil`. Wire name: `receipt`.
36
- # @return [Inttegro::Order::ReceiptDocumentFormat, nil]
37
30
  class InvoiceFormat < T::Struct
38
31
  const :web, Inttegro::Order::DocumentFormat
39
32
  const :pdf, Inttegro::Order::DocumentFormat
40
- const :receipt, T.nilable(Inttegro::Order::ReceiptDocumentFormat), default: nil
41
33
  end
42
34
  end
43
35
  end
@@ -5,10 +5,11 @@
5
5
 
6
6
  require_relative "base"
7
7
  require_relative "document_delivery_summary"
8
+ require_relative "receipt_format"
8
9
 
9
10
  module Inttegro
10
11
  class Order
11
- # Typed representation of the receipt document format object in the Inttegro API.
12
+ # Receipt issued for a paid order payment.
12
13
  #
13
14
  # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
14
15
  # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
@@ -16,20 +17,27 @@ module Inttegro
16
17
  #
17
18
  # @api public
18
19
  #
20
+ # @!attribute [r] number
21
+ # Value of the `number` field in the Inttegro API payload.
22
+ #
23
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `number`.
24
+ # @return [String, nil]
25
+ #
19
26
  # @!attribute [r] delivery_summary
20
27
  # Bounded aggregate of Chime-accepted sends for one generated order document.
21
28
  #
22
29
  # Optional in the API payload; omitted values default to `nil`. Wire name: `delivery_summary`.
23
30
  # @return [Inttegro::Order::DocumentDeliverySummary, nil]
24
31
  #
25
- # @!attribute [r] url
26
- # Value of the `url` field in the Inttegro API payload.
32
+ # @!attribute [r] format_value
33
+ # Value of the `format` field in the Inttegro API payload.
27
34
  #
28
- # Required in the API payload. Wire name: `url`.
29
- # @return [String]
30
- class ReceiptDocumentFormat < T::Struct
35
+ # Required in the API payload. Wire name: `format`.
36
+ # @return [Inttegro::Order::ReceiptFormat]
37
+ class Receipt < T::Struct
38
+ const :number, T.nilable(String), default: nil
31
39
  const :delivery_summary, T.nilable(Inttegro::Order::DocumentDeliverySummary), default: nil
32
- const :url, String
40
+ const :format_value, Inttegro::Order::ReceiptFormat, name: "format"
33
41
  end
34
42
  end
35
43
  end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+ require_relative "document_format"
8
+
9
+ module Inttegro
10
+ class Order
11
+ # Typed representation of the receipt format object in the Inttegro API.
12
+ #
13
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
14
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
15
+ # field names and serialized enum values.
16
+ #
17
+ # @api public
18
+ #
19
+ # @!attribute [r] web
20
+ # Value of the `web` field in the Inttegro API payload.
21
+ #
22
+ # Required in the API payload. Wire name: `web`.
23
+ # @return [Inttegro::Order::DocumentFormat]
24
+ #
25
+ # @!attribute [r] pdf
26
+ # Value of the `pdf` field in the Inttegro API payload.
27
+ #
28
+ # Required in the API payload. Wire name: `pdf`.
29
+ # @return [Inttegro::Order::DocumentFormat]
30
+ class ReceiptFormat < T::Struct
31
+ const :web, Inttegro::Order::DocumentFormat
32
+ const :pdf, Inttegro::Order::DocumentFormat
33
+ end
34
+ end
35
+ end
@@ -6,6 +6,7 @@
6
6
  require_relative "base"
7
7
  require_relative "../balance_transaction/balance_transaction"
8
8
  require_relative "../money/amount"
9
+ require_relative "../order/receipt"
9
10
  require_relative "billing_details"
10
11
  require_relative "customer"
11
12
  require_relative "latest_attempt"
@@ -67,6 +68,12 @@ module Inttegro
67
68
  # Optional in the API payload; omitted values default to `nil`. Wire name: `billing_details`.
68
69
  # @return [Inttegro::Payment::BillingDetails, nil]
69
70
  #
71
+ # @!attribute [r] receipt
72
+ # Receipt issued for a paid order payment.
73
+ #
74
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `receipt`.
75
+ # @return [Inttegro::Order::Receipt, nil]
76
+ #
70
77
  # @!attribute [r] customer
71
78
  # Value of the `customer` field in the Inttegro API payload.
72
79
  #
@@ -158,6 +165,7 @@ module Inttegro
158
165
  const :balance_transaction, T.nilable(Inttegro::BalanceTransaction), default: nil
159
166
  const :payment_method, T.nilable(Inttegro::Payment::PaymentMethod), default: nil
160
167
  const :billing_details, T.nilable(Inttegro::Payment::BillingDetails), default: nil
168
+ const :receipt, T.nilable(Inttegro::Order::Receipt), default: nil
161
169
  const :customer, T.nilable(Inttegro::Payment::Customer), default: nil
162
170
  const :latest_attempt, T.nilable(Inttegro::Payment::LatestAttempt), default: nil
163
171
  const :next_action, T.nilable(Inttegro::Payment::NextAction), default: nil
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+ require_relative "../money/amount"
8
+
9
+ module Inttegro
10
+ class Payout
11
+ # Inclusive payout amount range. Values use the currency's smallest unit.
12
+ #
13
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
14
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
15
+ # field names and serialized enum values.
16
+ #
17
+ # @api public
18
+ #
19
+ # @!attribute [r] min
20
+ # Value of the `min` field in the Inttegro API payload.
21
+ #
22
+ # Required in the API payload. Wire name: `min`.
23
+ # @return [Inttegro::Money::Amount]
24
+ #
25
+ # @!attribute [r] max
26
+ # Value of the `max` field in the Inttegro API payload.
27
+ #
28
+ # Required in the API payload. Wire name: `max`.
29
+ # @return [Inttegro::Money::Amount]
30
+ class AmountLimits < T::Struct
31
+ const :min, Inttegro::Money::Amount
32
+ const :max, Inttegro::Money::Amount
33
+ end
34
+ end
35
+ end
@@ -5,10 +5,12 @@
5
5
 
6
6
  require_relative "base"
7
7
  require_relative "../money/amount"
8
+ require_relative "balance_transaction_status"
8
9
 
9
10
  module Inttegro
10
11
  class Payout
11
- # A sparse view of one balance transaction's contribution to a payout.
12
+ # A historical view of one balance transaction's contribution to a payout. Released
13
+ # contributions remain present so clients can inspect the payout's original composition.
12
14
  #
13
15
  # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
14
16
  # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
@@ -33,10 +35,18 @@ module Inttegro
33
35
  #
34
36
  # Required in the API payload. Wire name: `id`.
35
37
  # @return [String]
38
+ #
39
+ # @!attribute [r] status
40
+ # Whether this contribution is still reserved for the payout, was consumed by a successful
41
+ # payout, or was released after the payout did not complete.
42
+ #
43
+ # Required in the API payload. Wire name: `status`.
44
+ # @return [Inttegro::Payout::BalanceTransactionStatus]
36
45
  class BalanceTransaction < T::Struct
37
46
  const :allocated_amount, Inttegro::Money::Amount
38
47
  const :amount, Inttegro::Money::Amount
39
48
  const :id, String
49
+ const :status, Inttegro::Payout::BalanceTransactionStatus
40
50
  end
41
51
  end
42
52
  end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+
8
+ module Inttegro
9
+ class Payout
10
+ # Whether this contribution is still reserved for the payout, was consumed by a successful
11
+ # payout, or was released after the payout did not complete.
12
+ #
13
+ # Use the constants below when constructing a request. `#serialize` returns the documented
14
+ # string wire value received from or sent to the API.
15
+ #
16
+ # @api public
17
+ class BalanceTransactionStatus < T::Enum
18
+ enums do
19
+ # Serialized wire value: `reserved`.
20
+ # @return [Inttegro::Payout::BalanceTransactionStatus]
21
+ RESERVED = new("reserved")
22
+ # Serialized wire value: `completed`.
23
+ # @return [Inttegro::Payout::BalanceTransactionStatus]
24
+ COMPLETED = new("completed")
25
+ # Serialized wire value: `released`.
26
+ # @return [Inttegro::Payout::BalanceTransactionStatus]
27
+ RELEASED = new("released")
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+ require_relative "cancellation_reason"
8
+
9
+ module Inttegro
10
+ class Payout
11
+ # Stable, caller-safe information and guidance for a canceled payout.
12
+ #
13
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
14
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
15
+ # field names and serialized enum values.
16
+ #
17
+ # @api public
18
+ #
19
+ # @!attribute [r] detail
20
+ # Human-readable explanation safe to show to an operator.
21
+ #
22
+ # Required in the API payload. Wire name: `detail`.
23
+ # @return [String]
24
+ #
25
+ # @!attribute [r] reason
26
+ # Stable category describing why the payout was canceled.
27
+ #
28
+ # Required in the API payload. Wire name: `reason`.
29
+ # @return [Inttegro::Payout::CancellationReason]
30
+ #
31
+ # @!attribute [r] remediation
32
+ # Recommended next step safe to show to an operator.
33
+ #
34
+ # Required in the API payload. Wire name: `remediation`.
35
+ # @return [String]
36
+ class Cancellation < T::Struct
37
+ const :detail, String
38
+ const :reason, Inttegro::Payout::CancellationReason
39
+ const :remediation, String
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+
8
+ module Inttegro
9
+ class Payout
10
+ # Stable category describing why the payout was canceled.
11
+ #
12
+ # Use the constants below when constructing a request. `#serialize` returns the documented
13
+ # string wire value received from or sent to the API.
14
+ #
15
+ # @api public
16
+ class CancellationReason < T::Enum
17
+ enums do
18
+ # Serialized wire value: `requested`.
19
+ # @return [Inttegro::Payout::CancellationReason]
20
+ REQUESTED = new("requested")
21
+ # Serialized wire value: `no_eligible_funds`.
22
+ # @return [Inttegro::Payout::CancellationReason]
23
+ NO_ELIGIBLE_FUNDS = new("no_eligible_funds")
24
+ # Serialized wire value: `unknown`.
25
+ # @return [Inttegro::Payout::CancellationReason]
26
+ UNKNOWN = new("unknown")
27
+ end
28
+ end
29
+ end
30
+ end
@@ -7,7 +7,7 @@ require_relative "base"
7
7
 
8
8
  module Inttegro
9
9
  class Payout
10
- # Public failure details returned when payout execution fails.
10
+ # Deprecated compatibility projection of `PayoutFailure`.
11
11
  #
12
12
  # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
13
13
  # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+ require_relative "failure_reason"
8
+
9
+ module Inttegro
10
+ class Payout
11
+ # Stable, caller-safe information about a terminal payout failure.
12
+ #
13
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
14
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
15
+ # field names and serialized enum values.
16
+ #
17
+ # @api public
18
+ #
19
+ # @!attribute [r] detail
20
+ # Human-readable explanation safe to show to an operator.
21
+ #
22
+ # Required in the API payload. Wire name: `detail`.
23
+ # @return [String]
24
+ #
25
+ # @!attribute [r] reason
26
+ # Stable category describing why the payout failed.
27
+ #
28
+ # Required in the API payload. Wire name: `reason`.
29
+ # @return [Inttegro::Payout::FailureReason]
30
+ #
31
+ # @!attribute [r] retryable
32
+ # Whether creating a new payout attempt may succeed without changing the destination or
33
+ # request.
34
+ #
35
+ # Required in the API payload. Wire name: `retryable`.
36
+ # @return [Boolean]
37
+ class Failure < T::Struct
38
+ const :detail, String
39
+ const :reason, Inttegro::Payout::FailureReason
40
+ const :retryable, T::Boolean
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+
8
+ module Inttegro
9
+ class Payout
10
+ # Stable category describing why the payout failed.
11
+ #
12
+ # Use the constants below when constructing a request. `#serialize` returns the documented
13
+ # string wire value received from or sent to the API.
14
+ #
15
+ # @api public
16
+ class FailureReason < T::Enum
17
+ enums do
18
+ # Serialized wire value: `provider_declined`.
19
+ # @return [Inttegro::Payout::FailureReason]
20
+ PROVIDER_DECLINED = new("provider_declined")
21
+ # Serialized wire value: `delivery_failed`.
22
+ # @return [Inttegro::Payout::FailureReason]
23
+ DELIVERY_FAILED = new("delivery_failed")
24
+ # Serialized wire value: `temporarily_unavailable`.
25
+ # @return [Inttegro::Payout::FailureReason]
26
+ TEMPORARILY_UNAVAILABLE = new("temporarily_unavailable")
27
+ # Serialized wire value: `unknown`.
28
+ # @return [Inttegro::Payout::FailureReason]
29
+ UNKNOWN = new("unknown")
30
+ end
31
+ end
32
+ end
33
+ end
@@ -7,7 +7,9 @@ require_relative "base"
7
7
  require_relative "../custom_data"
8
8
  require_relative "../money/amount"
9
9
  require_relative "balance_transaction"
10
+ require_relative "cancellation"
10
11
  require_relative "error"
12
+ require_relative "failure"
11
13
  require_relative "status"
12
14
 
13
15
  module Inttegro
@@ -46,6 +48,13 @@ module Inttegro
46
48
  # Optional in the API payload; omitted values default to `nil`. Wire name: `canceled_at`.
47
49
  # @return [Time, nil]
48
50
  #
51
+ # @!attribute [r] cancellation
52
+ # Caller-safe explanation and next step for a canceled payout. Present only when `status` is
53
+ # `canceled`.
54
+ #
55
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `cancellation`.
56
+ # @return [Inttegro::Payout::Cancellation, nil]
57
+ #
49
58
  # @!attribute [r] custom_data
50
59
  # Merchant-defined string values attached to a resource. SDKs expose this as a semantic
51
60
  # collection rather than a raw map.
@@ -60,7 +69,7 @@ module Inttegro
60
69
  # @return [String]
61
70
  #
62
71
  # @!attribute [r] error
63
- # Public failure details returned when payout execution fails.
72
+ # Deprecated compatibility projection of `failure`. New integrations should use `failure`.
64
73
  #
65
74
  # Optional in the API payload; omitted values default to `nil`. Wire name: `error`.
66
75
  # @return [Inttegro::Payout::Error, nil]
@@ -84,11 +93,17 @@ module Inttegro
84
93
  # @return [Time, nil]
85
94
  #
86
95
  # @!attribute [r] failed_at
87
- # When the payout entered its unsuccessful terminal state
96
+ # When the payout entered the `failed` state.
88
97
  #
89
98
  # Optional in the API payload; omitted values default to `nil`. Wire name: `failed_at`.
90
99
  # @return [Time, nil]
91
100
  #
101
+ # @!attribute [r] failure
102
+ # Caller-safe failure information. Present only when `status` is `failed`.
103
+ #
104
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `failure`.
105
+ # @return [Inttegro::Payout::Failure, nil]
106
+ #
92
107
  # @!attribute [r] id
93
108
  # Unique payout identifier
94
109
  #
@@ -165,6 +180,7 @@ module Inttegro
165
180
  const :balance_transactions, T.nilable(T::Array[Inttegro::Payout::BalanceTransaction]), default: nil
166
181
  const :balance_transaction_id, T.nilable(String), default: nil
167
182
  const :canceled_at, T.nilable(Time), default: nil
183
+ const :cancellation, T.nilable(Inttegro::Payout::Cancellation), default: nil
168
184
  const :custom_data, T.nilable(Inttegro::CustomData), default: nil
169
185
  const :destination_id, String
170
186
  const :error, T.nilable(Inttegro::Payout::Error), default: nil
@@ -172,6 +188,7 @@ module Inttegro
172
188
  const :executed_by, T.nilable(String), default: nil
173
189
  const :expected_at, T.nilable(Time), default: nil
174
190
  const :failed_at, T.nilable(Time), default: nil
191
+ const :failure, T.nilable(Inttegro::Payout::Failure), default: nil
175
192
  const :id, String
176
193
  const :initiated_at, Time
177
194
  const :initiated_by, T.nilable(String), default: nil
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+ require_relative "amount_limits"
8
+
9
+ module Inttegro
10
+ class Payout
11
+ # Platform limits applied to payouts.
12
+ #
13
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
14
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
15
+ # field names and serialized enum values.
16
+ #
17
+ # @api public
18
+ #
19
+ # @!attribute [r] amount
20
+ # Inclusive payout amount range. Values use the currency's smallest unit.
21
+ #
22
+ # Required in the API payload. Wire name: `amount`.
23
+ # @return [Inttegro::Payout::AmountLimits]
24
+ class SettingsLimits < T::Struct
25
+ const :amount, Inttegro::Payout::AmountLimits
26
+ end
27
+ end
28
+ end
@@ -5,6 +5,7 @@
5
5
 
6
6
  require_relative "base"
7
7
  require_relative "destinations"
8
+ require_relative "settings_limits"
8
9
  require_relative "settings_lookup_schedule"
9
10
 
10
11
  module Inttegro
@@ -29,6 +30,12 @@ module Inttegro
29
30
  # Optional in the API payload; omitted values default to `nil`. Wire name: `fx_enabled`.
30
31
  # @return [Boolean, nil]
31
32
  #
33
+ # @!attribute [r] limits
34
+ # Platform limits applied to payouts.
35
+ #
36
+ # Required in the API payload. Wire name: `limits`.
37
+ # @return [Inttegro::Payout::SettingsLimits]
38
+ #
32
39
  # @!attribute [r] schedule
33
40
  # Active payout schedule returned when settings are retrieved.
34
41
  #
@@ -37,6 +44,7 @@ module Inttegro
37
44
  class SettingsLookup < T::Struct
38
45
  const :destinations, Inttegro::Payout::Destinations
39
46
  const :fx_enabled, T.nilable(T::Boolean), default: nil
47
+ const :limits, Inttegro::Payout::SettingsLimits
40
48
  const :schedule, T.nilable(Inttegro::Payout::SettingsLookupSchedule), default: nil
41
49
  end
42
50
  end