Class: Stripe::Tax::CalculationCreateParams::ShippingCost
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Tax::CalculationCreateParams::ShippingCost
- Defined in:
- lib/stripe/params/tax/calculation_create_params.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
A positive integer in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal) representing the shipping charge.
-
#shipping_rate ⇒ Object
If provided, the [shipping rate](stripe.com/docs/api/shipping_rates/object)‘s `amount`, `tax_code` and `tax_behavior` are used.
-
#tax_behavior ⇒ Object
Specifies whether the ‘amount` includes taxes.
-
#tax_code ⇒ Object
The [tax code](stripe.com/docs/tax/tax-categories) used to calculate tax on shipping.
Instance Method Summary collapse
-
#initialize(amount: nil, shipping_rate: nil, tax_behavior: nil, tax_code: nil) ⇒ ShippingCost
constructor
A new instance of ShippingCost.
Methods inherited from RequestParams
Constructor Details
#initialize(amount: nil, shipping_rate: nil, tax_behavior: nil, tax_code: nil) ⇒ ShippingCost
Returns a new instance of ShippingCost.
161 162 163 164 165 166 |
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 161 def initialize(amount: nil, shipping_rate: nil, tax_behavior: nil, tax_code: nil) @amount = amount @shipping_rate = shipping_rate @tax_behavior = tax_behavior @tax_code = tax_code end |
Instance Attribute Details
#amount ⇒ Object
A positive integer in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal) representing the shipping charge. If ‘tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
153 154 155 |
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 153 def amount @amount end |
#shipping_rate ⇒ Object
If provided, the [shipping rate](stripe.com/docs/api/shipping_rates/object)‘s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters.
155 156 157 |
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 155 def shipping_rate @shipping_rate end |
#tax_behavior ⇒ Object
Specifies whether the ‘amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`.
157 158 159 |
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 157 def tax_behavior @tax_behavior end |
#tax_code ⇒ Object
The [tax code](stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](dashboard.stripe.com/settings/tax) is used.
159 160 161 |
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 159 def tax_code @tax_code end |