Class: Io::Flow::V0::Models::MerchantApplicationUpserted
- 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 = {}) ⇒ MerchantApplicationUpserted
constructor
A new instance of MerchantApplicationUpserted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ MerchantApplicationUpserted
Returns a new instance of MerchantApplicationUpserted.
49943 49944 49945 49946 49947 49948 49949 49950 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49943 def initialize(incoming={}) super(:discriminator => Event::Types::MERCHANT_APPLICATION_UPSERTED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :merchant_application], 'MerchantApplicationUpserted') @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.
49941 49942 49943 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49941 def event_id @event_id end |
#merchant_application ⇒ Object (readonly)
Returns the value of attribute merchant_application.
49941 49942 49943 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49941 def merchant_application @merchant_application end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
49941 49942 49943 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49941 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
49956 49957 49958 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49956 def copy(incoming={}) MerchantApplicationUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
49960 49961 49962 49963 49964 49965 49966 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49960 def subtype_to_hash { :event_id => event_id, :timestamp => , :merchant_application => merchant_application.to_hash } end |
#to_json ⇒ Object
49952 49953 49954 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49952 def to_json JSON.dump(to_hash) end |