Class: Io::Flow::V0::Models::RegionSettingForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::RegionSettingForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#region_id ⇒ Object
readonly
Returns the value of attribute region_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ RegionSettingForm
constructor
A new instance of RegionSettingForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ RegionSettingForm
Returns a new instance of RegionSettingForm.
24426 24427 24428 24429 24430 24431 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24426 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:region_id, :status], 'RegionSettingForm') @region_id = HttpClient::Preconditions.assert_class('region_id', opts.delete(:region_id), String) @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::AvailabilityStatus) ? x : ::Io::Flow::V0::Models::AvailabilityStatus.apply(x)) end |
Instance Attribute Details
#region_id ⇒ Object (readonly)
Returns the value of attribute region_id.
24424 24425 24426 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24424 def region_id @region_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
24424 24425 24426 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24424 def status @status end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
24437 24438 24439 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24437 def copy(incoming={}) RegionSettingForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
24441 24442 24443 24444 24445 24446 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24441 def to_hash { :region_id => region_id, :status => status.value } end |
#to_json ⇒ Object
24433 24434 24435 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24433 def to_json JSON.dump(to_hash) end |