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.
37195 37196 37197 37198 37199 37200 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37195 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.
37193 37194 37195 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37193 def id @id end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
37193 37194 37195 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37193 def source @source end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
37206 37207 37208 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37206 def copy(incoming={}) CountryPicker.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
37210 37211 37212 37213 37214 37215 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37210 def to_hash { :id => id, :source => source.value } end |
#to_json ⇒ Object
37202 37203 37204 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37202 def to_json JSON.dump(to_hash) end |