class Io::Flow::V0::Models::CardSummary
Card
Summary is the card without the token
Attributes
address[R]
expiration[R]
id[R]
iin[R]
issuer[R]
last4[R]
name[R]
type[R]
Public Class Methods
new(incoming={})
click to toggle source
Calls superclass method
Io::Flow::V0::Models::ExpandableCard::new
# File lib/flow_commerce/flow_api_v0_client.rb, line 33666 def initialize(incoming={}) super(:discriminator => ExpandableCard::Types::CARD_SUMMARY) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :type, :expiration, :iin, :last4, :name], 'CardSummary') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::CardType) ? x : ::Io::Flow::V0::Models::CardType.apply(x)) @expiration = (x = opts.delete(:expiration); x.is_a?(::Io::Flow::V0::Models::Expiration) ? x : ::Io::Flow::V0::Models::Expiration.new(x)) @iin = HttpClient::Preconditions.assert_class('iin', opts.delete(:iin), 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 = HttpClient::Preconditions.assert_class('last4', opts.delete(:last4), String) @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) @address = (x = opts.delete(:address); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::BillingAddress) ? x : ::Io::Flow::V0::Models::BillingAddress.new(x))) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 33684 def copy(incoming={}) CardSummary.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
subtype_to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 33688 def subtype_to_hash { :id => id, :type => type.value, :expiration => expiration.to_hash, :iin => iin, :issuer => issuer.nil? ? nil : issuer.to_hash, :last4 => last4, :name => name, :address => address.nil? ? nil : address.to_hash } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 33680 def to_json JSON.dump(to_hash) end