Class: Stripe::Tax::Calculation::CreateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Tax::Calculation::CreateParams
- Defined in:
- lib/stripe/resources/tax/calculation.rb
Defined Under Namespace
Classes: CustomerDetails, LineItem, ShipFromDetails, ShippingCost
Instance Attribute Summary collapse
-
#currency ⇒ Object
Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), 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
Timestamp of date at which the tax rules and rates in effect applies for the calculation.
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) ⇒ CreateParams
constructor
A new instance of CreateParams.
Methods inherited from RequestParams
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) ⇒ CreateParams
Returns a new instance of CreateParams.
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 |
# File 'lib/stripe/resources/tax/calculation.rb', line 353 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](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).
337 338 339 |
# File 'lib/stripe/resources/tax/calculation.rb', line 337 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`.
339 340 341 |
# File 'lib/stripe/resources/tax/calculation.rb', line 339 def customer @customer end |
#customer_details ⇒ Object
Details about the customer, including address and tax IDs.
341 342 343 |
# File 'lib/stripe/resources/tax/calculation.rb', line 341 def customer_details @customer_details end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
343 344 345 |
# File 'lib/stripe/resources/tax/calculation.rb', line 343 def @expand end |
#line_items ⇒ Object
A list of items the customer is purchasing.
345 346 347 |
# File 'lib/stripe/resources/tax/calculation.rb', line 345 def line_items @line_items end |
#ship_from_details ⇒ Object
Details about the address from which the goods are being shipped.
347 348 349 |
# File 'lib/stripe/resources/tax/calculation.rb', line 347 def ship_from_details @ship_from_details end |
#shipping_cost ⇒ Object
Shipping cost details to be used for the calculation.
349 350 351 |
# File 'lib/stripe/resources/tax/calculation.rb', line 349 def shipping_cost @shipping_cost end |
#tax_date ⇒ Object
Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future.
351 352 353 |
# File 'lib/stripe/resources/tax/calculation.rb', line 351 def tax_date @tax_date end |