Class: Stripe::Checkout::SessionService::CreateParams::ConsentCollection

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

Defined Under Namespace

Classes: PaymentMethodReuseAgreement

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(payment_method_reuse_agreement: nil, promotions: nil, terms_of_service: nil) ⇒ ConsentCollection

Returns a new instance of ConsentCollection.



168
169
170
171
172
173
174
175
176
# File 'lib/stripe/services/checkout/session_service.rb', line 168

def initialize(
  payment_method_reuse_agreement: nil,
  promotions: nil,
  terms_of_service: nil
)
  @payment_method_reuse_agreement = payment_method_reuse_agreement
  @promotions = promotions
  @terms_of_service = terms_of_service
end

Instance Attribute Details

#payment_method_reuse_agreementObject

Determines the display of payment method reuse agreement text in the UI. If set to ‘hidden`, it will hide legal text related to the reuse of a payment method.



159
160
161
# File 'lib/stripe/services/checkout/session_service.rb', line 159

def payment_method_reuse_agreement
  @payment_method_reuse_agreement
end

#promotionsObject

If set to ‘auto`, enables the collection of customer consent for promotional communications. The Checkout Session will determine whether to display an option to opt into promotional communication from the merchant depending on the customer’s locale. Only available to US merchants.



163
164
165
# File 'lib/stripe/services/checkout/session_service.rb', line 163

def promotions
  @promotions
end

#terms_of_serviceObject

If set to ‘required`, it requires customers to check a terms of service checkbox before being able to pay. There must be a valid terms of service URL set in your [Dashboard settings](dashboard.stripe.com/settings/public).



166
167
168
# File 'lib/stripe/services/checkout/session_service.rb', line 166

def terms_of_service
  @terms_of_service
end