inttegro 7.0.0 → 8.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 (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/lib/inttegro/chime/chime.rb +3 -2
  4. data/lib/inttegro/chime/send_request.rb +3 -2
  5. data/lib/inttegro/custom_data.rb +132 -0
  6. data/lib/inttegro/customer/create_request.rb +3 -2
  7. data/lib/inttegro/customer/customer.rb +3 -2
  8. data/lib/inttegro/customer/data.rb +3 -2
  9. data/lib/inttegro/customer/update_request.rb +3 -2
  10. data/lib/inttegro/file/file.rb +3 -2
  11. data/lib/inttegro/file_link/create_request.rb +3 -2
  12. data/lib/inttegro/file_link/file_link.rb +3 -2
  13. data/lib/inttegro/financial_account/bank_request.rb +3 -2
  14. data/lib/inttegro/financial_account/connected.rb +3 -2
  15. data/lib/inttegro/financial_account/created.rb +3 -2
  16. data/lib/inttegro/financial_account/details.rb +3 -2
  17. data/lib/inttegro/financial_account/dosh_request.rb +3 -2
  18. data/lib/inttegro/financial_account/financial_account.rb +3 -2
  19. data/lib/inttegro/financial_account/request_base.rb +3 -2
  20. data/lib/inttegro/financial_account/update_request.rb +3 -2
  21. data/lib/inttegro/financial_account/updated.rb +3 -2
  22. data/lib/inttegro/financial_account/wallet_request.rb +3 -2
  23. data/lib/inttegro/financial_account/wire_page_accounts_item.rb +3 -2
  24. data/lib/inttegro/generated/enums.rb +5 -0
  25. data/lib/inttegro/generated/models.rb +10 -0
  26. data/lib/inttegro/model_serialization.rb +30 -1
  27. data/lib/inttegro/order/create_existing_customer.rb +3 -2
  28. data/lib/inttegro/order/create_new_customer.rb +3 -2
  29. data/lib/inttegro/order/order.rb +3 -2
  30. data/lib/inttegro/order/product_line_item_product.rb +3 -2
  31. data/lib/inttegro/order/update_request.rb +3 -2
  32. data/lib/inttegro/payment_method/payment_method.rb +14 -2
  33. data/lib/inttegro/payment_method/tokenize_base.rb +3 -2
  34. data/lib/inttegro/payment_method/tokenize_mobile_money_request.rb +3 -2
  35. data/lib/inttegro/payment_method/update_request.rb +3 -2
  36. data/lib/inttegro/payout/payout.rb +3 -2
  37. data/lib/inttegro/price/embedded_product.rb +3 -2
  38. data/lib/inttegro/product/create_request.rb +3 -2
  39. data/lib/inttegro/product/inline_details.rb +3 -2
  40. data/lib/inttegro/product/product.rb +3 -2
  41. data/lib/inttegro/product/update_request.rb +3 -2
  42. data/lib/inttegro/product/updated.rb +3 -2
  43. data/lib/inttegro/purchase_intent/product.rb +3 -2
  44. data/lib/inttegro/refund/create_request.rb +3 -2
  45. data/lib/inttegro/refund/failure.rb +45 -0
  46. data/lib/inttegro/refund/failure_reason.rb +49 -0
  47. data/lib/inttegro/refund/offline_settlement.rb +28 -0
  48. data/lib/inttegro/refund/offline_settlement_type.rb +24 -0
  49. data/lib/inttegro/refund/payment_method_settlement.rb +37 -0
  50. data/lib/inttegro/refund/payment_method_settlement_type.rb +24 -0
  51. data/lib/inttegro/refund/refund.rb +21 -2
  52. data/lib/inttegro/refund/settlement.rb +19 -0
  53. data/lib/inttegro/refund/settlement_bank_account_payment_method.rb +44 -0
  54. data/lib/inttegro/refund/settlement_bank_account_payment_method_bank_account.rb +37 -0
  55. data/lib/inttegro/refund/settlement_bank_account_payment_method_bank_account_ghana_bank_account.rb +35 -0
  56. data/lib/inttegro/refund/settlement_bank_account_payment_method_type.rb +25 -0
  57. data/lib/inttegro/refund/settlement_mobile_money_payment_method.rb +44 -0
  58. data/lib/inttegro/refund/settlement_mobile_money_payment_method_mobile_money.rb +43 -0
  59. data/lib/inttegro/refund/settlement_mobile_money_payment_method_type.rb +25 -0
  60. data/lib/inttegro/refund/settlement_payment_method.rb +19 -0
  61. data/lib/inttegro/shared/fee_details.rb +3 -2
  62. data/lib/inttegro/shared/invoice_settings.rb +3 -2
  63. data/lib/inttegro/shared/shipping_details.rb +3 -2
  64. data/lib/inttegro/upload_request/create_request.rb +3 -2
  65. data/lib/inttegro/upload_request/details.rb +3 -2
  66. data/lib/inttegro/upload_request/upload_request.rb +3 -2
  67. data/lib/inttegro/version.rb +1 -1
  68. data/lib/inttegro.rb +1 -0
  69. metadata +18 -2
@@ -0,0 +1,49 @@
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 Refund
10
+ # Stable, caller-safe reason that terminal refund processing failed. `unknown` is the
11
+ # fail-closed fallback for an unclassified internal failure.
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 FailureReason < T::Enum
18
+ enums do
19
+ # Serialized wire value: `insufficient_balance`.
20
+ # @return [Inttegro::Refund::FailureReason]
21
+ INSUFFICIENT_BALANCE = new("insufficient_balance")
22
+ # Serialized wire value: `original_payment_method_unavailable`.
23
+ # @return [Inttegro::Refund::FailureReason]
24
+ ORIGINAL_PAYMENT_METHOD_UNAVAILABLE = new("original_payment_method_unavailable")
25
+ # Serialized wire value: `original_payment_not_refundable`.
26
+ # @return [Inttegro::Refund::FailureReason]
27
+ ORIGINAL_PAYMENT_NOT_REFUNDABLE = new("original_payment_not_refundable")
28
+ # Serialized wire value: `refund_not_supported`.
29
+ # @return [Inttegro::Refund::FailureReason]
30
+ REFUND_NOT_SUPPORTED = new("refund_not_supported")
31
+ # Serialized wire value: `amount_not_supported`.
32
+ # @return [Inttegro::Refund::FailureReason]
33
+ AMOUNT_NOT_SUPPORTED = new("amount_not_supported")
34
+ # Serialized wire value: `refund_declined`.
35
+ # @return [Inttegro::Refund::FailureReason]
36
+ REFUND_DECLINED = new("refund_declined")
37
+ # Serialized wire value: `refund_not_permitted`.
38
+ # @return [Inttegro::Refund::FailureReason]
39
+ REFUND_NOT_PERMITTED = new("refund_not_permitted")
40
+ # Serialized wire value: `temporarily_unavailable`.
41
+ # @return [Inttegro::Refund::FailureReason]
42
+ TEMPORARILY_UNAVAILABLE = new("temporarily_unavailable")
43
+ # Serialized wire value: `unknown`.
44
+ # @return [Inttegro::Refund::FailureReason]
45
+ UNKNOWN = new("unknown")
46
+ end
47
+ end
48
+ end
49
+ end
@@ -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 "offline_settlement_type"
8
+
9
+ module Inttegro
10
+ class Refund
11
+ # Typed representation of the offline settlement 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] type
20
+ # The order was paid offline, so no Inttegro payment method is attached.
21
+ #
22
+ # Required in the API payload. Wire name: `type`.
23
+ # @return [Inttegro::Refund::OfflineSettlementType]
24
+ class OfflineSettlement < T::Struct
25
+ const :type, Inttegro::Refund::OfflineSettlementType
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,24 @@
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 Refund
10
+ # The order was paid offline, so no Inttegro payment method is attached.
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 OfflineSettlementType < T::Enum
17
+ enums do
18
+ # Serialized wire value: `offline`.
19
+ # @return [Inttegro::Refund::OfflineSettlementType]
20
+ OFFLINE = new("offline")
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,37 @@
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 "payment_method_settlement_type"
8
+ require_relative "settlement_payment_method"
9
+
10
+ module Inttegro
11
+ class Refund
12
+ # Typed representation of the payment method settlement object in the Inttegro API.
13
+ #
14
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
15
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
16
+ # field names and serialized enum values.
17
+ #
18
+ # @api public
19
+ #
20
+ # @!attribute [r] payment_method
21
+ # Caller-safe immutable snapshot of the original payment method. Account values are masked and
22
+ # management-only payment-method data is never included.
23
+ #
24
+ # Required in the API payload. Wire name: `payment_method`.
25
+ # @return [Inttegro::Refund::SettlementPaymentMethod]
26
+ #
27
+ # @!attribute [r] type
28
+ # The refund returns to the original payment method used for the order.
29
+ #
30
+ # Required in the API payload. Wire name: `type`.
31
+ # @return [Inttegro::Refund::PaymentMethodSettlementType]
32
+ class PaymentMethodSettlement < T::Struct
33
+ const :payment_method, Inttegro::Refund::SettlementPaymentMethod
34
+ const :type, Inttegro::Refund::PaymentMethodSettlementType
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,24 @@
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 Refund
10
+ # The refund returns to the original payment method used for the order.
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 PaymentMethodSettlementType < T::Enum
17
+ enums do
18
+ # Serialized wire value: `payment_method`.
19
+ # @return [Inttegro::Refund::PaymentMethodSettlementType]
20
+ PAYMENT_METHOD = new("payment_method")
21
+ end
22
+ end
23
+ end
24
+ end
@@ -4,9 +4,12 @@
4
4
  # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
5
 
6
6
  require_relative "base"
7
+ require_relative "../custom_data"
7
8
  require_relative "../money/amount"
9
+ require_relative "failure"
8
10
  require_relative "line_item"
9
11
  require_relative "reason"
12
+ require_relative "settlement"
10
13
  require_relative "status"
11
14
 
12
15
  module Inttegro
@@ -41,7 +44,7 @@ module Inttegro
41
44
  # collection rather than a raw map.
42
45
  #
43
46
  # Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
44
- # @return [Hash{String => String}, nil]
47
+ # @return [Inttegro::CustomData, nil]
45
48
  #
46
49
  # @!attribute [r] failed_at
47
50
  # Omitted unless processing failed.
@@ -49,6 +52,13 @@ module Inttegro
49
52
  # Optional in the API payload; omitted values default to `nil`. Wire name: `failed_at`.
50
53
  # @return [Time, nil]
51
54
  #
55
+ # @!attribute [r] failure
56
+ # Sanitized terminal failure information. Present only when `status` is `failed`. An uncertain
57
+ # provider outcome remains `processing` and does not produce this object.
58
+ #
59
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `failure`.
60
+ # @return [Inttegro::Refund::Failure, nil]
61
+ #
52
62
  # @!attribute [r] id
53
63
  # Value of the `id` field in the Inttegro API payload.
54
64
  #
@@ -97,6 +107,13 @@ module Inttegro
97
107
  # Optional in the API payload; omitted values default to `nil`. Wire name: `reference`.
98
108
  # @return [String, nil]
99
109
  #
110
+ # @!attribute [r] settlement
111
+ # Immutable destination snapshot for the refund. `payment_method` returns money to the
112
+ # original payment method; `offline` records settlement for an order paid outside Inttegro.
113
+ #
114
+ # Required in the API payload. Wire name: `settlement`.
115
+ # @return [Inttegro::Refund::Settlement]
116
+ #
100
117
  # @!attribute [r] status
101
118
  # Value of the `status` field in the Inttegro API payload.
102
119
  #
@@ -118,8 +135,9 @@ module Inttegro
118
135
  const :cancel_reason, T.nilable(String), default: nil
119
136
  const :canceled_at, T.nilable(Time), default: nil
120
137
  const :created_at, Time
121
- const :custom_data, T.nilable(T::Hash[String, String]), default: nil
138
+ const :custom_data, T.nilable(Inttegro::CustomData), default: nil
122
139
  const :failed_at, T.nilable(Time), default: nil
140
+ const :failure, T.nilable(Inttegro::Refund::Failure), default: nil
123
141
  const :id, String
124
142
  const :line_items, T::Array[Inttegro::Refund::LineItem]
125
143
  const :order_id, String
@@ -128,6 +146,7 @@ module Inttegro
128
146
  const :reason, Inttegro::Refund::Reason
129
147
  const :reason_details, T.nilable(String), default: nil
130
148
  const :reference, T.nilable(String), default: nil
149
+ const :settlement, Inttegro::Refund::Settlement
131
150
  const :status, Inttegro::Refund::Status
132
151
  const :succeeded_at, T.nilable(Time), default: nil
133
152
  const :total, Inttegro::Money::Amount
@@ -0,0 +1,19 @@
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 "offline_settlement"
8
+ require_relative "payment_method_settlement"
9
+
10
+ module Inttegro
11
+ class Refund
12
+ # Immutable destination snapshot for the refund. `payment_method` returns money to the
13
+ # original payment method; `offline` records settlement for an order paid outside Inttegro.
14
+ #
15
+ # @api public
16
+ # @return [Inttegro::Refund::OfflineSettlement, Inttegro::Refund::PaymentMethodSettlement]
17
+ Settlement = T.type_alias { T.any(Inttegro::Refund::OfflineSettlement, Inttegro::Refund::PaymentMethodSettlement) }
18
+ end
19
+ end
@@ -0,0 +1,44 @@
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 "settlement_bank_account_payment_method_bank_account"
8
+ require_relative "settlement_bank_account_payment_method_type"
9
+
10
+ module Inttegro
11
+ class Refund
12
+ # Typed representation of the settlement bank account payment method object in the Inttegro
13
+ # API.
14
+ #
15
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
16
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
17
+ # field names and serialized enum values.
18
+ #
19
+ # @api public
20
+ #
21
+ # @!attribute [r] bank_account
22
+ # Value of the `bank_account` field in the Inttegro API payload.
23
+ #
24
+ # Required in the API payload. Wire name: `bank_account`.
25
+ # @return [Inttegro::Refund::SettlementBankAccountPaymentMethodBankAccount]
26
+ #
27
+ # @!attribute [r] id
28
+ # Public identifier of the original payment method.
29
+ #
30
+ # Required in the API payload. Wire name: `id`.
31
+ # @return [String]
32
+ #
33
+ # @!attribute [r] type
34
+ # Value of the `type` field in the Inttegro API payload.
35
+ #
36
+ # Required in the API payload. Wire name: `type`.
37
+ # @return [Inttegro::Refund::SettlementBankAccountPaymentMethodType]
38
+ class SettlementBankAccountPaymentMethod < T::Struct
39
+ const :bank_account, Inttegro::Refund::SettlementBankAccountPaymentMethodBankAccount
40
+ const :id, String
41
+ const :type, Inttegro::Refund::SettlementBankAccountPaymentMethodType
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,37 @@
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 "../bank_account/type"
8
+ require_relative "settlement_bank_account_payment_method_bank_account_ghana_bank_account"
9
+
10
+ module Inttegro
11
+ class Refund
12
+ # Typed representation of the settlement bank account payment method bank account object in
13
+ # the Inttegro API.
14
+ #
15
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
16
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
17
+ # field names and serialized enum values.
18
+ #
19
+ # @api public
20
+ #
21
+ # @!attribute [r] ghana_bank_account
22
+ # Value of the `ghana_bank_account` field in the Inttegro API payload.
23
+ #
24
+ # Required in the API payload. Wire name: `ghana_bank_account`.
25
+ # @return [Inttegro::Refund::SettlementBankAccountPaymentMethodBankAccountGhanaBankAccount]
26
+ #
27
+ # @!attribute [r] type
28
+ # Value of the `type` field in the Inttegro API payload.
29
+ #
30
+ # Required in the API payload. Wire name: `type`.
31
+ # @return [Inttegro::BankAccount::Type]
32
+ class SettlementBankAccountPaymentMethodBankAccount < T::Struct
33
+ const :ghana_bank_account, Inttegro::Refund::SettlementBankAccountPaymentMethodBankAccountGhanaBankAccount
34
+ const :type, Inttegro::BankAccount::Type
35
+ end
36
+ end
37
+ 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
+
8
+ module Inttegro
9
+ class Refund
10
+ # Typed representation of the settlement bank account payment method bank account ghana bank
11
+ # account 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] account_number
20
+ # Masked bank-account number. The full number is never returned.
21
+ #
22
+ # Required in the API payload. Wire name: `account_number`.
23
+ # @return [String]
24
+ #
25
+ # @!attribute [r] last4
26
+ # Last four numeric digits of the original bank-account number.
27
+ #
28
+ # Required in the API payload. Wire name: `last4`.
29
+ # @return [String]
30
+ class SettlementBankAccountPaymentMethodBankAccountGhanaBankAccount < T::Struct
31
+ const :account_number, String
32
+ const :last4, String
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,25 @@
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 Refund
10
+ # String-backed values accepted by the Inttegro API for
11
+ # Inttegro::Refund::SettlementBankAccountPaymentMethodType.
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 SettlementBankAccountPaymentMethodType < T::Enum
18
+ enums do
19
+ # Serialized wire value: `bank_account`.
20
+ # @return [Inttegro::Refund::SettlementBankAccountPaymentMethodType]
21
+ BANK_ACCOUNT = new("bank_account")
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,44 @@
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 "settlement_mobile_money_payment_method_mobile_money"
8
+ require_relative "settlement_mobile_money_payment_method_type"
9
+
10
+ module Inttegro
11
+ class Refund
12
+ # Typed representation of the settlement mobile money payment method object in the Inttegro
13
+ # API.
14
+ #
15
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
16
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
17
+ # field names and serialized enum values.
18
+ #
19
+ # @api public
20
+ #
21
+ # @!attribute [r] id
22
+ # Public identifier of the original payment method.
23
+ #
24
+ # Required in the API payload. Wire name: `id`.
25
+ # @return [String]
26
+ #
27
+ # @!attribute [r] mobile_money
28
+ # Value of the `mobile_money` field in the Inttegro API payload.
29
+ #
30
+ # Required in the API payload. Wire name: `mobile_money`.
31
+ # @return [Inttegro::Refund::SettlementMobileMoneyPaymentMethodMobileMoney]
32
+ #
33
+ # @!attribute [r] type
34
+ # Value of the `type` field in the Inttegro API payload.
35
+ #
36
+ # Required in the API payload. Wire name: `type`.
37
+ # @return [Inttegro::Refund::SettlementMobileMoneyPaymentMethodType]
38
+ class SettlementMobileMoneyPaymentMethod < T::Struct
39
+ const :id, String
40
+ const :mobile_money, Inttegro::Refund::SettlementMobileMoneyPaymentMethodMobileMoney
41
+ const :type, Inttegro::Refund::SettlementMobileMoneyPaymentMethodType
42
+ end
43
+ end
44
+ end
@@ -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 "../shared/mobile_money_network"
8
+
9
+ module Inttegro
10
+ class Refund
11
+ # Typed representation of the settlement mobile money payment method mobile money object in
12
+ # the Inttegro API.
13
+ #
14
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
15
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
16
+ # field names and serialized enum values.
17
+ #
18
+ # @api public
19
+ #
20
+ # @!attribute [r] account_number
21
+ # Masked mobile-money account number. The full number is never returned.
22
+ #
23
+ # Required in the API payload. Wire name: `account_number`.
24
+ # @return [String]
25
+ #
26
+ # @!attribute [r] last4
27
+ # Last four numeric digits of the original account number.
28
+ #
29
+ # Required in the API payload. Wire name: `last4`.
30
+ # @return [String]
31
+ #
32
+ # @!attribute [r] network
33
+ # Value of the `network` field in the Inttegro API payload.
34
+ #
35
+ # Required in the API payload. Wire name: `network`.
36
+ # @return [Inttegro::Shared::MobileMoneyNetwork]
37
+ class SettlementMobileMoneyPaymentMethodMobileMoney < T::Struct
38
+ const :account_number, String
39
+ const :last4, String
40
+ const :network, Inttegro::Shared::MobileMoneyNetwork
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,25 @@
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 Refund
10
+ # String-backed values accepted by the Inttegro API for
11
+ # Inttegro::Refund::SettlementMobileMoneyPaymentMethodType.
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 SettlementMobileMoneyPaymentMethodType < T::Enum
18
+ enums do
19
+ # Serialized wire value: `mobile_money`.
20
+ # @return [Inttegro::Refund::SettlementMobileMoneyPaymentMethodType]
21
+ MOBILE_MONEY = new("mobile_money")
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,19 @@
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 "settlement_bank_account_payment_method"
8
+ require_relative "settlement_mobile_money_payment_method"
9
+
10
+ module Inttegro
11
+ class Refund
12
+ # Caller-safe immutable snapshot of the original payment method. Account values are masked and
13
+ # management-only payment-method data is never included.
14
+ #
15
+ # @api public
16
+ # @return [Inttegro::Refund::SettlementMobileMoneyPaymentMethod, Inttegro::Refund::SettlementBankAccountPaymentMethod]
17
+ SettlementPaymentMethod = T.type_alias { T.any(Inttegro::Refund::SettlementMobileMoneyPaymentMethod, Inttegro::Refund::SettlementBankAccountPaymentMethod) }
18
+ end
19
+ end
@@ -4,6 +4,7 @@
4
4
  # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
5
 
6
6
  require_relative "base"
7
+ require_relative "../custom_data"
7
8
  require_relative "../money/amount_params"
8
9
 
9
10
  module Inttegro
@@ -45,7 +46,7 @@ module Inttegro
45
46
  # collection rather than a raw map.
46
47
  #
47
48
  # Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
48
- # @return [Hash{String => String}, nil]
49
+ # @return [Inttegro::CustomData, nil]
49
50
  #
50
51
  # @!attribute [r] amount
51
52
  # Value of the `amount` field in the Inttegro API payload.
@@ -57,7 +58,7 @@ module Inttegro
57
58
  const :label, T.nilable(String), default: nil
58
59
  const :tax_code, T.nilable(String), default: nil
59
60
  const :description, T.nilable(String), default: nil
60
- const :custom_data, T.nilable(T::Hash[String, String]), default: nil
61
+ const :custom_data, T.nilable(Inttegro::CustomData), default: nil
61
62
  const :amount, Inttegro::Money::AmountParams
62
63
  end
63
64
  end
@@ -4,6 +4,7 @@
4
4
  # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
5
 
6
6
  require_relative "base"
7
+ require_relative "../custom_data"
7
8
 
8
9
  module Inttegro
9
10
  module Shared
@@ -40,12 +41,12 @@ module Inttegro
40
41
  # collection rather than a raw map.
41
42
  #
42
43
  # Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
43
- # @return [Hash{String => String}, nil]
44
+ # @return [Inttegro::CustomData, nil]
44
45
  class InvoiceSettings < T::Struct
45
46
  const :number, T.nilable(String), default: nil
46
47
  const :memo, T.nilable(String), default: nil
47
48
  const :footer, T.nilable(String), default: nil
48
- const :custom_data, T.nilable(T::Hash[String, String]), default: nil
49
+ const :custom_data, T.nilable(Inttegro::CustomData), default: nil
49
50
  end
50
51
  end
51
52
  end
@@ -4,6 +4,7 @@
4
4
  # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
5
 
6
6
  require_relative "base"
7
+ require_relative "../custom_data"
7
8
  require_relative "../money/amount_params"
8
9
 
9
10
  module Inttegro
@@ -33,7 +34,7 @@ module Inttegro
33
34
  # collection rather than a raw map.
34
35
  #
35
36
  # Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
36
- # @return [Hash{String => String}, nil]
37
+ # @return [Inttegro::CustomData, nil]
37
38
  #
38
39
  # @!attribute [r] fee
39
40
  # Value of the `fee` field in the Inttegro API payload.
@@ -43,7 +44,7 @@ module Inttegro
43
44
  class ShippingDetails < T::Struct
44
45
  const :id, T.nilable(String), default: nil
45
46
  const :tax_code, T.nilable(String), default: nil
46
- const :custom_data, T.nilable(T::Hash[String, String]), default: nil
47
+ const :custom_data, T.nilable(Inttegro::CustomData), default: nil
47
48
  const :fee, Inttegro::Money::AmountParams
48
49
  end
49
50
  end
@@ -4,6 +4,7 @@
4
4
  # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
5
 
6
6
  require_relative "base"
7
+ require_relative "../custom_data"
7
8
  require_relative "../file/actor_input"
8
9
  require_relative "../file/party"
9
10
  require_relative "../file/resource"
@@ -74,7 +75,7 @@ module Inttegro
74
75
  # collection rather than a raw map.
75
76
  #
76
77
  # Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
77
- # @return [Hash{String => String}, nil]
78
+ # @return [Inttegro::CustomData, nil]
78
79
  #
79
80
  # @!attribute [r] expires_at
80
81
  # Value of the `expires_at` field in the Inttegro API payload.
@@ -90,7 +91,7 @@ module Inttegro
90
91
  const :resource, T.nilable(Inttegro::File::Resource), default: nil
91
92
  const :requester, T.nilable(Inttegro::File::ActorInput), default: nil
92
93
  const :attempts, T.nilable(Inttegro::UploadRequest::AttemptsRequest), default: nil
93
- const :custom_data, T.nilable(T::Hash[String, String]), default: nil
94
+ const :custom_data, T.nilable(Inttegro::CustomData), default: nil
94
95
  const :expires_at, T.nilable(Time), default: nil
95
96
  end
96
97
  end
@@ -4,6 +4,7 @@
4
4
  # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
5
 
6
6
  require_relative "base"
7
+ require_relative "../custom_data"
7
8
  require_relative "../file/party"
8
9
  require_relative "../file/resource"
9
10
  require_relative "actor"
@@ -119,7 +120,7 @@ module Inttegro
119
120
  # collection rather than a raw map.
120
121
  #
121
122
  # Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
122
- # @return [Hash{String => String}, nil]
123
+ # @return [Inttegro::CustomData, nil]
123
124
  #
124
125
  # @!attribute [r] metadata
125
126
  # System-managed string metadata attached to a file resource.
@@ -190,7 +191,7 @@ module Inttegro
190
191
  const :attempts, Inttegro::UploadRequest::Attempts
191
192
  const :latest_error, T.nilable(Inttegro::UploadRequest::LatestError), default: nil
192
193
  const :canceled_by, T.nilable(Inttegro::UploadRequest::Actor), default: nil
193
- const :custom_data, T.nilable(T::Hash[String, String]), default: nil
194
+ const :custom_data, T.nilable(Inttegro::CustomData), default: nil
194
195
  const :metadata, T.nilable(T::Hash[String, String]), default: nil
195
196
  const :created_at, Time
196
197
  const :updated_at, Time