Class: Io::Flow::V0::Models::MerchantInfo
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::MerchantInfo
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#legal_name ⇒ Object
readonly
Returns the value of attribute legal_name.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#region_value ⇒ Object
readonly
Returns the value of attribute region_value.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ MerchantInfo
constructor
A new instance of MerchantInfo.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ MerchantInfo
Returns a new instance of MerchantInfo.
46541 46542 46543 46544 46545 46546 46547 46548 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46541 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:country, :region, :region_value], 'MerchantInfo') @legal_name = (x = opts.delete(:legal_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('legal_name', x, String)) @country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String) @region = (x = opts.delete(:region); x.is_a?(::Io::Flow::V0::Models::RegionType) ? x : ::Io::Flow::V0::Models::RegionType.apply(x)) @region_value = HttpClient::Preconditions.assert_class('region_value', opts.delete(:region_value), String) end |
Instance Attribute Details
#country ⇒ Object (readonly)
Returns the value of attribute country.
46539 46540 46541 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46539 def country @country end |
#legal_name ⇒ Object (readonly)
Returns the value of attribute legal_name.
46539 46540 46541 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46539 def legal_name @legal_name end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
46539 46540 46541 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46539 def region @region end |
#region_value ⇒ Object (readonly)
Returns the value of attribute region_value.
46539 46540 46541 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46539 def region_value @region_value end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
46554 46555 46556 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46554 def copy(incoming={}) MerchantInfo.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
46558 46559 46560 46561 46562 46563 46564 46565 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46558 def to_hash { :legal_name => legal_name, :country => country, :region => region.value, :region_value => region_value } end |
#to_json ⇒ Object
46550 46551 46552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46550 def to_json JSON.dump(to_hash) end |