Class: Io::Flow::V0::Models::PaypalAuthorizationDetails
- Inherits:
-
OnlineAuthorizationDetails
- Object
- OnlineAuthorizationDetails
- Io::Flow::V0::Models::PaypalAuthorizationDetails
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Represents online payment
Instance Attribute Summary collapse
-
#approval_url ⇒ Object
readonly
Returns the value of attribute approval_url.
-
#payer_email ⇒ Object
readonly
Returns the value of attribute payer_email.
-
#payer_id ⇒ Object
readonly
Returns the value of attribute payer_id.
-
#payer_status ⇒ Object
readonly
Returns the value of attribute payer_status.
-
#payment_id ⇒ Object
readonly
Returns the value of attribute payment_id.
-
#payment_method ⇒ Object
readonly
Returns the value of attribute payment_method.
-
#payment_state ⇒ Object
readonly
Returns the value of attribute payment_state.
Attributes inherited from OnlineAuthorizationDetails
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaypalAuthorizationDetails
constructor
A new instance of PaypalAuthorizationDetails.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from OnlineAuthorizationDetails
Constructor Details
#initialize(incoming = {}) ⇒ PaypalAuthorizationDetails
Returns a new instance of PaypalAuthorizationDetails.
59355 59356 59357 59358 59359 59360 59361 59362 59363 59364 59365 59366 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59355 def initialize(incoming={}) super(:discriminator => OnlineAuthorizationDetails::Types::PAYPAL_AUTHORIZATION_DETAILS) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:payment_id], 'PaypalAuthorizationDetails') @payment_id = HttpClient::Preconditions.assert_class('payment_id', opts.delete(:payment_id), String) @payment_method = (x = opts.delete(:payment_method); x.nil? ? nil : HttpClient::Preconditions.assert_class('payment_method', x, String)) @payment_state = (x = opts.delete(:payment_state); x.nil? ? nil : HttpClient::Preconditions.assert_class('payment_state', x, String)) @payer_id = (x = opts.delete(:payer_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('payer_id', x, String)) @payer_email = (x = opts.delete(:payer_email); x.nil? ? nil : HttpClient::Preconditions.assert_class('payer_email', x, String)) @payer_status = (x = opts.delete(:payer_status); x.nil? ? nil : HttpClient::Preconditions.assert_class('payer_status', x, String)) @approval_url = (x = opts.delete(:approval_url); x.nil? ? nil : HttpClient::Preconditions.assert_class('approval_url', x, String)) end |
Instance Attribute Details
#approval_url ⇒ Object (readonly)
Returns the value of attribute approval_url.
59353 59354 59355 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59353 def approval_url @approval_url end |
#payer_email ⇒ Object (readonly)
Returns the value of attribute payer_email.
59353 59354 59355 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59353 def payer_email @payer_email end |
#payer_id ⇒ Object (readonly)
Returns the value of attribute payer_id.
59353 59354 59355 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59353 def payer_id @payer_id end |
#payer_status ⇒ Object (readonly)
Returns the value of attribute payer_status.
59353 59354 59355 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59353 def payer_status @payer_status end |
#payment_id ⇒ Object (readonly)
Returns the value of attribute payment_id.
59353 59354 59355 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59353 def payment_id @payment_id end |
#payment_method ⇒ Object (readonly)
Returns the value of attribute payment_method.
59353 59354 59355 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59353 def payment_method @payment_method end |
#payment_state ⇒ Object (readonly)
Returns the value of attribute payment_state.
59353 59354 59355 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59353 def payment_state @payment_state end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
59372 59373 59374 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59372 def copy(incoming={}) PaypalAuthorizationDetails.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
59376 59377 59378 59379 59380 59381 59382 59383 59384 59385 59386 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59376 def subtype_to_hash { :payment_id => payment_id, :payment_method => payment_method, :payment_state => payment_state, :payer_id => payer_id, :payer_email => payer_email, :payer_status => payer_status, :approval_url => approval_url } end |
#to_json ⇒ Object
59368 59369 59370 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59368 def to_json JSON.dump(to_hash) end |