Class: Stripe::Checkout::Session::CreateParams::AutomaticTax

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/checkout/session.rb

Defined Under Namespace

Classes: Liability

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(enabled: nil, liability: nil) ⇒ AutomaticTax

Returns a new instance of AutomaticTax.



1195
1196
1197
1198
# File 'lib/stripe/resources/checkout/session.rb', line 1195

def initialize(enabled: nil, liability: nil)
  @enabled = enabled
  @liability = liability
end

Instance Attribute Details

#enabledObject

Set to ‘true` to [calculate tax automatically](docs.stripe.com/tax) using the customer’s location.

Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation.



1191
1192
1193
# File 'lib/stripe/resources/checkout/session.rb', line 1191

def enabled
  @enabled
end

#liabilityObject

The account that’s liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.



1193
1194
1195
# File 'lib/stripe/resources/checkout/session.rb', line 1193

def liability
  @liability
end