class Beaver::CAD1
CAD1
Model.
Attributes
balance[RW]
TODO: Write general description for this method @return [Integer]
incoming_pending[RW]
TODO: Write general description for this method @return [Integer]
outgoing_pending[RW]
TODO: Write general description for this method @return [Integer]
reserve[RW]
TODO: Write general description for this method @return [Integer]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/beaver/models/cad1.rb, line 46 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. balance = hash['balance'] incoming_pending = hash['incoming_pending'] outgoing_pending = hash['outgoing_pending'] reserve = hash['reserve'] # Create object from extracted values. CAD1.new(balance, incoming_pending, outgoing_pending, reserve) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/cad1.rb, line 26 def self.names @_hash = {} if @_hash.nil? @_hash['balance'] = 'balance' @_hash['incoming_pending'] = 'incoming_pending' @_hash['outgoing_pending'] = 'outgoing_pending' @_hash['reserve'] = 'reserve' @_hash end
new(balance = nil, incoming_pending = nil, outgoing_pending = nil, reserve = nil)
click to toggle source
# File lib/beaver/models/cad1.rb, line 35 def initialize(balance = nil, incoming_pending = nil, outgoing_pending = nil, reserve = nil) @balance = balance @incoming_pending = incoming_pending @outgoing_pending = outgoing_pending @reserve = reserve end