Class: Stripe::Tax::CalculationCreateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Tax::CalculationCreateParams
- Defined in:
- lib/stripe/params/tax/calculation_create_params.rb
Defined Under Namespace
Classes: CustomerDetails, LineItem, ShipFromDetails, ShippingCost
Instance Attribute Summary collapse
-
#currency ⇒ Object
Three-letter ISO currency code, in lowercase.
-
#customer ⇒ Object
The ID of an existing customer to use for this calculation.
-
#customer_details ⇒ Object
Details about the customer, including address and tax IDs.
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#line_items ⇒ Object
A list of items the customer is purchasing.
-
#ship_from_details ⇒ Object
Details about the address from which the goods are being shipped.
-
#shipping_cost ⇒ Object
Shipping cost details to be used for the calculation.
-
#tax_date ⇒ Object
The calculation uses the tax rules and rates that are in effect at this timestamp.
Instance Method Summary collapse
-
#initialize(currency: nil, customer: nil, customer_details: nil, expand: nil, line_items: nil, ship_from_details: nil, shipping_cost: nil, tax_date: nil) ⇒ CalculationCreateParams
constructor
A new instance of CalculationCreateParams.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h
Constructor Details
#initialize(currency: nil, customer: nil, customer_details: nil, expand: nil, line_items: nil, ship_from_details: nil, shipping_cost: nil, tax_date: nil) ⇒ CalculationCreateParams
Returns a new instance of CalculationCreateParams.
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 231 def initialize( currency: nil, customer: nil, customer_details: nil, expand: nil, line_items: nil, ship_from_details: nil, shipping_cost: nil, tax_date: nil ) @currency = currency @customer = customer @customer_details = customer_details @expand = @line_items = line_items @ship_from_details = ship_from_details @shipping_cost = shipping_cost @tax_date = tax_date end |
Instance Attribute Details
#currency ⇒ Object
Three-letter ISO currency code, in lowercase. Must be a supported currency.
215 216 217 |
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 215 def currency @currency end |
#customer ⇒ Object
The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to customer_details.
217 218 219 |
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 217 def customer @customer end |
#customer_details ⇒ Object
Details about the customer, including address and tax IDs.
219 220 221 |
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 219 def customer_details @customer_details end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
221 222 223 |
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 221 def @expand end |
#line_items ⇒ Object
A list of items the customer is purchasing.
223 224 225 |
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 223 def line_items @line_items end |
#ship_from_details ⇒ Object
Details about the address from which the goods are being shipped.
225 226 227 |
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 225 def ship_from_details @ship_from_details end |
#shipping_cost ⇒ Object
Shipping cost details to be used for the calculation.
227 228 229 |
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 227 def shipping_cost @shipping_cost end |
#tax_date ⇒ Object
The calculation uses the tax rules and rates that are in effect at this timestamp. You can use a date up to 31 days in the past or up to 31 days in the future. If you use a future date, Stripe doesn't guarantee that the expected tax rules and rate being used match the actual rules and rate that will be in effect on that date. We deploy tax changes before their effective date, but not within a fixed window.
229 230 231 |
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 229 def tax_date @tax_date end |