File Coverage

blib/lib/Net/API/Stripe/Payment/Source/Receiver.pm
Criterion Covered Total %
statement 7 13 53.8
branch n/a
condition n/a
subroutine 3 9 33.3
pod 6 6 100.0
total 16 28 57.1


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## Stripe API - ~/lib/Net/API/Stripe/Payment/Source/Receiver.pm
3             ## Version v0.100.0
4             ## Copyright(c) 2019 DEGUEST Pte. Ltd.
5             ## Author: Jacques Deguest <@sitael.tokyo.deguest.jp>
6             ## Created 2019/11/02
7             ## Modified 2020/05/15
8             ##
9             ##----------------------------------------------------------------------------
10             package Net::API::Stripe::Payment::Source::Receiver;
11             BEGIN
12             {
13 1     1   846 use strict;
  1         2  
  1         27  
14 1     1   5 use parent qw( Net::API::Stripe::Generic );
  1         1  
  1         4  
15 1     1   173 our( $VERSION ) = 'v0.100.0';
16             };
17              
18 0     0 1   sub address { shift->_set_get_scalar( 'address', @_ ); }
19              
20 0     0 1   sub amount_charged { shift->_set_get_number( 'amount_charged', @_ ); }
21              
22 0     0 1   sub amount_received { shift->_set_get_number( 'amount_received', @_ ); }
23              
24 0     0 1   sub amount_returned { shift->_set_get_number( 'amount_returned', @_ ); }
25              
26 0     0 1   sub refund_attributes_method { shift->_set_get_scalar( 'refund_attributes_method', @_ ); }
27              
28 0     0 1   sub refund_attributes_status { shift->_set_get_scalar( 'refund_attributes_status', @_ ); }
29              
30             1;
31              
32             __END__
33              
34             =encoding utf8
35              
36             =head1 NAME
37              
38             Net::API::Stripe::Payment::Source::Receiver - A Stripe Payment Receiver Object
39              
40             =head1 SYNOPSIS
41              
42             my $rcv = $stripe->source->receiver({
43             address => '1-2-3 Kudan-Minami, Chiyoda-ku, Tokyo 123-4567 Japan',
44             amount_charged => 2000,
45             });
46              
47             =head1 VERSION
48              
49             v0.100.0
50              
51             =head1 DESCRIPTION
52              
53             Information related to the receiver flow. Present if the source is a receiver (flow is receiver).
54              
55             This is part of the L<Net::API::Stripe::Payment::Source> object
56              
57             =head1 CONSTRUCTOR
58              
59             =over 4
60              
61             =item B<new>( %ARG )
62              
63             Creates a new L<Net::API::Stripe::Payment::Source::Receiver> object.
64             It may also take an hash like arguments, that also are method of the same name.
65              
66             =back
67              
68             =head1 METHODS
69              
70             =over 4
71              
72             =item B<address> string
73              
74             The address of the receiver source. This is the value that should be communicated to the customer to send their funds to.
75              
76             =item B<amount_charged> integer
77              
78             The total amount that was charged by you. The amount charged is expressed in the source’s currency.
79              
80             =item B<amount_received> integer
81              
82             The total amount received by the receiver source. amount_received = amount_returned + amount_charged is true at all time. The amount received is expressed in the source’s currency.
83              
84             =item B<amount_returned> integer
85              
86             The total amount that was returned to the customer. The amount returned is expressed in the source’s currency.
87              
88             =item B<refund_attributes_method> string
89              
90             Type of refund attribute method, one of email, manual, or none.
91              
92             =item B<refund_attributes_status> string
93              
94             Type of refund attribute status, one of missing, requested, or available.
95              
96             =back
97              
98             =head1 API SAMPLE
99              
100             {
101             "id": "src_fake123456789",
102             "object": "source",
103             "ach_credit_transfer": {
104             "account_number": "test_52796e3294dc",
105             "routing_number": "110000000",
106             "fingerprint": "avmabmnabvmnvb",
107             "bank_name": "TEST BANK",
108             "swift_code": "TSTEZ122"
109             },
110             "amount": null,
111             "client_secret": "src_client_secret_fake123456789",
112             "created": 1571314413,
113             "currency": "jpy",
114             "flow": "receiver",
115             "livemode": false,
116             "metadata": {},
117             "owner": {
118             "address": null,
119             "email": "jenny.rosen@example.com",
120             "name": null,
121             "phone": null,
122             "verified_address": null,
123             "verified_email": null,
124             "verified_name": null,
125             "verified_phone": null
126             },
127             "receiver": {
128             "address": "121042882-38381234567890123",
129             "amount_charged": 0,
130             "amount_received": 0,
131             "amount_returned": 0,
132             "refund_attributes_method": "email",
133             "refund_attributes_status": "missing"
134             },
135             "statement_descriptor": null,
136             "status": "pending",
137             "type": "ach_credit_transfer",
138             "usage": "reusable"
139             }
140              
141             =head1 HISTORY
142              
143             =head2 v0.1
144              
145             Initial version
146              
147             =head1 AUTHOR
148              
149             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
150              
151             =head1 SEE ALSO
152              
153             Stripe API documentation:
154              
155             L<https://stripe.com/docs/api/sources/object>
156              
157             =head1 COPYRIGHT & LICENSE
158              
159             Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
160              
161             You can use, copy, modify and redistribute this package and associated
162             files under the same terms as Perl itself.
163              
164             =cut