Class: Stripe::Charge::CaptureParams::PaymentDetails::Subscription

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/charge.rb

Defined Under Namespace

Classes: Affiliate, BillingInterval

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(affiliate: nil, auto_renewal: nil, billing_interval: nil, ends_at: nil, name: nil, starts_at: nil) ⇒ Subscription

Returns a new instance of Subscription.



2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
# File 'lib/stripe/resources/charge.rb', line 2893

def initialize(
  affiliate: nil,
  auto_renewal: nil,
  billing_interval: nil,
  ends_at: nil,
  name: nil,
  starts_at: nil
)
  @affiliate = affiliate
  @auto_renewal = auto_renewal
  @billing_interval = billing_interval
  @ends_at = ends_at
  @name = name
  @starts_at = starts_at
end

Instance Attribute Details

#affiliateObject

Affiliate details for this purchase.



2881
2882
2883
# File 'lib/stripe/resources/charge.rb', line 2881

def affiliate
  @affiliate
end

#auto_renewalObject

Info whether the subscription will be auto renewed upon expiry.



2883
2884
2885
# File 'lib/stripe/resources/charge.rb', line 2883

def auto_renewal
  @auto_renewal
end

#billing_intervalObject

Subscription billing details for this purchase.



2885
2886
2887
# File 'lib/stripe/resources/charge.rb', line 2885

def billing_interval
  @billing_interval
end

#ends_atObject

Subscription end time. Measured in seconds since the Unix epoch.



2887
2888
2889
# File 'lib/stripe/resources/charge.rb', line 2887

def ends_at
  @ends_at
end

#nameObject

Name of the product on subscription. e.g. Apple Music Subscription



2889
2890
2891
# File 'lib/stripe/resources/charge.rb', line 2889

def name
  @name
end

#starts_atObject

Subscription start time. Measured in seconds since the Unix epoch.



2891
2892
2893
# File 'lib/stripe/resources/charge.rb', line 2891

def starts_at
  @starts_at
end