Class: Stripe::PaymentLink::CreateParams::SubscriptionData

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

Defined Under Namespace

Classes: InvoiceSettings, TrialSettings

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(description: nil, invoice_settings: nil, metadata: nil, trial_period_days: nil, trial_settings: nil) ⇒ SubscriptionData

Returns a new instance of SubscriptionData.



867
868
869
870
871
872
873
874
875
876
877
878
879
# File 'lib/stripe/resources/payment_link.rb', line 867

def initialize(
  description: nil,
  invoice_settings: nil,
  metadata: nil,
  trial_period_days: nil,
  trial_settings: nil
)
  @description = description
  @invoice_settings = invoice_settings
  @metadata = 
  @trial_period_days = trial_period_days
  @trial_settings = trial_settings
end

Instance Attribute Details

#descriptionObject

The subscription’s description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.



853
854
855
# File 'lib/stripe/resources/payment_link.rb', line 853

def description
  @description
end

#invoice_settingsObject

All invoices will be billed using the specified settings.



856
857
858
# File 'lib/stripe/resources/payment_link.rb', line 856

def invoice_settings
  @invoice_settings
end

#metadataObject

Set of [key-value pairs](stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values.



859
860
861
# File 'lib/stripe/resources/payment_link.rb', line 859

def 
  @metadata
end

#trial_period_daysObject

Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.



862
863
864
# File 'lib/stripe/resources/payment_link.rb', line 862

def trial_period_days
  @trial_period_days
end

#trial_settingsObject

Settings related to subscription trials.



865
866
867
# File 'lib/stripe/resources/payment_link.rb', line 865

def trial_settings
  @trial_settings
end