class Io::Flow::V0::Models::OrderQuoteAddress
Attributes
city[R]
company[R]
country[R]
first_name[R]
last_name[R]
name[R]
postal[R]
province[R]
streets[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52954 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String)) @first_name = (x = opts.delete(:first_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('first_name', x, String)) @last_name = (x = opts.delete(:last_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('last_name', x, String)) @country = (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)) @streets = (x = opts.delete(:streets); x.nil? ? nil : HttpClient::Preconditions.assert_class('streets', x, Array).map { |v| HttpClient::Preconditions.assert_class('streets', v, String) }) @city = (x = opts.delete(:city); x.nil? ? nil : HttpClient::Preconditions.assert_class('city', x, String)) @province = (x = opts.delete(:province); x.nil? ? nil : HttpClient::Preconditions.assert_class('province', x, String)) @postal = (x = opts.delete(:postal); x.nil? ? nil : HttpClient::Preconditions.assert_class('postal', x, String)) @company = (x = opts.delete(:company); x.nil? ? nil : HttpClient::Preconditions.assert_class('company', x, String)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52971 def copy(incoming={}) OrderQuoteAddress.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52975 def to_hash { :name => name, :first_name => first_name, :last_name => last_name, :country => country, :streets => streets.nil? ? nil : streets, :city => city, :province => province, :postal => postal, :company => company } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52967 def to_json JSON.dump(to_hash) end