Class: Io::Flow::V0::Models::CardUpserted
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#expiration ⇒ Object
readonly
Returns the value of attribute expiration.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#iin ⇒ Object
readonly
Returns the value of attribute iin.
-
#last4 ⇒ Object
readonly
Returns the value of attribute last4.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CardUpserted
constructor
A new instance of CardUpserted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ CardUpserted
Returns a new instance of CardUpserted.
12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 12999 13000 13001 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12987 def initialize(incoming={}) super(:discriminator => Event::Types::CARD_UPSERTED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id, :type, :expiration, :iin, :last4, :name], 'CardUpserted') @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String) @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime) @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String) @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @type = HttpClient::Preconditions.assert_class('type', opts.delete(:type), String) @expiration = HttpClient::Preconditions.assert_class('expiration', HttpClient::Helper.to_object(opts.delete(:expiration)), Hash) @iin = HttpClient::Preconditions.assert_class('iin', opts.delete(:iin), String) @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 : HttpClient::Preconditions.assert_class('address', HttpClient::Helper.to_object(x), Hash)) end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
12985 12986 12987 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12985 def address @address end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
12985 12986 12987 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12985 def event_id @event_id end |
#expiration ⇒ Object (readonly)
Returns the value of attribute expiration.
12985 12986 12987 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12985 def expiration @expiration end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
12985 12986 12987 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12985 def id @id end |
#iin ⇒ Object (readonly)
Returns the value of attribute iin.
12985 12986 12987 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12985 def iin @iin end |
#last4 ⇒ Object (readonly)
Returns the value of attribute last4.
12985 12986 12987 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12985 def last4 @last4 end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
12985 12986 12987 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12985 def name @name end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
12985 12986 12987 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12985 def organization @organization end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
12985 12986 12987 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12985 def @timestamp end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
12985 12986 12987 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12985 def type @type end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
13007 13008 13009 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13007 def copy(incoming={}) CardUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
13011 13012 13013 13014 13015 13016 13017 13018 13019 13020 13021 13022 13023 13024 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13011 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :id => id, :type => type, :expiration => expiration, :iin => iin, :last4 => last4, :name => name, :address => address } end |
#to_json ⇒ Object
13003 13004 13005 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13003 def to_json JSON.dump(to_hash) end |