Class: Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Payto::MandateOptions

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amount: nil, amount_type: nil, end_date: nil, payment_schedule: nil, payments_per_period: nil, purpose: nil, start_date: nil) ⇒ MandateOptions

Returns a new instance of MandateOptions.



1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
# File 'lib/stripe/services/checkout/session_service.rb', line 1412

def initialize(
  amount: nil,
  amount_type: nil,
  end_date: nil,
  payment_schedule: nil,
  payments_per_period: nil,
  purpose: nil,
  start_date: nil
)
  @amount = amount
  @amount_type = amount_type
  @end_date = end_date
  @payment_schedule = payment_schedule
  @payments_per_period = payments_per_period
  @purpose = purpose
  @start_date = start_date
end

Instance Attribute Details

#amountObject

Amount that will be collected. It is required when ‘amount_type` is `fixed`.



1398
1399
1400
# File 'lib/stripe/services/checkout/session_service.rb', line 1398

def amount
  @amount
end

#amount_typeObject

The type of amount that will be collected. The amount charged must be exact or up to the value of ‘amount` param for `fixed` or `maximum` type respectively.



1400
1401
1402
# File 'lib/stripe/services/checkout/session_service.rb', line 1400

def amount_type
  @amount_type
end

#end_dateObject

Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.



1402
1403
1404
# File 'lib/stripe/services/checkout/session_service.rb', line 1402

def end_date
  @end_date
end

#payment_scheduleObject

The periodicity at which payments will be collected.



1404
1405
1406
# File 'lib/stripe/services/checkout/session_service.rb', line 1404

def payment_schedule
  @payment_schedule
end

#payments_per_periodObject

The number of payments that will be made during a payment period. Defaults to 1 except for when ‘payment_schedule` is `adhoc`. In that case, it defaults to no limit.



1406
1407
1408
# File 'lib/stripe/services/checkout/session_service.rb', line 1406

def payments_per_period
  @payments_per_period
end

#purposeObject

The purpose for which payments are made. Defaults to retail.



1408
1409
1410
# File 'lib/stripe/services/checkout/session_service.rb', line 1408

def purpose
  @purpose
end

#start_dateObject

Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.



1410
1411
1412
# File 'lib/stripe/services/checkout/session_service.rb', line 1410

def start_date
  @start_date
end