Class: Stripe::SourceService::UpdateParams::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.



104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/stripe/services/source_service.rb', line 104

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.



94
95
96
# File 'lib/stripe/services/source_service.rb', line 94

def acceptance
  @acceptance
end

#amountObject

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



96
97
98
# File 'lib/stripe/services/source_service.rb', line 96

def amount
  @amount
end

#currencyObject

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



98
99
100
# File 'lib/stripe/services/source_service.rb', line 98

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)



100
101
102
# File 'lib/stripe/services/source_service.rb', line 100

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).



102
103
104
# File 'lib/stripe/services/source_service.rb', line 102

def notification_method
  @notification_method
end