Class: Io::Flow::V0::Models::CountryStatusForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CountryStatusForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CountryStatusForm
constructor
A new instance of CountryStatusForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CountryStatusForm
Returns a new instance of CountryStatusForm.
37339 37340 37341 37342 37343 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37339 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:status], 'CountryStatusForm') @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::ExperienceCountryStatus) ? x : ::Io::Flow::V0::Models::ExperienceCountryStatus.apply(x)) end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
37337 37338 37339 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37337 def status @status end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
37349 37350 37351 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37349 def copy(incoming={}) CountryStatusForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
37353 37354 37355 37356 37357 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37353 def to_hash { :status => status.value } end |
#to_json ⇒ Object
37345 37346 37347 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37345 def to_json JSON.dump(to_hash) end |