Class: Io::Flow::V0::Models::MerchantOnboardingAddress
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::MerchantOnboardingAddress
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
-
#postal ⇒ Object
readonly
Returns the value of attribute postal.
-
#province ⇒ Object
readonly
Returns the value of attribute province.
-
#streets ⇒ Object
readonly
Returns the value of attribute streets.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ MerchantOnboardingAddress
constructor
A new instance of MerchantOnboardingAddress.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ MerchantOnboardingAddress
Returns a new instance of MerchantOnboardingAddress.
50366 50367 50368 50369 50370 50371 50372 50373 50374 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50366 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @full_name = (x = opts.delete(:full_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('full_name', 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)) @country = (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)) end |
Instance Attribute Details
#city ⇒ Object (readonly)
Returns the value of attribute city.
50364 50365 50366 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50364 def city @city end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
50364 50365 50366 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50364 def country @country end |
#full_name ⇒ Object (readonly)
Returns the value of attribute full_name.
50364 50365 50366 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50364 def full_name @full_name end |
#postal ⇒ Object (readonly)
Returns the value of attribute postal.
50364 50365 50366 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50364 def postal @postal end |
#province ⇒ Object (readonly)
Returns the value of attribute province.
50364 50365 50366 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50364 def province @province end |
#streets ⇒ Object (readonly)
Returns the value of attribute streets.
50364 50365 50366 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50364 def streets @streets end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
50380 50381 50382 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50380 def copy(incoming={}) MerchantOnboardingAddress.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
50384 50385 50386 50387 50388 50389 50390 50391 50392 50393 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50384 def to_hash { :full_name => full_name, :streets => streets.nil? ? nil : streets, :city => city, :province => province, :postal => postal, :country => country } end |
#to_json ⇒ Object
50376 50377 50378 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50376 def to_json JSON.dump(to_hash) end |