Class: Freee::Wallet

Inherits:
Base
  • Object
show all
Defined in:
lib/freee/wallet.rb

Instance Attribute Summary

Attributes inherited from Base

#client

Class Method Summary collapse

Methods inherited from Base

config, #get, #initialize, #post, set_env, #token, #token=

Constructor Details

This class inherits a constructor from Freee::Base

Class Method Details

.create(**kwargs) ⇒ Object



3
4
5
# File 'lib/freee/wallet.rb', line 3

def self.create(**kwargs)
  Freee.client.post('/api/1/wallet_txns', :wallet, **kwargs)
end

.list(company_id, **kwargs) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/freee/wallet.rb', line 7

def self.list(company_id, **kwargs)
  params = Freee.encode_params(kwargs)
  Freee.client.get(
    "/api/1/wallet_txns?company_id=#{company_id.to_i}#{params}",
    :wallet
  )
end