File Coverage

lib/Net/API/Stripe/Connect/ApplicationFee/Refund.pm
Criterion Covered Total %
statement 19 27 70.3
branch n/a
condition n/a
subroutine 7 15 46.6
pod 8 8 100.0
total 34 50 68.0


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## Stripe API - ~/lib/Net/API/Stripe/Connect/ApplicationFee/Refund.pm
3             ## Version v0.100.0
4             ## Copyright(c) 2019 DEGUEST Pte. Ltd.
5             ## Author: Jacques Deguest <jack@deguest.jp>
6             ## Created 2019/11/02
7             ## Modified 2020/05/15
8             ##
9             ##----------------------------------------------------------------------------
10             ## https://stripe.com/docs/api/fee_refunds/object
11             package Net::API::Stripe::Connect::ApplicationFee::Refund;
12             BEGIN
13             {
14 2     2   21243154 use strict;
  2         18  
  2         63  
15 2     2   15 use warnings;
  2         8  
  2         65  
16 2     2   10 use parent qw( Net::API::Stripe::Generic );
  2         13  
  2         18  
17 2     2   162 use vars qw( $VERSION );
  2         4  
  2         155  
18 2     2   45 our( $VERSION ) = 'v0.100.0';
19             };
20              
21 2     2   12 use strict;
  2         4  
  2         40  
22 2     2   8 use warnings;
  2         5  
  2         420  
23              
24 0     0 1   sub id { return( shift->_set_get_scalar( 'id', @_ ) ); }
25              
26 0     0 1   sub object { return( shift->_set_get_scalar( 'object', @_ ) ); }
27              
28 0     0 1   sub amount { return( shift->_set_get_number( 'amount', @_ ) ); }
29              
30 0     0 1   sub balance_transaction { return( shift->_set_get_scalar_or_object( 'balance_transaction', 'Net::API::Stripe::Balance::Transaction', @_ ) ); }
31              
32 0     0 1   sub created { return( shift->_set_get_datetime( 'created', @_ ) ); }
33              
34 0     0 1   sub currency { return( shift->_set_get_scalar( 'currency', @_ ) ); }
35              
36 0     0 1   sub fee { return( shift->_set_get_scalar_or_object( 'fee', 'Net::API::Stripe::Connect::ApplicationFee', @_ ) ); }
37              
38 0     0 1   sub metadata { return( shift->_set_get_hash( 'metadata', @_ ) ); }
39              
40             1;
41              
42             __END__
43              
44             =encoding utf8
45              
46             =head1 NAME
47              
48             Net::API::Stripe::Connect::ApplicationFee::Refund - A Stripe Application Fee Refund Object
49              
50             =head1 SYNOPSIS
51              
52             my $refund = $stripe->application_fee->refund({
53             amount => 10000,
54             ## Net::API::Stripe::Balance::Transaction
55             balance_transaction => $balance_transaction_object,
56             currency => 'jpy',
57             fee => 290,
58             metadata => { cust_id => 123, trans_id => 456 },
59             });
60              
61             =head1 VERSION
62              
63             v0.100.0
64              
65             =head1 DESCRIPTION
66              
67             Application Fee Refund objects allow you to refund an application fee that has previously been created but not yet refunded. Funds will be refunded to the Stripe account from which the fee was originally collected.
68              
69             =head1 CONSTRUCTOR
70              
71             =head2 new( %ARG )
72              
73             Creates a new L<Net::API::Stripe::Connect::ApplicationFee::Refund> object.
74             It may also take an hash like arguments, that also are method of the same name.
75              
76             =head1 METHODS
77              
78             =head2 id string
79              
80             Unique identifier for the object.
81              
82             =head2 object string, value is "fee_refund"
83              
84             String representing the object’s type. Objects of the same type share the same value.
85              
86             =head2 amount integer
87              
88             Amount, in JPY.
89              
90             =head2 balance_transaction string (expandable)
91              
92             Balance transaction that describes the impact on your account balance.
93              
94             =head2 created timestamp
95              
96             Time at which the object was created. Measured in seconds since the Unix epoch.
97              
98             This is a C<DateTime> object.
99              
100             =head2 currency currency
101              
102             Three-letter ISO currency code, in lowercase. Must be a supported currency.
103              
104             =head2 fee string (expandable)
105              
106             ID of the application fee that was refunded.
107              
108             =head2 metadata hash
109              
110             Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
111              
112             =head1 API SAMPLE
113              
114             {
115             "id": "fr_fake123456789",
116             "object": "fee_refund",
117             "amount": 100,
118             "balance_transaction": null,
119             "created": 1571480455,
120             "currency": "jpy",
121             "fee": "fee_fake123456789",
122             "metadata": {}
123             }
124              
125             =head1 HISTORY
126              
127             =head2 v0.1
128              
129             Initial version
130              
131             =head1 AUTHOR
132              
133             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
134              
135             =head1 SEE ALSO
136              
137             Stripe API documentation:
138              
139             L<https://stripe.com/docs/api/fee_refunds>, L<https://stripe.com/docs/connect/destination-charges#refunding-app-fee>
140              
141             =head1 COPYRIGHT & LICENSE
142              
143             Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
144              
145             You can use, copy, modify and redistribute this package and associated
146             files under the same terms as Perl itself.
147              
148             =cut