class Stripe::Subscription
- Stripe::Subscription
- Reference
- Object
Overview
https://stripe.com/docs/api/subscriptions/object
Included Modules
- JSON::Serializable
- StripeMethods
Defined in:
stripe/methods/core/subscriptions/create_subscription.crstripe/methods/core/subscriptions/update_subscription.cr
stripe/objects/core/subscription.cr
Constructors
- .create(customer : String | Customer | Nil = nil, coupon : String | Nil = nil, default_source : String | Token | Nil = nil, default_payment_method : String | Token | Nil = nil, off_session : Bool | Nil = nil, metadata : Hash | Nil = nil, items : U | Nil = nil, add_invoice_items : U | Nil = nil, trial_end : Time | Nil = nil, expand : Array(String) | Nil = nil) : Subscription forall T, U
- .new(pull : JSON::PullParser)
- .update(subscription : String | Subscription, cancel_at_period_end : Bool | Unset = Unset.new, customer : String | Customer | Nil | Unset = Unset.new, coupon : String | Nil | Unset = Unset.new, default_source : String | Token | Nil | Unset = Unset.new, default_payment_method : String | Token | Nil | Unset = Unset.new, metadata : Hash | Nil | Unset = Unset.new, items : U | Nil | Unset = Unset.new, add_invoice_items : U | Nil | Unset = Unset.new) : Subscription forall T, U
Class Method Summary
- .delete(id : String)
- .delete(subscription : Stripe::Subscription)
- .list(customer : String | Nil = nil, status : String | Nil | Stripe::Subscription::Status | Nil = nil, limit : Int32 | Nil = nil, starting_after : String | Nil = nil, ending_before : String | Nil = nil) : List(Stripe::Subscription)
- .retrieve(id : String)
- .retrieve(subscription : Stripe::Subscription)
Instance Method Summary
- #application_fee_percent : Float32 | Nil
- #billing : String | Nil
- #billing_cycle_anchor : Time | Nil
- #billing_thresholds : Hash(String, Int32 | Bool) | Nil
- #cancel_at : Time | Nil
- #cancel_at_period_end : Bool
- #canceled_at : Time | Nil
- #collection_method : String | Nil
- #created : Time | Nil
- #current_period_end : Time
- #current_period_start : Time
- #customer : String | Nil | Stripe::Customer | Nil
- #days_until_due : Int32 | Nil
- #default_payment_method : String | Nil | Stripe::PaymentMethod | Nil
- #default_source : String | Nil
- #default_tax_rates : Array(Stripe::TaxRate) | Nil
- #discount : Stripe::Discount | Nil
- #id : String
- #items : List(Item) | Nil
- #latest_invoice : String | Nil | Stripe::Invoice | Nil
- #livemode : Bool | Nil
- #metadata : Hash(String, String) | Nil
- #pending_setup_intent : String | Nil | Stripe::SetupIntent | Nil
- #schedule : String | Nil
- #start : Time | Nil
- #start_date : Time | Nil
- #status : Status
Constructor Detail
def self.create(customer : String | Customer | Nil = nil, coupon : String | Nil = nil, default_source : String | Token | Nil = nil, default_payment_method : String | Token | Nil = nil, off_session : Bool | Nil = nil, metadata : Hash | Nil = nil, items : U | Nil = nil, add_invoice_items : U | Nil = nil, trial_end : Time | Nil = nil, expand : Array(String) | Nil = nil) : Subscription forall T, U
#
def self.update(subscription : String | Subscription, cancel_at_period_end : Bool | Unset = Unset.new, customer : String | Customer | Nil | Unset = Unset.new, coupon : String | Nil | Unset = Unset.new, default_source : String | Token | Nil | Unset = Unset.new, default_payment_method : String | Token | Nil | Unset = Unset.new, metadata : Hash | Nil | Unset = Unset.new, items : U | Nil | Unset = Unset.new, add_invoice_items : U | Nil | Unset = Unset.new) : Subscription forall T, U
#
Class Method Detail
def self.list(customer : String | Nil = nil, status : String | Nil | Stripe::Subscription::Status | Nil = nil, limit : Int32 | Nil = nil, starting_after : String | Nil = nil, ending_before : String | Nil = nil) : List(Stripe::Subscription)
#