Class: Io::Flow::V0::Models::CardConfirmationSummary
- Inherits:
-
ConfirmationDetails
- Object
- ConfirmationDetails
- Io::Flow::V0::Models::CardConfirmationSummary
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Represents an online payment via a tokenized card
Instance Attribute Summary collapse
-
#expiration ⇒ Object
readonly
Returns the value of attribute expiration.
-
#funding_type ⇒ Object
readonly
Returns the value of attribute funding_type.
-
#iin ⇒ Object
readonly
Returns the value of attribute iin.
-
#issuer ⇒ Object
readonly
Returns the value of attribute issuer.
-
#last4 ⇒ Object
readonly
Returns the value of attribute last4.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from ConfirmationDetails
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CardConfirmationSummary
constructor
A new instance of CardConfirmationSummary.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from ConfirmationDetails
Constructor Details
#initialize(incoming = {}) ⇒ CardConfirmationSummary
Returns a new instance of CardConfirmationSummary.
33268 33269 33270 33271 33272 33273 33274 33275 33276 33277 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33268 def initialize(incoming={}) super(:discriminator => ConfirmationDetails::Types::CARD_CONFIRMATION_SUMMARY) opts = HttpClient::Helper.symbolize_keys(incoming) @type = (x = opts.delete(:type); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::CardType) ? x : ::Io::Flow::V0::Models::CardType.apply(x))) @funding_type = (x = opts.delete(:funding_type); x.nil? ? nil : HttpClient::Preconditions.assert_class('funding_type', x, String)) @expiration = (x = opts.delete(:expiration); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Expiration) ? x : ::Io::Flow::V0::Models::Expiration.new(x))) @iin = (x = opts.delete(:iin); x.nil? ? nil : HttpClient::Preconditions.assert_class('iin', x, String)) @issuer = (x = opts.delete(:issuer); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::IssuerSummary) ? x : ::Io::Flow::V0::Models::IssuerSummary.new(x))) @last4 = (x = opts.delete(:last4); x.nil? ? nil : HttpClient::Preconditions.assert_class('last4', x, String)) end |
Instance Attribute Details
#expiration ⇒ Object (readonly)
Returns the value of attribute expiration.
33266 33267 33268 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33266 def expiration @expiration end |
#funding_type ⇒ Object (readonly)
Returns the value of attribute funding_type.
33266 33267 33268 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33266 def funding_type @funding_type end |
#iin ⇒ Object (readonly)
Returns the value of attribute iin.
33266 33267 33268 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33266 def iin @iin end |
#issuer ⇒ Object (readonly)
Returns the value of attribute issuer.
33266 33267 33268 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33266 def issuer @issuer end |
#last4 ⇒ Object (readonly)
Returns the value of attribute last4.
33266 33267 33268 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33266 def last4 @last4 end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
33266 33267 33268 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33266 def type @type end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
33283 33284 33285 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33283 def copy(incoming={}) CardConfirmationSummary.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
33287 33288 33289 33290 33291 33292 33293 33294 33295 33296 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33287 def subtype_to_hash { :type => type.nil? ? nil : type.value, :funding_type => funding_type, :expiration => expiration.nil? ? nil : expiration.to_hash, :iin => iin, :issuer => issuer.nil? ? nil : issuer.to_hash, :last4 => last4 } end |
#to_json ⇒ Object
33279 33280 33281 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33279 def to_json JSON.dump(to_hash) end |