Class: OnlinePayments::SDK::DataObject
- Inherits:
-
Object
- Object
- OnlinePayments::SDK::DataObject
- Defined in:
- lib/onlinepayments/sdk/data_object.rb
Overview
Base class for all SDK data objects, supports marshalling and unmarshalling the data object to and from JSON.
Direct Known Subclasses
OnlinePayments::SDK::Domain::APIError, OnlinePayments::SDK::Domain::AccountOnFile, OnlinePayments::SDK::Domain::AccountOnFileAttribute, OnlinePayments::SDK::Domain::AccountOnFileDisplayHints, OnlinePayments::SDK::Domain::AcquirerInformation, OnlinePayments::SDK::Domain::AcquirerSelectionInformation, OnlinePayments::SDK::Domain::AdditionalOrderInput, OnlinePayments::SDK::Domain::Address, OnlinePayments::SDK::Domain::AddressPersonal, OnlinePayments::SDK::Domain::AirlineData, OnlinePayments::SDK::Domain::AirlineFlightLeg, OnlinePayments::SDK::Domain::AirlinePassenger, OnlinePayments::SDK::Domain::AmountBreakdown, OnlinePayments::SDK::Domain::AmountOfMoney, OnlinePayments::SDK::Domain::BankAccountIban, OnlinePayments::SDK::Domain::BrowserData, OnlinePayments::SDK::Domain::CalculateSurchargeRequest, OnlinePayments::SDK::Domain::CalculateSurchargeResponse, OnlinePayments::SDK::Domain::CancelPaymentRequest, OnlinePayments::SDK::Domain::CancelPaymentResponse, OnlinePayments::SDK::Domain::Capture, OnlinePayments::SDK::Domain::CaptureOutput, OnlinePayments::SDK::Domain::CapturePaymentRequest, OnlinePayments::SDK::Domain::CaptureResponse, OnlinePayments::SDK::Domain::CaptureStatusOutput, OnlinePayments::SDK::Domain::CapturesResponse, OnlinePayments::SDK::Domain::Card, OnlinePayments::SDK::Domain::CardEssentials, OnlinePayments::SDK::Domain::CardFraudResults, OnlinePayments::SDK::Domain::CardInfo, OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInput, OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputBase, OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputForHostedCheckout, OnlinePayments::SDK::Domain::CardPaymentMethodSpecificOutput, OnlinePayments::SDK::Domain::CardPayoutMethodSpecificInput, OnlinePayments::SDK::Domain::CardRecurrenceDetails, OnlinePayments::SDK::Domain::CardSource, OnlinePayments::SDK::Domain::CardWithoutCvv, OnlinePayments::SDK::Domain::CompanyInformation, OnlinePayments::SDK::Domain::CompletePaymentCardPaymentMethodSpecificInput, OnlinePayments::SDK::Domain::CompletePaymentRequest, OnlinePayments::SDK::Domain::CompletePaymentResponse, OnlinePayments::SDK::Domain::ContactDetails, OnlinePayments::SDK::Domain::CreateHostedCheckoutRequest, OnlinePayments::SDK::Domain::CreateHostedCheckoutResponse, OnlinePayments::SDK::Domain::CreateHostedTokenizationRequest, OnlinePayments::SDK::Domain::CreateHostedTokenizationResponse, OnlinePayments::SDK::Domain::CreateMandateRequest, OnlinePayments::SDK::Domain::CreateMandateResponse, OnlinePayments::SDK::Domain::CreateMandateWithReturnUrl, OnlinePayments::SDK::Domain::CreatePaymentLinkRequest, OnlinePayments::SDK::Domain::CreatePaymentRequest, OnlinePayments::SDK::Domain::CreatePaymentResponse, OnlinePayments::SDK::Domain::CreatePayoutRequest, OnlinePayments::SDK::Domain::CreateTokenRequest, OnlinePayments::SDK::Domain::CreatedPaymentOutput, OnlinePayments::SDK::Domain::CreatedTokenResponse, OnlinePayments::SDK::Domain::CreditCardSpecificInputHostedTokenization, OnlinePayments::SDK::Domain::CreditCardValidationRulesHostedTokenization, OnlinePayments::SDK::Domain::CurrencyConversion, OnlinePayments::SDK::Domain::CurrencyConversionInput, OnlinePayments::SDK::Domain::CurrencyConversionRequest, OnlinePayments::SDK::Domain::CurrencyConversionResponse, OnlinePayments::SDK::Domain::CurrencyConversionResult, OnlinePayments::SDK::Domain::CurrencyConversionSpecificInput, OnlinePayments::SDK::Domain::Customer, OnlinePayments::SDK::Domain::CustomerAccount, OnlinePayments::SDK::Domain::CustomerAccountAuthentication, OnlinePayments::SDK::Domain::CustomerBankAccount, OnlinePayments::SDK::Domain::CustomerDevice, OnlinePayments::SDK::Domain::CustomerDeviceOutput, OnlinePayments::SDK::Domain::CustomerOutput, OnlinePayments::SDK::Domain::CustomerPaymentActivity, OnlinePayments::SDK::Domain::CustomerToken, OnlinePayments::SDK::Domain::DccCardSource, OnlinePayments::SDK::Domain::DccProposal, OnlinePayments::SDK::Domain::DecryptedPaymentData, OnlinePayments::SDK::Domain::DirectoryEntry, OnlinePayments::SDK::Domain::Discount, OnlinePayments::SDK::Domain::EmptyValidator, OnlinePayments::SDK::Domain::ErrorResponse, OnlinePayments::SDK::Domain::ExternalCardholderAuthenticationData, OnlinePayments::SDK::Domain::ExternalTokenLinked, OnlinePayments::SDK::Domain::FixedListValidator, OnlinePayments::SDK::Domain::FraudFields, OnlinePayments::SDK::Domain::FraudResults, OnlinePayments::SDK::Domain::GPayThreeDSecure, OnlinePayments::SDK::Domain::GetHostedCheckoutResponse, OnlinePayments::SDK::Domain::GetHostedTokenizationResponse, OnlinePayments::SDK::Domain::GetIINDetailsRequest, OnlinePayments::SDK::Domain::GetIINDetailsResponse, OnlinePayments::SDK::Domain::GetMandateResponse, OnlinePayments::SDK::Domain::GetPaymentProductGroupsResponse, OnlinePayments::SDK::Domain::GetPaymentProductsResponse, OnlinePayments::SDK::Domain::GetPrivacyPolicyResponse, OnlinePayments::SDK::Domain::GiftCardPurchase, OnlinePayments::SDK::Domain::HostedCheckoutSpecificInput, OnlinePayments::SDK::Domain::HostedCheckoutSpecificOutput, OnlinePayments::SDK::Domain::IINDetail, OnlinePayments::SDK::Domain::LabelTemplateElement, OnlinePayments::SDK::Domain::LengthValidator, OnlinePayments::SDK::Domain::LineItem, OnlinePayments::SDK::Domain::LineItemInvoiceData, OnlinePayments::SDK::Domain::LoanRecipient, OnlinePayments::SDK::Domain::LodgingData, OnlinePayments::SDK::Domain::MandateAddress, OnlinePayments::SDK::Domain::MandateAddressResponse, OnlinePayments::SDK::Domain::MandateContactDetails, OnlinePayments::SDK::Domain::MandateCustomer, OnlinePayments::SDK::Domain::MandateCustomerResponse, OnlinePayments::SDK::Domain::MandateMerchantAction, OnlinePayments::SDK::Domain::MandatePersonalInformation, OnlinePayments::SDK::Domain::MandatePersonalInformationResponse, OnlinePayments::SDK::Domain::MandatePersonalName, OnlinePayments::SDK::Domain::MandatePersonalNameResponse, OnlinePayments::SDK::Domain::MandateRedirectData, OnlinePayments::SDK::Domain::MandateResponse, OnlinePayments::SDK::Domain::MerchantAction, OnlinePayments::SDK::Domain::MobilePaymentData, OnlinePayments::SDK::Domain::MobilePaymentMethodHostedCheckoutSpecificInput, OnlinePayments::SDK::Domain::MobilePaymentMethodSpecificInput, OnlinePayments::SDK::Domain::MobilePaymentMethodSpecificOutput, OnlinePayments::SDK::Domain::MobilePaymentProduct320SpecificInput, OnlinePayments::SDK::Domain::MultiplePaymentInformation, OnlinePayments::SDK::Domain::OmnichannelPayoutSpecificInput, OnlinePayments::SDK::Domain::OperationOutput, OnlinePayments::SDK::Domain::Order, OnlinePayments::SDK::Domain::OrderLineDetails, OnlinePayments::SDK::Domain::OrderReferences, OnlinePayments::SDK::Domain::OrderStatusOutput, OnlinePayments::SDK::Domain::OrderTypeInformation, OnlinePayments::SDK::Domain::PaymentAccountOnFile, OnlinePayments::SDK::Domain::PaymentContext, OnlinePayments::SDK::Domain::PaymentCreationOutput, OnlinePayments::SDK::Domain::PaymentDetailsResponse, OnlinePayments::SDK::Domain::PaymentErrorResponse, OnlinePayments::SDK::Domain::PaymentLinkEvent, OnlinePayments::SDK::Domain::PaymentLinkOrderInput, OnlinePayments::SDK::Domain::PaymentLinkOrderOutput, OnlinePayments::SDK::Domain::PaymentLinkResponse, OnlinePayments::SDK::Domain::PaymentLinkSpecificInput, OnlinePayments::SDK::Domain::PaymentOutput, OnlinePayments::SDK::Domain::PaymentProduct, OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput, OnlinePayments::SDK::Domain::PaymentProduct130SpecificThreeDSecure, OnlinePayments::SDK::Domain::PaymentProduct3012, OnlinePayments::SDK::Domain::PaymentProduct302SpecificData, OnlinePayments::SDK::Domain::PaymentProduct3203SpecificOutput, OnlinePayments::SDK::Domain::PaymentProduct3208SpecificInput, OnlinePayments::SDK::Domain::PaymentProduct3208SpecificOutput, OnlinePayments::SDK::Domain::PaymentProduct3209SpecificInput, OnlinePayments::SDK::Domain::PaymentProduct3209SpecificOutput, OnlinePayments::SDK::Domain::PaymentProduct320SpecificData, OnlinePayments::SDK::Domain::PaymentProduct5001SpecificOutput, OnlinePayments::SDK::Domain::PaymentProduct5100SpecificInput, OnlinePayments::SDK::Domain::PaymentProduct5402SpecificOutput, OnlinePayments::SDK::Domain::PaymentProduct5404, OnlinePayments::SDK::Domain::PaymentProduct5407, OnlinePayments::SDK::Domain::PaymentProduct5500SpecificOutput, OnlinePayments::SDK::Domain::PaymentProduct771SpecificOutput, OnlinePayments::SDK::Domain::PaymentProduct840CustomerAccount, OnlinePayments::SDK::Domain::PaymentProduct840SpecificOutput, OnlinePayments::SDK::Domain::PaymentProductDisplayHints, OnlinePayments::SDK::Domain::PaymentProductField, OnlinePayments::SDK::Domain::PaymentProductFieldDataRestrictions, OnlinePayments::SDK::Domain::PaymentProductFieldDisplayElement, OnlinePayments::SDK::Domain::PaymentProductFieldDisplayHints, OnlinePayments::SDK::Domain::PaymentProductFieldFormElement, OnlinePayments::SDK::Domain::PaymentProductFieldTooltip, OnlinePayments::SDK::Domain::PaymentProductFieldValidators, OnlinePayments::SDK::Domain::PaymentProductFilter, OnlinePayments::SDK::Domain::PaymentProductFilterHostedTokenization, OnlinePayments::SDK::Domain::PaymentProductFiltersHostedCheckout, OnlinePayments::SDK::Domain::PaymentProductFiltersHostedTokenization, OnlinePayments::SDK::Domain::PaymentProductGroup, OnlinePayments::SDK::Domain::PaymentProductNetworksResponse, OnlinePayments::SDK::Domain::PaymentReferences, OnlinePayments::SDK::Domain::PaymentResponse, OnlinePayments::SDK::Domain::PaymentStatusOutput, OnlinePayments::SDK::Domain::PayoutErrorResponse, OnlinePayments::SDK::Domain::PayoutOutput, OnlinePayments::SDK::Domain::PayoutResponse, OnlinePayments::SDK::Domain::PayoutResult, OnlinePayments::SDK::Domain::PayoutStatusOutput, OnlinePayments::SDK::Domain::PersonalInformation, OnlinePayments::SDK::Domain::PersonalInformationToken, OnlinePayments::SDK::Domain::PersonalName, OnlinePayments::SDK::Domain::PersonalNameToken, OnlinePayments::SDK::Domain::ProductDirectory, OnlinePayments::SDK::Domain::ProtectionEligibility, OnlinePayments::SDK::Domain::RangeValidator, OnlinePayments::SDK::Domain::RateDetails, OnlinePayments::SDK::Domain::RedirectData, OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificInput, OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificOutput, OnlinePayments::SDK::Domain::RedirectPaymentProduct3203SpecificInput, OnlinePayments::SDK::Domain::RedirectPaymentProduct3306SpecificInput, OnlinePayments::SDK::Domain::RedirectPaymentProduct5001SpecificInput, OnlinePayments::SDK::Domain::RedirectPaymentProduct5406SpecificInput, OnlinePayments::SDK::Domain::RedirectPaymentProduct5408SpecificInput, OnlinePayments::SDK::Domain::RedirectPaymentProduct809SpecificInput, OnlinePayments::SDK::Domain::RedirectPaymentProduct840SpecificInput, OnlinePayments::SDK::Domain::RedirectionData, OnlinePayments::SDK::Domain::RefundCardMethodSpecificOutput, OnlinePayments::SDK::Domain::RefundEWalletMethodSpecificOutput, OnlinePayments::SDK::Domain::RefundErrorResponse, OnlinePayments::SDK::Domain::RefundMobileMethodSpecificOutput, OnlinePayments::SDK::Domain::RefundOutput, OnlinePayments::SDK::Domain::RefundPaymentProduct840CustomerAccount, OnlinePayments::SDK::Domain::RefundPaymentProduct840SpecificOutput, OnlinePayments::SDK::Domain::RefundRedirectMethodSpecificOutput, OnlinePayments::SDK::Domain::RefundRequest, OnlinePayments::SDK::Domain::RefundResponse, OnlinePayments::SDK::Domain::RefundsResponse, OnlinePayments::SDK::Domain::RegularExpressionValidator, OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificInput, OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificInputBase, OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificOutput, OnlinePayments::SDK::Domain::SepaDirectDebitPaymentProduct771SpecificInput, OnlinePayments::SDK::Domain::SepaDirectDebitPaymentProduct771SpecificInputBase, OnlinePayments::SDK::Domain::SessionRequest, OnlinePayments::SDK::Domain::SessionResponse, OnlinePayments::SDK::Domain::Shipping, OnlinePayments::SDK::Domain::ShippingMethod, OnlinePayments::SDK::Domain::ShoppingCart, OnlinePayments::SDK::Domain::ShoppingCartExtension, OnlinePayments::SDK::Domain::ShowFormData, OnlinePayments::SDK::Domain::SubsequentCardPaymentMethodSpecificInput, OnlinePayments::SDK::Domain::SubsequentPaymentProduct5001SpecificInput, OnlinePayments::SDK::Domain::SubsequentPaymentRequest, OnlinePayments::SDK::Domain::SubsequentPaymentResponse, OnlinePayments::SDK::Domain::Surcharge, OnlinePayments::SDK::Domain::SurchargeCalculationCard, OnlinePayments::SDK::Domain::SurchargeForPaymentLink, OnlinePayments::SDK::Domain::SurchargeRate, OnlinePayments::SDK::Domain::SurchargeSpecificInput, OnlinePayments::SDK::Domain::SurchargeSpecificOutput, OnlinePayments::SDK::Domain::TestConnection, OnlinePayments::SDK::Domain::ThreeDSecure, OnlinePayments::SDK::Domain::ThreeDSecureBase, OnlinePayments::SDK::Domain::ThreeDSecureData, OnlinePayments::SDK::Domain::ThreeDSecureResults, OnlinePayments::SDK::Domain::TokenCard, OnlinePayments::SDK::Domain::TokenCardData, OnlinePayments::SDK::Domain::TokenCardSpecificInput, OnlinePayments::SDK::Domain::TokenData, OnlinePayments::SDK::Domain::TokenEWallet, OnlinePayments::SDK::Domain::TokenResponse, OnlinePayments::SDK::Domain::Transaction, OnlinePayments::SDK::Domain::ValueMappingElement, MetaDataProvider::ServerMetaInfo, Webhooks::WebhooksEvent
Class Method Summary collapse
-
.new_from_hash(hash) ⇒ Object
Create a new instance of this object (DataObject or descendant) from a hash containing attribute values in camelCase.
Instance Method Summary collapse
-
#from_hash(hash) ⇒ Object
Set attributes from values in parameter hash.
-
#to_h ⇒ Hash
Returns a hash representation of the DataObject.
Class Method Details
.new_from_hash(hash) ⇒ Object
Create a new instance of this object (DataObject or descendant) from a hash containing attribute values in camelCase. Note that the hash contains Strings as keys instead of more commonly used tokens.
20 21 22 23 24 |
# File 'lib/onlinepayments/sdk/data_object.rb', line 20 def self.new_from_hash(hash) obj = self.new obj.from_hash(hash) obj end |
Instance Method Details
#from_hash(hash) ⇒ Object
Set attributes from values in parameter hash. Should be overridden by descendants in order to properly restore their attributes from the hash. Note that the hash contains Strings as keys instead of more commonly used tokens.
29 |
# File 'lib/onlinepayments/sdk/data_object.rb', line 29 def from_hash(hash) end |
#to_h ⇒ Hash
Returns a hash representation of the DataObject. The hash contains camelCase representations of the variables, and their values. Should be overridden to add all instance variables of the object.
13 14 15 |
# File 'lib/onlinepayments/sdk/data_object.rb', line 13 def to_h {} end |