Class: Io::Flow::V0::Models::CrossdockShipment

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ CrossdockShipment

Returns a new instance of CrossdockShipment.



16971
16972
16973
16974
16975
16976
16977
16978
16979
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16971

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_idObject (readonly)

Returns the value of attribute center_id.



16969
16970
16971
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16969

def center_id
  @center_id
end

#order_numberObject (readonly)

Returns the value of attribute order_number.



16969
16970
16971
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16969

def order_number
  @order_number
end

#partner_idObject (readonly)

Returns the value of attribute partner_id.



16969
16970
16971
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16969

def partner_id
  @partner_id
end

#statusObject (readonly)

Returns the value of attribute status.



16969
16970
16971
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16969

def status
  @status
end

#tracking_idObject (readonly)

Returns the value of attribute tracking_id.



16969
16970
16971
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16969

def tracking_id
  @tracking_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



16985
16986
16987
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16985

def copy(incoming={})
  CrossdockShipment.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



16989
16990
16991
16992
16993
16994
16995
16996
16997
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16989

def to_hash
  {
    :partner_id => partner_id,
    :center_id => center_id,
    :tracking_id => tracking_id,
    :order_number => order_number,
    :status => status
  }
end

#to_jsonObject



16981
16982
16983
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16981

def to_json
  JSON.dump(to_hash)
end