Class: Stripe::Checkout::SessionCreateParams::AutomaticTax

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

Defined Under Namespace

Classes: Liability

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(address_collection_precision: nil, enabled: nil, liability: nil) ⇒ AutomaticTax

Returns a new instance of AutomaticTax.



78
79
80
81
82
# File 'lib/stripe/params/checkout/session_create_params.rb', line 78

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

Instance Attribute Details

#address_collection_precisionObject

Controls how much address information Checkout collects when automatic_tax is enabled.

Defaults to full, which collects the address fields needed for the most accurate tax calculation. Set to minimal to collect only the fields required for tax in the buyer's country, accepting potentially less precise tax calculation in exchange for a streamlined form.

Only honored when automatic_tax.enabled is true, billing_address_collection is auto, the resolved tax address source is the session billing address, and ui_mode is form.



70
71
72
# File 'lib/stripe/params/checkout/session_create_params.rb', line 70

def address_collection_precision
  @address_collection_precision
end

#enabledObject

Set to true to calculate tax automatically using the customer's location.

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



74
75
76
# File 'lib/stripe/params/checkout/session_create_params.rb', line 74

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.



76
77
78
# File 'lib/stripe/params/checkout/session_create_params.rb', line 76

def liability
  @liability
end