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.



37259
37260
37261
37262
37263
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37259

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.



37257
37258
37259
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37257

def status
  @status
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



37269
37270
37271
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37269

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

#to_hashObject



37273
37274
37275
37276
37277
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37273

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

#to_jsonObject



37265
37266
37267
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37265

def to_json
  JSON.dump(to_hash)
end