class Beaver::TransactionRecord
TransactionRecord
Model.
Attributes
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [CurrencyEnum]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [Owner3]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [Type8Enum]
Public Class Methods
Creates an instance of the object from a hash.
# File lib/beaver/models/transaction_record.rb, line 95 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. create_time = hash['create_time'] id = hash['id'] path = hash['path'] resource = hash['resource'] currency = hash['currency'] fee_amount = hash['fee_amount'] gross_amount = hash['gross_amount'] net_amount = hash['net_amount'] owner = Owner3.from_hash(hash['owner']) if hash['owner'] type = hash['type'] api_version = hash['api_version'] # Create object from extracted values. TransactionRecord.new(create_time, id, path, resource, currency, fee_amount, gross_amount, net_amount, owner, type, api_version) end
A mapping from model property names to API property names.
# File lib/beaver/models/transaction_record.rb, line 54 def self.names @_hash = {} if @_hash.nil? @_hash['create_time'] = 'create_time' @_hash['currency'] = 'currency' @_hash['fee_amount'] = 'fee_amount' @_hash['gross_amount'] = 'gross_amount' @_hash['id'] = 'id' @_hash['net_amount'] = 'net_amount' @_hash['owner'] = 'owner' @_hash['path'] = 'path' @_hash['resource'] = 'resource' @_hash['type'] = 'type' @_hash['api_version'] = 'api_version' @_hash end
# File lib/beaver/models/transaction_record.rb, line 70 def initialize(create_time = nil, id = nil, path = nil, resource = nil, currency = nil, fee_amount = nil, gross_amount = nil, net_amount = nil, owner = nil, type = nil, api_version = nil) @create_time = create_time @currency = currency @fee_amount = fee_amount @gross_amount = gross_amount @id = id @net_amount = net_amount @owner = owner @path = path @resource = resource @type = type @api_version = api_version end