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.



30823
30824
30825
30826
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30823

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.



30821
30822
30823
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30821

def placeholder
  @placeholder
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



30832
30833
30834
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30832

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

#to_hashObject



30836
30837
30838
30839
30840
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30836

def to_hash
  {
    :placeholder => placeholder
  }
end

#to_jsonObject



30828
30829
30830
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30828

def to_json
  JSON.dump(to_hash)
end