Initial project import
This commit is contained in:
75
node_modules/stripe/esm/resources/Tax/Associations.d.ts
generated
vendored
Normal file
75
node_modules/stripe/esm/resources/Tax/Associations.d.ts
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
import { RequestOptions, Response } from '../../lib.js';
|
||||
export declare class AssociationResource extends StripeResource {
|
||||
/**
|
||||
* Finds a tax association object by PaymentIntent id.
|
||||
*/
|
||||
find(params: Tax.AssociationFindParams, options?: RequestOptions): Promise<Response<Association>>;
|
||||
}
|
||||
export interface Association {
|
||||
/**
|
||||
* Unique identifier for the object.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* String representing the object's type. Objects of the same type share the same value.
|
||||
*/
|
||||
object: 'tax.association';
|
||||
/**
|
||||
* The [Tax Calculation](https://docs.stripe.com/api/tax/calculations/object) that was included in PaymentIntent.
|
||||
*/
|
||||
calculation: string;
|
||||
/**
|
||||
* The [PaymentIntent](https://docs.stripe.com/api/payment_intents/object) that this Tax Association is tracking.
|
||||
*/
|
||||
payment_intent: string;
|
||||
/**
|
||||
* Information about the tax transactions linked to this payment intent
|
||||
*/
|
||||
tax_transaction_attempts: Array<Tax.Association.TaxTransactionAttempt> | null;
|
||||
}
|
||||
export declare namespace Tax {
|
||||
namespace Association {
|
||||
interface TaxTransactionAttempt {
|
||||
committed?: TaxTransactionAttempt.Committed;
|
||||
errored?: TaxTransactionAttempt.Errored;
|
||||
/**
|
||||
* The source of the tax transaction attempt. This is either a refund or a payment intent.
|
||||
*/
|
||||
source: string;
|
||||
/**
|
||||
* The status of the transaction attempt. This can be `errored` or `committed`.
|
||||
*/
|
||||
status: string;
|
||||
}
|
||||
namespace TaxTransactionAttempt {
|
||||
interface Committed {
|
||||
/**
|
||||
* The [Tax Transaction](https://docs.stripe.com/api/tax/transaction/object)
|
||||
*/
|
||||
transaction: string;
|
||||
}
|
||||
interface Errored {
|
||||
/**
|
||||
* Details on why we couldn't commit the tax transaction.
|
||||
*/
|
||||
reason: Errored.Reason;
|
||||
}
|
||||
namespace Errored {
|
||||
type Reason = 'another_payment_associated_with_calculation' | 'calculation_expired' | 'currency_mismatch' | 'original_transaction_voided' | 'unique_reference_violation';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export declare namespace Tax {
|
||||
interface AssociationFindParams {
|
||||
/**
|
||||
* Valid [PaymentIntent](https://docs.stripe.com/api/payment_intents/object) id
|
||||
*/
|
||||
payment_intent: string;
|
||||
/**
|
||||
* Specifies which fields in the response should be expanded.
|
||||
*/
|
||||
expand?: Array<string>;
|
||||
}
|
||||
}
|
||||
11
node_modules/stripe/esm/resources/Tax/Associations.js
generated
vendored
Normal file
11
node_modules/stripe/esm/resources/Tax/Associations.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
export class AssociationResource extends StripeResource {
|
||||
/**
|
||||
* Finds a tax association object by PaymentIntent id.
|
||||
*/
|
||||
find(params, options) {
|
||||
return this._makeRequest('GET', '/v1/tax/associations/find', params, options);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=Associations.js.map
|
||||
1
node_modules/stripe/esm/resources/Tax/Associations.js.map
generated
vendored
Normal file
1
node_modules/stripe/esm/resources/Tax/Associations.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Associations.js","sourceRoot":"","sources":["../../../src/resources/Tax/Associations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAGvD,MAAM,OAAO,mBAAoB,SAAQ,cAAc;IACrD;;OAEG;IACH,IAAI,CACF,MAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,2BAA2B,EAC3B,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF"}
|
||||
121
node_modules/stripe/esm/resources/Tax/CalculationLineItems.d.ts
generated
vendored
Normal file
121
node_modules/stripe/esm/resources/Tax/CalculationLineItems.d.ts
generated
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
import { Metadata } from '../../shared.js';
|
||||
export interface CalculationLineItem {
|
||||
/**
|
||||
* Unique identifier for the object.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* String representing the object's type. Objects of the same type share the same value.
|
||||
*/
|
||||
object: 'tax.calculation_line_item';
|
||||
/**
|
||||
* The line item amount in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
* The amount of tax calculated for this line item, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
||||
*/
|
||||
amount_tax: number;
|
||||
/**
|
||||
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
|
||||
*/
|
||||
livemode: boolean;
|
||||
/**
|
||||
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
*/
|
||||
metadata: Metadata | null;
|
||||
/**
|
||||
* The ID of an existing [Product](https://docs.stripe.com/api/products/object).
|
||||
*/
|
||||
product: string | null;
|
||||
/**
|
||||
* The number of units of the item being purchased. For reversals, this is the quantity reversed.
|
||||
*/
|
||||
quantity: number;
|
||||
/**
|
||||
* A custom identifier for this line item.
|
||||
*/
|
||||
reference: string;
|
||||
/**
|
||||
* Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
|
||||
*/
|
||||
tax_behavior: Tax.CalculationLineItem.TaxBehavior;
|
||||
/**
|
||||
* Detailed account of taxes relevant to this line item.
|
||||
*/
|
||||
tax_breakdown?: Array<Tax.CalculationLineItem.TaxBreakdown> | null;
|
||||
/**
|
||||
* The [tax code](https://docs.stripe.com/tax/tax-categories) ID used for this resource.
|
||||
*/
|
||||
tax_code: string;
|
||||
}
|
||||
export declare namespace Tax {
|
||||
namespace CalculationLineItem {
|
||||
type TaxBehavior = 'exclusive' | 'inclusive';
|
||||
interface TaxBreakdown {
|
||||
/**
|
||||
* The amount of tax, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
||||
*/
|
||||
amount: number;
|
||||
jurisdiction: TaxBreakdown.Jurisdiction;
|
||||
/**
|
||||
* Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
|
||||
*/
|
||||
sourcing: TaxBreakdown.Sourcing;
|
||||
/**
|
||||
* Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax.
|
||||
*/
|
||||
tax_rate_details: TaxBreakdown.TaxRateDetails | null;
|
||||
/**
|
||||
* The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
|
||||
*/
|
||||
taxability_reason: TaxBreakdown.TaxabilityReason;
|
||||
/**
|
||||
* The amount on which tax is calculated, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
||||
*/
|
||||
taxable_amount: number;
|
||||
}
|
||||
namespace TaxBreakdown {
|
||||
interface Jurisdiction {
|
||||
/**
|
||||
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
*/
|
||||
country: string;
|
||||
/**
|
||||
* A human-readable name for the jurisdiction imposing the tax.
|
||||
*/
|
||||
display_name: string;
|
||||
/**
|
||||
* Indicates the level of the jurisdiction imposing the tax.
|
||||
*/
|
||||
level: Jurisdiction.Level;
|
||||
/**
|
||||
* [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
|
||||
*/
|
||||
state: string | null;
|
||||
}
|
||||
type Sourcing = 'destination' | 'origin';
|
||||
interface TaxRateDetails {
|
||||
/**
|
||||
* A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)".
|
||||
*/
|
||||
display_name: string;
|
||||
/**
|
||||
* The tax rate percentage as a string. For example, 8.5% is represented as "8.5".
|
||||
*/
|
||||
percentage_decimal: string;
|
||||
/**
|
||||
* The tax type, such as `vat` or `sales_tax`.
|
||||
*/
|
||||
tax_type: TaxRateDetails.TaxType;
|
||||
}
|
||||
type TaxabilityReason = 'customer_exempt' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated';
|
||||
namespace Jurisdiction {
|
||||
type Level = 'city' | 'country' | 'county' | 'district' | 'state';
|
||||
}
|
||||
namespace TaxRateDetails {
|
||||
type TaxType = 'amusement_tax' | 'communications_tax' | 'gst' | 'hst' | 'igst' | 'jct' | 'lease_tax' | 'pst' | 'qst' | 'retail_delivery_fee' | 'rst' | 'sales_tax' | 'service_tax' | 'vat';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
3
node_modules/stripe/esm/resources/Tax/CalculationLineItems.js
generated
vendored
Normal file
3
node_modules/stripe/esm/resources/Tax/CalculationLineItems.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
// File generated from our OpenAPI spec
|
||||
export {};
|
||||
//# sourceMappingURL=CalculationLineItems.js.map
|
||||
1
node_modules/stripe/esm/resources/Tax/CalculationLineItems.js.map
generated
vendored
Normal file
1
node_modules/stripe/esm/resources/Tax/CalculationLineItems.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"CalculationLineItems.js","sourceRoot":"","sources":["../../../src/resources/Tax/CalculationLineItems.ts"],"names":[],"mappings":"AAAA,uCAAuC"}
|
||||
487
node_modules/stripe/esm/resources/Tax/Calculations.d.ts
generated
vendored
Normal file
487
node_modules/stripe/esm/resources/Tax/Calculations.d.ts
generated
vendored
Normal file
@@ -0,0 +1,487 @@
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
import { CalculationLineItem } from './CalculationLineItems.js';
|
||||
import { MetadataParam, Address, Emptyable, PaginationParams } from '../../shared.js';
|
||||
import { RequestOptions, Response, ApiListPromise, ApiList } from '../../lib.js';
|
||||
export declare class CalculationResource extends StripeResource {
|
||||
/**
|
||||
* Retrieves a Tax Calculation object, if the calculation hasn't expired.
|
||||
*/
|
||||
retrieve(id: string, params?: Tax.CalculationRetrieveParams, options?: RequestOptions): Promise<Response<Calculation>>;
|
||||
/**
|
||||
* Calculates tax based on the input and returns a Tax Calculation object.
|
||||
*/
|
||||
create(params: Tax.CalculationCreateParams, options?: RequestOptions): Promise<Response<Calculation>>;
|
||||
/**
|
||||
* Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired.
|
||||
*/
|
||||
listLineItems(id: string, params?: Tax.CalculationListLineItemsParams, options?: RequestOptions): ApiListPromise<CalculationLineItem>;
|
||||
}
|
||||
export interface Calculation {
|
||||
/**
|
||||
* Unique identifier for the calculation.
|
||||
*/
|
||||
id: string | null;
|
||||
/**
|
||||
* String representing the object's type. Objects of the same type share the same value.
|
||||
*/
|
||||
object: 'tax.calculation';
|
||||
/**
|
||||
* Total amount after taxes in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
||||
*/
|
||||
amount_total: number;
|
||||
/**
|
||||
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
*/
|
||||
currency: string;
|
||||
/**
|
||||
* The ID of an existing [Customer](https://docs.stripe.com/api/customers/object) used for the resource.
|
||||
*/
|
||||
customer: string | null;
|
||||
customer_details: Tax.Calculation.CustomerDetails;
|
||||
/**
|
||||
* Timestamp of date at which the tax calculation will expire.
|
||||
*/
|
||||
expires_at: number | null;
|
||||
/**
|
||||
* The list of items the customer is purchasing.
|
||||
*/
|
||||
line_items?: ApiList<CalculationLineItem> | null;
|
||||
/**
|
||||
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
|
||||
*/
|
||||
livemode: boolean;
|
||||
/**
|
||||
* The details of the ship from location, such as the address.
|
||||
*/
|
||||
ship_from_details: Tax.Calculation.ShipFromDetails | null;
|
||||
/**
|
||||
* The shipping cost details for the calculation.
|
||||
*/
|
||||
shipping_cost: Tax.Calculation.ShippingCost | null;
|
||||
/**
|
||||
* The amount of tax to be collected on top of the line item prices.
|
||||
*/
|
||||
tax_amount_exclusive: number;
|
||||
/**
|
||||
* The amount of tax already included in the line item prices.
|
||||
*/
|
||||
tax_amount_inclusive: number;
|
||||
/**
|
||||
* Breakdown of individual tax amounts that add up to the total.
|
||||
*/
|
||||
tax_breakdown: Array<Tax.Calculation.TaxBreakdown>;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
tax_date: number;
|
||||
}
|
||||
export declare namespace Tax {
|
||||
namespace Calculation {
|
||||
interface CustomerDetails {
|
||||
/**
|
||||
* The customer's postal address (for example, home or business location).
|
||||
*/
|
||||
address: Address | null;
|
||||
/**
|
||||
* The type of customer address provided.
|
||||
*/
|
||||
address_source: CustomerDetails.AddressSource | null;
|
||||
/**
|
||||
* The customer's IP address (IPv4 or IPv6).
|
||||
*/
|
||||
ip_address: string | null;
|
||||
/**
|
||||
* The customer's tax IDs (for example, EU VAT numbers).
|
||||
*/
|
||||
tax_ids: Array<CustomerDetails.TaxId>;
|
||||
/**
|
||||
* The taxability override used for taxation.
|
||||
*/
|
||||
taxability_override: CustomerDetails.TaxabilityOverride;
|
||||
}
|
||||
interface ShipFromDetails {
|
||||
address: Address;
|
||||
}
|
||||
interface ShippingCost {
|
||||
/**
|
||||
* The shipping amount in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
* The amount of tax calculated for shipping, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
||||
*/
|
||||
amount_tax: number;
|
||||
/**
|
||||
* The ID of an existing [ShippingRate](https://docs.stripe.com/api/shipping_rates/object).
|
||||
*/
|
||||
shipping_rate?: string;
|
||||
/**
|
||||
* Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
|
||||
*/
|
||||
tax_behavior: ShippingCost.TaxBehavior;
|
||||
/**
|
||||
* Detailed account of taxes relevant to shipping cost.
|
||||
*/
|
||||
tax_breakdown?: Array<ShippingCost.TaxBreakdown>;
|
||||
/**
|
||||
* The [tax code](https://docs.stripe.com/tax/tax-categories) ID used for shipping.
|
||||
*/
|
||||
tax_code: string;
|
||||
}
|
||||
interface TaxBreakdown {
|
||||
/**
|
||||
* The amount of tax, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
* Specifies whether the tax amount is included in the line item amount.
|
||||
*/
|
||||
inclusive: boolean;
|
||||
tax_rate_details: TaxBreakdown.TaxRateDetails;
|
||||
/**
|
||||
* The reasoning behind this tax, for example, if the product is tax exempt. We might extend the possible values for this field to support new tax rules.
|
||||
*/
|
||||
taxability_reason: TaxBreakdown.TaxabilityReason;
|
||||
/**
|
||||
* The amount on which tax is calculated, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
||||
*/
|
||||
taxable_amount: number;
|
||||
}
|
||||
namespace CustomerDetails {
|
||||
type AddressSource = 'billing' | 'shipping';
|
||||
interface TaxId {
|
||||
/**
|
||||
* The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `pl_nip`, `it_cf`, `fo_vat`, `gi_tin`, `py_ruc`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown`
|
||||
*/
|
||||
type: TaxId.Type;
|
||||
/**
|
||||
* The value of the tax ID.
|
||||
*/
|
||||
value: string;
|
||||
}
|
||||
type TaxabilityOverride = 'customer_exempt' | 'none' | 'reverse_charge';
|
||||
namespace TaxId {
|
||||
type Type = 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'fo_vat' | 'gb_vat' | 'ge_vat' | 'gi_tin' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'it_cf' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'lk_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'pl_nip' | 'py_ruc' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'unknown' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin';
|
||||
}
|
||||
}
|
||||
namespace ShippingCost {
|
||||
type TaxBehavior = 'exclusive' | 'inclusive';
|
||||
interface TaxBreakdown {
|
||||
/**
|
||||
* The amount of tax, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
||||
*/
|
||||
amount: number;
|
||||
jurisdiction: TaxBreakdown.Jurisdiction;
|
||||
/**
|
||||
* Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
|
||||
*/
|
||||
sourcing: TaxBreakdown.Sourcing;
|
||||
/**
|
||||
* Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax.
|
||||
*/
|
||||
tax_rate_details: TaxBreakdown.TaxRateDetails | null;
|
||||
/**
|
||||
* The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
|
||||
*/
|
||||
taxability_reason: TaxBreakdown.TaxabilityReason;
|
||||
/**
|
||||
* The amount on which tax is calculated, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
||||
*/
|
||||
taxable_amount: number;
|
||||
}
|
||||
namespace TaxBreakdown {
|
||||
interface Jurisdiction {
|
||||
/**
|
||||
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
*/
|
||||
country: string;
|
||||
/**
|
||||
* A human-readable name for the jurisdiction imposing the tax.
|
||||
*/
|
||||
display_name: string;
|
||||
/**
|
||||
* Indicates the level of the jurisdiction imposing the tax.
|
||||
*/
|
||||
level: Jurisdiction.Level;
|
||||
/**
|
||||
* [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
|
||||
*/
|
||||
state: string | null;
|
||||
}
|
||||
type Sourcing = 'destination' | 'origin';
|
||||
interface TaxRateDetails {
|
||||
/**
|
||||
* A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)".
|
||||
*/
|
||||
display_name: string;
|
||||
/**
|
||||
* The tax rate percentage as a string. For example, 8.5% is represented as "8.5".
|
||||
*/
|
||||
percentage_decimal: string;
|
||||
/**
|
||||
* The tax type, such as `vat` or `sales_tax`.
|
||||
*/
|
||||
tax_type: TaxRateDetails.TaxType;
|
||||
}
|
||||
type TaxabilityReason = 'customer_exempt' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated';
|
||||
namespace Jurisdiction {
|
||||
type Level = 'city' | 'country' | 'county' | 'district' | 'state';
|
||||
}
|
||||
namespace TaxRateDetails {
|
||||
type TaxType = 'amusement_tax' | 'communications_tax' | 'gst' | 'hst' | 'igst' | 'jct' | 'lease_tax' | 'pst' | 'qst' | 'retail_delivery_fee' | 'rst' | 'sales_tax' | 'service_tax' | 'vat';
|
||||
}
|
||||
}
|
||||
}
|
||||
namespace TaxBreakdown {
|
||||
interface TaxRateDetails {
|
||||
/**
|
||||
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
*/
|
||||
country: string | null;
|
||||
/**
|
||||
* The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate.
|
||||
*/
|
||||
flat_amount: TaxRateDetails.FlatAmount | null;
|
||||
/**
|
||||
* The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`.
|
||||
*/
|
||||
percentage_decimal: string;
|
||||
/**
|
||||
* Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax.
|
||||
*/
|
||||
rate_type: TaxRateDetails.RateType | null;
|
||||
/**
|
||||
* State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
|
||||
*/
|
||||
state: string | null;
|
||||
/**
|
||||
* The tax type, such as `vat` or `sales_tax`.
|
||||
*/
|
||||
tax_type: TaxRateDetails.TaxType | null;
|
||||
}
|
||||
type TaxabilityReason = 'customer_exempt' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated';
|
||||
namespace TaxRateDetails {
|
||||
interface FlatAmount {
|
||||
/**
|
||||
* Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
* Three-letter ISO currency code, in lowercase.
|
||||
*/
|
||||
currency: string;
|
||||
}
|
||||
type RateType = 'flat_amount' | 'percentage';
|
||||
type TaxType = 'amusement_tax' | 'communications_tax' | 'gst' | 'hst' | 'igst' | 'jct' | 'lease_tax' | 'pst' | 'qst' | 'retail_delivery_fee' | 'rst' | 'sales_tax' | 'service_tax' | 'vat';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export declare namespace Tax {
|
||||
interface CalculationCreateParams {
|
||||
/**
|
||||
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
*/
|
||||
currency: string;
|
||||
/**
|
||||
* A list of items the customer is purchasing.
|
||||
*/
|
||||
line_items: Array<CalculationCreateParams.LineItem>;
|
||||
/**
|
||||
* 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`.
|
||||
*/
|
||||
customer?: string;
|
||||
/**
|
||||
* Details about the customer, including address and tax IDs.
|
||||
*/
|
||||
customer_details?: CalculationCreateParams.CustomerDetails;
|
||||
/**
|
||||
* Specifies which fields in the response should be expanded.
|
||||
*/
|
||||
expand?: Array<string>;
|
||||
/**
|
||||
* Details about the address from which the goods are being shipped.
|
||||
*/
|
||||
ship_from_details?: CalculationCreateParams.ShipFromDetails;
|
||||
/**
|
||||
* Shipping cost details to be used for the calculation.
|
||||
*/
|
||||
shipping_cost?: CalculationCreateParams.ShippingCost;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
tax_date?: number;
|
||||
}
|
||||
namespace CalculationCreateParams {
|
||||
interface LineItem {
|
||||
/**
|
||||
* A positive integer representing the line item's total price in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
||||
* If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
*/
|
||||
metadata?: MetadataParam;
|
||||
/**
|
||||
* If provided, the product's `tax_code` will be used as the line item's `tax_code`.
|
||||
*/
|
||||
product?: string;
|
||||
/**
|
||||
* The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25.
|
||||
*/
|
||||
quantity?: number;
|
||||
/**
|
||||
* A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://docs.stripe.com/tax/reports).
|
||||
*/
|
||||
reference?: string;
|
||||
/**
|
||||
* Specifies whether the `amount` includes taxes. Defaults to `exclusive`.
|
||||
*/
|
||||
tax_behavior?: LineItem.TaxBehavior;
|
||||
/**
|
||||
* A [tax code](https://docs.stripe.com/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings.
|
||||
*/
|
||||
tax_code?: string;
|
||||
}
|
||||
interface CustomerDetails {
|
||||
/**
|
||||
* The customer's postal address (for example, home or business location).
|
||||
*/
|
||||
address?: CustomerDetails.Address;
|
||||
/**
|
||||
* The type of customer address provided.
|
||||
*/
|
||||
address_source?: CustomerDetails.AddressSource;
|
||||
/**
|
||||
* The customer's IP address (IPv4 or IPv6).
|
||||
*/
|
||||
ip_address?: string;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
tax_ids?: Array<CustomerDetails.TaxId>;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
taxability_override?: CustomerDetails.TaxabilityOverride;
|
||||
}
|
||||
interface ShipFromDetails {
|
||||
/**
|
||||
* The address from which the goods are being shipped from.
|
||||
*/
|
||||
address: ShipFromDetails.Address;
|
||||
}
|
||||
interface ShippingCost {
|
||||
/**
|
||||
* A positive integer in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units) representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
|
||||
*/
|
||||
amount?: number;
|
||||
/**
|
||||
* If provided, the [shipping rate](https://docs.stripe.com/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.
|
||||
*/
|
||||
shipping_rate?: string;
|
||||
/**
|
||||
* Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`.
|
||||
*/
|
||||
tax_behavior?: ShippingCost.TaxBehavior;
|
||||
/**
|
||||
* The [tax code](https://docs.stripe.com/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used.
|
||||
*/
|
||||
tax_code?: string;
|
||||
}
|
||||
namespace CustomerDetails {
|
||||
interface Address {
|
||||
/**
|
||||
* City, district, suburb, town, or village.
|
||||
*/
|
||||
city?: Emptyable<string>;
|
||||
/**
|
||||
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
*/
|
||||
country: string;
|
||||
/**
|
||||
* Address line 1, such as the street, PO Box, or company name.
|
||||
*/
|
||||
line1?: Emptyable<string>;
|
||||
/**
|
||||
* Address line 2, such as the apartment, suite, unit, or building.
|
||||
*/
|
||||
line2?: Emptyable<string>;
|
||||
/**
|
||||
* ZIP or postal code.
|
||||
*/
|
||||
postal_code?: Emptyable<string>;
|
||||
/**
|
||||
* State, county, province, or region. We recommend sending [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code value when possible.
|
||||
*/
|
||||
state?: Emptyable<string>;
|
||||
}
|
||||
type AddressSource = 'billing' | 'shipping';
|
||||
interface TaxId {
|
||||
/**
|
||||
* Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
|
||||
*/
|
||||
type: TaxId.Type;
|
||||
/**
|
||||
* Value of the tax ID.
|
||||
*/
|
||||
value: string;
|
||||
}
|
||||
type TaxabilityOverride = 'customer_exempt' | 'none' | 'reverse_charge';
|
||||
namespace TaxId {
|
||||
type Type = 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'fo_vat' | 'gb_vat' | 'ge_vat' | 'gi_tin' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'it_cf' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'lk_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'pl_nip' | 'py_ruc' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin';
|
||||
}
|
||||
}
|
||||
namespace LineItem {
|
||||
type TaxBehavior = 'exclusive' | 'inclusive';
|
||||
}
|
||||
namespace ShipFromDetails {
|
||||
interface Address {
|
||||
/**
|
||||
* City, district, suburb, town, or village.
|
||||
*/
|
||||
city?: Emptyable<string>;
|
||||
/**
|
||||
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
*/
|
||||
country: string;
|
||||
/**
|
||||
* Address line 1, such as the street, PO Box, or company name.
|
||||
*/
|
||||
line1?: Emptyable<string>;
|
||||
/**
|
||||
* Address line 2, such as the apartment, suite, unit, or building.
|
||||
*/
|
||||
line2?: Emptyable<string>;
|
||||
/**
|
||||
* ZIP or postal code.
|
||||
*/
|
||||
postal_code?: Emptyable<string>;
|
||||
/**
|
||||
* State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix, such as "NY" or "TX".
|
||||
*/
|
||||
state?: Emptyable<string>;
|
||||
}
|
||||
}
|
||||
namespace ShippingCost {
|
||||
type TaxBehavior = 'exclusive' | 'inclusive';
|
||||
}
|
||||
}
|
||||
}
|
||||
export declare namespace Tax {
|
||||
interface CalculationRetrieveParams {
|
||||
/**
|
||||
* Specifies which fields in the response should be expanded.
|
||||
*/
|
||||
expand?: Array<string>;
|
||||
}
|
||||
}
|
||||
export declare namespace Tax {
|
||||
interface CalculationListLineItemsParams extends PaginationParams {
|
||||
/**
|
||||
* Specifies which fields in the response should be expanded.
|
||||
*/
|
||||
expand?: Array<string>;
|
||||
}
|
||||
}
|
||||
25
node_modules/stripe/esm/resources/Tax/Calculations.js
generated
vendored
Normal file
25
node_modules/stripe/esm/resources/Tax/Calculations.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
export class CalculationResource extends StripeResource {
|
||||
/**
|
||||
* Retrieves a Tax Calculation object, if the calculation hasn't expired.
|
||||
*/
|
||||
retrieve(id, params, options) {
|
||||
return this._makeRequest('GET', `/v1/tax/calculations/${encodeURIComponent(id)}`, params, options);
|
||||
}
|
||||
/**
|
||||
* Calculates tax based on the input and returns a Tax Calculation object.
|
||||
*/
|
||||
create(params, options) {
|
||||
return this._makeRequest('POST', '/v1/tax/calculations', params, options);
|
||||
}
|
||||
/**
|
||||
* Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired.
|
||||
*/
|
||||
listLineItems(id, params, options) {
|
||||
return this._makeRequest('GET', `/v1/tax/calculations/${encodeURIComponent(id)}/line_items`, params, options, {
|
||||
methodType: 'list',
|
||||
});
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=Calculations.js.map
|
||||
1
node_modules/stripe/esm/resources/Tax/Calculations.js.map
generated
vendored
Normal file
1
node_modules/stripe/esm/resources/Tax/Calculations.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Calculations.js","sourceRoot":"","sources":["../../../src/resources/Tax/Calculations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAUvD,MAAM,OAAO,mBAAoB,SAAQ,cAAc;IACrD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAAsC,EACtC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,wBAAwB,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAChD,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,MAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,sBAAsB,EACtB,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,aAAa,CACX,EAAU,EACV,MAA2C,EAC3C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,wBAAwB,kBAAkB,CAAC,EAAE,CAAC,aAAa,EAC3D,MAAM,EACN,OAAO,EACP;YACE,UAAU,EAAE,MAAM;SACnB,CACK,CAAC;IACX,CAAC;CACF"}
|
||||
3300
node_modules/stripe/esm/resources/Tax/Registrations.d.ts
generated
vendored
Normal file
3300
node_modules/stripe/esm/resources/Tax/Registrations.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
33
node_modules/stripe/esm/resources/Tax/Registrations.js
generated
vendored
Normal file
33
node_modules/stripe/esm/resources/Tax/Registrations.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
export class RegistrationResource extends StripeResource {
|
||||
/**
|
||||
* Returns a list of Tax Registration objects.
|
||||
*/
|
||||
list(params, options) {
|
||||
return this._makeRequest('GET', '/v1/tax/registrations', params, options, {
|
||||
methodType: 'list',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Creates a new Tax Registration object.
|
||||
*/
|
||||
create(params, options) {
|
||||
return this._makeRequest('POST', '/v1/tax/registrations', params, options);
|
||||
}
|
||||
/**
|
||||
* Returns a Tax Registration object.
|
||||
*/
|
||||
retrieve(id, params, options) {
|
||||
return this._makeRequest('GET', `/v1/tax/registrations/${encodeURIComponent(id)}`, params, options);
|
||||
}
|
||||
/**
|
||||
* Updates an existing Tax Registration object.
|
||||
*
|
||||
* A registration cannot be deleted after it has been created. If you wish to end a registration you may do so by setting expires_at.
|
||||
*/
|
||||
update(id, params, options) {
|
||||
return this._makeRequest('POST', `/v1/tax/registrations/${encodeURIComponent(id)}`, params, options);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=Registrations.js.map
|
||||
1
node_modules/stripe/esm/resources/Tax/Registrations.js.map
generated
vendored
Normal file
1
node_modules/stripe/esm/resources/Tax/Registrations.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Registrations.js","sourceRoot":"","sources":["../../../src/resources/Tax/Registrations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAIvD,MAAM,OAAO,oBAAqB,SAAQ,cAAc;IACtD;;OAEG;IACH,IAAI,CACF,MAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,uBAAuB,EAAE,MAAM,EAAE,OAAO,EAAE;YACxE,UAAU,EAAE,MAAM;SACnB,CAAQ,CAAC;IACZ,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,MAAoC,EACpC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,uBAAuB,EACvB,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAAuC,EACvC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,yBAAyB,kBAAkB,CAAC,EAAE,CAAC,EAAE,EACjD,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;;;OAIG;IACH,MAAM,CACJ,EAAU,EACV,MAAqC,EACrC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,yBAAyB,kBAAkB,CAAC,EAAE,CAAC,EAAE,EACjD,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF"}
|
||||
118
node_modules/stripe/esm/resources/Tax/Settings.d.ts
generated
vendored
Normal file
118
node_modules/stripe/esm/resources/Tax/Settings.d.ts
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
import { AddressParam, Address } from '../../shared.js';
|
||||
import { RequestOptions, Response } from '../../lib.js';
|
||||
export declare class SettingResource extends StripeResource {
|
||||
/**
|
||||
* Retrieves Tax Settings for a merchant.
|
||||
*/
|
||||
retrieve(params?: Tax.SettingsRetrieveParams, options?: RequestOptions): Promise<Response<Settings>>;
|
||||
/**
|
||||
* Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set.
|
||||
*/
|
||||
update(params?: Tax.SettingsUpdateParams, options?: RequestOptions): Promise<Response<Settings>>;
|
||||
}
|
||||
export interface Settings {
|
||||
/**
|
||||
* String representing the object's type. Objects of the same type share the same value.
|
||||
*/
|
||||
object: 'tax.settings';
|
||||
defaults: Tax.Settings.Defaults;
|
||||
/**
|
||||
* The place where your business is located.
|
||||
*/
|
||||
head_office: Tax.Settings.HeadOffice | null;
|
||||
/**
|
||||
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
|
||||
*/
|
||||
livemode: boolean;
|
||||
/**
|
||||
* The status of the Tax `Settings`.
|
||||
*/
|
||||
status: Tax.Settings.Status;
|
||||
status_details: Tax.Settings.StatusDetails;
|
||||
}
|
||||
export declare namespace Tax {
|
||||
namespace Settings {
|
||||
interface Defaults {
|
||||
/**
|
||||
* The tax calculation provider this account uses. Defaults to `stripe` when not using a [third-party provider](https://docs.stripe.com/tax/third-party-apps).
|
||||
*/
|
||||
provider: Defaults.Provider;
|
||||
/**
|
||||
* Default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) used to specify whether the price is considered inclusive of taxes or exclusive of taxes. If the item's price has a tax behavior set, it will take precedence over the default tax behavior.
|
||||
*/
|
||||
tax_behavior: Defaults.TaxBehavior | null;
|
||||
/**
|
||||
* Default [tax code](https://stripe.com/docs/tax/tax-categories) used to classify your products and prices.
|
||||
*/
|
||||
tax_code: string | null;
|
||||
}
|
||||
interface HeadOffice {
|
||||
address: Address;
|
||||
}
|
||||
type Status = 'active' | 'pending';
|
||||
interface StatusDetails {
|
||||
active?: StatusDetails.Active;
|
||||
pending?: StatusDetails.Pending;
|
||||
}
|
||||
namespace Defaults {
|
||||
type Provider = 'anrok' | 'avalara' | 'sphere' | 'stripe';
|
||||
type TaxBehavior = 'exclusive' | 'inclusive' | 'inferred_by_currency';
|
||||
}
|
||||
namespace StatusDetails {
|
||||
interface Active {
|
||||
}
|
||||
interface Pending {
|
||||
/**
|
||||
* The list of missing fields that are required to perform calculations. It includes the entry `head_office` when the status is `pending`. It is recommended to set the optional values even if they aren't listed as required for calculating taxes. Calculations can fail if missing fields aren't explicitly provided on every call.
|
||||
*/
|
||||
missing_fields: Array<string> | null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export declare namespace Tax {
|
||||
interface SettingsRetrieveParams {
|
||||
/**
|
||||
* Specifies which fields in the response should be expanded.
|
||||
*/
|
||||
expand?: Array<string>;
|
||||
}
|
||||
}
|
||||
export declare namespace Tax {
|
||||
interface SettingsUpdateParams {
|
||||
/**
|
||||
* Default configuration to be used on Stripe Tax calculations.
|
||||
*/
|
||||
defaults?: SettingsUpdateParams.Defaults;
|
||||
/**
|
||||
* Specifies which fields in the response should be expanded.
|
||||
*/
|
||||
expand?: Array<string>;
|
||||
/**
|
||||
* The place where your business is located.
|
||||
*/
|
||||
head_office?: SettingsUpdateParams.HeadOffice;
|
||||
}
|
||||
namespace SettingsUpdateParams {
|
||||
interface Defaults {
|
||||
/**
|
||||
* Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null.
|
||||
*/
|
||||
tax_behavior?: Defaults.TaxBehavior;
|
||||
/**
|
||||
* A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
|
||||
*/
|
||||
tax_code?: string;
|
||||
}
|
||||
interface HeadOffice {
|
||||
/**
|
||||
* The location of the business for tax purposes.
|
||||
*/
|
||||
address: AddressParam;
|
||||
}
|
||||
namespace Defaults {
|
||||
type TaxBehavior = 'exclusive' | 'inclusive' | 'inferred_by_currency';
|
||||
}
|
||||
}
|
||||
}
|
||||
17
node_modules/stripe/esm/resources/Tax/Settings.js
generated
vendored
Normal file
17
node_modules/stripe/esm/resources/Tax/Settings.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
export class SettingResource extends StripeResource {
|
||||
/**
|
||||
* Retrieves Tax Settings for a merchant.
|
||||
*/
|
||||
retrieve(params, options) {
|
||||
return this._makeRequest('GET', '/v1/tax/settings', params, options);
|
||||
}
|
||||
/**
|
||||
* Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set.
|
||||
*/
|
||||
update(params, options) {
|
||||
return this._makeRequest('POST', '/v1/tax/settings', params, options);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=Settings.js.map
|
||||
1
node_modules/stripe/esm/resources/Tax/Settings.js.map
generated
vendored
Normal file
1
node_modules/stripe/esm/resources/Tax/Settings.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Settings.js","sourceRoot":"","sources":["../../../src/resources/Tax/Settings.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAIvD,MAAM,OAAO,eAAgB,SAAQ,cAAc;IACjD;;OAEG;IACH,QAAQ,CACN,MAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,OAAO,CAAQ,CAAC;IAC9E,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,MAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,kBAAkB,EAClB,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF"}
|
||||
67
node_modules/stripe/esm/resources/Tax/TransactionLineItems.d.ts
generated
vendored
Normal file
67
node_modules/stripe/esm/resources/Tax/TransactionLineItems.d.ts
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
import { Metadata } from '../../shared.js';
|
||||
export interface TransactionLineItem {
|
||||
/**
|
||||
* Unique identifier for the object.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* String representing the object's type. Objects of the same type share the same value.
|
||||
*/
|
||||
object: 'tax.transaction_line_item';
|
||||
/**
|
||||
* The line item amount in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
* The amount of tax calculated for this line item, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
||||
*/
|
||||
amount_tax: number;
|
||||
/**
|
||||
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
|
||||
*/
|
||||
livemode: boolean;
|
||||
/**
|
||||
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
*/
|
||||
metadata: Metadata | null;
|
||||
/**
|
||||
* The ID of an existing [Product](https://docs.stripe.com/api/products/object).
|
||||
*/
|
||||
product: string | null;
|
||||
/**
|
||||
* The number of units of the item being purchased. For reversals, this is the quantity reversed.
|
||||
*/
|
||||
quantity: number;
|
||||
/**
|
||||
* A custom identifier for this line item in the transaction.
|
||||
*/
|
||||
reference: string;
|
||||
/**
|
||||
* If `type=reversal`, contains information about what was reversed.
|
||||
*/
|
||||
reversal: Tax.TransactionLineItem.Reversal | null;
|
||||
/**
|
||||
* Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
|
||||
*/
|
||||
tax_behavior: Tax.TransactionLineItem.TaxBehavior;
|
||||
/**
|
||||
* The [tax code](https://docs.stripe.com/tax/tax-categories) ID used for this resource.
|
||||
*/
|
||||
tax_code: string;
|
||||
/**
|
||||
* If `reversal`, this line item reverses an earlier transaction.
|
||||
*/
|
||||
type: Tax.TransactionLineItem.Type;
|
||||
}
|
||||
export declare namespace Tax {
|
||||
namespace TransactionLineItem {
|
||||
interface Reversal {
|
||||
/**
|
||||
* The `id` of the line item to reverse in the original transaction.
|
||||
*/
|
||||
original_line_item: string;
|
||||
}
|
||||
type TaxBehavior = 'exclusive' | 'inclusive';
|
||||
type Type = 'reversal' | 'transaction';
|
||||
}
|
||||
}
|
||||
3
node_modules/stripe/esm/resources/Tax/TransactionLineItems.js
generated
vendored
Normal file
3
node_modules/stripe/esm/resources/Tax/TransactionLineItems.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
// File generated from our OpenAPI spec
|
||||
export {};
|
||||
//# sourceMappingURL=TransactionLineItems.js.map
|
||||
1
node_modules/stripe/esm/resources/Tax/TransactionLineItems.js.map
generated
vendored
Normal file
1
node_modules/stripe/esm/resources/Tax/TransactionLineItems.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"TransactionLineItems.js","sourceRoot":"","sources":["../../../src/resources/Tax/TransactionLineItems.ts"],"names":[],"mappings":"AAAA,uCAAuC"}
|
||||
347
node_modules/stripe/esm/resources/Tax/Transactions.d.ts
generated
vendored
Normal file
347
node_modules/stripe/esm/resources/Tax/Transactions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,347 @@
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
import { TransactionLineItem } from './TransactionLineItems.js';
|
||||
import { MetadataParam, PaginationParams, Metadata, Address } from '../../shared.js';
|
||||
import { RequestOptions, Response, ApiListPromise, ApiList } from '../../lib.js';
|
||||
export declare class TransactionResource extends StripeResource {
|
||||
/**
|
||||
* Retrieves a Tax Transaction object.
|
||||
*/
|
||||
retrieve(id: string, params?: Tax.TransactionRetrieveParams, options?: RequestOptions): Promise<Response<Transaction>>;
|
||||
/**
|
||||
* Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days.
|
||||
*/
|
||||
createFromCalculation(params: Tax.TransactionCreateFromCalculationParams, options?: RequestOptions): Promise<Response<Transaction>>;
|
||||
/**
|
||||
* Partially or fully reverses a previously created Transaction.
|
||||
*/
|
||||
createReversal(params: Tax.TransactionCreateReversalParams, options?: RequestOptions): Promise<Response<Transaction>>;
|
||||
/**
|
||||
* Retrieves the line items of a committed standalone transaction as a collection.
|
||||
*/
|
||||
listLineItems(id: string, params?: Tax.TransactionListLineItemsParams, options?: RequestOptions): ApiListPromise<TransactionLineItem>;
|
||||
}
|
||||
export interface Transaction {
|
||||
/**
|
||||
* Unique identifier for the transaction.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* String representing the object's type. Objects of the same type share the same value.
|
||||
*/
|
||||
object: 'tax.transaction';
|
||||
/**
|
||||
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
*/
|
||||
created: number;
|
||||
/**
|
||||
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
*/
|
||||
currency: string;
|
||||
/**
|
||||
* The ID of an existing [Customer](https://docs.stripe.com/api/customers/object) used for the resource.
|
||||
*/
|
||||
customer: string | null;
|
||||
customer_details: Tax.Transaction.CustomerDetails;
|
||||
/**
|
||||
* The tax collected or refunded, by line item.
|
||||
*/
|
||||
line_items?: ApiList<TransactionLineItem> | null;
|
||||
/**
|
||||
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
|
||||
*/
|
||||
livemode: boolean;
|
||||
/**
|
||||
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
*/
|
||||
metadata: Metadata | null;
|
||||
/**
|
||||
* The Unix timestamp representing when the tax liability is assumed or reduced.
|
||||
*/
|
||||
posted_at: number;
|
||||
/**
|
||||
* A custom unique identifier, such as 'myOrder_123'.
|
||||
*/
|
||||
reference: string;
|
||||
/**
|
||||
* If `type=reversal`, contains information about what was reversed.
|
||||
*/
|
||||
reversal: Tax.Transaction.Reversal | null;
|
||||
/**
|
||||
* The details of the ship from location, such as the address.
|
||||
*/
|
||||
ship_from_details: Tax.Transaction.ShipFromDetails | null;
|
||||
/**
|
||||
* The shipping cost details for the transaction.
|
||||
*/
|
||||
shipping_cost: Tax.Transaction.ShippingCost | null;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
tax_date: number;
|
||||
/**
|
||||
* If `reversal`, this transaction reverses an earlier transaction.
|
||||
*/
|
||||
type: Tax.Transaction.Type;
|
||||
}
|
||||
export declare namespace Tax {
|
||||
namespace Transaction {
|
||||
interface CustomerDetails {
|
||||
/**
|
||||
* The customer's postal address (for example, home or business location).
|
||||
*/
|
||||
address: Address | null;
|
||||
/**
|
||||
* The type of customer address provided.
|
||||
*/
|
||||
address_source: CustomerDetails.AddressSource | null;
|
||||
/**
|
||||
* The customer's IP address (IPv4 or IPv6).
|
||||
*/
|
||||
ip_address: string | null;
|
||||
/**
|
||||
* The customer's tax IDs (for example, EU VAT numbers).
|
||||
*/
|
||||
tax_ids: Array<CustomerDetails.TaxId>;
|
||||
/**
|
||||
* The taxability override used for taxation.
|
||||
*/
|
||||
taxability_override: CustomerDetails.TaxabilityOverride;
|
||||
}
|
||||
interface Reversal {
|
||||
/**
|
||||
* The `id` of the reversed `Transaction` object.
|
||||
*/
|
||||
original_transaction: string | null;
|
||||
}
|
||||
interface ShipFromDetails {
|
||||
address: Address;
|
||||
}
|
||||
interface ShippingCost {
|
||||
/**
|
||||
* The shipping amount in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount.
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
* The amount of tax calculated for shipping, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
||||
*/
|
||||
amount_tax: number;
|
||||
/**
|
||||
* The ID of an existing [ShippingRate](https://docs.stripe.com/api/shipping_rates/object).
|
||||
*/
|
||||
shipping_rate?: string;
|
||||
/**
|
||||
* Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes.
|
||||
*/
|
||||
tax_behavior: ShippingCost.TaxBehavior;
|
||||
/**
|
||||
* Detailed account of taxes relevant to shipping cost. (It is not populated for the transaction resource object and will be removed in the next API version.)
|
||||
*/
|
||||
tax_breakdown?: Array<ShippingCost.TaxBreakdown>;
|
||||
/**
|
||||
* The [tax code](https://docs.stripe.com/tax/tax-categories) ID used for shipping.
|
||||
*/
|
||||
tax_code: string;
|
||||
}
|
||||
type Type = 'reversal' | 'transaction';
|
||||
namespace CustomerDetails {
|
||||
type AddressSource = 'billing' | 'shipping';
|
||||
interface TaxId {
|
||||
/**
|
||||
* The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `pl_nip`, `it_cf`, `fo_vat`, `gi_tin`, `py_ruc`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown`
|
||||
*/
|
||||
type: TaxId.Type;
|
||||
/**
|
||||
* The value of the tax ID.
|
||||
*/
|
||||
value: string;
|
||||
}
|
||||
type TaxabilityOverride = 'customer_exempt' | 'none' | 'reverse_charge';
|
||||
namespace TaxId {
|
||||
type Type = 'ad_nrt' | 'ae_trn' | 'al_tin' | 'am_tin' | 'ao_tin' | 'ar_cuit' | 'au_abn' | 'au_arn' | 'aw_tin' | 'az_tin' | 'ba_tin' | 'bb_tin' | 'bd_bin' | 'bf_ifu' | 'bg_uic' | 'bh_vat' | 'bj_ifu' | 'bo_tin' | 'br_cnpj' | 'br_cpf' | 'bs_tin' | 'by_tin' | 'ca_bn' | 'ca_gst_hst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'ca_qst' | 'cd_nif' | 'ch_uid' | 'ch_vat' | 'cl_tin' | 'cm_niu' | 'cn_tin' | 'co_nit' | 'cr_tin' | 'cv_nif' | 'de_stn' | 'do_rcn' | 'ec_ruc' | 'eg_tin' | 'es_cif' | 'et_tin' | 'eu_oss_vat' | 'eu_vat' | 'fo_vat' | 'gb_vat' | 'ge_vat' | 'gi_tin' | 'gn_nif' | 'hk_br' | 'hr_oib' | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' | 'is_vat' | 'it_cf' | 'jp_cn' | 'jp_rn' | 'jp_trn' | 'ke_pin' | 'kg_tin' | 'kh_tin' | 'kr_brn' | 'kz_bin' | 'la_tin' | 'li_uid' | 'li_vat' | 'lk_vat' | 'ma_vat' | 'md_vat' | 'me_pib' | 'mk_vat' | 'mr_nif' | 'mx_rfc' | 'my_frp' | 'my_itn' | 'my_sst' | 'ng_tin' | 'no_vat' | 'no_voec' | 'np_pan' | 'nz_gst' | 'om_vat' | 'pe_ruc' | 'ph_tin' | 'pl_nip' | 'py_ruc' | 'ro_tin' | 'rs_pib' | 'ru_inn' | 'ru_kpp' | 'sa_vat' | 'sg_gst' | 'sg_uen' | 'si_tin' | 'sn_ninea' | 'sr_fin' | 'sv_nit' | 'th_vat' | 'tj_tin' | 'tr_tin' | 'tw_vat' | 'tz_vat' | 'ua_vat' | 'ug_tin' | 'unknown' | 'us_ein' | 'uy_ruc' | 'uz_tin' | 'uz_vat' | 've_rif' | 'vn_tin' | 'za_vat' | 'zm_tin' | 'zw_tin';
|
||||
}
|
||||
}
|
||||
namespace ShippingCost {
|
||||
type TaxBehavior = 'exclusive' | 'inclusive';
|
||||
interface TaxBreakdown {
|
||||
/**
|
||||
* The amount of tax, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
||||
*/
|
||||
amount: number;
|
||||
jurisdiction: TaxBreakdown.Jurisdiction;
|
||||
/**
|
||||
* Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
|
||||
*/
|
||||
sourcing: TaxBreakdown.Sourcing;
|
||||
/**
|
||||
* Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax.
|
||||
*/
|
||||
tax_rate_details: TaxBreakdown.TaxRateDetails | null;
|
||||
/**
|
||||
* The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
|
||||
*/
|
||||
taxability_reason: TaxBreakdown.TaxabilityReason;
|
||||
/**
|
||||
* The amount on which tax is calculated, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
||||
*/
|
||||
taxable_amount: number;
|
||||
}
|
||||
namespace TaxBreakdown {
|
||||
interface Jurisdiction {
|
||||
/**
|
||||
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
*/
|
||||
country: string;
|
||||
/**
|
||||
* A human-readable name for the jurisdiction imposing the tax.
|
||||
*/
|
||||
display_name: string;
|
||||
/**
|
||||
* Indicates the level of the jurisdiction imposing the tax.
|
||||
*/
|
||||
level: Jurisdiction.Level;
|
||||
/**
|
||||
* [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
|
||||
*/
|
||||
state: string | null;
|
||||
}
|
||||
type Sourcing = 'destination' | 'origin';
|
||||
interface TaxRateDetails {
|
||||
/**
|
||||
* A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)".
|
||||
*/
|
||||
display_name: string;
|
||||
/**
|
||||
* The tax rate percentage as a string. For example, 8.5% is represented as "8.5".
|
||||
*/
|
||||
percentage_decimal: string;
|
||||
/**
|
||||
* The tax type, such as `vat` or `sales_tax`.
|
||||
*/
|
||||
tax_type: TaxRateDetails.TaxType;
|
||||
}
|
||||
type TaxabilityReason = 'customer_exempt' | 'not_collecting' | 'not_subject_to_tax' | 'not_supported' | 'portion_product_exempt' | 'portion_reduced_rated' | 'portion_standard_rated' | 'product_exempt' | 'product_exempt_holiday' | 'proportionally_rated' | 'reduced_rated' | 'reverse_charge' | 'standard_rated' | 'taxable_basis_reduced' | 'zero_rated';
|
||||
namespace Jurisdiction {
|
||||
type Level = 'city' | 'country' | 'county' | 'district' | 'state';
|
||||
}
|
||||
namespace TaxRateDetails {
|
||||
type TaxType = 'amusement_tax' | 'communications_tax' | 'gst' | 'hst' | 'igst' | 'jct' | 'lease_tax' | 'pst' | 'qst' | 'retail_delivery_fee' | 'rst' | 'sales_tax' | 'service_tax' | 'vat';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export declare namespace Tax {
|
||||
interface TransactionRetrieveParams {
|
||||
/**
|
||||
* Specifies which fields in the response should be expanded.
|
||||
*/
|
||||
expand?: Array<string>;
|
||||
}
|
||||
}
|
||||
export declare namespace Tax {
|
||||
interface TransactionCreateFromCalculationParams {
|
||||
/**
|
||||
* Tax Calculation ID to be used as input when creating the transaction.
|
||||
*/
|
||||
calculation: string;
|
||||
/**
|
||||
* A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals.
|
||||
*/
|
||||
reference: string;
|
||||
/**
|
||||
* Specifies which fields in the response should be expanded.
|
||||
*/
|
||||
expand?: Array<string>;
|
||||
/**
|
||||
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
*/
|
||||
metadata?: MetadataParam;
|
||||
/**
|
||||
* The Unix timestamp representing when the tax liability is assumed or reduced, which determines the liability posting period and handling in tax liability reports. The timestamp must fall within the `tax_date` and the current time, unless the `tax_date` is scheduled in advance. Defaults to the current time.
|
||||
*/
|
||||
posted_at?: number;
|
||||
}
|
||||
}
|
||||
export declare namespace Tax {
|
||||
interface TransactionCreateReversalParams {
|
||||
/**
|
||||
* If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed.
|
||||
*/
|
||||
mode: TransactionCreateReversalParams.Mode;
|
||||
/**
|
||||
* The ID of the Transaction to partially or fully reverse.
|
||||
*/
|
||||
original_transaction: string;
|
||||
/**
|
||||
* A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://docs.stripe.com/tax/reports).
|
||||
*/
|
||||
reference: string;
|
||||
/**
|
||||
* Specifies which fields in the response should be expanded.
|
||||
*/
|
||||
expand?: Array<string>;
|
||||
/**
|
||||
* A flat amount to reverse across the entire transaction, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units) in negative. This value represents the total amount to refund from the transaction, including taxes.
|
||||
*/
|
||||
flat_amount?: number;
|
||||
/**
|
||||
* The line item amounts to reverse.
|
||||
*/
|
||||
line_items?: Array<TransactionCreateReversalParams.LineItem>;
|
||||
/**
|
||||
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
*/
|
||||
metadata?: MetadataParam;
|
||||
/**
|
||||
* The shipping cost to reverse.
|
||||
*/
|
||||
shipping_cost?: TransactionCreateReversalParams.ShippingCost;
|
||||
}
|
||||
namespace TransactionCreateReversalParams {
|
||||
type Mode = 'full' | 'partial';
|
||||
interface LineItem {
|
||||
/**
|
||||
* The amount to reverse, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units) in negative.
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
* The amount of tax to reverse, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units) in negative.
|
||||
*/
|
||||
amount_tax: number;
|
||||
/**
|
||||
* Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
*/
|
||||
metadata?: MetadataParam;
|
||||
/**
|
||||
* The `id` of the line item to reverse in the original transaction.
|
||||
*/
|
||||
original_line_item: string;
|
||||
/**
|
||||
* The quantity reversed. Appears in [tax exports](https://docs.stripe.com/tax/reports), but does not affect the amount of tax reversed.
|
||||
*/
|
||||
quantity?: number;
|
||||
/**
|
||||
* A custom identifier for this line item in the reversal transaction, such as 'L1-refund'.
|
||||
*/
|
||||
reference: string;
|
||||
}
|
||||
interface ShippingCost {
|
||||
/**
|
||||
* The amount to reverse, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units) in negative.
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
* The amount of tax to reverse, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units) in negative.
|
||||
*/
|
||||
amount_tax: number;
|
||||
}
|
||||
}
|
||||
}
|
||||
export declare namespace Tax {
|
||||
interface TransactionListLineItemsParams extends PaginationParams {
|
||||
/**
|
||||
* Specifies which fields in the response should be expanded.
|
||||
*/
|
||||
expand?: Array<string>;
|
||||
}
|
||||
}
|
||||
31
node_modules/stripe/esm/resources/Tax/Transactions.js
generated
vendored
Normal file
31
node_modules/stripe/esm/resources/Tax/Transactions.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
export class TransactionResource extends StripeResource {
|
||||
/**
|
||||
* Retrieves a Tax Transaction object.
|
||||
*/
|
||||
retrieve(id, params, options) {
|
||||
return this._makeRequest('GET', `/v1/tax/transactions/${encodeURIComponent(id)}`, params, options);
|
||||
}
|
||||
/**
|
||||
* Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days.
|
||||
*/
|
||||
createFromCalculation(params, options) {
|
||||
return this._makeRequest('POST', '/v1/tax/transactions/create_from_calculation', params, options);
|
||||
}
|
||||
/**
|
||||
* Partially or fully reverses a previously created Transaction.
|
||||
*/
|
||||
createReversal(params, options) {
|
||||
return this._makeRequest('POST', '/v1/tax/transactions/create_reversal', params, options);
|
||||
}
|
||||
/**
|
||||
* Retrieves the line items of a committed standalone transaction as a collection.
|
||||
*/
|
||||
listLineItems(id, params, options) {
|
||||
return this._makeRequest('GET', `/v1/tax/transactions/${encodeURIComponent(id)}/line_items`, params, options, {
|
||||
methodType: 'list',
|
||||
});
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=Transactions.js.map
|
||||
1
node_modules/stripe/esm/resources/Tax/Transactions.js.map
generated
vendored
Normal file
1
node_modules/stripe/esm/resources/Tax/Transactions.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Transactions.js","sourceRoot":"","sources":["../../../src/resources/Tax/Transactions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAUvD,MAAM,OAAO,mBAAoB,SAAQ,cAAc;IACrD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAAsC,EACtC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,wBAAwB,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAChD,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,qBAAqB,CACnB,MAAkD,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,8CAA8C,EAC9C,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,cAAc,CACZ,MAA2C,EAC3C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,sCAAsC,EACtC,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,aAAa,CACX,EAAU,EACV,MAA2C,EAC3C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,wBAAwB,kBAAkB,CAAC,EAAE,CAAC,aAAa,EAC3D,MAAM,EACN,OAAO,EACP;YACE,UAAU,EAAE,MAAM;SACnB,CACK,CAAC;IACX,CAAC;CACF"}
|
||||
47
node_modules/stripe/esm/resources/Tax/index.d.ts
generated
vendored
Normal file
47
node_modules/stripe/esm/resources/Tax/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
import { Stripe } from '../../stripe.core.js';
|
||||
import { Tax as TaxNamespace0, Association, AssociationResource } from './Associations.js';
|
||||
import { Tax as TaxNamespace1, Calculation, CalculationResource } from './Calculations.js';
|
||||
import { Tax as TaxNamespace2, Registration, RegistrationResource } from './Registrations.js';
|
||||
import { Tax as TaxNamespace3, Settings, SettingResource } from './Settings.js';
|
||||
import { Tax as TaxNamespace4, Transaction, TransactionResource } from './Transactions.js';
|
||||
import { CalculationLineItem } from './CalculationLineItems.js';
|
||||
import { TransactionLineItem } from './TransactionLineItems.js';
|
||||
export { Association } from './Associations.js';
|
||||
export { Calculation } from './Calculations.js';
|
||||
export { Registration } from './Registrations.js';
|
||||
export { Settings } from './Settings.js';
|
||||
export { Transaction } from './Transactions.js';
|
||||
export { CalculationLineItem } from './CalculationLineItems.js';
|
||||
export { TransactionLineItem } from './TransactionLineItems.js';
|
||||
export declare class Tax {
|
||||
private readonly stripe;
|
||||
associations: AssociationResource;
|
||||
calculations: CalculationResource;
|
||||
registrations: RegistrationResource;
|
||||
settings: SettingResource;
|
||||
transactions: TransactionResource;
|
||||
constructor(stripe: Stripe);
|
||||
}
|
||||
export declare namespace Tax {
|
||||
export import AssociationFindParams = TaxNamespace0.AssociationFindParams;
|
||||
export { Association };
|
||||
export import CalculationRetrieveParams = TaxNamespace1.CalculationRetrieveParams;
|
||||
export import CalculationCreateParams = TaxNamespace1.CalculationCreateParams;
|
||||
export import CalculationListLineItemsParams = TaxNamespace1.CalculationListLineItemsParams;
|
||||
export { Calculation };
|
||||
export import RegistrationListParams = TaxNamespace2.RegistrationListParams;
|
||||
export import RegistrationCreateParams = TaxNamespace2.RegistrationCreateParams;
|
||||
export import RegistrationRetrieveParams = TaxNamespace2.RegistrationRetrieveParams;
|
||||
export import RegistrationUpdateParams = TaxNamespace2.RegistrationUpdateParams;
|
||||
export { Registration };
|
||||
export import SettingsRetrieveParams = TaxNamespace3.SettingsRetrieveParams;
|
||||
export import SettingsUpdateParams = TaxNamespace3.SettingsUpdateParams;
|
||||
export { Settings };
|
||||
export import TransactionRetrieveParams = TaxNamespace4.TransactionRetrieveParams;
|
||||
export import TransactionCreateFromCalculationParams = TaxNamespace4.TransactionCreateFromCalculationParams;
|
||||
export import TransactionCreateReversalParams = TaxNamespace4.TransactionCreateReversalParams;
|
||||
export import TransactionListLineItemsParams = TaxNamespace4.TransactionListLineItemsParams;
|
||||
export { Transaction };
|
||||
export { CalculationLineItem };
|
||||
export { TransactionLineItem };
|
||||
}
|
||||
17
node_modules/stripe/esm/resources/Tax/index.js
generated
vendored
Normal file
17
node_modules/stripe/esm/resources/Tax/index.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { AssociationResource, } from './Associations.js';
|
||||
import { CalculationResource, } from './Calculations.js';
|
||||
import { RegistrationResource, } from './Registrations.js';
|
||||
import { SettingResource } from './Settings.js';
|
||||
import { TransactionResource, } from './Transactions.js';
|
||||
export class Tax {
|
||||
constructor(stripe) {
|
||||
this.stripe = stripe;
|
||||
this.associations = new AssociationResource(stripe);
|
||||
this.calculations = new CalculationResource(stripe);
|
||||
this.registrations = new RegistrationResource(stripe);
|
||||
this.settings = new SettingResource(stripe);
|
||||
this.transactions = new TransactionResource(stripe);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/stripe/esm/resources/Tax/index.js.map
generated
vendored
Normal file
1
node_modules/stripe/esm/resources/Tax/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/Tax/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAGvC,OAAO,EAGL,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAGL,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAGL,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAiC,eAAe,EAAC,MAAM,eAAe,CAAC;AAC9E,OAAO,EAGL,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAY3B,MAAM,OAAO,GAAG;IAOd,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,YAAY,GAAG,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,YAAY,GAAG,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,aAAa,GAAG,IAAI,oBAAoB,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,CAAC,YAAY,GAAG,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC;CACF"}
|
||||
Reference in New Issue
Block a user