Class: Stripe::PaymentLinkService::CreateParams::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(description: nil, invoice_settings: nil, metadata: nil, trial_period_days: nil, trial_settings: nil) ⇒ SubscriptionData

Returns a new instance of SubscriptionData.



552
553
554
555
556
557
558
559
560
561
562
563
564
# File 'lib/stripe/services/payment_link_service.rb', line 552

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.



542
543
544
# File 'lib/stripe/services/payment_link_service.rb', line 542

def description
  @description
end

#invoice_settingsObject

All invoices will be billed using the specified settings.



544
545
546
# File 'lib/stripe/services/payment_link_service.rb', line 544

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.



546
547
548
# File 'lib/stripe/services/payment_link_service.rb', line 546

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.



548
549
550
# File 'lib/stripe/services/payment_link_service.rb', line 548

def trial_period_days
  @trial_period_days
end

#trial_settingsObject

Settings related to subscription trials.



550
551
552
# File 'lib/stripe/services/payment_link_service.rb', line 550

def trial_settings
  @trial_settings
end