Stripe/Checkout/Session.pm

filter: Statementstmt 28.1% 20 / 71 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 12.0% 7 / 58 Podpod 98.0% 50 / 51 totaltotal 42.7% 77 / 180 CC 1 SCAR 6.3
CC
1
Cov
28%
id
2.0
object
2.0
after_expiration
2.0
CRAP 1.9
« Stripe/Billing/Subscription.pm ↑ Summary Stripe/Treasury/OutboundPayment.pm »
1 ##----------------------------------------------------------------------------
2 ## Stripe API - ~/lib/Net/API/Stripe/Checkout/Session.pm
3 ## Version v0.102.0
4 ## Copyright(c) 2020 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <jack@deguest.jp>
6 ## Created 2019/11/02
7 ## Modified 2022/10/29
8 ## All rights reserved
9 ##
10 ## This program is free software; you can redistribute it and/or modify it
11 ## under the same terms as Perl itself.
12 ##----------------------------------------------------------------------------
13 ## https://stripe.com/docs/api/checkout/sessions
14 package Net::API::Stripe::Checkout::Session;
15 BEGIN
16 2 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
17 2 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 2 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 2 ▶ use parent qw( Net::API::Stripe::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
20 2 ▶ use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
21 2 our( $VERSION ) = 'v0.102.0';
22 };
23  
24 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
26  
27 0 ▶sub id { return( shift->_set_get_scalar( 'id', @_ ) ); }
Subroutine id: not called CC=1 SCAR=6.9
Pod documented
28  
29 0 ▶sub object { return( shift->_set_get_scalar( 'object', @_ ) ); }
Subroutine object: not called CC=1 SCAR=6.9
Pod documented
30  
31 0 ▶sub after_expiration { return( shift->_set_get_class( 'after_expiration',
Subroutine after_expiration: not called CC=1 SCAR=6.9
Pod documented
32 {
33 recovery =>
34 {
35 type => 'class',
36 definition =>
37 {
38 allow_promotion_codes => { type => 'boolean' },
39 enabled => { type => 'boolean' },
40 expires_at => { type => 'datetime' },
41 url => { type => 'uri' },
42 }
43 }
44 }, @_ ) ); }
45  
46 0 ▶sub allow_promotion_codes { return( shift->_set_get_boolean( 'allow_promotion_codes', @_ ) ); }
Subroutine allow_promotion_codes: not called CC=1 SCAR=6.9
Pod documented
47  
48 0 ▶sub amount_subtotal { return( shift->_set_get_number( 'amount_subtotal', @_ ) ); }
Subroutine amount_subtotal: not called CC=1 SCAR=6.9
Pod documented
49  
50 0 ▶sub amount_total { return( shift->_set_get_number( 'amount_total', @_ ) ); }
Subroutine amount_total: not called CC=1 SCAR=6.9
Pod documented
51  
52 0 ▶sub automatic_tax { return( shift->_set_get_class( 'automatic_tax',
Subroutine automatic_tax: not called CC=1 SCAR=6.9
Pod documented
53 {
54 enabled => { type => 'boolean' },
55 status => { type => 'scalar' },
56 }, @_ ) ); }
57  
58 0 ▶sub billing_address_collection { return( shift->_set_get_scalar( 'billing_address_collection', @_ ) ); }
Subroutine billing_address_collection: not called CC=1 SCAR=6.9
Pod documented
59  
60 0 ▶sub cancel_url { return( shift->_set_get_uri( 'cancel_url', @_ ) ); }
Subroutine cancel_url: not called CC=1 SCAR=6.9
Pod documented
61  
62 0 ▶sub client_reference_id { return( shift->_set_get_scalar( 'client_reference_id', @_ ) ); }
Subroutine client_reference_id: not called CC=1 SCAR=6.9
Pod documented
63  
64 0 ▶sub consent { return( shift->_set_get_class( 'consent',
Subroutine consent: not called CC=1 SCAR=6.9
Pod documented
65 {
66 promotions => { type => 'scalar' },
67 }, @_ ) ); }
68  
69 0 ▶sub consent_collection { return( shift->_set_get_class( 'consent',
Subroutine consent_collection: not called CC=1 SCAR=6.9
Pod documented
70 {
71 promotions => { type => 'scalar' },
72 }, @_ ) ); }
73  
74 0 ▶sub currency { return( shift->_set_get_number( 'currency', @_ ) ); }
Subroutine currency: not called CC=1 SCAR=6.9
Pod documented
75  
76 0 ▶sub customer { return( shift->_set_get_scalar_or_object( 'customer', 'Net::API::Stripe::Customer', @_ ) ); }
Subroutine customer: not called CC=1 SCAR=6.9
Pod documented
77  
78 0 ▶sub customer_creation { return( shift->_set_get_scalar( 'customer_creation', @_ ) ); }
Subroutine customer_creation: not called CC=1 SCAR=6.9
Pod documented
79  
80 0 ▶sub customer_details { return( shift->_set_get_object( 'customer_details', 'Net::API::Stripe::Customer', @_ ) ); }
Subroutine customer_details: not called CC=1 SCAR=6.9
Pod documented
81  
82 0 ▶sub customer_email { return( shift->_set_get_scalar( 'customer_email', @_ ) ); }
Subroutine customer_email: not called CC=1 SCAR=6.9
Pod documented
83  
84 0 ▶sub display_items { return( shift->_set_get_object_array( 'display_items', 'Net::API::Stripe::Checkout::Item', @_ ) ); }
Subroutine display_items: not called CC=1 SCAR=6.9
Pod documented
85  
86 0 ▶sub expires_at { return( shift->_set_get_datetime( 'expires_at', @_ ) ); }
Subroutine expires_at: not called CC=1 SCAR=6.9
Pod documented
87  
88 0 ▶sub interval { return( shift->_set_get_scalar( 'interval', @_ ) ); }
Subroutine interval: not called CC=1 SCAR=6.9
Pod documented
89  
90 0 ▶sub interval_count { return( shift->_set_get_scalar( 'interval_count', @_ ) ); }
Subroutine interval_count: not called CC=1 SCAR=6.9
Pod documented
91  
92 0 ▶sub line_items { return( shift->_set_get_object( 'line_items', 'Net::API::Stripe::List', @_ ) ); }
Subroutine line_items: not called CC=1 SCAR=6.9
Pod undocumented
93  
94 0 ▶sub livemode { return( shift->_set_get_boolean( 'livemode', @_ ) ); }
Subroutine livemode: not called CC=1 SCAR=6.9
Pod documented
95  
96 0 ▶sub locale { return( shift->_set_get_scalar( 'locale', @_ ) ); }
Subroutine locale: not called CC=1 SCAR=6.9
Pod documented
97  
98 0 ▶sub metadata { return( shift->_set_get_hash( 'metadata', @_ ) ); }
Subroutine metadata: not called CC=1 SCAR=6.9
Pod documented
99  
100 # payment, setup, or subscription
101  
102 0 ▶sub mode { return( shift->_set_get_scalar( 'mode', @_ ) ); }
Subroutine mode: not called CC=1 SCAR=6.9
Pod documented
103  
104 0 ▶sub payment_intent { return( shift->_set_get_scalar_or_object( 'payment_intent', 'Net::API::Stripe::Payment::Intent', @_ ) ); }
Subroutine payment_intent: not called CC=1 SCAR=6.9
Pod documented
105  
106 0 ▶sub payment_intent_data { return( shift->_set_get_object( 'payment_intent_data', 'Net::API::Stripe::Payment::Intent', @_ ) ); }
Subroutine payment_intent_data: not called CC=1 SCAR=6.9
Pod documented
107  
108 0 ▶sub payment_link { return( shift->_set_get_scalar_or_object( 'payment_link', 'Net::API::Stripe::Payment::Link', @_ ) ); }
Subroutine payment_link: not called CC=1 SCAR=6.9
Pod documented
109  
110 0 ▶sub payment_method_collection { return( shift->_set_get_scalar( 'payment_method_collection', @_ ) ); }
Subroutine payment_method_collection: not called CC=1 SCAR=6.9
Pod documented
111  
112 0 ▶sub payment_method_options { return( shift->_set_get_object( 'payment_method_options', 'Net::API::Stripe::Payment::Method::Options', @_ ) ); }
Subroutine payment_method_options: not called CC=1 SCAR=6.9
Pod documented
113  
114 0 ▶sub payment_method_types { return( shift->_set_get_array( 'payment_method_types', @_ ) ); }
Subroutine payment_method_types: not called CC=1 SCAR=6.9
Pod documented
115  
116 0 ▶sub payment_status { return( shift->_set_get_scalar( 'payment_status', @_ ) ); }
Subroutine payment_status: not called CC=1 SCAR=6.9
Pod documented
117  
118 0 ▶sub phone_number_collection { return( shift->_set_get_class( 'phone_number_collection',
Subroutine phone_number_collection: not called CC=1 SCAR=6.9
Pod documented
119 {
120 enabled => { type => 'boolean' },
121 }, @_ ) ); }
122  
123 0 ▶sub recovered_from { return( shift->_set_get_scalar( 'recovered_from', @_ ) ); }
Subroutine recovered_from: not called CC=1 SCAR=6.9
Pod documented
124  
125 0 ▶sub setup_intent { return( shift->_set_get_scalar_or_object( 'setup_intent', 'Net::API::Stripe::Payment::Intent::Setup', @_ ) ); }
Subroutine setup_intent: not called CC=1 SCAR=6.9
Pod documented
126  
127 0 ▶sub setup_intent_data { return( shift->_set_get_object( 'setup_intent_data', 'Net::API::Stripe::Payment::Intent::Setup', @_ ) ); }
Subroutine setup_intent_data: not called CC=1 SCAR=6.9
Pod documented
128  
129 0 ▶sub shipping { return( shift->_set_get_class( 'shipping',
Subroutine shipping: not called CC=1 SCAR=6.9
Pod documented
130 {
131 address => { package => "Net::API::Stripe::Address", type => "object" },
132 name => { type => "scalar" },
133 }, @_ ) ); }
134  
135 0 ▶sub shipping_address_collection { return( shift->_set_get_class( 'shipping_address_collection',
Subroutine shipping_address_collection: not called CC=1 SCAR=6.9
Pod documented
136 { allowed_countries => { type => "array" } }, @_ ) ); }
137  
138 0 ▶sub shipping_cost { return( shift->_set_get_object( 'shipping_cost', 'Net::API::Stripe::Checkout::Session', @_ ) ); }
Subroutine shipping_cost: not called CC=1 SCAR=6.9
Pod documented
139  
140 0 ▶sub shipping_details { return( shift->_set_get_object( 'shipping_details', 'Net::API::Stripe::Billing::Details', @_ ) ); }
Subroutine shipping_details: not called CC=1 SCAR=6.9
Pod documented
141  
142 0 ▶sub shipping_options { return( shift->_set_get_class_array( 'shipping_options',
Subroutine shipping_options: not called CC=1 SCAR=6.9
Pod documented
143 {
144 shipping_amount => { type => 'integer' },
145 shipping_rate => { type => 'object', class => 'Net::API::Stripe::Shipping::Rate' },
146 }, @_ ) ); }
147  
148 0 ▶sub shipping_rate { return( shift->_set_get_scalar_or_object( 'shipping_rate', 'Net::API::Stripe::Shipping::Rate', @_ ) ); }
Subroutine shipping_rate: not called CC=1 SCAR=6.9
Pod documented
149  
150 0 ▶sub status { return( shift->_set_get_scalar( 'status', @_ ) ); }
Subroutine status: not called CC=1 SCAR=6.9
Pod documented
151  
152 0 ▶sub submit_type { return( shift->_set_get_scalar( 'submit_type', @_ ) ); }
Subroutine submit_type: not called CC=1 SCAR=6.9
Pod documented
153  
154 0 ▶sub subscription { return( shift->_set_get_scalar_or_object( 'subscription', 'Net::API::Stripe::Billing::Subscription', @_ ) ); }
Subroutine subscription: not called CC=1 SCAR=6.9
Pod documented
155  
156 0 ▶sub subscription_data { return( shift->_set_get_object( 'subscription_data', 'Net::API::Stripe::Billing::Subscription', @_ ) ); }
Subroutine subscription_data: not called CC=1 SCAR=6.9
Pod documented
157  
158 0 ▶sub success_url { return( shift->_set_get_uri( 'success_url', @_ ) ); }
Subroutine success_url: not called CC=1 SCAR=6.9
Pod documented
159  
160 0 ▶sub tax_id_collection { return( shift->_set_get_class( 'tax_id_collection',
Subroutine tax_id_collection: not called CC=1 SCAR=6.9
Pod documented
161 {
162 enabled => { type => 'boolean' },
163 }, @_ ) ); }
164  
165 0 ▶sub total_details { return( shift->_set_get_class( 'total_details',
Subroutine total_details: not called CC=1 SCAR=6.9
Pod documented
166 {
167 amount_discount => { type => "number" },
168 amount_shipping => { type => "integer" },
169 amount_tax => { type => "number" },
170 breakdown => {
171 definition => {
172 discounts => {
173 definition => { amount => { type => "number" }, discount => { type => "hash" } },
174 type => "class_array",
175 },
176 taxes => {
177 definition => {
178 amount => { type => "number" },
179 rate => { class => "Net::API::Stripe::Tax::Rate", type => "object" },
180 },
181 type => "class_array",
182 },
183 },
184 type => "class",
185 },
186 }, @_ ) ); }
187  
188 0 ▶sub url { return( shift->_set_get_uri( 'url', @_ ) ); }
Subroutine url: not called CC=1 SCAR=6.9
Pod documented
189  
190 2 1;
191  
192 __END__
« Stripe/Billing/Subscription.pm ↑ Summary Stripe/Treasury/OutboundPayment.pm »