Class: BigDoor::CurrencyBalance

Inherits:
ResourceEndUser show all
Defined in:
lib/big_door/currency_balance.rb

Overview

This module provides CurrencyBalance Resource object corresponding to /end_user/id/currency_balance BigDoor API end point

Instance Method Summary collapse

Methods inherited from ResourceEndUser

all, end_point, #end_point, parent_end_point, #parent_id_attr

Methods inherited from Resource

all, #delete, #end_point, end_point, end_point_from_classname, #get_id, #instance_to_payload, #load, #response_to_instance, #save

Constructor Details

#initialize(hash = {}) ⇒ CurrencyBalance

Initialize new CurrencyBalance object with optional Hash

Parameters:

  • hash (Hash) (defaults to: {})

    Optional fields to assign to object



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/big_door/currency_balance.rb', line 13

def initialize( hash = {} ) 
    $log.debug( "CurrencyBalance init with hash = #{hash.inspect}")
    default_values = {
        'read_only'            => 0,
        'adjustment_amount'    => 0,
        'curr_balance'         => 0,
        'prev_balance'         => 0,
        'transaction_group_id' => nil,
    }
    default_values.merge!( hash )
    $log.debug( "CurrencyBalance default_values = #{default_values.inspect}")
    super( default_values )
end