Class: Stripe::SourceService::CreateParams::Mandate

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

Defined Under Namespace

Classes: Acceptance

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(acceptance: nil, amount: nil, currency: nil, interval: nil, notification_method: nil) ⇒ Mandate

Returns a new instance of Mandate.



359
360
361
362
363
364
365
366
367
368
369
370
371
# File 'lib/stripe/services/source_service.rb', line 359

def initialize(
  acceptance: nil,
  amount: nil,
  currency: nil,
  interval: nil,
  notification_method: nil
)
  @acceptance = acceptance
  @amount = amount
  @currency = currency
  @interval = interval
  @notification_method = notification_method
end

Instance Attribute Details

#acceptanceObject

The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.



349
350
351
# File 'lib/stripe/services/source_service.rb', line 349

def acceptance
  @acceptance
end

#amountObject

The amount specified by the mandate. (Leave null for a mandate covering all amounts)



351
352
353
# File 'lib/stripe/services/source_service.rb', line 351

def amount
  @amount
end

#currencyObject

The currency specified by the mandate. (Must match ‘currency` of the source)



353
354
355
# File 'lib/stripe/services/source_service.rb', line 353

def currency
  @currency
end

#intervalObject

The interval of debits permitted by the mandate. Either ‘one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency)



355
356
357
# File 'lib/stripe/services/source_service.rb', line 355

def interval
  @interval
end

#notification_methodObject

The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either ‘email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification).



357
358
359
# File 'lib/stripe/services/source_service.rb', line 357

def notification_method
  @notification_method
end