Class: Io::Flow::V0::Models::ReadyToFulfillV2
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Sent when an order is assigned to a fulfillment center in whole or in part. All assigned fulfillments for all centers will be included on the message.
Instance Attribute Summary collapse
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#ready_to_fulfill ⇒ Object
readonly
Returns the value of attribute ready_to_fulfill.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ReadyToFulfillV2
constructor
A new instance of ReadyToFulfillV2.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ ReadyToFulfillV2
Returns a new instance of ReadyToFulfillV2.
62807 62808 62809 62810 62811 62812 62813 62814 62815 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62807 def initialize(incoming={}) super(:discriminator => Event::Types::READY_TO_FULFILL_V2) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :ready_to_fulfill], 'ReadyToFulfillV2') @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) @ready_to_fulfill = (x = opts.delete(:ready_to_fulfill); x.is_a?(::Io::Flow::V0::Models::ReadyToFulfillDetails) ? x : ::Io::Flow::V0::Models::ReadyToFulfillDetails.new(x)) end |
Instance Attribute Details
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
62805 62806 62807 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62805 def event_id @event_id end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
62805 62806 62807 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62805 def organization @organization end |
#ready_to_fulfill ⇒ Object (readonly)
Returns the value of attribute ready_to_fulfill.
62805 62806 62807 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62805 def ready_to_fulfill @ready_to_fulfill end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
62805 62806 62807 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62805 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
62821 62822 62823 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62821 def copy(incoming={}) ReadyToFulfillV2.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
62825 62826 62827 62828 62829 62830 62831 62832 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62825 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :ready_to_fulfill => ready_to_fulfill.to_hash } end |
#to_json ⇒ Object
62817 62818 62819 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62817 def to_json JSON.dump(to_hash) end |