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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/inttegro/chime/chime.rb +3 -2
- data/lib/inttegro/chime/send_request.rb +3 -2
- data/lib/inttegro/custom_data.rb +132 -0
- data/lib/inttegro/customer/create_request.rb +3 -2
- data/lib/inttegro/customer/customer.rb +3 -2
- data/lib/inttegro/customer/data.rb +3 -2
- data/lib/inttegro/customer/update_request.rb +3 -2
- data/lib/inttegro/file/file.rb +3 -2
- data/lib/inttegro/file_link/create_request.rb +3 -2
- data/lib/inttegro/file_link/file_link.rb +3 -2
- data/lib/inttegro/financial_account/bank_request.rb +3 -2
- data/lib/inttegro/financial_account/connected.rb +3 -2
- data/lib/inttegro/financial_account/created.rb +3 -2
- data/lib/inttegro/financial_account/details.rb +3 -2
- data/lib/inttegro/financial_account/dosh_request.rb +3 -2
- data/lib/inttegro/financial_account/financial_account.rb +3 -2
- data/lib/inttegro/financial_account/request_base.rb +3 -2
- data/lib/inttegro/financial_account/update_request.rb +3 -2
- data/lib/inttegro/financial_account/updated.rb +3 -2
- data/lib/inttegro/financial_account/wallet_request.rb +3 -2
- data/lib/inttegro/financial_account/wire_page_accounts_item.rb +3 -2
- data/lib/inttegro/generated/enums.rb +5 -0
- data/lib/inttegro/generated/models.rb +10 -0
- data/lib/inttegro/model_serialization.rb +30 -1
- data/lib/inttegro/order/create_existing_customer.rb +3 -2
- data/lib/inttegro/order/create_new_customer.rb +3 -2
- data/lib/inttegro/order/order.rb +3 -2
- data/lib/inttegro/order/product_line_item_product.rb +3 -2
- data/lib/inttegro/order/update_request.rb +3 -2
- data/lib/inttegro/payment_method/payment_method.rb +14 -2
- data/lib/inttegro/payment_method/tokenize_base.rb +3 -2
- data/lib/inttegro/payment_method/tokenize_mobile_money_request.rb +3 -2
- data/lib/inttegro/payment_method/update_request.rb +3 -2
- data/lib/inttegro/payout/payout.rb +3 -2
- data/lib/inttegro/price/embedded_product.rb +3 -2
- data/lib/inttegro/product/create_request.rb +3 -2
- data/lib/inttegro/product/inline_details.rb +3 -2
- data/lib/inttegro/product/product.rb +3 -2
- data/lib/inttegro/product/update_request.rb +3 -2
- data/lib/inttegro/product/updated.rb +3 -2
- data/lib/inttegro/purchase_intent/product.rb +3 -2
- data/lib/inttegro/refund/create_request.rb +3 -2
- data/lib/inttegro/refund/failure.rb +45 -0
- data/lib/inttegro/refund/failure_reason.rb +49 -0
- data/lib/inttegro/refund/offline_settlement.rb +28 -0
- data/lib/inttegro/refund/offline_settlement_type.rb +24 -0
- data/lib/inttegro/refund/payment_method_settlement.rb +37 -0
- data/lib/inttegro/refund/payment_method_settlement_type.rb +24 -0
- data/lib/inttegro/refund/refund.rb +21 -2
- data/lib/inttegro/refund/settlement.rb +19 -0
- data/lib/inttegro/refund/settlement_bank_account_payment_method.rb +44 -0
- data/lib/inttegro/refund/settlement_bank_account_payment_method_bank_account.rb +37 -0
- data/lib/inttegro/refund/settlement_bank_account_payment_method_bank_account_ghana_bank_account.rb +35 -0
- data/lib/inttegro/refund/settlement_bank_account_payment_method_type.rb +25 -0
- data/lib/inttegro/refund/settlement_mobile_money_payment_method.rb +44 -0
- data/lib/inttegro/refund/settlement_mobile_money_payment_method_mobile_money.rb +43 -0
- data/lib/inttegro/refund/settlement_mobile_money_payment_method_type.rb +25 -0
- data/lib/inttegro/refund/settlement_payment_method.rb +19 -0
- data/lib/inttegro/shared/fee_details.rb +3 -2
- data/lib/inttegro/shared/invoice_settings.rb +3 -2
- data/lib/inttegro/shared/shipping_details.rb +3 -2
- data/lib/inttegro/upload_request/create_request.rb +3 -2
- data/lib/inttegro/upload_request/details.rb +3 -2
- data/lib/inttegro/upload_request/upload_request.rb +3 -2
- data/lib/inttegro/version.rb +1 -1
- data/lib/inttegro.rb +1 -0
- metadata +18 -2
|
@@ -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 "type"
|
|
8
9
|
|
|
9
10
|
module Inttegro
|
|
@@ -69,7 +70,7 @@ module Inttegro
|
|
|
69
70
|
# collection rather than a raw map.
|
|
70
71
|
#
|
|
71
72
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
72
|
-
# @return [
|
|
73
|
+
# @return [Inttegro::CustomData, nil]
|
|
73
74
|
class WirePageAccountsItem < T::Struct
|
|
74
75
|
const :id, T.nilable(String), default: nil
|
|
75
76
|
const :type, T.nilable(Inttegro::FinancialAccount::Type), default: nil
|
|
@@ -79,7 +80,7 @@ module Inttegro
|
|
|
79
80
|
const :reference, T.nilable(String), default: nil
|
|
80
81
|
const :created_at, T.nilable(Time), default: nil
|
|
81
82
|
const :archived_at, T.nilable(Time), default: nil
|
|
82
|
-
const :custom_data, T.nilable(
|
|
83
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
83
84
|
end
|
|
84
85
|
end
|
|
85
86
|
end
|
|
@@ -67,7 +67,12 @@ require_relative "../product/shipment_input_type"
|
|
|
67
67
|
require_relative "../product/shipment_type"
|
|
68
68
|
require_relative "../product/type"
|
|
69
69
|
require_relative "../purchase_intent/status"
|
|
70
|
+
require_relative "../refund/failure_reason"
|
|
71
|
+
require_relative "../refund/offline_settlement_type"
|
|
72
|
+
require_relative "../refund/payment_method_settlement_type"
|
|
70
73
|
require_relative "../refund/reason"
|
|
74
|
+
require_relative "../refund/settlement_bank_account_payment_method_type"
|
|
75
|
+
require_relative "../refund/settlement_mobile_money_payment_method_type"
|
|
71
76
|
require_relative "../refund/status"
|
|
72
77
|
require_relative "../secret_key/auth_result"
|
|
73
78
|
require_relative "../secret_key/status"
|
|
@@ -144,7 +144,17 @@ require_relative "../order/customer"
|
|
|
144
144
|
require_relative "../order/document_format"
|
|
145
145
|
require_relative "../order/invoice_format"
|
|
146
146
|
require_relative "../order/invoice"
|
|
147
|
+
require_relative "../refund/failure"
|
|
147
148
|
require_relative "../refund/line_item"
|
|
149
|
+
require_relative "../refund/offline_settlement"
|
|
150
|
+
require_relative "../refund/settlement_mobile_money_payment_method_mobile_money"
|
|
151
|
+
require_relative "../refund/settlement_mobile_money_payment_method"
|
|
152
|
+
require_relative "../refund/settlement_bank_account_payment_method_bank_account_ghana_bank_account"
|
|
153
|
+
require_relative "../refund/settlement_bank_account_payment_method_bank_account"
|
|
154
|
+
require_relative "../refund/settlement_bank_account_payment_method"
|
|
155
|
+
require_relative "../refund/settlement_payment_method"
|
|
156
|
+
require_relative "../refund/payment_method_settlement"
|
|
157
|
+
require_relative "../refund/settlement"
|
|
148
158
|
require_relative "../refund/refund"
|
|
149
159
|
require_relative "../shared/invoice_settings"
|
|
150
160
|
require_relative "../price/price"
|
|
@@ -44,7 +44,9 @@ module Inttegro
|
|
|
44
44
|
data = stringify_json_keys(value, decode_timestamps: true)
|
|
45
45
|
raise TypeError, "expected an object for #{klass}, got #{data.class}" unless data.is_a?(Hash)
|
|
46
46
|
|
|
47
|
-
T.cast(klass, T.class_of(T::Struct)).from_hash(data)
|
|
47
|
+
model = T.cast(klass, T.class_of(T::Struct)).from_hash(data)
|
|
48
|
+
wrap_response_custom_data(model)
|
|
49
|
+
model
|
|
48
50
|
end
|
|
49
51
|
|
|
50
52
|
sig { params(value: Object, decode_timestamps: T::Boolean).returns(Object) }
|
|
@@ -56,6 +58,8 @@ module Inttegro
|
|
|
56
58
|
# @api private
|
|
57
59
|
def self.stringify_json_keys(value, decode_timestamps: false)
|
|
58
60
|
case value
|
|
61
|
+
when CustomData, CustomDataInput, CustomDataPatch
|
|
62
|
+
value
|
|
59
63
|
when T::Struct
|
|
60
64
|
stringify_json_keys(value.serialize, decode_timestamps: decode_timestamps)
|
|
61
65
|
when T::Enum
|
|
@@ -82,4 +86,29 @@ module Inttegro
|
|
|
82
86
|
end
|
|
83
87
|
end
|
|
84
88
|
private_class_method :stringify_json_keys
|
|
89
|
+
|
|
90
|
+
sig { params(value: Object).returns(Object) }
|
|
91
|
+
def self.wrap_response_custom_data(value)
|
|
92
|
+
case value
|
|
93
|
+
when T::Struct
|
|
94
|
+
raw = value.instance_variable_get(:@custom_data)
|
|
95
|
+
if raw.is_a?(Hash) && !raw.is_a?(CustomData)
|
|
96
|
+
value.instance_variable_set(
|
|
97
|
+
:@custom_data,
|
|
98
|
+
CustomData.new(raw)
|
|
99
|
+
)
|
|
100
|
+
end
|
|
101
|
+
value.instance_variables.each do |variable|
|
|
102
|
+
next if variable == :@custom_data
|
|
103
|
+
|
|
104
|
+
wrap_response_custom_data(value.instance_variable_get(variable))
|
|
105
|
+
end
|
|
106
|
+
when Array
|
|
107
|
+
value.each { |item| wrap_response_custom_data(item) }
|
|
108
|
+
when Hash
|
|
109
|
+
value.each_value { |item| wrap_response_custom_data(item) }
|
|
110
|
+
end
|
|
111
|
+
value
|
|
112
|
+
end
|
|
113
|
+
private_class_method :wrap_response_custom_data
|
|
85
114
|
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 "../payment_method/data"
|
|
8
9
|
require_relative "../shared/billing_details"
|
|
9
10
|
require_relative "../shared/invoice_settings"
|
|
@@ -112,7 +113,7 @@ module Inttegro
|
|
|
112
113
|
# collection rather than a raw map.
|
|
113
114
|
#
|
|
114
115
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
115
|
-
# @return [
|
|
116
|
+
# @return [Inttegro::CustomData, nil]
|
|
116
117
|
#
|
|
117
118
|
# @!attribute [r] billing_details
|
|
118
119
|
# Value of the `billing_details` field in the Inttegro API payload.
|
|
@@ -139,7 +140,7 @@ module Inttegro
|
|
|
139
140
|
const :invoice_settings, T.nilable(Inttegro::Shared::InvoiceSettings), default: nil
|
|
140
141
|
const :payout_settings, T.nilable(Inttegro::Order::PayoutSettingsRequest), default: nil
|
|
141
142
|
const :line_items, T::Array[Inttegro::Shared::LineItem]
|
|
142
|
-
const :custom_data, T.nilable(
|
|
143
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
143
144
|
const :billing_details, T.nilable(Inttegro::Shared::BillingDetails), default: nil
|
|
144
145
|
const :shipping, T.nilable(Inttegro::Shared::Shipping), default: nil
|
|
145
146
|
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 "../customer/data"
|
|
8
9
|
require_relative "../payment_method/data"
|
|
9
10
|
require_relative "../shared/billing_details"
|
|
@@ -114,7 +115,7 @@ module Inttegro
|
|
|
114
115
|
# collection rather than a raw map.
|
|
115
116
|
#
|
|
116
117
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
117
|
-
# @return [
|
|
118
|
+
# @return [Inttegro::CustomData, nil]
|
|
118
119
|
#
|
|
119
120
|
# @!attribute [r] billing_details
|
|
120
121
|
# Value of the `billing_details` field in the Inttegro API payload.
|
|
@@ -141,7 +142,7 @@ module Inttegro
|
|
|
141
142
|
const :invoice_settings, T.nilable(Inttegro::Shared::InvoiceSettings), default: nil
|
|
142
143
|
const :payout_settings, T.nilable(Inttegro::Order::PayoutSettingsRequest), default: nil
|
|
143
144
|
const :line_items, T::Array[Inttegro::Shared::LineItem]
|
|
144
|
-
const :custom_data, T.nilable(
|
|
145
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
145
146
|
const :billing_details, T.nilable(Inttegro::Shared::BillingDetails), default: nil
|
|
146
147
|
const :shipping, T.nilable(Inttegro::Shared::Shipping), default: nil
|
|
147
148
|
end
|
data/lib/inttegro/order/order.rb
CHANGED
|
@@ -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 "../payment/payment"
|
|
8
9
|
require_relative "../refund/refund"
|
|
9
10
|
require_relative "../shared/invoice_settings"
|
|
@@ -53,7 +54,7 @@ module Inttegro
|
|
|
53
54
|
# collection rather than a raw map.
|
|
54
55
|
#
|
|
55
56
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
56
|
-
# @return [
|
|
57
|
+
# @return [Inttegro::CustomData, nil]
|
|
57
58
|
#
|
|
58
59
|
# @!attribute [r] customer
|
|
59
60
|
# Value of the `customer` field in the Inttegro API payload.
|
|
@@ -156,7 +157,7 @@ module Inttegro
|
|
|
156
157
|
const :checkout_settings, T.nilable(Inttegro::Order::CheckoutSettings), default: nil
|
|
157
158
|
const :completed_at, T.nilable(Time), default: nil
|
|
158
159
|
const :created_from, T.nilable(Inttegro::Order::CreatedFrom), default: nil
|
|
159
|
-
const :custom_data, T.nilable(
|
|
160
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
160
161
|
const :customer, Inttegro::Order::Customer
|
|
161
162
|
const :expires_at, T.nilable(Time), default: nil
|
|
162
163
|
const :id, String
|
|
@@ -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 "../price/price"
|
|
8
9
|
|
|
9
10
|
module Inttegro
|
|
@@ -51,7 +52,7 @@ module Inttegro
|
|
|
51
52
|
# collection rather than a raw map.
|
|
52
53
|
#
|
|
53
54
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
54
|
-
# @return [
|
|
55
|
+
# @return [Inttegro::CustomData, nil]
|
|
55
56
|
#
|
|
56
57
|
# @!attribute [r] tax_code
|
|
57
58
|
# Value of the `tax_code` field in the Inttegro API payload.
|
|
@@ -94,7 +95,7 @@ module Inttegro
|
|
|
94
95
|
const :price_id, T.nilable(String), default: nil
|
|
95
96
|
const :reference, T.nilable(String), default: nil
|
|
96
97
|
const :about, T.nilable(String), default: nil
|
|
97
|
-
const :custom_data, T.nilable(
|
|
98
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
98
99
|
const :tax_code, T.nilable(String), default: nil
|
|
99
100
|
const :name, String
|
|
100
101
|
const :category, T.nilable(String), default: nil
|
|
@@ -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 "../shared/invoice_settings"
|
|
8
9
|
require_relative "../shared/line_item"
|
|
9
10
|
require_relative "update_request_payment_method_data"
|
|
@@ -30,7 +31,7 @@ module Inttegro
|
|
|
30
31
|
# collection rather than a raw map.
|
|
31
32
|
#
|
|
32
33
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
33
|
-
# @return [
|
|
34
|
+
# @return [Inttegro::CustomData, nil]
|
|
34
35
|
#
|
|
35
36
|
# @!attribute [r] invoice_settings
|
|
36
37
|
# Order-level invoice rendering data. Pages uses this data when rendering invoice web and
|
|
@@ -101,7 +102,7 @@ module Inttegro
|
|
|
101
102
|
# @return [String, nil]
|
|
102
103
|
class UpdateRequest < T::Struct
|
|
103
104
|
const :clear_payment_method, T.nilable(T::Boolean), default: nil
|
|
104
|
-
const :custom_data, T.nilable(
|
|
105
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
105
106
|
const :invoice_settings, T.nilable(Inttegro::Shared::InvoiceSettings), default: nil
|
|
106
107
|
const :finalize, T.nilable(T::Boolean), default: nil
|
|
107
108
|
const :line_items, T.nilable(T::Array[Inttegro::Shared::LineItem]), default: nil
|
|
@@ -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 "bank_account"
|
|
8
9
|
require_relative "card"
|
|
9
10
|
require_relative "mobile_money"
|
|
@@ -56,7 +57,7 @@ module Inttegro
|
|
|
56
57
|
# collection rather than a raw map.
|
|
57
58
|
#
|
|
58
59
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
59
|
-
# @return [
|
|
60
|
+
# @return [Inttegro::CustomData, nil]
|
|
60
61
|
#
|
|
61
62
|
# @!attribute [r] customer_id
|
|
62
63
|
# Customer who owns this payment method
|
|
@@ -76,6 +77,16 @@ module Inttegro
|
|
|
76
77
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `expires_on`.
|
|
77
78
|
# @return [Time, nil]
|
|
78
79
|
#
|
|
80
|
+
# @!attribute [r] fingerprint
|
|
81
|
+
# Customer-scoped fingerprint for this payment method within the merchant application.
|
|
82
|
+
# Matching nonempty values for the same customer indicate the same underlying method was added
|
|
83
|
+
# more than once. May be empty for records awaiting fingerprint backfill or methods lacking
|
|
84
|
+
# reliable fingerprint material. It does not identify the method across customers or
|
|
85
|
+
# applications.
|
|
86
|
+
#
|
|
87
|
+
# Required in the API payload. Wire name: `fingerprint`.
|
|
88
|
+
# @return [String]
|
|
89
|
+
#
|
|
79
90
|
# @!attribute [r] id
|
|
80
91
|
# Unique identifier for this payment method
|
|
81
92
|
#
|
|
@@ -123,10 +134,11 @@ module Inttegro
|
|
|
123
134
|
const :bank_account, T.nilable(Inttegro::PaymentMethod::BankAccount), default: nil
|
|
124
135
|
const :card, T.nilable(Inttegro::PaymentMethod::Card), default: nil
|
|
125
136
|
const :created_at, Time
|
|
126
|
-
const :custom_data, T.nilable(
|
|
137
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
127
138
|
const :customer_id, String
|
|
128
139
|
const :ephemeral, T.nilable(T::Boolean), default: nil
|
|
129
140
|
const :expires_on, T.nilable(Time), default: nil
|
|
141
|
+
const :fingerprint, String
|
|
130
142
|
const :id, String
|
|
131
143
|
const :mobile_money, T.nilable(Inttegro::PaymentMethod::MobileMoney), default: nil
|
|
132
144
|
const :owner, T.nilable(Inttegro::PaymentMethod::Owner), default: nil
|
|
@@ -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 "tokenize_base_type"
|
|
8
9
|
|
|
9
10
|
module Inttegro
|
|
@@ -27,7 +28,7 @@ module Inttegro
|
|
|
27
28
|
# collection rather than a raw map.
|
|
28
29
|
#
|
|
29
30
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
30
|
-
# @return [
|
|
31
|
+
# @return [Inttegro::CustomData, nil]
|
|
31
32
|
#
|
|
32
33
|
# @!attribute [r] type
|
|
33
34
|
# Value of the `type` field in the Inttegro API payload.
|
|
@@ -36,7 +37,7 @@ module Inttegro
|
|
|
36
37
|
# @return [Inttegro::PaymentMethod::TokenizeBaseType]
|
|
37
38
|
class TokenizeBase < T::Struct
|
|
38
39
|
const :customer_id, String
|
|
39
|
-
const :custom_data, T.nilable(
|
|
40
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
40
41
|
const :type, Inttegro::PaymentMethod::TokenizeBaseType
|
|
41
42
|
end
|
|
42
43
|
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 "owner_input"
|
|
8
9
|
require_relative "tokenize_mobile_money_request_mobile_money"
|
|
9
10
|
require_relative "tokenize_mobile_money_request_type"
|
|
@@ -29,7 +30,7 @@ module Inttegro
|
|
|
29
30
|
# collection rather than a raw map.
|
|
30
31
|
#
|
|
31
32
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
32
|
-
# @return [
|
|
33
|
+
# @return [Inttegro::CustomData, nil]
|
|
33
34
|
#
|
|
34
35
|
# @!attribute [r] type
|
|
35
36
|
# Value of the `type` field in the Inttegro API payload.
|
|
@@ -50,7 +51,7 @@ module Inttegro
|
|
|
50
51
|
# @return [Inttegro::PaymentMethod::OwnerInput]
|
|
51
52
|
class TokenizeMobileMoneyRequest < T::Struct
|
|
52
53
|
const :customer_id, String
|
|
53
|
-
const :custom_data, T.nilable(
|
|
54
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
54
55
|
const :type, Inttegro::PaymentMethod::TokenizeMobileMoneyRequestType
|
|
55
56
|
const :mobile_money, Inttegro::PaymentMethod::TokenizeMobileMoneyRequestMobileMoney
|
|
56
57
|
const :owner, Inttegro::PaymentMethod::OwnerInput
|
|
@@ -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 "update_request_owner"
|
|
8
9
|
|
|
9
10
|
module Inttegro
|
|
@@ -27,7 +28,7 @@ module Inttegro
|
|
|
27
28
|
# serialized to a string.
|
|
28
29
|
#
|
|
29
30
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
30
|
-
# @return [
|
|
31
|
+
# @return [Inttegro::CustomDataPatch, nil]
|
|
31
32
|
#
|
|
32
33
|
# @!attribute [r] active
|
|
33
34
|
# Set to `true` to activate the payment method or `false` to mark it inactive.
|
|
@@ -48,7 +49,7 @@ module Inttegro
|
|
|
48
49
|
# @return [Inttegro::PaymentMethod::UpdateRequestOwner, nil]
|
|
49
50
|
class UpdateRequest < T::Struct
|
|
50
51
|
const :payment_method_id, String
|
|
51
|
-
const :custom_data, T.nilable(
|
|
52
|
+
const :custom_data, T.nilable(Inttegro::CustomDataPatch), default: nil
|
|
52
53
|
const :active, T.nilable(T::Boolean), default: nil
|
|
53
54
|
const :archived, T.nilable(T::Boolean), default: nil
|
|
54
55
|
const :owner, T.nilable(Inttegro::PaymentMethod::UpdateRequestOwner), default: nil
|
|
@@ -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"
|
|
8
9
|
require_relative "error"
|
|
9
10
|
require_relative "status"
|
|
@@ -40,7 +41,7 @@ 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 [
|
|
44
|
+
# @return [Inttegro::CustomData, nil]
|
|
44
45
|
#
|
|
45
46
|
# @!attribute [r] destination_id
|
|
46
47
|
# Financial account receiving the funds
|
|
@@ -153,7 +154,7 @@ module Inttegro
|
|
|
153
154
|
const :amount, T.nilable(Inttegro::Money::Amount), default: nil
|
|
154
155
|
const :balance_transactions, T.nilable(T::Array[String]), default: nil
|
|
155
156
|
const :canceled_at, T.nilable(Time), default: nil
|
|
156
|
-
const :custom_data, T.nilable(
|
|
157
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
157
158
|
const :destination_id, String
|
|
158
159
|
const :error, T.nilable(Inttegro::Payout::Error), default: nil
|
|
159
160
|
const :execute_after, Time
|
|
@@ -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 "../product/dimensions"
|
|
8
9
|
require_relative "../product/media"
|
|
9
10
|
require_relative "../product/shipment"
|
|
@@ -67,7 +68,7 @@ module Inttegro
|
|
|
67
68
|
# collection rather than a raw map.
|
|
68
69
|
#
|
|
69
70
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
70
|
-
# @return [
|
|
71
|
+
# @return [Inttegro::CustomData, nil]
|
|
71
72
|
#
|
|
72
73
|
# @!attribute [r] description
|
|
73
74
|
# Short description
|
|
@@ -142,7 +143,7 @@ module Inttegro
|
|
|
142
143
|
const :attributes, T.nilable(T::Array[Inttegro::PurchaseIntent::ProductAttributesItem]), default: nil
|
|
143
144
|
const :category, T.nilable(String), default: nil
|
|
144
145
|
const :created_at, Time
|
|
145
|
-
const :custom_data, T.nilable(
|
|
146
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
146
147
|
const :description, T.nilable(String), default: nil
|
|
147
148
|
const :dimensions, T.nilable(Inttegro::Product::Dimensions), default: nil
|
|
148
149
|
const :media, T.nilable(Inttegro::Product::Media), default: nil
|
|
@@ -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 "attribute"
|
|
8
9
|
require_relative "dimensions"
|
|
9
10
|
require_relative "media"
|
|
@@ -103,7 +104,7 @@ module Inttegro
|
|
|
103
104
|
# collection rather than a raw map.
|
|
104
105
|
#
|
|
105
106
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
106
|
-
# @return [
|
|
107
|
+
# @return [Inttegro::CustomData, nil]
|
|
107
108
|
class CreateRequest < T::Struct
|
|
108
109
|
const :type, Inttegro::Product::Type
|
|
109
110
|
const :reference, T.nilable(String), default: nil
|
|
@@ -118,7 +119,7 @@ module Inttegro
|
|
|
118
119
|
const :media, T.nilable(Inttegro::Product::Media), default: nil
|
|
119
120
|
const :attributes, T.nilable(T::Array[Inttegro::Product::Attribute]), default: nil
|
|
120
121
|
const :publish, T.nilable(T::Boolean), default: nil
|
|
121
|
-
const :custom_data, T.nilable(
|
|
122
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
122
123
|
end
|
|
123
124
|
end
|
|
124
125
|
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 "../price/price_params"
|
|
8
9
|
require_relative "type"
|
|
9
10
|
|
|
@@ -28,7 +29,7 @@ module Inttegro
|
|
|
28
29
|
# collection rather than a raw map.
|
|
29
30
|
#
|
|
30
31
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
31
|
-
# @return [
|
|
32
|
+
# @return [Inttegro::CustomData, nil]
|
|
32
33
|
#
|
|
33
34
|
# @!attribute [r] name
|
|
34
35
|
# Product name shown to the customer
|
|
@@ -67,7 +68,7 @@ module Inttegro
|
|
|
67
68
|
# @return [Inttegro::Product::Type]
|
|
68
69
|
class InlineDetails < T::Struct
|
|
69
70
|
const :about, T.nilable(String), default: nil
|
|
70
|
-
const :custom_data, T.nilable(
|
|
71
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
71
72
|
const :name, String
|
|
72
73
|
const :price, Inttegro::Price::PriceParams
|
|
73
74
|
const :quantity, Integer
|
|
@@ -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 "attribute"
|
|
8
9
|
require_relative "dimensions"
|
|
9
10
|
require_relative "media"
|
|
@@ -103,7 +104,7 @@ module Inttegro
|
|
|
103
104
|
# collection rather than a raw map.
|
|
104
105
|
#
|
|
105
106
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
106
|
-
# @return [
|
|
107
|
+
# @return [Inttegro::CustomData, nil]
|
|
107
108
|
#
|
|
108
109
|
# @!attribute [r] active
|
|
109
110
|
# Whether product is published and available
|
|
@@ -154,7 +155,7 @@ module Inttegro
|
|
|
154
155
|
const :media, T.nilable(Inttegro::Product::Media), default: nil
|
|
155
156
|
const :attributes, T.nilable(T::Array[Inttegro::Product::Attribute]), default: nil
|
|
156
157
|
const :dimensions, T.nilable(Inttegro::Product::Dimensions), default: nil
|
|
157
|
-
const :custom_data, T.nilable(
|
|
158
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
158
159
|
const :active, T::Boolean
|
|
159
160
|
const :created_at, Time
|
|
160
161
|
const :updated_at, T.nilable(Time), default: nil
|
|
@@ -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 "attribute"
|
|
8
9
|
require_relative "dimensions"
|
|
9
10
|
require_relative "media"
|
|
@@ -103,7 +104,7 @@ module Inttegro
|
|
|
103
104
|
# collection rather than a raw map.
|
|
104
105
|
#
|
|
105
106
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
106
|
-
# @return [
|
|
107
|
+
# @return [Inttegro::CustomData, nil]
|
|
107
108
|
class UpdateRequest < T::Struct
|
|
108
109
|
const :product_id, String
|
|
109
110
|
const :type, T.nilable(Inttegro::Product::Type), default: nil
|
|
@@ -118,7 +119,7 @@ module Inttegro
|
|
|
118
119
|
const :media, T.nilable(Inttegro::Product::Media), default: nil
|
|
119
120
|
const :images, T.nilable(T::Array[String]), default: nil
|
|
120
121
|
const :attributes, T.nilable(T::Array[Inttegro::Product::Attribute]), default: nil
|
|
121
|
-
const :custom_data, T.nilable(
|
|
122
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
122
123
|
end
|
|
123
124
|
end
|
|
124
125
|
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 "dimensions"
|
|
8
9
|
require_relative "price_summary"
|
|
9
10
|
require_relative "type"
|
|
@@ -71,7 +72,7 @@ module Inttegro
|
|
|
71
72
|
# collection rather than a raw map.
|
|
72
73
|
#
|
|
73
74
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
74
|
-
# @return [
|
|
75
|
+
# @return [Inttegro::CustomData, nil]
|
|
75
76
|
#
|
|
76
77
|
# @!attribute [r] dimensions
|
|
77
78
|
# At most one of `physical`, `digital`, or `custom`.
|
|
@@ -111,7 +112,7 @@ module Inttegro
|
|
|
111
112
|
const :reference, T.nilable(String), default: nil
|
|
112
113
|
const :tax_code, T.nilable(String), default: nil
|
|
113
114
|
const :category, T.nilable(String), default: nil
|
|
114
|
-
const :custom_data, T.nilable(
|
|
115
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
115
116
|
const :dimensions, T.nilable(Inttegro::Product::Dimensions), default: nil
|
|
116
117
|
const :prices, T.nilable(T::Array[Inttegro::Product::PriceSummary]), default: nil
|
|
117
118
|
const :unit_dim, T.nilable(String), default: nil
|
|
@@ -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 "../product/dimensions"
|
|
8
9
|
require_relative "../product/media"
|
|
9
10
|
require_relative "../product/price_summary"
|
|
@@ -68,7 +69,7 @@ module Inttegro
|
|
|
68
69
|
# collection rather than a raw map.
|
|
69
70
|
#
|
|
70
71
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
71
|
-
# @return [
|
|
72
|
+
# @return [Inttegro::CustomData, nil]
|
|
72
73
|
#
|
|
73
74
|
# @!attribute [r] description
|
|
74
75
|
# Short description
|
|
@@ -155,7 +156,7 @@ module Inttegro
|
|
|
155
156
|
const :attributes, T.nilable(T::Array[Inttegro::PurchaseIntent::ProductAttributesItem]), default: nil
|
|
156
157
|
const :category, T.nilable(String), default: nil
|
|
157
158
|
const :created_at, Time
|
|
158
|
-
const :custom_data, T.nilable(
|
|
159
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
159
160
|
const :description, T.nilable(String), default: nil
|
|
160
161
|
const :dimensions, T.nilable(Inttegro::Product::Dimensions), default: nil
|
|
161
162
|
const :media, T.nilable(Inttegro::Product::Media), default: nil
|
|
@@ -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 "create_line_item"
|
|
8
9
|
require_relative "reason"
|
|
9
10
|
require_relative "request_meta"
|
|
@@ -23,7 +24,7 @@ module Inttegro
|
|
|
23
24
|
# collection rather than a raw map.
|
|
24
25
|
#
|
|
25
26
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
26
|
-
# @return [
|
|
27
|
+
# @return [Inttegro::CustomData, nil]
|
|
27
28
|
#
|
|
28
29
|
# @!attribute [r] line_items
|
|
29
30
|
# Value of the `line_items` field in the Inttegro API payload.
|
|
@@ -61,7 +62,7 @@ module Inttegro
|
|
|
61
62
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `request_meta`.
|
|
62
63
|
# @return [Inttegro::Refund::RequestMeta, nil]
|
|
63
64
|
class CreateRequest < T::Struct
|
|
64
|
-
const :custom_data, T.nilable(
|
|
65
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
65
66
|
const :line_items, T::Array[Inttegro::Refund::CreateLineItem]
|
|
66
67
|
const :order_id, String
|
|
67
68
|
const :reason, Inttegro::Refund::Reason
|
|
@@ -0,0 +1,45 @@
|
|
|
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 Refund
|
|
11
|
+
# Typed representation of the failure 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] detail
|
|
20
|
+
# Safe explanation intended for the merchant. Raw provider and internal diagnostic messages
|
|
21
|
+
# are never returned.
|
|
22
|
+
#
|
|
23
|
+
# Required in the API payload. Wire name: `detail`.
|
|
24
|
+
# @return [String]
|
|
25
|
+
#
|
|
26
|
+
# @!attribute [r] reason
|
|
27
|
+
# Stable, caller-safe reason that terminal refund processing failed. `unknown` is the
|
|
28
|
+
# fail-closed fallback for an unclassified internal failure.
|
|
29
|
+
#
|
|
30
|
+
# Required in the API payload. Wire name: `reason`.
|
|
31
|
+
# @return [Inttegro::Refund::FailureReason]
|
|
32
|
+
#
|
|
33
|
+
# @!attribute [r] retryable
|
|
34
|
+
# Whether the underlying condition may be resolved before creating a new, intentional refund
|
|
35
|
+
# request. It never instructs clients to repeat an uncertain money movement.
|
|
36
|
+
#
|
|
37
|
+
# Required in the API payload. Wire name: `retryable`.
|
|
38
|
+
# @return [Boolean]
|
|
39
|
+
class Failure < T::Struct
|
|
40
|
+
const :detail, String
|
|
41
|
+
const :reason, Inttegro::Refund::FailureReason
|
|
42
|
+
const :retryable, T::Boolean
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|