class Stripe::Subscription

Overview

https://stripe.com/docs/api/subscriptions/object

Included Modules

Defined in:

stripe/methods/core/subscriptions/create_subscription.cr
stripe/methods/core/subscriptions/update_subscription.cr
stripe/objects/core/subscription.cr

Constructors

Class Method Summary

Instance Method Summary

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.new(pull : JSON::PullParser) #

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.delete(id : String) #

def self.delete(subscription : Stripe::Subscription) #

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) #

def self.retrieve(id : String) #

def self.retrieve(subscription : Stripe::Subscription) #

Instance Method Detail

def application_fee_percent : Float32 | Nil #

def billing : String | Nil #

def billing_cycle_anchor : Time | Nil #

def billing_thresholds : Hash(String, Int32 | Bool) | Nil #

def cancel_at : Time | Nil #

def cancel_at_period_end : Bool #

def canceled_at : Time | Nil #

def collection_method : String | Nil #

def created : Time | Nil #

def current_period_end : Time #

def current_period_start : Time #

def customer : String | Nil | Stripe::Customer | Nil #

def days_until_due : Int32 | Nil #

def default_payment_method : String | Nil | Stripe::PaymentMethod | Nil #

def default_source : String | Nil #

def default_tax_rates : Array(Stripe::TaxRate) | Nil #

def discount : Stripe::Discount | Nil #

def id : String #

def items : List(Item) | Nil #

def latest_invoice : String | Nil | Stripe::Invoice | Nil #

def livemode : Bool | Nil #

def metadata : Hash(String, String) | Nil #

def pending_setup_intent : String | Nil | Stripe::SetupIntent | Nil #

def schedule : String | Nil #

def start : Time | Nil #

def start_date : Time | Nil #

def status : Status #