lib/Finance/GDAX/API/PaymentMethod.pm

filter: Statementstmt 81.8% 18 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 1 / 1 totaltotal 82.7% 24 / 29 CC 1 SCAR 1.5
CC
1
Cov
82%
get
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« lib/Finance/GDAX/API/Currency.pm ↑ Summary lib/Finance/GDAX/API/UserAccount.pm »
1 package Finance::GDAX::API::PaymentMethod;
2 1 our $VERSION = '0.01';
3 1 ▶use 5.20.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Finance::GDAX::API;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 extends 'Finance::GDAX::API';
10  
11 sub get {
12 0 ▶ my $self = shift;
Subroutine get: not called CC=1 SCAR=6.9
Pod documented
13 0 $self->method('GET');
14 0 $self->path('/payment-methods');
15 0 return $self->send;
16 }
17  
18 1 __PACKAGE__->meta->make_immutable;
19 1 1;
20  
21 =head1 NAME
22  
23 Finance::GDAX::API::PaymentMethod - List Payment Methods
24  
25 =head1 SYNOPSIS
26  
27 use Finance::GDAX::API::PaymentMethod;
28  
29 $pay_methods = Finance::GDAX::API::PaymentMethod->new;
30  
31 # Array of Hashes of payment methods available
32 $methods = $pay_methods->get;
33  
34 =head2 DESCRIPTION
35  
36 Returns an array of payment methods available on the account.
37  
38 =head1 METHODS
39  
40 =head2 C<get>
41  
42 Returns an array of payment methods available on the account.
43  
44 The API documents the array of hashes as follows:
45  
46 [
47 {
48 "id": "bc6d7162-d984-5ffa-963c-a493b1c1370b",
49 "type": "ach_bank_account",
50 "name": "Bank of America - eBan... ********7134",
51 "currency": "USD",
52 "primary_buy": true,
53 "primary_sell": true,
54 "allow_buy": true,
55 "allow_sell": true,
56 "allow_deposit": true,
57 "allow_withdraw": true,
58 "limits": {
59 "buy": [
60 {
61 "period_in_days": 1,
62 "total": {
63 "amount": "10000.00",
64 "currency": "USD"
65 },
66 "remaining": {
67 "amount": "10000.00",
68 "currency": "USD"
69 }
70 }
71 ],
72 "instant_buy": [
73 {
74 "period_in_days": 7,
75 "total": {
76 "amount": "0.00",
77 "currency": "USD"
78 },
79 "remaining": {
80 "amount": "0.00",
81 "currency": "USD"
82 }
83 }
84 ],
85 "sell": [
86 {
87 "period_in_days": 1,
88 "total": {
89 "amount": "10000.00",
90 "currency": "USD"
91 },
92 "remaining": {
93 "amount": "10000.00",
94 "currency": "USD"
95 }
96 }
97 ],
98 "deposit": [
99 {
100 "period_in_days": 1,
101 "total": {
102 "amount": "10000.00",
103 "currency": "USD"
104 },
105 "remaining": {
106 "amount": "10000.00",
107 "currency": "USD"
108 }
109 }
110 ]
111 }
112 },
113 ]
114  
115 =cut
116  
117  
118 =head1 AUTHOR
119  
120 Mark Rushing <mark@orbislumen.net>
121  
122 =head1 COPYRIGHT AND LICENSE
123  
124 This software is copyright (c) 2017 by Home Grown Systems, SPC.
125  
126 This is free software; you can redistribute it and/or modify it under
127 the same terms as the Perl 5 programming language system itself.
128  
129 =cut
130  
« lib/Finance/GDAX/API/Currency.pm ↑ Summary lib/Finance/GDAX/API/UserAccount.pm »