Class: Stripe::Tax::Calculation::CreateParams::CustomerDetails

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/tax/calculation.rb

Defined Under Namespace

Classes: Address, TaxId

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(address: nil, address_source: nil, ip_address: nil, tax_ids: nil, taxability_override: nil) ⇒ CustomerDetails

Returns a new instance of CustomerDetails.



224
225
226
227
228
229
230
231
232
233
234
235
236
# File 'lib/stripe/resources/tax/calculation.rb', line 224

def initialize(
  address: nil,
  address_source: nil,
  ip_address: nil,
  tax_ids: nil,
  taxability_override: nil
)
  @address = address
  @address_source = address_source
  @ip_address = ip_address
  @tax_ids = tax_ids
  @taxability_override = taxability_override
end

Instance Attribute Details

#addressObject

The customer’s postal address (for example, home or business location).



214
215
216
# File 'lib/stripe/resources/tax/calculation.rb', line 214

def address
  @address
end

#address_sourceObject

The type of customer address provided.



216
217
218
# File 'lib/stripe/resources/tax/calculation.rb', line 216

def address_source
  @address_source
end

#ip_addressObject

The customer’s IP address (IPv4 or IPv6).



218
219
220
# File 'lib/stripe/resources/tax/calculation.rb', line 218

def ip_address
  @ip_address
end

#tax_idsObject

The customer’s tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn’t validate tax IDs for correctness.



220
221
222
# File 'lib/stripe/resources/tax/calculation.rb', line 220

def tax_ids
  @tax_ids
end

#taxability_overrideObject

Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you’ve manually checked your customer’s tax exemptions. Prefer providing the customer’s ‘tax_ids` where possible, which automatically determines whether `reverse_charge` applies.



222
223
224
# File 'lib/stripe/resources/tax/calculation.rb', line 222

def taxability_override
  @taxability_override
end