Class: Io::Flow::V0::Models::OnlinePaymentAuthorizationForm
- Inherits:
-
AuthorizationForm
- Object
- AuthorizationForm
- Io::Flow::V0::Models::OnlinePaymentAuthorizationForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#payment_id ⇒ Object
readonly
Returns the value of attribute payment_id.
Attributes inherited from AuthorizationForm
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OnlinePaymentAuthorizationForm
constructor
A new instance of OnlinePaymentAuthorizationForm.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from AuthorizationForm
Constructor Details
#initialize(incoming = {}) ⇒ OnlinePaymentAuthorizationForm
Returns a new instance of OnlinePaymentAuthorizationForm.
51065 51066 51067 51068 51069 51070 51071 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51065 def initialize(incoming={}) super(:discriminator => AuthorizationForm::Types::ONLINE_PAYMENT_AUTHORIZATION_FORM) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:payment_id], 'OnlinePaymentAuthorizationForm') @payment_id = HttpClient::Preconditions.assert_class('payment_id', opts.delete(:payment_id), String) @key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String)) end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
51063 51064 51065 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51063 def key @key end |
#payment_id ⇒ Object (readonly)
Returns the value of attribute payment_id.
51063 51064 51065 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51063 def payment_id @payment_id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
51077 51078 51079 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51077 def copy(incoming={}) OnlinePaymentAuthorizationForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
51081 51082 51083 51084 51085 51086 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51081 def subtype_to_hash { :payment_id => payment_id, :key => key } end |
#to_json ⇒ Object
51073 51074 51075 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51073 def to_json JSON.dump(to_hash) end |