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.
24484 24485 24486 24487 24488 24489 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24484 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.
24482 24483 24484 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24482 def region_id @region_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
24482 24483 24484 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24482 def status @status end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
24495 24496 24497 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24495 def copy(incoming={}) RegionSettingForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
24499 24500 24501 24502 24503 24504 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24499 def to_hash { :region_id => region_id, :status => status.value } end |
#to_json ⇒ Object
24491 24492 24493 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24491 def to_json JSON.dump(to_hash) end |