Class: Io::Flow::V0::Models::ChannelRate

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

Returns a new instance of ChannelRate.



35393
35394
35395
35396
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35393

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @placeholder = (x = opts.delete(:placeholder); x.nil? ? nil : HttpClient::Preconditions.assert_class('placeholder', x, String))
end

Instance Attribute Details

#placeholderObject (readonly)

Returns the value of attribute placeholder.



35391
35392
35393
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35391

def placeholder
  @placeholder
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



35402
35403
35404
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35402

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

#to_hashObject



35406
35407
35408
35409
35410
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35406

def to_hash
  {
    :placeholder => placeholder
  }
end

#to_jsonObject



35398
35399
35400
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35398

def to_json
  JSON.dump(to_hash)
end