Stripe/Billing/Details.pm

filter: Statementstmt 66.6% 8 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 42.8% 3 / 7 Podpod 100% 4 / 4 totaltotal 65.2% 15 / 23 CC 1 SCAR 4.5
CC
1
Cov
67%
address
2.0
email
2.0
name
2.0
CRAP 1.6
« Stripe/Connect/Account/TosAcceptance.pm ↑ Summary Stripe/Billing/Invoice/StatusTransition.pm »
1 ##----------------------------------------------------------------------------
2 ## Stripe API - ~/lib/Net/API/Stripe/Billing/Details.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 ## https://stripe.com/docs/api/charges/object
11 package Net::API::Stripe::Billing::Details;
12 BEGIN
13 {
14 1 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶ use parent qw( Net::API::Stripe::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
16 1 ▶ our( $VERSION ) = 'v0.100.0';
Subroutine BEGIN: called CC=1 SCAR=0.0
17 };
18  
19 0 ▶sub address { shift->_set_get_object( 'address', 'Net::API::Stripe::Address', @_ ); }
Subroutine address: not called CC=1 SCAR=6.9
Pod documented
20  
21 0 ▶sub email { shift->_set_get_scalar( 'email', @_ ); }
Subroutine email: not called CC=1 SCAR=6.9
Pod documented
22  
23 0 ▶sub name { shift->_set_get_scalar( 'name', @_ ); }
Subroutine name: not called CC=1 SCAR=6.9
Pod documented
24  
25 0 ▶sub phone { shift->_set_get_scalar( 'phone', @_ ); }
Subroutine phone: not called CC=1 SCAR=6.9
Pod documented
26  
27 1 1;
28  
29 __END__
30  
31 =encoding utf8
32  
33 =head1 NAME
34  
35 Net::API::Stripe::Billing::Details - An interface to Stripe API
36  
37 =head1 SYNOPSIS
38  
39 my $billing_details = $stripe->charge->billing_details({
40 address => $stripe->address({
41 line1 => '1-2-3 Kudan-Manami, Chiyoda-ku',
42 line2 => 'Big Bldg, 12F',
43 city => 'Tokyo',
44 postal_code => '123-4567',
45 country => 'jp',
46 }),
47 email => 'john.doe@example.com',
48 name => 'John Doe',
49 phone => '+81-90-1234-5678',
50 });
51  
52 =head1 VERSION
53  
54 v0.100.0
55  
56 =head1 DESCRIPTION
57  
58 This is created by method B<billing_details> L<Net::API::Stripe::Charge> or by method B<billing_details> in L<Net::API::Stripe::Payment::Method> and capture the billing details
59  
60 =head1 CONSTRUCTOR
61  
62 =over 4
63  
64 =item B<new>( %ARG )
65  
66 Creates a new L<Net::API::Stripe::Billing::Details> object.
67 It may also take an hash like arguments, that also are method of the same name.
68  
69 =back
70  
71 =head1 METHODS
72  
73 =over 4
74  
75 =item B<address> hash
76  
77 Billing address.
78  
79 This is a L<Net::API::Stripe::Address> object.
80  
81 =item B<email> string
82  
83 Email address.
84  
85 =item B<name> string
86  
87 Full name.
88  
89 =item B<phone> string
90  
91 Billing phone number (including extension).
92  
93 =back
94  
95 =head1 API SAMPLE
96  
97 {
98 "id": "pm_123456789",
99 "object": "payment_method",
100 "billing_details": {
101 "address": {
102 "city": "Anytown",
103 "country": "US",
104 "line1": "1234 Main street",
105 "line2": null,
106 "postal_code": "123456",
107 "state": null
108 },
109 "email": "jenny@example.com",
110 "name": null,
111 "phone": "+15555555555"
112 },
113 "card": {
114 "brand": "visa",
115 "checks": {
116 "address_line1_check": null,
117 "address_postal_code_check": null,
118 "cvc_check": null
119 },
120 "country": "US",
121 "exp_month": 8,
122 "exp_year": 2020,
123 "fingerprint": "xksmmnsnmhfjskhjh",
124 "funding": "credit",
125 "generated_from": null,
126 "last4": "4242",
127 "three_d_secure_usage": {
128 "supported": true
129 },
130 "wallet": null
131 },
132 "created": 123456789,
133 "customer": null,
134 "livemode": false,
135 "metadata": {
136 "order_id": "123456789"
137 },
138 "type": "card"
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>
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
165  
« Stripe/Connect/Account/TosAcceptance.pm ↑ Summary Stripe/Billing/Invoice/StatusTransition.pm »