Class: PaystackGateway::Response
- Inherits:
-
Hashie::Dash
- Object
- Hashie::Dash
- PaystackGateway::Response
- Includes:
- Hashie::Extensions::Coercion
- Defined in:
- lib/paystack_gateway/response.rb
Overview
Wrapper for responses from Paystack.
Direct Known Subclasses
Customers::CreateCustomerResponse, Customers::FetchCustomerResponse, DedicatedVirtualAccounts::AssignDedicatedVirtualAccountResponse, DedicatedVirtualAccounts::CreateDedicatedVirtualAccountResponse, DedicatedVirtualAccounts::RequeryDedicatedAccountResponse, DedicatedVirtualAccounts::SplitDedicatedAccountTransactionResponse, Miscellaneous::ListBanksResponse, Plans::CreatePlanResponse, Plans::FetchPlanResponse, Plans::ListPlansResponse, Plans::UpdatePlanResponse, PaystackGateway::Refunds::CreateResponse, PaystackGateway::Refunds::FetchRefundResponse, PaystackGateway::Refunds::ListRefundsResponse, Subaccounts::CreateSubaccountResponse, Transactions::ChargeAuthorizationResponse, Transactions::InitializeTransactionResponse, Transactions::VerifyTransactionResponse, TransferRecipients::CreateTransferRecipientResponse, Transfers::InitiateTransferResponse, Verification::ResolveAccountNumberResponse, Webhooks::WebhookResponse
Class Method Summary collapse
Class Method Details
.coerce_data(value) ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/paystack_gateway/response.rb', line 19 def self.coerce_data(value) case value when Array value.map { coerce_data(_1) } when Hash Hashie::Mash.new(value) else value end end |