Class: Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Klarna::Subscription

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

Defined Under Namespace

Classes: NextBilling

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(interval: nil, interval_count: nil, name: nil, next_billing: nil, reference: nil) ⇒ Subscription

Returns a new instance of Subscription.



519
520
521
522
523
524
525
526
527
528
529
530
531
# File 'lib/stripe/services/order_service.rb', line 519

def initialize(
  interval: nil,
  interval_count: nil,
  name: nil,
  next_billing: nil,
  reference: nil
)
  @interval = interval
  @interval_count = interval_count
  @name = name
  @next_billing = next_billing
  @reference = reference
end

Instance Attribute Details

#intervalObject

Unit of time between subscription charges.



509
510
511
# File 'lib/stripe/services/order_service.rb', line 509

def interval
  @interval
end

#interval_countObject

The number of intervals (specified in the ‘interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.



511
512
513
# File 'lib/stripe/services/order_service.rb', line 511

def interval_count
  @interval_count
end

#nameObject

Name for subscription.



513
514
515
# File 'lib/stripe/services/order_service.rb', line 513

def name
  @name
end

#next_billingObject

Describes the upcoming charge for this subscription.



515
516
517
# File 'lib/stripe/services/order_service.rb', line 515

def next_billing
  @next_billing
end

#referenceObject

A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.



517
518
519
# File 'lib/stripe/services/order_service.rb', line 517

def reference
  @reference
end