Class: Spendee::Clients::WalletCreateTransaction

Inherits:
BaseClient
  • Object
show all
Defined in:
lib/spendee/clients/wallet_create_transaction.rb

Instance Method Summary collapse

Instance Method Details

#create(token, device_uuid, amount:, start_date:, wallet_id:, note:, category_id:, timezone:, offset:) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/spendee/clients/wallet_create_transaction.rb', line 6

def create(token, device_uuid, amount:, start_date:, wallet_id:, note:, category_id:, timezone:, offset:)
  post(
    body:    {
      amount:      amount,
      start_date:  start_date,
      wallet_id:   wallet_id,
      note:        note,
      category_id: category_id,
      timezone:    timezone,
      offset:      offset
    }.to_json,
    headers: default_headers(token, device_uuid)
  )
end