Class: Io::Flow::V0::Models::RatecardReference

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

Returns a new instance of RatecardReference.



41553
41554
41555
41556
41557
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41553

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



41551
41552
41553
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41551

def id
  @id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



41563
41564
41565
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41563

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

#to_hashObject



41567
41568
41569
41570
41571
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41567

def to_hash
  {
    :id => id
  }
end

#to_jsonObject



41559
41560
41561
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41559

def to_json
  JSON.dump(to_hash)
end