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.



32506
32507
32508
32509
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32506

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.



32504
32505
32506
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32504

def placeholder
  @placeholder
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



32515
32516
32517
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32515

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

#to_hashObject



32519
32520
32521
32522
32523
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32519

def to_hash
  {
    :placeholder => placeholder
  }
end

#to_jsonObject



32511
32512
32513
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32511

def to_json
  JSON.dump(to_hash)
end