Class: Stripe::PaymentLinkService::UpdateParams::SubscriptionData

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/payment_link_service.rb

Defined Under Namespace

Classes: InvoiceSettings, TrialSettings

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

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

Returns a new instance of SubscriptionData.



1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
# File 'lib/stripe/services/payment_link_service.rb', line 1241

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

Instance Attribute Details

#invoice_settingsObject

All invoices will be billed using the specified settings.



1233
1234
1235
# File 'lib/stripe/services/payment_link_service.rb', line 1233

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.



1235
1236
1237
# File 'lib/stripe/services/payment_link_service.rb', line 1235

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.



1237
1238
1239
# File 'lib/stripe/services/payment_link_service.rb', line 1237

def trial_period_days
  @trial_period_days
end

#trial_settingsObject

Settings related to subscription trials.



1239
1240
1241
# File 'lib/stripe/services/payment_link_service.rb', line 1239

def trial_settings
  @trial_settings
end