class Io::Flow::V0::Models::MonthlyAverage

Attributes

number_transactions[R]
volume[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 50522
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @volume = (x = opts.delete(:volume); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::MonthlyAverageVolume) ? x : ::Io::Flow::V0::Models::MonthlyAverageVolume.new(x)))
  @number_transactions = (x = opts.delete(:number_transactions); x.nil? ? nil : HttpClient::Preconditions.assert_class('number_transactions', x, Integer))
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 50532
def copy(incoming={})
  MonthlyAverage.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 50536
def to_hash
  {
    :volume => volume.nil? ? nil : volume.to_hash,
    :number_transactions => number_transactions
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 50528
def to_json
  JSON.dump(to_hash)
end