Class: Io::Flow::V0::Models::CountryPicker
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CountryPicker
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
The Country Picker manages the configuration of your country picker.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CountryPicker
constructor
A new instance of CountryPicker.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CountryPicker
Returns a new instance of CountryPicker.
26819 26820 26821 26822 26823 26824 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26819 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :source], 'CountryPicker') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @source = (x = opts.delete(:source); x.is_a?(::Io::Flow::V0::Models::CountryPickerSource) ? x : ::Io::Flow::V0::Models::CountryPickerSource.apply(x)) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
26817 26818 26819 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26817 def id @id end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
26817 26818 26819 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26817 def source @source end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
26830 26831 26832 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26830 def copy(incoming={}) CountryPicker.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
26834 26835 26836 26837 26838 26839 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26834 def to_hash { :id => id, :source => source.value } end |
#to_json ⇒ Object
26826 26827 26828 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26826 def to_json JSON.dump(to_hash) end |