Class: Stripe::Checkout::SessionCreateParams::AutomaticTax
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Checkout::SessionCreateParams::AutomaticTax
- Defined in:
- lib/stripe/params/checkout/session_create_params.rb
Defined Under Namespace
Classes: Liability
Instance Attribute Summary collapse
-
#address_collection_precision ⇒ Object
Controls how much address information Checkout collects when automatic_tax is enabled.
-
#enabled ⇒ Object
Set to
trueto calculate tax automatically using the customer's location. -
#liability ⇒ Object
The account that's liable for tax.
Instance Method Summary collapse
-
#initialize(address_collection_precision: nil, enabled: nil, liability: nil) ⇒ AutomaticTax
constructor
A new instance of AutomaticTax.
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_precision ⇒ Object
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 |
#enabled ⇒ Object
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 |
#liability ⇒ Object
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 |