inttegro 6.0.1 → 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 +24 -0
- data/README.md +2 -2
- data/SECURITY.md +1 -1
- data/lib/inttegro/api_response.rb +41 -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 -1
- data/lib/inttegro/generated/models.rb +22 -17
- data/lib/inttegro/generated/operations.rb +6 -6
- data/lib/inttegro/http_client.rb +65 -1
- 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/cancel_request.rb +2 -2
- data/lib/inttegro/payout/{lookup_response.rb → destinations.rb} +8 -8
- data/lib/inttegro/payout/disable_automatic_response.rb +1 -1
- data/lib/inttegro/payout/error.rb +5 -5
- data/lib/inttegro/payout/lookup_request.rb +2 -2
- data/lib/inttegro/payout/page.rb +3 -3
- data/lib/inttegro/payout/page_request.rb +3 -3
- data/lib/inttegro/payout/page_response.rb +2 -2
- data/lib/inttegro/payout/payout.rb +4 -3
- data/lib/inttegro/payout/{cancel_response.rb → response.rb} +2 -2
- data/lib/inttegro/payout/set_destinations_request.rb +5 -4
- data/lib/inttegro/payout/settings_lookup.rb +5 -4
- data/lib/inttegro/payout/{get_settings_response.rb → settings_lookup_response.rb} +2 -2
- data/lib/inttegro/payout/settings_lookup_schedule.rb +2 -2
- data/lib/inttegro/payout/settings_lookup_schedule_aging_spec.rb +4 -4
- data/lib/inttegro/payout/settings_mutation.rb +12 -4
- data/lib/inttegro/payout/{set_destinations_response.rb → settings_mutation_response.rb} +2 -2
- data/lib/inttegro/payout/settings_mutation_schedule.rb +2 -2
- data/lib/inttegro/payout/settings_mutation_schedule_spec.rb +1 -1
- 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/purchase_intent/purchase_intent.rb +0 -8
- data/lib/inttegro/refund/cancel_request.rb +7 -0
- 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 +35 -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/orders.rb +8 -0
- data/lib/inttegro/resources/payouts.rb +15 -32
- data/lib/inttegro/resources/refunds.rb +5 -2
- data/lib/inttegro/schedule/payout_request.rb +5 -5
- data/lib/inttegro/shared/fee_details.rb +3 -2
- data/lib/inttegro/shared/invoice_settings.rb +3 -2
- data/lib/inttegro/shared/response_meta.rb +35 -0
- 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 +2 -0
- data/rbi/inttegro/generated.rbi +11 -8
- metadata +27 -16
- data/lib/inttegro/payout/enable_automatic_response.rb +0 -28
- data/lib/inttegro/purchase_intent/activity.rb +0 -122
- data/lib/inttegro/purchase_intent/activity_attribution.rb +0 -83
- data/lib/inttegro/purchase_intent/activity_log.rb +0 -28
- data/lib/inttegro/purchase_intent/activity_type.rb +0 -37
- data/lib/inttegro/purchase_intent/activity_visitor.rb +0 -97
- data/lib/inttegro/schedule/payout_response.rb +0 -28
|
@@ -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,7 +4,6 @@
|
|
|
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 "activity_log"
|
|
8
7
|
require_relative "merchant"
|
|
9
8
|
require_relative "price"
|
|
10
9
|
require_relative "product"
|
|
@@ -22,12 +21,6 @@ module Inttegro
|
|
|
22
21
|
#
|
|
23
22
|
# @api public
|
|
24
23
|
#
|
|
25
|
-
# @!attribute [r] activity
|
|
26
|
-
# Recent authenticated-owner activity for the purchase intent.
|
|
27
|
-
#
|
|
28
|
-
# Optional in the API payload; omitted values default to `nil`. Wire name: `activity`.
|
|
29
|
-
# @return [Inttegro::PurchaseIntent::ActivityLog, nil]
|
|
30
|
-
#
|
|
31
24
|
# @!attribute [r] allow_variants
|
|
32
25
|
# Whether the intent was configured with a variant set
|
|
33
26
|
#
|
|
@@ -110,7 +103,6 @@ module Inttegro
|
|
|
110
103
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `variant_set`.
|
|
111
104
|
# @return [Inttegro::PurchaseIntent::VariantSet, nil]
|
|
112
105
|
class PurchaseIntent
|
|
113
|
-
const :activity, T.nilable(Inttegro::PurchaseIntent::ActivityLog), default: nil
|
|
114
106
|
const :allow_variants, T::Boolean
|
|
115
107
|
const :created_at, Time
|
|
116
108
|
const :expires_at, T.nilable(Time), default: nil
|
|
@@ -22,6 +22,12 @@ module Inttegro
|
|
|
22
22
|
# Required in the API payload. Wire name: `refund_id`.
|
|
23
23
|
# @return [String]
|
|
24
24
|
#
|
|
25
|
+
# @!attribute [r] reason
|
|
26
|
+
# Optional explanation for canceling the refund. Leading and trailing whitespace is removed.
|
|
27
|
+
#
|
|
28
|
+
# Optional in the API payload; omitted values default to `nil`. Wire name: `reason`.
|
|
29
|
+
# @return [String, nil]
|
|
30
|
+
#
|
|
25
31
|
# @!attribute [r] request_meta
|
|
26
32
|
# Value of the `request_meta` field in the Inttegro API payload.
|
|
27
33
|
#
|
|
@@ -29,6 +35,7 @@ module Inttegro
|
|
|
29
35
|
# @return [Inttegro::Refund::RequestMeta, nil]
|
|
30
36
|
class CancelRequest < T::Struct
|
|
31
37
|
const :refund_id, String
|
|
38
|
+
const :reason, T.nilable(String), default: nil
|
|
32
39
|
const :request_meta, T.nilable(Inttegro::Refund::RequestMeta), default: nil
|
|
33
40
|
end
|
|
34
41
|
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 "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
|
|
@@ -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
|
|
@@ -18,6 +21,12 @@ module Inttegro
|
|
|
18
21
|
#
|
|
19
22
|
# @api public
|
|
20
23
|
#
|
|
24
|
+
# @!attribute [r] cancel_reason
|
|
25
|
+
# Omitted unless a reason was supplied when the refund was canceled.
|
|
26
|
+
#
|
|
27
|
+
# Optional in the API payload; omitted values default to `nil`. Wire name: `cancel_reason`.
|
|
28
|
+
# @return [String, nil]
|
|
29
|
+
#
|
|
21
30
|
# @!attribute [r] canceled_at
|
|
22
31
|
# Omitted unless the refund was canceled before processing began.
|
|
23
32
|
#
|
|
@@ -35,7 +44,7 @@ module Inttegro
|
|
|
35
44
|
# collection rather than a raw map.
|
|
36
45
|
#
|
|
37
46
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
|
|
38
|
-
# @return [
|
|
47
|
+
# @return [Inttegro::CustomData, nil]
|
|
39
48
|
#
|
|
40
49
|
# @!attribute [r] failed_at
|
|
41
50
|
# Omitted unless processing failed.
|
|
@@ -43,6 +52,13 @@ module Inttegro
|
|
|
43
52
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `failed_at`.
|
|
44
53
|
# @return [Time, nil]
|
|
45
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
|
+
#
|
|
46
62
|
# @!attribute [r] id
|
|
47
63
|
# Value of the `id` field in the Inttegro API payload.
|
|
48
64
|
#
|
|
@@ -61,6 +77,12 @@ module Inttegro
|
|
|
61
77
|
# Required in the API payload. Wire name: `order_id`.
|
|
62
78
|
# @return [String]
|
|
63
79
|
#
|
|
80
|
+
# @!attribute [r] order_amount
|
|
81
|
+
# Total amount of the originating order captured when the refund was created.
|
|
82
|
+
#
|
|
83
|
+
# Optional in the API payload; omitted values default to `nil`. Wire name: `order_amount`.
|
|
84
|
+
# @return [Inttegro::Money::Amount, nil]
|
|
85
|
+
#
|
|
64
86
|
# @!attribute [r] processing_at
|
|
65
87
|
# Omitted until processing starts.
|
|
66
88
|
#
|
|
@@ -85,6 +107,13 @@ module Inttegro
|
|
|
85
107
|
# Optional in the API payload; omitted values default to `nil`. Wire name: `reference`.
|
|
86
108
|
# @return [String, nil]
|
|
87
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
|
+
#
|
|
88
117
|
# @!attribute [r] status
|
|
89
118
|
# Value of the `status` field in the Inttegro API payload.
|
|
90
119
|
#
|
|
@@ -103,17 +132,21 @@ module Inttegro
|
|
|
103
132
|
# Required in the API payload. Wire name: `total`.
|
|
104
133
|
# @return [Inttegro::Money::Amount]
|
|
105
134
|
class Refund
|
|
135
|
+
const :cancel_reason, T.nilable(String), default: nil
|
|
106
136
|
const :canceled_at, T.nilable(Time), default: nil
|
|
107
137
|
const :created_at, Time
|
|
108
|
-
const :custom_data, T.nilable(
|
|
138
|
+
const :custom_data, T.nilable(Inttegro::CustomData), default: nil
|
|
109
139
|
const :failed_at, T.nilable(Time), default: nil
|
|
140
|
+
const :failure, T.nilable(Inttegro::Refund::Failure), default: nil
|
|
110
141
|
const :id, String
|
|
111
142
|
const :line_items, T::Array[Inttegro::Refund::LineItem]
|
|
112
143
|
const :order_id, String
|
|
144
|
+
const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil
|
|
113
145
|
const :processing_at, T.nilable(Time), default: nil
|
|
114
146
|
const :reason, Inttegro::Refund::Reason
|
|
115
147
|
const :reason_details, T.nilable(String), default: nil
|
|
116
148
|
const :reference, T.nilable(String), default: nil
|
|
149
|
+
const :settlement, Inttegro::Refund::Settlement
|
|
117
150
|
const :status, Inttegro::Refund::Status
|
|
118
151
|
const :succeeded_at, T.nilable(Time), default: nil
|
|
119
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
|
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
|