Deposit

NAME

Finance::GDAX::API::Deposit - Deposit funds via Payment Method or Coinbase

SYNOPSIS

use Finance::GDAX::API::Deposit;
$deposit = Finance::GDAX::API::Deposit.new(
        currency => 'USD',
        amount   => 250.00);

$deposit.payment-method-id = 'kwji-wefwe-ewrgeurg-wef';
$response $deposit.from-payment;
# Or, from a Coinbase account
$deposit.from-coinbase(coinbase-account-id => 'woifhe-i234h-fwikn-wfihwe');

DESCRIPTION

Used to transfer funds into your GDAX account, either from a predefined Payment Method or your Coinbase account.

Both methods require the same two attributes: "amount" and "currency" to be set, along with their corresponding payment or coinbase account id's.

ATTRIBUTES

payment-method-id

ID of the payment method.

Either this or coinbase-account-id must be set.

coinbase-account-id

ID of the coinbase account.

Either this or payment-method-id must be set.

amount

The amount to be deposited.

currency

The currency of the amount -- for example "USD".

METHODS

from-payment (:$payment-method-id?)

All necessary attributes must be set when calling this method. The return value is a hash that will describe the result of the payment.

From the current GDAX API documentation, this is how that returned hash is keyed:

{
    "amount": 10.00,
    "currency": "USD",
    "payment_method_id": "bc677162-d934-5f1a-968c-a496b1c1270b"
  }

from_coinbase (:$coinbase-account-id?)

All necessary attributes must be set when calling this method. The return value is a hash that will describe the result of the funds move.

From the current GDAX API documentation, this is how that returned hash is keyed:

{
    "id": "593533d2-ff31-46e0-b22e-ca754147a96a",
    "amount": "10.00",
    "currency": "BTC",
  }

AUTHOR

Mark Rushing <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Home Grown Systems, SPC.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.