File Coverage

lib/Net/API/Stripe/Issuing/MerchantData.pm
Criterion Covered Total %
statement 19 28 67.8
branch n/a
condition n/a
subroutine 7 16 43.7
pod 9 9 100.0
total 35 53 66.0


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## Stripe API - ~/lib/Net/API/Stripe/Issuing/MerchantData.pm
3             ## Version v0.101.0
4             ## Copyright(c) 2019 DEGUEST Pte. Ltd.
5             ## Author: Jacques Deguest <jack@deguest.jp>
6             ## Created 2019/11/02
7             ## Modified 2022/10/29
8             ##
9             ##----------------------------------------------------------------------------
10             BEGIN
11             {
12             use strict;
13 2     2   24203517 use warnings;
  2         16  
  2         63  
14 2     2   11 use parent qw( Net::API::Stripe::Generic );
  2         5  
  2         61  
15 2     2   10 use vars qw( $VERSION );
  2         4  
  2         10  
16 2     2   148 our( $VERSION ) = 'v0.101.0';
  2         4  
  2         117  
17 2     2   55 };
18              
19             use strict;
20 2     2   16 use warnings;
  2         7  
  2         45  
21 2     2   11  
  2         3  
  2         492  
22              
23 0     0 1    
24              
25 0     0 1    
26              
27 0     0 1    
28              
29 0     0 1    
30              
31 0     0 1   1;
32              
33 0     0 1    
34             =encoding utf8
35 0     0 1    
36             =head1 NAME
37 0     0 1    
38             Net::API::Stripe::Issuing::MerchantData - A Stripe Merchant Data Object
39 0     0 1    
40             =head1 SYNOPSIS
41              
42             my $data = $stripe->authorization->merchant_data({
43             # https://stripe.com/docs/issuing/categories
44             category => '8111',
45             city => 'Tokyo',
46             country => 'jp',
47             name => 'Big Corp, Inc',
48             network_id => $some_id,
49             postal_code => '123-4567',
50             state => undef,
51             url => 'https://store.example.com/12/service/advisory',
52             });
53              
54             =head1 VERSION
55              
56             v0.101.0
57              
58             =head1 DESCRIPTION
59              
60             This is used in L<Net::API::Stripe::Issuing::Authorization> object.
61              
62             This is instantiated by method B<merchant_data> in module L<Net::API::Stripe::Issuing::Authorization>, L<Net::API::Stripe::Issuing::Authorization::Transaction> and L<Net::API::Stripe::Issuing::Transaction>
63              
64             =head1 CONSTRUCTOR
65              
66             =head2 new( %ARG )
67              
68             Creates a new L<Net::API::Stripe::Issuing::MerchantData> object.
69             It may also take an hash like arguments, that also are method of the same name.
70              
71             =head1 METHODS
72              
73             =head2 category string
74              
75             A categorization of the seller’s type of business. See Stripe merchant categories guide (L<https://stripe.com/docs/issuing/categories>) for a list of possible values.
76              
77             =head2 category_code string
78              
79             The merchant category code for the seller’s business
80              
81             =head2 city string
82              
83             City where the seller is located
84              
85             =head2 country string
86              
87             Country where the seller is located
88              
89             =head2 name string
90              
91             Name of the seller
92              
93             =head2 network_id string
94              
95             Identifier assigned to the seller by the card brand
96              
97             =head2 postal_code string
98              
99             Postal code where the seller is located
100              
101             =head2 state string
102              
103             State where the seller is located
104              
105             =head2 url string
106              
107             The url an online purchase was made from
108              
109             =head1 API SAMPLE
110              
111             {
112             "id": "iauth_fake123456789",
113             "object": "issuing.authorization",
114             "approved": true,
115             "authorization_method": "online",
116             "authorized_amount": 500,
117             "authorized_currency": "usd",
118             "balance_transactions": [],
119             "card": null,
120             "cardholder": null,
121             "created": 1540642827,
122             "held_amount": 0,
123             "held_currency": "usd",
124             "is_held_amount_controllable": false,
125             "livemode": false,
126             "merchant_data": {
127             "category": "taxicabs_limousines",
128             "city": "San Francisco",
129             "country": "US",
130             "name": "Rocket Rides",
131             "network_id": "1234567890",
132             "postal_code": "94107",
133             "state": "CA",
134             "url": null
135             },
136             "metadata": {},
137             "pending_authorized_amount": 0,
138             "pending_held_amount": 0,
139             "request_history": [],
140             "status": "reversed",
141             "transactions": [
142             {
143             "id": "ipi_fake123456789",
144             "object": "issuing.transaction",
145             "amount": -100,
146             "authorization": "iauth_fake123456789",
147             "balance_transaction": null,
148             "card": "ic_fake123456789",
149             "cardholder": null,
150             "created": 1540642827,
151             "currency": "usd",
152             "dispute": null,
153             "livemode": false,
154             "merchant_amount": null,
155             "merchant_currency": null,
156             "merchant_data": {
157             "category": "taxicabs_limousines",
158             "city": "San Francisco",
159             "country": "US",
160             "name": "Rocket Rides",
161             "network_id": "1234567890",
162             "postal_code": "94107",
163             "state": "CA",
164             "url": null
165             },
166             "metadata": {},
167             "type": "capture"
168             },
169             {
170             "id": "ipi_fake123456789",
171             "object": "issuing.transaction",
172             "amount": -100,
173             "authorization": "iauth_fake123456789",
174             "balance_transaction": null,
175             "card": "ic_fake123456789",
176             "cardholder": null,
177             "created": 1540642827,
178             "currency": "usd",
179             "dispute": null,
180             "livemode": false,
181             "merchant_amount": null,
182             "merchant_currency": null,
183             "merchant_data": {
184             "category": "taxicabs_limousines",
185             "city": "San Francisco",
186             "country": "US",
187             "name": "Rocket Rides",
188             "network_id": "1234567890",
189             "postal_code": "94107",
190             "state": "CA",
191             "url": null
192             },
193             "metadata": {},
194             "type": "capture"
195             }
196             ],
197             "verification_data": {
198             "address_line1_check": "not_provided",
199             "address_zip_check": "match",
200             "authentication": "none",
201             "cvc_check": "match"
202             },
203             "wallet_provider": null
204             }
205              
206             =head1 HISTORY
207              
208             =head2 v0.1
209              
210             Initial version
211              
212             =head1 AUTHOR
213              
214             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
215              
216             =head1 SEE ALSO
217              
218             Stripe API documentation:
219              
220             L<https://stripe.com/docs/api>
221              
222             =head1 COPYRIGHT & LICENSE
223              
224             Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
225              
226             You can use, copy, modify and redistribute this package and associated
227             files under the same terms as Perl itself.
228              
229             =cut