inttegro 7.0.0 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/inttegro/checkout/invoice_view.rb +8 -0
- data/lib/inttegro/checkout/order_line_item_group.rb +23 -0
- data/lib/inttegro/chime/chime.rb +3 -2
- data/lib/inttegro/chime/send_request.rb +12 -2
- data/lib/inttegro/chime/send_request_cooldown.rb +35 -0
- data/lib/inttegro/chime/transport.rb +2 -1
- 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 +17 -1
- data/lib/inttegro/generated/models.rb +36 -0
- data/lib/inttegro/generated/operations.rb +18 -3
- data/lib/inttegro/http_client.rb +1 -1
- data/lib/inttegro/model_serialization.rb +30 -1
- data/lib/inttegro/order/create_existing_customer.rb +26 -2
- data/lib/inttegro/order/create_new_customer.rb +26 -2
- data/lib/inttegro/order/document_delivery_attempt.rb +7 -0
- data/lib/inttegro/order/document_delivery_channel_summary.rb +34 -0
- data/lib/inttegro/order/document_delivery_summary.rb +43 -0
- data/lib/inttegro/order/document_delivery_summary_channels.rb +36 -0
- data/lib/inttegro/order/invoice.rb +8 -0
- data/lib/inttegro/order/invoice_format.rb +3 -2
- data/lib/inttegro/order/line_item_group.rb +25 -0
- data/lib/inttegro/order/order.rb +3 -2
- data/lib/inttegro/order/product_line_item_product.rb +3 -2
- data/lib/inttegro/order/receipt_document_format.rb +35 -0
- data/lib/inttegro/order/update_request.rb +26 -2
- data/lib/inttegro/otp/initiate_request.rb +35 -8
- data/lib/inttegro/otp/purpose.rb +62 -0
- data/lib/inttegro/otp/transmission.rb +4 -4
- data/lib/inttegro/otp/transmission_status.rb +9 -0
- data/lib/inttegro/otp/verify_request.rb +2 -1
- 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/line_item.rb +31 -1
- data/lib/inttegro/refund/offline_settlement.rb +28 -0
- data/lib/inttegro/{otp/transmission_sent_via.rb → refund/offline_settlement_type.rb} +6 -6
- data/lib/inttegro/refund/order_fee_line_item.rb +43 -0
- data/lib/inttegro/refund/order_fee_line_item_fee.rb +34 -0
- data/lib/inttegro/refund/order_fee_line_item_type.rb +25 -0
- data/lib/inttegro/refund/order_line_item.rb +20 -0
- data/lib/inttegro/refund/order_product_line_item.rb +50 -0
- data/lib/inttegro/refund/order_product_line_item_product.rb +34 -0
- data/lib/inttegro/refund/order_product_line_item_type.rb +25 -0
- data/lib/inttegro/refund/order_shipping_line_item.rb +43 -0
- data/lib/inttegro/refund/order_shipping_line_item_shipping.rb +34 -0
- data/lib/inttegro/refund/order_shipping_line_item_type.rb +25 -0
- data/lib/inttegro/refund/payment_method_settlement.rb +55 -0
- data/lib/inttegro/refund/payment_method_settlement_type.rb +24 -0
- data/lib/inttegro/refund/refund.rb +39 -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/resources/customers.rb +8 -0
- data/lib/inttegro/resources/financial_accounts.rb +12 -0
- data/lib/inttegro/resources/orders.rb +8 -0
- data/lib/inttegro/resources/payouts.rb +8 -0
- data/lib/inttegro/resources/products.rb +8 -0
- data/lib/inttegro/search/base.rb +17 -0
- data/lib/inttegro/search/facet.rb +34 -0
- data/lib/inttegro/search/facet_bucket.rb +34 -0
- data/lib/inttegro/search/facet_result.rb +35 -0
- data/lib/inttegro/search/filter.rb +42 -0
- data/lib/inttegro/search/filter_operator.rb +27 -0
- data/lib/inttegro/search/freshness.rb +43 -0
- data/lib/inttegro/search/freshness_state.rb +36 -0
- data/lib/inttegro/search/page.rb +104 -0
- data/lib/inttegro/search/request.rb +68 -0
- data/lib/inttegro/search/resource_freshness.rb +50 -0
- data/lib/inttegro/search/resource_freshness_state.rb +37 -0
- data/lib/inttegro/search/resource_reference.rb +35 -0
- data/lib/inttegro/search/resource_total.rb +43 -0
- data/lib/inttegro/search/resource_total_relation.rb +28 -0
- data/lib/inttegro/search/response.rb +28 -0
- data/lib/inttegro/search/result.rb +78 -0
- data/lib/inttegro/search/sort.rb +36 -0
- data/lib/inttegro/search/sort_direction.rb +27 -0
- data/lib/inttegro/search/sort_field.rb +30 -0
- data/lib/inttegro/search/total.rb +35 -0
- data/lib/inttegro/search/total_relation.rb +27 -0
- data/lib/inttegro/search/type.rb +36 -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/telemetry.rb +1 -1
- 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
- data/rbi/inttegro/generated.rbi +15 -0
- metadata +57 -3
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
|
|
36
|
+
extend T::Sig
|
|
37
|
+
|
|
38
|
+
sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) }
|
|
39
|
+
def self.from_hash(hash, strict = false)
|
|
40
|
+
data = hash.dup
|
|
41
|
+
if (payment_method_value = data["payment_method"]).is_a?(Hash)
|
|
42
|
+
data["payment_method"] = case payment_method_value["type"]
|
|
43
|
+
when "bank_account"
|
|
44
|
+
Inttegro::Refund::SettlementBankAccountPaymentMethod.from_hash(payment_method_value)
|
|
45
|
+
when "mobile_money"
|
|
46
|
+
Inttegro::Refund::SettlementMobileMoneyPaymentMethod.from_hash(payment_method_value)
|
|
47
|
+
else
|
|
48
|
+
payment_method_value
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
super(data, strict)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
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 [
|
|
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(
|
|
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,8 +146,27 @@ 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
|
|
153
|
+
|
|
154
|
+
extend T::Sig
|
|
155
|
+
|
|
156
|
+
sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) }
|
|
157
|
+
def self.from_hash(hash, strict = false)
|
|
158
|
+
data = hash.dup
|
|
159
|
+
if (settlement_value = data["settlement"]).is_a?(Hash)
|
|
160
|
+
data["settlement"] = case settlement_value["type"]
|
|
161
|
+
when "offline"
|
|
162
|
+
Inttegro::Refund::OfflineSettlement.from_hash(settlement_value)
|
|
163
|
+
when "payment_method"
|
|
164
|
+
Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value)
|
|
165
|
+
else
|
|
166
|
+
settlement_value
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
super(data, strict)
|
|
170
|
+
end
|
|
134
171
|
end
|
|
135
172
|
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 "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
|
data/lib/inttegro/refund/settlement_bank_account_payment_method_bank_account_ghana_bank_account.rb
ADDED
|
@@ -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
|
|
@@ -43,6 +43,14 @@ module Inttegro
|
|
|
43
43
|
def page(payload = {})
|
|
44
44
|
@http.post_resource("/customers/page", Inttegro::Customer::Page, :page, payload || {})
|
|
45
45
|
end
|
|
46
|
+
|
|
47
|
+
# Search customer profiles using indexed fields and full-text matching.
|
|
48
|
+
#
|
|
49
|
+
# @param payload [Inttegro::Search::Request] search query, filters, sorting, facets, and cursor
|
|
50
|
+
# @return [Inttegro::Search::Page] typed search results
|
|
51
|
+
def search(payload)
|
|
52
|
+
@http.post_resource("/customers/search", Inttegro::Search::Page, :search, payload)
|
|
53
|
+
end
|
|
46
54
|
end
|
|
47
55
|
end
|
|
48
56
|
end
|
|
@@ -60,6 +60,18 @@ module Inttegro
|
|
|
60
60
|
)
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
+
# Search financial accounts using indexed fields and full-text matching.
|
|
64
|
+
#
|
|
65
|
+
# @param payload [Inttegro::Search::Request] search query, filters, sorting, facets, and cursor
|
|
66
|
+
# @return [Inttegro::Search::Page] typed search results
|
|
67
|
+
def search(payload)
|
|
68
|
+
@http.post_resource(
|
|
69
|
+
"/financial_accounts/search",
|
|
70
|
+
Inttegro::Search::Page, :search,
|
|
71
|
+
payload
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
|
|
63
75
|
# Update mutable account profile fields.
|
|
64
76
|
#
|
|
65
77
|
# @param payload [Hash, Inttegro::FinancialAccount::UpdateRequest] account identifier and fields to change
|
|
@@ -398,6 +398,14 @@ module Inttegro
|
|
|
398
398
|
@http.post_resource("/orders/page", Inttegro::Order::Page, :page, payload || {})
|
|
399
399
|
end
|
|
400
400
|
|
|
401
|
+
# Search orders using indexed fields and full-text matching.
|
|
402
|
+
#
|
|
403
|
+
# @param payload [Inttegro::Search::Request] search query, filters, sorting, facets, and cursor
|
|
404
|
+
# @return [Inttegro::Search::Page] typed search results
|
|
405
|
+
def search(payload)
|
|
406
|
+
@http.post_resource("/orders/search", Inttegro::Search::Page, :search, payload)
|
|
407
|
+
end
|
|
408
|
+
|
|
401
409
|
private
|
|
402
410
|
|
|
403
411
|
def stable_order_request_meta(action, order_id)
|
|
@@ -156,6 +156,14 @@ module Inttegro
|
|
|
156
156
|
@http.post_resource("/payouts/page", Inttegro::Payout::Page, :page, payload)
|
|
157
157
|
end
|
|
158
158
|
|
|
159
|
+
# Search payouts using indexed fields and full-text matching.
|
|
160
|
+
#
|
|
161
|
+
# @param payload [Inttegro::Search::Request] search query, filters, sorting, facets, and cursor
|
|
162
|
+
# @return [Inttegro::Search::Page] typed search results
|
|
163
|
+
def search(payload)
|
|
164
|
+
@http.post_resource("/payouts/search", Inttegro::Search::Page, :search, payload)
|
|
165
|
+
end
|
|
166
|
+
|
|
159
167
|
# Schedule a payout from the application's available balance.
|
|
160
168
|
#
|
|
161
169
|
# @param payload [Inttegro::Schedule::PayoutRequest] typed amount, destination, and execution fields
|
|
@@ -83,6 +83,14 @@ module Inttegro
|
|
|
83
83
|
def page(payload = {})
|
|
84
84
|
@http.post_resource("/products/page", Inttegro::Product::Page, :page, payload || {})
|
|
85
85
|
end
|
|
86
|
+
|
|
87
|
+
# Search products using indexed fields and full-text matching.
|
|
88
|
+
#
|
|
89
|
+
# @param payload [Inttegro::Search::Request] search query, filters, sorting, facets, and cursor
|
|
90
|
+
# @return [Inttegro::Search::Page] typed search results
|
|
91
|
+
def search(payload)
|
|
92
|
+
@http.post_resource("/products/search", Inttegro::Search::Page, :search, payload)
|
|
93
|
+
end
|
|
86
94
|
end
|
|
87
95
|
end
|
|
88
96
|
end
|
|
@@ -0,0 +1,17 @@
|
|
|
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 "sorbet-runtime"
|
|
7
|
+
|
|
8
|
+
module Inttegro
|
|
9
|
+
# Namespace for generated search models and enums.
|
|
10
|
+
#
|
|
11
|
+
# Each public type in this namespace is defined in its own file and follows the field names
|
|
12
|
+
# and wire values declared by the Inttegro OpenAPI contract.
|
|
13
|
+
#
|
|
14
|
+
# @api public
|
|
15
|
+
module Search
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
module Search
|
|
10
|
+
# Typed representation of the facet object in the Inttegro API.
|
|
11
|
+
#
|
|
12
|
+
# This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
|
|
13
|
+
# payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
|
|
14
|
+
# field names and serialized enum values.
|
|
15
|
+
#
|
|
16
|
+
# @api public
|
|
17
|
+
#
|
|
18
|
+
# @!attribute [r] field
|
|
19
|
+
# Unqualified route-local field to group and count.
|
|
20
|
+
#
|
|
21
|
+
# Required in the API payload. Wire name: `field`.
|
|
22
|
+
# @return [String]
|
|
23
|
+
#
|
|
24
|
+
# @!attribute [r] limit
|
|
25
|
+
# Value of the `limit` field in the Inttegro API payload.
|
|
26
|
+
#
|
|
27
|
+
# Optional in the API payload; omitted values default to `nil`. Wire name: `limit`.
|
|
28
|
+
# @return [Integer, nil]
|
|
29
|
+
class Facet < T::Struct
|
|
30
|
+
const :field, String
|
|
31
|
+
const :limit, T.nilable(Integer), default: nil
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
module Search
|
|
10
|
+
# Typed representation of the facet bucket object in the Inttegro API.
|
|
11
|
+
#
|
|
12
|
+
# This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
|
|
13
|
+
# payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
|
|
14
|
+
# field names and serialized enum values.
|
|
15
|
+
#
|
|
16
|
+
# @api public
|
|
17
|
+
#
|
|
18
|
+
# @!attribute [r] value
|
|
19
|
+
# Value of the `value` field in the Inttegro API payload.
|
|
20
|
+
#
|
|
21
|
+
# Required in the API payload. Wire name: `value`.
|
|
22
|
+
# @return [String]
|
|
23
|
+
#
|
|
24
|
+
# @!attribute [r] count
|
|
25
|
+
# Value of the `count` field in the Inttegro API payload.
|
|
26
|
+
#
|
|
27
|
+
# Required in the API payload. Wire name: `count`.
|
|
28
|
+
# @return [Integer]
|
|
29
|
+
class FacetBucket < T::Struct
|
|
30
|
+
const :value, String
|
|
31
|
+
const :count, Integer
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
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 "facet_bucket"
|
|
8
|
+
|
|
9
|
+
module Inttegro
|
|
10
|
+
module Search
|
|
11
|
+
# Typed representation of the facet result 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] field
|
|
20
|
+
# The same unqualified route-local field requested by the caller.
|
|
21
|
+
#
|
|
22
|
+
# Required in the API payload. Wire name: `field`.
|
|
23
|
+
# @return [String]
|
|
24
|
+
#
|
|
25
|
+
# @!attribute [r] buckets
|
|
26
|
+
# Value of the `buckets` field in the Inttegro API payload.
|
|
27
|
+
#
|
|
28
|
+
# Required in the API payload. Wire name: `buckets`.
|
|
29
|
+
# @return [Array<Inttegro::Search::FacetBucket>]
|
|
30
|
+
class FacetResult < T::Struct
|
|
31
|
+
const :field, String
|
|
32
|
+
const :buckets, T::Array[Inttegro::Search::FacetBucket]
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|