Class: OnlinePayments::SDK::Domain::DataObject

Inherits:
Object
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/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

Communication::MetadataProvider::ServerMetaInfo, APIError, Acceptance, AccountOnFile, AccountOnFileAttribute, AccountOnFileDisplayHints, AcquirerInformation, AcquirerSelectionInformation, AddAuthorizationDetailsResponse, AdditionalOrderInput, Address, AddressPersonal, AirlineData, AirlineFlightLeg, AirlinePassenger, Amex, AmountBreakdown, AmountOfMoney, ApiParameters, ApplePayLineItem, ApplePayRecurringPaymentRequest, AuthenticationOptions, AutoCapture, BankAccountIban, BatchMetadata, BrowserData, CalculateSurchargeRequest, CalculateSurchargeResponse, CancelPaymentBatchRequest, CancelPaymentRequest, CancelPaymentResponse, Capture, CaptureOutput, CapturePaymentBatchRequest, CapturePaymentRequest, CaptureResponse, CaptureStatusOutput, CapturesResponse, CarRentalData, CarRentalPickupReturnData, CarRentalVehicleData, Card, CardBinDetails, CardDataWithoutCvv, CardEssentials, CardFraudResults, CardInfo, CardPaymentMethodSpecificInput, CardPaymentMethodSpecificInputBase, CardPaymentMethodSpecificInputForHostedCheckout, CardPaymentMethodSpecificOutput, CardPaymentMethodSpecificOutputSummary, CardPaymentMethodSpecificOutputSummaryCard, CardPayoutMethodSpecificInput, CardRecurrenceDetails, CardSource, CardToken, CardWithoutCvv, ClickToPay, CompanyInformation, CompletePaymentCardPaymentMethodSpecificInput, CompletePaymentRequest, CompletePaymentResponse, ContactDetails, CreateCertificateResponse, CreateHostedCheckoutRequest, CreateHostedCheckoutResponse, CreateHostedFieldsSessionRequest, CreateHostedFieldsSessionResponse, CreateHostedTokenizationRequest, CreateHostedTokenizationResponse, CreateMandateRequest, CreateMandateResponse, CreateMandateWithReturnUrl, CreatePaymentLinkRequest, CreatePaymentRequest, CreatePaymentResponse, CreatePayoutRequest, CreateTokenRequest, CreatedPaymentOutput, CreatedTokenResponse, CreditCardSpecificInputHostedTokenization, CreditCardValidationRules, CreditCardValidationRulesHostedTokenization, CrmToken, CsrRequest, CurrencyConversion, CurrencyConversionInput, CurrencyConversionRequest, CurrencyConversionResponse, CurrencyConversionResult, CurrencyConversionSpecificInput, CursorPaginationInfo, Customer, CustomerAccount, CustomerAccountAuthentication, CustomerBankAccount, CustomerDevice, CustomerDeviceOutput, CustomerOutput, CustomerPaymentActivity, CustomerToken, DccCardSource, DccProposal, DecryptedPaymentData, DetokenizationResponse, DetokenizedTokenResponse, DirectoryEntry, Discount, DpaData, DpaTransactionOptions, EmptyValidator, ErrorResponse, ExternalCardholderAuthenticationData, ExternalTokenLinked, Feedbacks, FixedListValidator, FraudFields, FraudResults, GPayThreeDSecure, GetBatchStatusResponse, GetHostedCheckoutResponse, GetHostedFieldsSessionResponse, GetHostedTokenizationResponse, GetIINDetailsRequest, GetIINDetailsResponse, GetMandateResponse, GetPaymentProductGroupsResponse, GetPaymentProductsResponse, GetPrivacyPolicyResponse, GiftCardPurchase, HostedCheckoutSpecificInput, HostedCheckoutSpecificOutput, IINDetail, ImportCofSeriesRequest, ImportCofSeriesResponse, IncrementAuthorizationRequest, IncrementAuthorizationResponse, LabelTemplateElement, LengthValidator, LineItem, LineItemDetail, LineItemInvoiceData, LoanRecipient, LodgingData, MandateAddress, MandateAddressResponse, MandateContactDetails, MandateCustomer, MandateCustomerResponse, MandateMerchantAction, MandatePersonalInformation, MandatePersonalInformationResponse, MandatePersonalName, MandatePersonalNameResponse, MandateRedirectData, MandateResponse, MarketPlace, Mastercard, MerchantAction, MobilePaymentData, MobilePaymentMethodHostedCheckoutSpecificInput, MobilePaymentMethodSpecificInput, MobilePaymentMethodSpecificOutput, MobilePaymentProduct302SpecificInput, MobilePaymentProduct320SpecificInput, MobileThreeDSecureChallengeParameters, MultiplePaymentInformation, NetworkTokenData, NetworkTokenEssentials, NetworkTokenLinked, OmnichannelPaymentSpecificInput, OmnichannelPayoutSpecificInput, OmnichannelRefundSpecificInput, OmnichannelSubsequentSpecificInput, OperationOutput, OperationPaymentReferences, Order, OrderLineDetails, OrderReferences, OrderStatusOutput, OrderTypeInformation, OtherDetails, PaymentAccountOnFile, PaymentContext, PaymentCreationOutput, PaymentDetailsResponse, PaymentErrorResponse, PaymentLinkEvent, PaymentLinkOrderInput, PaymentLinkOrderOutput, PaymentLinkResponse, PaymentLinkSpecificInput, PaymentLinksResponse, PaymentOutput, PaymentOutputSummary, PaymentProduct, PaymentProduct11, PaymentProduct130SpecificInput, PaymentProduct130SpecificThreeDSecure, PaymentProduct3012, PaymentProduct3012SpecificInput, PaymentProduct3013SpecificInput, PaymentProduct302SpecificData, PaymentProduct3203SpecificOutput, PaymentProduct3204SpecificOutput, PaymentProduct3208SpecificInput, PaymentProduct3208SpecificOutput, PaymentProduct3209SpecificInput, PaymentProduct3209SpecificOutput, PaymentProduct320SpecificData, PaymentProduct350, PaymentProduct5001, PaymentProduct5001SpecificOutput, PaymentProduct5002SpecificData, PaymentProduct5002SpecificInput, PaymentProduct5002defaultBrandParameters, PaymentProduct5100SpecificInput, PaymentProduct5402SpecificOutput, PaymentProduct5404, PaymentProduct5407, PaymentProduct5412, PaymentProduct5500SpecificOutput, PaymentProduct5704AutoCapture, PaymentProduct771SpecificOutput, PaymentProduct840, PaymentProduct840CustomerAccount, PaymentProduct840SpecificOutput, PaymentProductDisplayHints, PaymentProductField, PaymentProductFieldDataRestrictions, PaymentProductFieldDisplayElement, PaymentProductFieldDisplayHints, PaymentProductFieldFormElement, PaymentProductFieldTooltip, PaymentProductFieldValidators, PaymentProductFilter, PaymentProductFilterHostedTokenization, PaymentProductFiltersHostedCheckout, PaymentProductFiltersHostedTokenization, PaymentProductGroup, PaymentProductNetworksResponse, PaymentProductSession302SpecificInput, PaymentProductSession302SpecificOutput, PaymentProductSessionRequest, PaymentProductSessionResponse, PaymentReferences, PaymentResponse, PaymentStatusOutput, PaymentStatusOutputSummary, PaymentSummary, PaymentsReportResponse, PayoutCardPaymentMethodSpecificOutput, PayoutErrorResponse, PayoutOutput, PayoutResponse, PayoutResult, PayoutStatusOutput, PendingAuthentication, PersonalInformation, PersonalInformationToken, PersonalName, PersonalNameToken, ProblemDetailsResponse, Product302Recurring, Product320Recurring, ProductDirectory, ProtectionEligibility, RangeValidator, RateDetails, ReattemptInstructions, ReattemptInstructionsConditions, RedirectData, RedirectPaymentMethodSpecificInput, RedirectPaymentMethodSpecificOutput, RedirectPaymentProduct11SpecificInput, RedirectPaymentProduct3103SpecificInput, RedirectPaymentProduct3112SpecificInput, RedirectPaymentProduct3116SpecificInput, RedirectPaymentProduct3203SpecificInput, RedirectPaymentProduct3204SpecificInput, RedirectPaymentProduct3302SpecificInput, RedirectPaymentProduct3306SpecificInput, RedirectPaymentProduct3307SpecificInput, RedirectPaymentProduct5001SpecificInput, RedirectPaymentProduct5300SpecificInput, RedirectPaymentProduct5301SpecificInput, RedirectPaymentProduct5402SpecificInput, RedirectPaymentProduct5403SpecificInput, RedirectPaymentProduct5406SpecificInput, RedirectPaymentProduct5407SpecificInput, RedirectPaymentProduct5408SpecificInput, RedirectPaymentProduct5410SpecificInput, RedirectPaymentProduct5412SpecificInput, RedirectPaymentProduct5601SpecificInput, RedirectPaymentProduct809SpecificInput, RedirectPaymentProduct840SpecificInput, RedirectPaymentProduct900SpecificInput, RedirectionData, RefundCardMethodSpecificOutput, RefundEWalletMethodSpecificOutput, RefundErrorResponse, RefundMobileMethodSpecificOutput, RefundOutput, RefundPaymentBatchRequest, RefundPaymentProduct840CustomerAccount, RefundPaymentProduct840SpecificOutput, RefundRedirectMethodSpecificOutput, RefundRedirectPaymentMethodSpecificInput, RefundRedirectPaymentProduct900SpecificInput, RefundRequest, RefundResponse, RefundsResponse, RegularExpressionValidator, RevokeMandateRequest, SendTestRequest, SepaDirectDebitPaymentMethodSpecificInput, SepaDirectDebitPaymentMethodSpecificInputBase, SepaDirectDebitPaymentMethodSpecificOutput, SepaDirectDebitPaymentProduct771SpecificInput, SepaDirectDebitPaymentProduct771SpecificInputBase, SessionData, SessionDetails, SessionRequest, SessionResponse, Shipping, ShippingDetail, ShippingMethod, ShoppingCart, ShoppingCartExtension, ShoppingCartOutput, ShowFormData, ShowInstructionsData, SplitPaymentProductFilter, SplitPaymentProductFiltersHostedCheckout, SubMerchant, SubmitBatchRequestBody, SubmitBatchResponse, SubsequentCardPaymentMethodSpecificInput, SubsequentPaymentBatchRequest, SubsequentPaymentProduct5001SpecificInput, SubsequentPaymentRequest, SubsequentPaymentResponse, Surcharge, SurchargeCalculationCard, SurchargeForPaymentLink, SurchargeRate, SurchargeSpecificInput, SurchargeSpecificOutput, TestConnection, ThreeDSecure, ThreeDSecureBase, ThreeDSecureData, ThreeDSecureResults, ThreeDsInputData, TokenCard, TokenCardData, TokenCardSpecificInput, TokenData, TokenEWallet, TokenInfo, TokenResponse, Transaction, UpdateAuthorizationAdditionalDataRequest, ValidateCredentialsRequest, ValidateCredentialsResponse, ValueMappingElement, Visa, VisaAuthenticationOptions, Webhooks::WebhooksEvent

Class Method Summary collapse

Instance Method Summary collapse

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.



19
20
21
22
23
# File 'lib/onlinepayments/sdk/domain/data_object.rb', line 19

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.



28
# File 'lib/onlinepayments/sdk/domain/data_object.rb', line 28

def from_hash(hash) end

#to_hHash

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.

Returns:

  • (Hash)


12
13
14
# File 'lib/onlinepayments/sdk/domain/data_object.rb', line 12

def to_h
  {}
end