Class: Io::Flow::V0::Models::AuthorizationForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::AuthorizationForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Flow provides several different options for creating an authorization
Direct Known Subclasses
AchAuthorizationForm, AuthorizationCopyForm, AuthorizationFormUndefinedType, CardPaymentSourceAuthorizationForm, DirectAuthorizationForm, InlineAuthorizationForm, MerchantOfRecordAuthorizationForm, OnlinePaymentAuthorizationForm, PaypalAuthorizationForm, RedirectAuthorizationForm
Defined Under Namespace
Modules: Types
Instance Attribute Summary collapse
-
#discriminator ⇒ Object
readonly
Returns the value of attribute discriminator.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(incoming = {}) ⇒ AuthorizationForm
constructor
A new instance of AuthorizationForm.
- #subtype_to_hash ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ AuthorizationForm
Returns a new instance of AuthorizationForm.
9654 9655 9656 9657 9658 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9654 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:discriminator], 'AuthorizationForm') @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String) end |
Instance Attribute Details
#discriminator ⇒ Object (readonly)
Returns the value of attribute discriminator.
9652 9653 9654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9652 def discriminator @discriminator end |
Class Method Details
.from_json(hash) ⇒ Object
Instance Method Details
#subtype_to_hash ⇒ Object
9660 9661 9662 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9660 def subtype_to_hash raise 'Cannot serialize an instance of authorization_form directly - must use one of the specific types: authorization_copy_form, direct_authorization_form, merchant_of_record_authorization_form, paypal_authorization_form, redirect_authorization_form, inline_authorization_form, ach_authorization_form, card_payment_source_authorization_form, online_payment_authorization_form' end |
#to_hash ⇒ Object
9664 9665 9666 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9664 def to_hash subtype_to_hash.merge(:discriminator => @discriminator) end |