Class: Io::Flow::V0::Models::CrossdockShipment
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CrossdockShipment
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#center_id ⇒ Object
readonly
Returns the value of attribute center_id.
-
#order_number ⇒ Object
readonly
Returns the value of attribute order_number.
-
#partner_id ⇒ Object
readonly
Returns the value of attribute partner_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#tracking_id ⇒ Object
readonly
Returns the value of attribute tracking_id.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CrossdockShipment
constructor
A new instance of CrossdockShipment.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CrossdockShipment
Returns a new instance of CrossdockShipment.
17290 17291 17292 17293 17294 17295 17296 17297 17298 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17290 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:partner_id, :center_id, :tracking_id, :order_number, :status], 'CrossdockShipment') @partner_id = HttpClient::Preconditions.assert_class('partner_id', opts.delete(:partner_id), String) @center_id = HttpClient::Preconditions.assert_class('center_id', opts.delete(:center_id), String) @tracking_id = HttpClient::Preconditions.assert_class('tracking_id', opts.delete(:tracking_id), String) @order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String) @status = HttpClient::Preconditions.assert_class('status', opts.delete(:status), String) end |
Instance Attribute Details
#center_id ⇒ Object (readonly)
Returns the value of attribute center_id.
17288 17289 17290 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17288 def center_id @center_id end |
#order_number ⇒ Object (readonly)
Returns the value of attribute order_number.
17288 17289 17290 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17288 def order_number @order_number end |
#partner_id ⇒ Object (readonly)
Returns the value of attribute partner_id.
17288 17289 17290 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17288 def partner_id @partner_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
17288 17289 17290 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17288 def status @status end |
#tracking_id ⇒ Object (readonly)
Returns the value of attribute tracking_id.
17288 17289 17290 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17288 def tracking_id @tracking_id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
17304 17305 17306 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17304 def copy(incoming={}) CrossdockShipment.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
17308 17309 17310 17311 17312 17313 17314 17315 17316 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17308 def to_hash { :partner_id => partner_id, :center_id => center_id, :tracking_id => tracking_id, :order_number => order_number, :status => status } end |
#to_json ⇒ Object
17300 17301 17302 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17300 def to_json JSON.dump(to_hash) end |