Class: Io::Flow::V0::Models::OrderServiceChangeRequest
- 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.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderServiceChangeRequest
constructor
A new instance of OrderServiceChangeRequest.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ OrderServiceChangeRequest
Returns a new instance of OrderServiceChangeRequest.
39997 39998 39999 40000 40001 40002 40003 40004 40005 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39997 def initialize(incoming={}) super(:discriminator => Event::Types::ORDER_SERVICE_CHANGE_REQUEST) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :request], 'OrderServiceChangeRequest') @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String) = 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) @request = (x = opts.delete(:request); x.is_a?(::Io::Flow::V0::Models::OrderServiceChangeRequestData) ? x : ::Io::Flow::V0::Models::OrderServiceChangeRequestData.new(x)) end |
Instance Attribute Details
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
39995 39996 39997 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39995 def event_id @event_id end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
39995 39996 39997 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39995 def organization @organization end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
39995 39996 39997 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39995 def request @request end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
39995 39996 39997 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39995 def end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
40011 40012 40013 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40011 def copy(incoming={}) OrderServiceChangeRequest.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
40015 40016 40017 40018 40019 40020 40021 40022 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40015 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :request => request.to_hash } end |
#to_json ⇒ Object
40007 40008 40009 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40007 def to_json JSON.dump(to_hash) end |