Class: Io::Flow::V0::Models::ThirdPartyLogisticsPartner

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 = {}) ⇒ ThirdPartyLogisticsPartner

Returns a new instance of ThirdPartyLogisticsPartner.



65288
65289
65290
65291
65292
65293
65294
65295
65296
65297
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65288

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:warehouse_address, :third_party_logistics_pick_up_time_window, :pickup_location, :operations_contact], 'ThirdPartyLogisticsPartner')
  @warehouse_address = (x = opts.delete(:warehouse_address); x.is_a?(::Io::Flow::V0::Models::BillingAddress) ? x : ::Io::Flow::V0::Models::BillingAddress.new(x))
  @warehouse_url = (x = opts.delete(:warehouse_url); x.nil? ? nil : HttpClient::Preconditions.assert_class('warehouse_url', x, String))
  @third_party_logistics_pick_up_time_window = (x = opts.delete(:third_party_logistics_pick_up_time_window); x.is_a?(::Io::Flow::V0::Models::ThirdPartyLogisticsPickUpTimeWindow) ? x : ::Io::Flow::V0::Models::ThirdPartyLogisticsPickUpTimeWindow.new(x))
  @pickup_location = (x = opts.delete(:pickup_location); x.is_a?(::Io::Flow::V0::Models::BillingAddress) ? x : ::Io::Flow::V0::Models::BillingAddress.new(x))
  @pickup_instructions = (x = opts.delete(:pickup_instructions); x.nil? ? nil : HttpClient::Preconditions.assert_class('pickup_instructions', x, String))
  @operations_contact = (x = opts.delete(:operations_contact); x.is_a?(::Io::Flow::V0::Models::Contact) ? x : ::Io::Flow::V0::Models::Contact.new(x))
end

Instance Attribute Details

#operations_contactObject (readonly)

Returns the value of attribute operations_contact.



65286
65287
65288
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65286

def operations_contact
  @operations_contact
end

#pickup_instructionsObject (readonly)

Returns the value of attribute pickup_instructions.



65286
65287
65288
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65286

def pickup_instructions
  @pickup_instructions
end

#pickup_locationObject (readonly)

Returns the value of attribute pickup_location.



65286
65287
65288
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65286

def pickup_location
  @pickup_location
end

#third_party_logistics_pick_up_time_windowObject (readonly)

Returns the value of attribute third_party_logistics_pick_up_time_window.



65286
65287
65288
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65286

def third_party_logistics_pick_up_time_window
  @third_party_logistics_pick_up_time_window
end

#warehouse_addressObject (readonly)

Returns the value of attribute warehouse_address.



65286
65287
65288
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65286

def warehouse_address
  @warehouse_address
end

#warehouse_urlObject (readonly)

Returns the value of attribute warehouse_url.



65286
65287
65288
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65286

def warehouse_url
  @warehouse_url
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



65303
65304
65305
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65303

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

#to_hashObject



65307
65308
65309
65310
65311
65312
65313
65314
65315
65316
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65307

def to_hash
  {
    :warehouse_address => warehouse_address.to_hash,
    :warehouse_url => warehouse_url,
    :third_party_logistics_pick_up_time_window => third_party_logistics_pick_up_time_window.to_hash,
    :pickup_location => pickup_location.to_hash,
    :pickup_instructions => pickup_instructions,
    :operations_contact => operations_contact.to_hash
  }
end

#to_jsonObject



65299
65300
65301
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65299

def to_json
  JSON.dump(to_hash)
end