| 1 | ##---------------------------------------------------------------------------- | ||
| 2 | ## Stripe API - ~/lib/Net/API/Stripe/Billing/Subscription.pm | ||
| 3 | ## Version v0.301.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 | ## | ||
| 9 | ##---------------------------------------------------------------------------- | ||
| 10 | ## https://stripe.com/docs/api/subscriptions | ||
| 11 | package Net::API::Stripe::Billing::Subscription; | ||
| 12 | BEGIN | ||
| 13 | 2 | ▶ | { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | 2 | ▶ | use parent qw( Net::API::Stripe::Generic ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | 2 | ▶ | use vars qw( $VERSION ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | 2 | our( $VERSION ) = 'v0.301.0'; | |
| 19 | }; | ||
| 20 | |||
| 21 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 22 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 23 | |||
| 24 | 0 | ▶ | sub id { return( shift->_set_get_scalar( 'id', @_ ) ); } |
|
Subroutine
id: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 25 | |||
| 26 | 0 | ▶ | sub object { return( shift->_set_get_scalar( 'object', @_ ) ); } |
|
Subroutine
object: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 27 | |||
| 28 | 0 | ▶ | sub application { return( shift->_set_get_scalar_or_object( 'application', 'Net::API::Stripe::Connect::Account', @_ ) ); } |
|
Subroutine
application: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 29 | |||
| 30 | 0 | ▶ | sub application_fee_percent { return( shift->_set_get_number( 'application_fee_percent', @_ ) ); } |
|
Subroutine
application_fee_percent: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 31 | |||
| 32 | 0 | ▶ | sub automatic_tax { return( shift->_set_get_class( 'automatic_tax', |
|
Subroutine
automatic_tax: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 33 | { | ||
| 34 | enabled => { type => 'boolean' }, | ||
| 35 | }, @_ ) ); } | ||
| 36 | |||
| 37 | 0 | ▶ | sub backdate_start_date { return( shift->_set_get_datetime( 'backdate_start_date', @_ ) ); } |
|
Subroutine
backdate_start_date: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 38 | |||
| 39 | 0 | ▶ | sub billing { return( shift->_set_get_scalar( 'billing', @_ ) ); } |
|
Subroutine
billing: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 40 | |||
| 41 | 0 | ▶ | sub billing_cycle_anchor { return( shift->_set_get_datetime( 'billing_cycle_anchor', @_ ) ); } |
|
Subroutine
billing_cycle_anchor: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 42 | |||
| 43 | 0 | ▶ | sub billing_thresholds { return( shift->_set_get_object( 'billing_thresholds', 'Net::API::Stripe::Billing::Thresholds', @_ ) ); } |
|
Subroutine
billing_thresholds: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 44 | |||
| 45 | 0 | ▶ | sub cancel_at { return( shift->_set_get_datetime( 'cancel_at', @_ ) ); } |
|
Subroutine
cancel_at: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 46 | |||
| 47 | 0 | ▶ | sub cancel_at_period_end { return( shift->_set_get_boolean( 'cancel_at_period_end', @_ ) ); } |
|
Subroutine
cancel_at_period_end: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 48 | |||
| 49 | 0 | ▶ | sub canceled_at { return( shift->_set_get_datetime( 'canceled_at', @_ ) ); } |
|
Subroutine
canceled_at: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 50 | |||
| 51 | 0 | ▶ | sub collection_method { return( shift->_set_get_scalar( 'collection_method', @_ ) ); } |
|
Subroutine
collection_method: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 52 | |||
| 53 | 0 | ▶ | sub coupon { return( shift->_set_get_scalar( 'coupon', @_ ) ); } |
|
Subroutine
coupon: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 54 | |||
| 55 | 0 | ▶ | sub created { return( shift->_set_get_datetime( 'created', @_ ) ); } |
|
Subroutine
created: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 56 | |||
| 57 | 0 | ▶ | sub currency { return( shift->_set_get_number( 'currency', @_ ) ); } |
|
Subroutine
currency: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 58 | |||
| 59 | 0 | ▶ | sub current_period_end { return( shift->_set_get_datetime( 'current_period_end', @_ ) ); } |
|
Subroutine
current_period_end: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 60 | |||
| 61 | 0 | ▶ | sub current_period_start { return( shift->_set_get_datetime( 'current_period_start', @_ ) ); } |
|
Subroutine
current_period_start: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 62 | |||
| 63 | 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
| |||
| 64 | |||
| 65 | 0 | ▶ | sub days_until_due { return( shift->_set_get_number( 'days_until_due', @_ ) ); } |
|
Subroutine
days_until_due: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 66 | |||
| 67 | 0 | ▶ | sub default_payment_method { return( shift->_set_get_scalar_or_object( 'default_payment_method', 'Net::API::Stripe::Payment::Method', @_ ) ); } |
|
Subroutine
default_payment_method: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 68 | |||
| 69 | 0 | ▶ | sub default_source { return( shift->_set_get_scalar_or_object( 'default_source', 'Net::API::Stripe::Payment::Source', @_ ) ); } |
|
Subroutine
default_source: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 70 | |||
| 71 | 0 | ▶ | sub default_tax_rates { return( shift->_set_get_object_array( 'default_tax_rates', 'Net::API::Stripe::Tax::Rate', @_ ) ); } |
|
Subroutine
default_tax_rates: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 72 | |||
| 73 | 0 | ▶ | sub description { return( shift->_set_get_scalar( 'description', @_ ) ); } |
|
Subroutine
description: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 74 | |||
| 75 | 0 | ▶ | sub discount { return( shift->_set_get_object( 'discount', 'Net::API::Stripe::Billing::Discount', @_ ) ); } |
|
Subroutine
discount: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 76 | |||
| 77 | 0 | ▶ | sub ended_at { return( shift->_set_get_datetime( 'ended_at', @_ ) ); } |
|
Subroutine
ended_at: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 78 | |||
| 79 | ## To cancel subscriptions | ||
| 80 | |||
| 81 | 0 | ▶ | sub invoice_customer_balance_settings { return( shift->_set_get_hash_as_object( 'invoice_customer_balance_settings', 'Net::API::Stripe::Billing::Invoice::BalanceSettings', @_ ) ); } |
|
Subroutine
invoice_customer_balance_settings: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 82 | |||
| 83 | 0 | ▶ | sub invoice_now { return( shift->_set_get_boolean( 'invoice_now', @_ ) ); } |
|
Subroutine
invoice_now: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 84 | |||
| 85 | 0 | ▶ | sub items { return( shift->_set_get_object( 'items', 'Net::API::Stripe::Billing::Subscription::Items', @_ ) ); } |
|
Subroutine
items: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 86 | |||
| 87 | 0 | ▶ | sub latest_invoice { return( shift->_set_get_scalar_or_object( 'latest_invoice', 'Net::API::Stripe::Billing::Invoice', @_ ) ); } |
|
Subroutine
latest_invoice: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 88 | |||
| 89 | 0 | ▶ | sub livemode { return( shift->_set_get_boolean( 'livemode', @_ ) ); } |
|
Subroutine
livemode: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 90 | |||
| 91 | 0 | ▶ | sub metadata { return( shift->_set_get_hash( 'metadata', @_ ) ); } |
|
Subroutine
metadata: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 92 | |||
| 93 | 0 | ▶ | sub next_pending_invoice_item_invoice { return( shift->_set_get_hash_as_object( 'next_pending_invoice_item_invoice', 'Net::API::Billing::Subscription::Item::Invoice', @_ ) ); } |
|
Subroutine
next_pending_invoice_item_invoice: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 94 | |||
| 95 | 0 | ▶ | sub off_session { return( shift->_set_get_boolean( 'off_session', @_ ) ); } |
|
Subroutine
off_session: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 96 | |||
| 97 | sub pause_collection | ||
| 98 | 0 | ▶ | { |
|
Subroutine
pause_collection: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 99 | 0 | return( shift->_set_get_class( 'pause_collection', | |
| 100 | { | ||
| 101 | behavior => { type => 'scalar' }, | ||
| 102 | resumes_at => { type => 'datetime' }, | ||
| 103 | }, @_ ) ); | ||
| 104 | } | ||
| 105 | |||
| 106 | 0 | ▶ | sub payment_behavior { return( shift->_set_get_scalar( 'payment_behavior', @_ ) ); } |
|
Subroutine
payment_behavior: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 107 | |||
| 108 | 0 | ▶ | sub payment_settings { return( shift->_set_get_object( 'payment_settings', 'Net::API::Stripe::Payment::Settings', @_ ) ); } |
|
Subroutine
payment_settings: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 109 | |||
| 110 | 0 | ▶ | sub pending_invoice_item_interval { return( shift->_set_get_object( 'pending_invoice_item_interval', 'Net::API::Stripe::Billing::Plan', @_ ) ); } |
|
Subroutine
pending_invoice_item_interval: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 111 | |||
| 112 | 0 | ▶ | sub pending_setup_intent { return( shift->_set_get_scalar_or_object( 'pending_setup_intent', 'Net::API::Stripe::Payment::Intent::Setup', @_ ) ); } |
|
Subroutine
pending_setup_intent: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 113 | |||
| 114 | sub pending_update | ||
| 115 | 0 | ▶ | { |
|
Subroutine
pending_update: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 116 | 0 | return( shift->_set_get_class( 'pending_update', | |
| 117 | { | ||
| 118 | billing_cycle_anchor => { type => 'datetime' }, | ||
| 119 | expires_at => { type => 'datetime' }, | ||
| 120 | subscription_items => { type => 'object_array_object', class => 'Net::API::Stripe::Billing::Subscription::Item' }, | ||
| 121 | trial_end => { type => 'datetime' }, | ||
| 122 | trial_from_plan => { type => 'boolean' }, | ||
| 123 | }, @_ ) ); | ||
| 124 | } | ||
| 125 | |||
| 126 | 0 | ▶ | sub plan { return( shift->_set_get_object( 'plan', 'Net::API::Stripe::Billing::Plan', @_ ) ); } |
|
Subroutine
plan: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 127 | |||
| 128 | 0 | ▶ | sub prorate { return( shift->_set_get_boolean( 'prorate', @_ ) ); } |
|
Subroutine
prorate: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 129 | |||
| 130 | 0 | ▶ | sub proration_behavior { return( shift->_set_get_scalar( 'proration_behavior', @_ ) ); } |
|
Subroutine
proration_behavior: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 131 | |||
| 132 | 0 | ▶ | sub quantity { return( shift->_set_get_number( 'quantity', @_ ) ); } |
|
Subroutine
quantity: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 133 | |||
| 134 | 0 | ▶ | sub schedule { return( shift->_set_get_scalar_or_object( 'schedule', 'Net::API::Stripe::Billing::Subscription::Schedule', @_ ) ); } |
|
Subroutine
schedule: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 135 | |||
| 136 | 0 | ▶ | sub start { return( shift->_set_get_datetime( 'start', @_ ) ); } |
|
Subroutine
start: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 137 | |||
| 138 | 0 | ▶ | sub start_date { return( shift->_set_get_datetime( 'start_date', @_ ) ); } |
|
Subroutine
start_date: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 139 | |||
| 140 | 0 | ▶ | sub status { return( shift->_set_get_scalar( 'status', @_ ) ); } |
|
Subroutine
status: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 141 | |||
| 142 | 0 | ▶ | sub tax_percent { return( shift->_set_get_number( 'tax_percent', @_ ) ); } |
|
Subroutine
tax_percent: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 143 | |||
| 144 | 0 | ▶ | sub test_clock { return( shift->_set_get_scalar_or_object( 'test_clock', 'Net::API::Stripe::Billing::TestClock', @_ ) ); } |
|
Subroutine
test_clock: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 145 | |||
| 146 | sub transfer_data | ||
| 147 | 0 | ▶ | { |
|
Subroutine
transfer_data: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 148 | 0 | return( shift->_set_get_class( 'transfer_data', | |
| 149 | { | ||
| 150 | amount_percent => { type => 'number' }, | ||
| 151 | destination => { type => 'object', class => 'Net::API::Stripe::Connect::Account' }, | ||
| 152 | }, @_ ) ); | ||
| 153 | } | ||
| 154 | |||
| 155 | 0 | ▶ | sub trial_end { return( shift->_set_get_datetime( 'trial_end', @_ ) ); } |
|
Subroutine
trial_end: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 156 | |||
| 157 | 0 | ▶ | sub trial_from_plan { return( shift->_set_get_boolean( 'trial_from_plan', @_ ) ); } |
|
Subroutine
trial_from_plan: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 158 | |||
| 159 | 0 | ▶ | sub trial_period_days { return( shift->_set_get_number( 'trial_period_days', @_ ) ); } |
|
Subroutine
trial_period_days: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 160 | |||
| 161 | 0 | ▶ | sub trial_start { return( shift->_set_get_datetime( 'trial_start', @_ ) ); } |
|
Subroutine
trial_start: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 162 | |||
| 163 | 2 | 1; | |
| 164 | |||
| 165 | __END__ | ||