Class: Io::Flow::V0::Models::MerchantApplicationDeleted
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#merchant_application ⇒ Object
readonly
Returns the value of attribute merchant_application.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ MerchantApplicationDeleted
constructor
A new instance of MerchantApplicationDeleted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ MerchantApplicationDeleted
Returns a new instance of MerchantApplicationDeleted.
49912 49913 49914 49915 49916 49917 49918 49919 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49912 def initialize(incoming={}) super(:discriminator => Event::Types::MERCHANT_APPLICATION_DELETED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :merchant_application], 'MerchantApplicationDeleted') @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) @merchant_application = (x = opts.delete(:merchant_application); x.is_a?(::Io::Flow::V0::Models::MerchantApplication) ? x : ::Io::Flow::V0::Models::MerchantApplication.from_json(x)) end |
Instance Attribute Details
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
49910 49911 49912 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49910 def event_id @event_id end |
#merchant_application ⇒ Object (readonly)
Returns the value of attribute merchant_application.
49910 49911 49912 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49910 def merchant_application @merchant_application end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
49910 49911 49912 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49910 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
49925 49926 49927 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49925 def copy(incoming={}) MerchantApplicationDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
49929 49930 49931 49932 49933 49934 49935 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49929 def subtype_to_hash { :event_id => event_id, :timestamp => , :merchant_application => merchant_application.to_hash } end |
#to_json ⇒ Object
49921 49922 49923 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49921 def to_json JSON.dump(to_hash) end |