Class: Io::Flow::V0::Models::RegionReference

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 = {}) ⇒ RegionReference

Returns a new instance of RegionReference.



46693
46694
46695
46696
46697
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46693

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:id], 'RegionReference')
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



46691
46692
46693
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46691

def id
  @id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



46703
46704
46705
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46703

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

#to_hashObject



46707
46708
46709
46710
46711
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46707

def to_hash
  {
    :id => id
  }
end

#to_jsonObject



46699
46700
46701
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46699

def to_json
  JSON.dump(to_hash)
end