Class: Io::Flow::V0::Models::RegionSettingForm

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ RegionSettingForm

Returns a new instance of RegionSettingForm.



25250
25251
25252
25253
25254
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25250

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:status], 'RegionSettingForm')
  @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

#statusObject (readonly)

Returns the value of attribute status.



25248
25249
25250
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25248

def status
  @status
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



25260
25261
25262
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25260

def copy(incoming={})
  RegionSettingForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



25264
25265
25266
25267
25268
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25264

def to_hash
  {
    :status => status.value
  }
end

#to_jsonObject



25256
25257
25258
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25256

def to_json
  JSON.dump(to_hash)
end