Class: Stripe::Tax::CalculationCreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/params/tax/calculation_create_params.rb

Defined Under Namespace

Classes: CustomerDetails, LineItem, ShipFromDetails, ShippingCost

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(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.



189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 189

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 = expand
  @line_items = line_items
  @ship_from_details = ship_from_details
  @shipping_cost = shipping_cost
  @tax_date = tax_date
end

Instance Attribute Details

#currencyObject

Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).



173
174
175
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 173

def currency
  @currency
end

#customerObject

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`.



175
176
177
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 175

def customer
  @customer
end

#customer_detailsObject

Details about the customer, including address and tax IDs.



177
178
179
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 177

def customer_details
  @customer_details
end

#expandObject

Specifies which fields in the response should be expanded.



179
180
181
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 179

def expand
  @expand
end

#line_itemsObject

A list of items the customer is purchasing.



181
182
183
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 181

def line_items
  @line_items
end

#ship_from_detailsObject

Details about the address from which the goods are being shipped.



183
184
185
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 183

def ship_from_details
  @ship_from_details
end

#shipping_costObject

Shipping cost details to be used for the calculation.



185
186
187
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 185

def shipping_cost
  @shipping_cost
end

#tax_dateObject

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.



187
188
189
# File 'lib/stripe/params/tax/calculation_create_params.rb', line 187

def tax_date
  @tax_date
end