Class: Io::Flow::V0::Models::CountryPickerForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CountryPickerForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CountryPickerForm
constructor
A new instance of CountryPickerForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CountryPickerForm
Returns a new instance of CountryPickerForm.
27367 27368 27369 27370 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27367 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @source = (x = (x = opts.delete(:source); x.nil? ? "experience" : x); x.is_a?(::Io::Flow::V0::Models::CountryPickerSource) ? x : ::Io::Flow::V0::Models::CountryPickerSource.apply(x)) end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
27365 27366 27367 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27365 def source @source end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
27376 27377 27378 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27376 def copy(incoming={}) CountryPickerForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
27380 27381 27382 27383 27384 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27380 def to_hash { :source => source.value } end |
#to_json ⇒ Object
27372 27373 27374 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27372 def to_json JSON.dump(to_hash) end |