Class: Inttegro::Refund
- Inherits:
-
T::Struct
- Object
- T::Struct
- Inttegro::Refund
- Extended by:
- T::Sig
- Defined in:
- lib/inttegro/refund/refund.rb,
lib/inttegro/refund/base.rb,
lib/inttegro/refund/page.rb,
lib/inttegro/refund/reason.rb,
lib/inttegro/refund/status.rb,
lib/inttegro/refund/failure.rb,
lib/inttegro/refund/response.rb,
lib/inttegro/refund/line_item.rb,
lib/inttegro/refund/settlement.rb,
lib/inttegro/refund/page_request.rb,
lib/inttegro/refund/request_meta.rb,
lib/inttegro/refund/page_response.rb,
lib/inttegro/refund/cancel_request.rb,
lib/inttegro/refund/create_request.rb,
lib/inttegro/refund/failure_reason.rb,
lib/inttegro/refund/lookup_request.rb,
lib/inttegro/refund/order_line_item.rb,
lib/inttegro/refund/create_line_item.rb,
lib/inttegro/refund/offline_settlement.rb,
lib/inttegro/refund/order_fee_line_item.rb,
lib/inttegro/refund/offline_settlement_type.rb,
lib/inttegro/refund/order_fee_line_item_fee.rb,
lib/inttegro/refund/order_product_line_item.rb,
lib/inttegro/refund/order_fee_line_item_type.rb,
lib/inttegro/refund/order_shipping_line_item.rb,
lib/inttegro/refund/payment_method_settlement.rb,
lib/inttegro/refund/settlement_payment_method.rb,
lib/inttegro/refund/order_product_line_item_type.rb,
lib/inttegro/refund/order_shipping_line_item_type.rb,
lib/inttegro/refund/payment_method_settlement_type.rb,
lib/inttegro/refund/order_product_line_item_product.rb,
lib/inttegro/refund/order_shipping_line_item_shipping.rb,
lib/inttegro/refund/settlement_bank_account_payment_method.rb,
lib/inttegro/refund/settlement_mobile_money_payment_method.rb,
lib/inttegro/refund/settlement_bank_account_payment_method_type.rb,
lib/inttegro/refund/settlement_mobile_money_payment_method_type.rb,
lib/inttegro/refund/settlement_bank_account_payment_method_bank_account.rb,
lib/inttegro/refund/settlement_mobile_money_payment_method_mobile_money.rb,
lib/inttegro/refund/settlement_bank_account_payment_method_bank_account_ghana_bank_account.rb
Overview
Typed representation of the refund object in the Inttegro API.
This generated model is immutable. Construct it with .new, or decode a string-keyed API
payload with .from_hash. #serialize produces a string-keyed hash using the original wire
field names and serialized enum values.
Defined Under Namespace
Classes: CancelRequest, CreateLineItem, CreateRequest, Failure, FailureReason, LineItem, LookupRequest, OfflineSettlement, OfflineSettlementType, OrderFeeLineItem, OrderFeeLineItemFee, OrderFeeLineItemType, OrderProductLineItem, OrderProductLineItemProduct, OrderProductLineItemType, OrderShippingLineItem, OrderShippingLineItemShipping, OrderShippingLineItemType, Page, PageRequest, PageResponse, PaymentMethodSettlement, PaymentMethodSettlementType, Reason, RequestMeta, Response, SettlementBankAccountPaymentMethod, SettlementBankAccountPaymentMethodBankAccount, SettlementBankAccountPaymentMethodBankAccountGhanaBankAccount, SettlementBankAccountPaymentMethodType, SettlementMobileMoneyPaymentMethod, SettlementMobileMoneyPaymentMethodMobileMoney, SettlementMobileMoneyPaymentMethodType, Status
Constant Summary collapse
- Settlement =
Immutable destination snapshot for the refund.
payment_methodreturns money to the original payment method;offlinerecords settlement for an order paid outside Inttegro. T.type_alias { T.any(Inttegro::Refund::OfflineSettlement, Inttegro::Refund::PaymentMethodSettlement) }
- OrderLineItem =
Immutable display snapshot of the refunded order line. Omitted when the originating order cannot be resolved.
T.type_alias { T.any(Inttegro::Refund::OrderProductLineItem, Inttegro::Refund::OrderFeeLineItem, Inttegro::Refund::OrderShippingLineItem) }
- SettlementPaymentMethod =
Caller-safe immutable snapshot of the original payment method. Account values are masked and management-only payment-method data is never included.
T.type_alias { T.any(Inttegro::Refund::SettlementMobileMoneyPaymentMethod, Inttegro::Refund::SettlementBankAccountPaymentMethod) }
Instance Attribute Summary collapse
-
#cancel_reason ⇒ String?
readonly
Omitted unless a reason was supplied when the refund was canceled.
-
#canceled_at ⇒ Time?
readonly
Omitted unless the refund was canceled before processing began.
-
#created_at ⇒ Time
readonly
Value of the
created_atfield in the Inttegro API payload. -
#custom_data ⇒ Inttegro::CustomData?
readonly
Merchant-defined string values attached to a resource.
-
#failed_at ⇒ Time?
readonly
Omitted unless processing failed.
-
#failure ⇒ Inttegro::Refund::Failure?
readonly
Sanitized terminal failure information.
-
#id ⇒ String
readonly
Value of the
idfield in the Inttegro API payload. -
#line_items ⇒ Array<Inttegro::Refund::LineItem>
readonly
One or more immutable line-level refund allocations.
-
#order_amount ⇒ Inttegro::Money::Amount?
readonly
Total amount of the originating order captured when the refund was created.
-
#order_id ⇒ String
readonly
Value of the
order_idfield in the Inttegro API payload. -
#processing_at ⇒ Time?
readonly
Omitted until processing starts.
-
#reason ⇒ Inttegro::Refund::Reason
readonly
Value of the
reasonfield in the Inttegro API payload. -
#reason_details ⇒ String?
readonly
Value of the
reason_detailsfield in the Inttegro API payload. -
#reference ⇒ String?
readonly
Value of the
referencefield in the Inttegro API payload. -
#settlement ⇒ Inttegro::Refund::Settlement
readonly
Immutable destination snapshot for the refund.
-
#status ⇒ Inttegro::Refund::Status
readonly
Value of the
statusfield in the Inttegro API payload. -
#succeeded_at ⇒ Time?
readonly
Omitted unless processing succeeded.
-
#total ⇒ Inttegro::Money::Amount
readonly
Value of the
totalfield in the Inttegro API payload.
Class Method Summary collapse
Instance Attribute Details
#cancel_reason ⇒ String? (readonly)
Omitted unless a reason was supplied when the refund was canceled.
Optional in the API payload; omitted values default to nil. Wire name: cancel_reason.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#canceled_at ⇒ Time? (readonly)
Omitted unless the refund was canceled before processing began.
Optional in the API payload; omitted values default to nil. Wire name: canceled_at.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#created_at ⇒ Time (readonly)
Value of the created_at field in the Inttegro API payload.
Required in the API payload. Wire name: created_at.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#custom_data ⇒ Inttegro::CustomData? (readonly)
Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map.
Optional in the API payload; omitted values default to nil. Wire name: custom_data.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#failed_at ⇒ Time? (readonly)
Omitted unless processing failed.
Optional in the API payload; omitted values default to nil. Wire name: failed_at.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#failure ⇒ Inttegro::Refund::Failure? (readonly)
Sanitized terminal failure information. Present only when status is failed. An uncertain
provider outcome remains processing and does not produce this object.
Optional in the API payload; omitted values default to nil. Wire name: failure.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#id ⇒ String (readonly)
Value of the id field in the Inttegro API payload.
Required in the API payload. Wire name: id.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#line_items ⇒ Array<Inttegro::Refund::LineItem> (readonly)
One or more immutable line-level refund allocations.
Required in the API payload. Wire name: line_items.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#order_amount ⇒ Inttegro::Money::Amount? (readonly)
Total amount of the originating order captured when the refund was created.
Optional in the API payload; omitted values default to nil. Wire name: order_amount.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#order_id ⇒ String (readonly)
Value of the order_id field in the Inttegro API payload.
Required in the API payload. Wire name: order_id.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#processing_at ⇒ Time? (readonly)
Omitted until processing starts.
Optional in the API payload; omitted values default to nil. Wire name: processing_at.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#reason ⇒ Inttegro::Refund::Reason (readonly)
Value of the reason field in the Inttegro API payload.
Required in the API payload. Wire name: reason.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#reason_details ⇒ String? (readonly)
Value of the reason_details field in the Inttegro API payload.
Optional in the API payload; omitted values default to nil. Wire name: reason_details.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#reference ⇒ String? (readonly)
Value of the reference field in the Inttegro API payload.
Optional in the API payload; omitted values default to nil. Wire name: reference.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#settlement ⇒ Inttegro::Refund::Settlement (readonly)
Immutable destination snapshot for the refund. payment_method returns money to the
original payment method; offline records settlement for an order paid outside Inttegro.
Required in the API payload. Wire name: settlement.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#status ⇒ Inttegro::Refund::Status (readonly)
Value of the status field in the Inttegro API payload.
Required in the API payload. Wire name: status.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#succeeded_at ⇒ Time? (readonly)
Omitted unless processing succeeded.
Optional in the API payload; omitted values default to nil. Wire name: succeeded_at.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
#total ⇒ Inttegro::Money::Amount (readonly)
Value of the total field in the Inttegro API payload.
Required in the API payload. Wire name: total.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/inttegro/refund/refund.rb', line 134 class Refund const :cancel_reason, T.nilable(String), default: nil const :canceled_at, T.nilable(Time), default: nil const :created_at, Time const :custom_data, T.nilable(Inttegro::CustomData), default: nil const :failed_at, T.nilable(Time), default: nil const :failure, T.nilable(Inttegro::Refund::Failure), default: nil const :id, String const :line_items, T::Array[Inttegro::Refund::LineItem] const :order_id, String const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil const :processing_at, T.nilable(Time), default: nil const :reason, Inttegro::Refund::Reason const :reason_details, T.nilable(String), default: nil const :reference, T.nilable(String), default: nil const :settlement, Inttegro::Refund::Settlement const :status, Inttegro::Refund::Status const :succeeded_at, T.nilable(Time), default: nil const :total, Inttegro::Money::Amount extend T::Sig sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) } def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end end |
Class Method Details
.from_hash(hash, strict = false) ⇒ Object
157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/inttegro/refund/refund.rb', line 157 def self.from_hash(hash, strict = false) data = hash.dup if (settlement_value = data["settlement"]).is_a?(Hash) data["settlement"] = case settlement_value["type"] when "offline" Inttegro::Refund::OfflineSettlement.from_hash(settlement_value) when "payment_method" Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value) else settlement_value end end super(data, strict) end |