Class: Io::Flow::V0::Models::AddressConfiguration
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::AddressConfiguration
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#field_validation ⇒ Object
readonly
Returns the value of attribute field_validation.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ AddressConfiguration
constructor
A new instance of AddressConfiguration.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ AddressConfiguration
Returns a new instance of AddressConfiguration.
19648 19649 19650 19651 19652 19653 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19648 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:country, :field_validation], 'AddressConfiguration') @country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String) @field_validation = (x = opts.delete(:field_validation); x.is_a?(::Io::Flow::V0::Models::AddressFieldValidation) ? x : ::Io::Flow::V0::Models::AddressFieldValidation.new(x)) end |
Instance Attribute Details
#country ⇒ Object (readonly)
Returns the value of attribute country.
19646 19647 19648 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19646 def country @country end |
#field_validation ⇒ Object (readonly)
Returns the value of attribute field_validation.
19646 19647 19648 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19646 def field_validation @field_validation end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
19659 19660 19661 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19659 def copy(incoming={}) AddressConfiguration.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
19663 19664 19665 19666 19667 19668 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19663 def to_hash { :country => country, :field_validation => field_validation.to_hash } end |
#to_json ⇒ Object
19655 19656 19657 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19655 def to_json JSON.dump(to_hash) end |