Class: Stripe::Checkout::SessionCreateParams::AutomaticSurcharge

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/checkout/session_create_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h

Constructor Details

#initialize(calculation_basis: nil, enabled: nil, tax_behavior: nil) ⇒ AutomaticSurcharge

Returns a new instance of AutomaticSurcharge.



46
47
48
49
50
# File 'lib/stripe/params/checkout/session_create_params.rb', line 46

def initialize(calculation_basis: nil, enabled: nil, tax_behavior: nil)
  @calculation_basis = calculation_basis
  @enabled = enabled
  @tax_behavior = tax_behavior
end

Instance Attribute Details

#calculation_basisObject

Determines which amount serves as the basis for calculating the surcharge.



40
41
42
# File 'lib/stripe/params/checkout/session_create_params.rb', line 40

def calculation_basis
  @calculation_basis
end

#enabledObject

Set to ‘true` to calculate surcharge automatically using the customer’s card details and location.



42
43
44
# File 'lib/stripe/params/checkout/session_create_params.rb', line 42

def enabled
  @enabled
end

#tax_behaviorObject

Specifies whether the surcharge is considered inclusive or exclusive of taxes.



44
45
46
# File 'lib/stripe/params/checkout/session_create_params.rb', line 44

def tax_behavior
  @tax_behavior
end