stripe_misc/tax_calculation/
requests.rs

1use stripe_client_core::{
2    RequestBuilder, StripeBlockingClient, StripeClient, StripeMethod, StripeRequest,
3};
4
5#[derive(Clone, Debug, serde::Serialize)]
6struct RetrieveTaxCalculationBuilder {
7    #[serde(skip_serializing_if = "Option::is_none")]
8    expand: Option<Vec<String>>,
9}
10impl RetrieveTaxCalculationBuilder {
11    fn new() -> Self {
12        Self { expand: None }
13    }
14}
15/// Retrieves a Tax `Calculation` object, if the calculation hasn’t expired.
16#[derive(Clone, Debug, serde::Serialize)]
17pub struct RetrieveTaxCalculation {
18    inner: RetrieveTaxCalculationBuilder,
19    calculation: stripe_misc::TaxCalculationId,
20}
21impl RetrieveTaxCalculation {
22    /// Construct a new `RetrieveTaxCalculation`.
23    pub fn new(calculation: impl Into<stripe_misc::TaxCalculationId>) -> Self {
24        Self { calculation: calculation.into(), inner: RetrieveTaxCalculationBuilder::new() }
25    }
26    /// Specifies which fields in the response should be expanded.
27    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
28        self.inner.expand = Some(expand.into());
29        self
30    }
31}
32impl RetrieveTaxCalculation {
33    /// Send the request and return the deserialized response.
34    pub async fn send<C: StripeClient>(
35        &self,
36        client: &C,
37    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
38        self.customize().send(client).await
39    }
40
41    /// Send the request and return the deserialized response, blocking until completion.
42    pub fn send_blocking<C: StripeBlockingClient>(
43        &self,
44        client: &C,
45    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
46        self.customize().send_blocking(client)
47    }
48}
49
50impl StripeRequest for RetrieveTaxCalculation {
51    type Output = stripe_misc::TaxCalculation;
52
53    fn build(&self) -> RequestBuilder {
54        let calculation = &self.calculation;
55        RequestBuilder::new(StripeMethod::Get, format!("/tax/calculations/{calculation}"))
56            .query(&self.inner)
57    }
58}
59#[derive(Clone, Debug, serde::Serialize)]
60struct ListLineItemsTaxCalculationBuilder {
61    #[serde(skip_serializing_if = "Option::is_none")]
62    ending_before: Option<String>,
63    #[serde(skip_serializing_if = "Option::is_none")]
64    expand: Option<Vec<String>>,
65    #[serde(skip_serializing_if = "Option::is_none")]
66    limit: Option<i64>,
67    #[serde(skip_serializing_if = "Option::is_none")]
68    starting_after: Option<String>,
69}
70impl ListLineItemsTaxCalculationBuilder {
71    fn new() -> Self {
72        Self { ending_before: None, expand: None, limit: None, starting_after: None }
73    }
74}
75/// Retrieves the line items of a tax calculation as a collection, if the calculation hasn’t expired.
76#[derive(Clone, Debug, serde::Serialize)]
77pub struct ListLineItemsTaxCalculation {
78    inner: ListLineItemsTaxCalculationBuilder,
79    calculation: stripe_misc::TaxCalculationId,
80}
81impl ListLineItemsTaxCalculation {
82    /// Construct a new `ListLineItemsTaxCalculation`.
83    pub fn new(calculation: impl Into<stripe_misc::TaxCalculationId>) -> Self {
84        Self { calculation: calculation.into(), inner: ListLineItemsTaxCalculationBuilder::new() }
85    }
86    /// A cursor for use in pagination.
87    /// `ending_before` is an object ID that defines your place in the list.
88    /// For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
89    pub fn ending_before(mut self, ending_before: impl Into<String>) -> Self {
90        self.inner.ending_before = Some(ending_before.into());
91        self
92    }
93    /// Specifies which fields in the response should be expanded.
94    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
95        self.inner.expand = Some(expand.into());
96        self
97    }
98    /// A limit on the number of objects to be returned.
99    /// Limit can range between 1 and 100, and the default is 10.
100    pub fn limit(mut self, limit: impl Into<i64>) -> Self {
101        self.inner.limit = Some(limit.into());
102        self
103    }
104    /// A cursor for use in pagination.
105    /// `starting_after` is an object ID that defines your place in the list.
106    /// For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
107    pub fn starting_after(mut self, starting_after: impl Into<String>) -> Self {
108        self.inner.starting_after = Some(starting_after.into());
109        self
110    }
111}
112impl ListLineItemsTaxCalculation {
113    /// Send the request and return the deserialized response.
114    pub async fn send<C: StripeClient>(
115        &self,
116        client: &C,
117    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
118        self.customize().send(client).await
119    }
120
121    /// Send the request and return the deserialized response, blocking until completion.
122    pub fn send_blocking<C: StripeBlockingClient>(
123        &self,
124        client: &C,
125    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
126        self.customize().send_blocking(client)
127    }
128
129    pub fn paginate(
130        &self,
131    ) -> stripe_client_core::ListPaginator<stripe_types::List<stripe_misc::TaxCalculationLineItem>>
132    {
133        let calculation = &self.calculation;
134
135        stripe_client_core::ListPaginator::new_list(
136            format!("/tax/calculations/{calculation}/line_items"),
137            &self.inner,
138        )
139    }
140}
141
142impl StripeRequest for ListLineItemsTaxCalculation {
143    type Output = stripe_types::List<stripe_misc::TaxCalculationLineItem>;
144
145    fn build(&self) -> RequestBuilder {
146        let calculation = &self.calculation;
147        RequestBuilder::new(
148            StripeMethod::Get,
149            format!("/tax/calculations/{calculation}/line_items"),
150        )
151        .query(&self.inner)
152    }
153}
154#[derive(Clone, Debug, serde::Serialize)]
155struct CreateTaxCalculationBuilder {
156    currency: stripe_types::Currency,
157    #[serde(skip_serializing_if = "Option::is_none")]
158    customer: Option<String>,
159    #[serde(skip_serializing_if = "Option::is_none")]
160    customer_details: Option<CreateTaxCalculationCustomerDetails>,
161    #[serde(skip_serializing_if = "Option::is_none")]
162    expand: Option<Vec<String>>,
163    line_items: Vec<CreateTaxCalculationLineItems>,
164    #[serde(skip_serializing_if = "Option::is_none")]
165    ship_from_details: Option<CreateTaxCalculationShipFromDetails>,
166    #[serde(skip_serializing_if = "Option::is_none")]
167    shipping_cost: Option<CreateTaxCalculationShippingCost>,
168    #[serde(skip_serializing_if = "Option::is_none")]
169    tax_date: Option<stripe_types::Timestamp>,
170}
171impl CreateTaxCalculationBuilder {
172    fn new(
173        currency: impl Into<stripe_types::Currency>,
174        line_items: impl Into<Vec<CreateTaxCalculationLineItems>>,
175    ) -> Self {
176        Self {
177            currency: currency.into(),
178            customer: None,
179            customer_details: None,
180            expand: None,
181            line_items: line_items.into(),
182            ship_from_details: None,
183            shipping_cost: None,
184            tax_date: None,
185        }
186    }
187}
188/// Details about the customer, including address and tax IDs.
189#[derive(Clone, Debug, serde::Serialize)]
190pub struct CreateTaxCalculationCustomerDetails {
191    /// The customer's postal address (for example, home or business location).
192    #[serde(skip_serializing_if = "Option::is_none")]
193    pub address: Option<CreateTaxCalculationCustomerDetailsAddress>,
194    /// The type of customer address provided.
195    #[serde(skip_serializing_if = "Option::is_none")]
196    pub address_source: Option<CreateTaxCalculationCustomerDetailsAddressSource>,
197    /// The customer's IP address (IPv4 or IPv6).
198    #[serde(skip_serializing_if = "Option::is_none")]
199    pub ip_address: Option<String>,
200    /// The customer's tax IDs.
201    /// Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result.
202    /// Stripe Tax doesn't validate tax IDs for correctness.
203    #[serde(skip_serializing_if = "Option::is_none")]
204    pub tax_ids: Option<Vec<CreateTaxCalculationCustomerDetailsTaxIds>>,
205    /// Overrides the tax calculation result to allow you to not collect tax from your customer.
206    /// Use this if you've manually checked your customer's tax exemptions.
207    /// Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies.
208    #[serde(skip_serializing_if = "Option::is_none")]
209    pub taxability_override: Option<CreateTaxCalculationCustomerDetailsTaxabilityOverride>,
210}
211impl CreateTaxCalculationCustomerDetails {
212    pub fn new() -> Self {
213        Self {
214            address: None,
215            address_source: None,
216            ip_address: None,
217            tax_ids: None,
218            taxability_override: None,
219        }
220    }
221}
222impl Default for CreateTaxCalculationCustomerDetails {
223    fn default() -> Self {
224        Self::new()
225    }
226}
227/// The customer's postal address (for example, home or business location).
228#[derive(Clone, Debug, serde::Serialize)]
229pub struct CreateTaxCalculationCustomerDetailsAddress {
230    /// City, district, suburb, town, or village.
231    #[serde(skip_serializing_if = "Option::is_none")]
232    pub city: Option<String>,
233    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
234    pub country: String,
235    /// Address line 1, such as the street, PO Box, or company name.
236    #[serde(skip_serializing_if = "Option::is_none")]
237    pub line1: Option<String>,
238    /// Address line 2, such as the apartment, suite, unit, or building.
239    #[serde(skip_serializing_if = "Option::is_none")]
240    pub line2: Option<String>,
241    /// ZIP or postal code.
242    #[serde(skip_serializing_if = "Option::is_none")]
243    pub postal_code: Option<String>,
244    /// State, county, province, or region.
245    /// We recommend sending [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code value when possible.
246    #[serde(skip_serializing_if = "Option::is_none")]
247    pub state: Option<String>,
248}
249impl CreateTaxCalculationCustomerDetailsAddress {
250    pub fn new(country: impl Into<String>) -> Self {
251        Self {
252            city: None,
253            country: country.into(),
254            line1: None,
255            line2: None,
256            postal_code: None,
257            state: None,
258        }
259    }
260}
261/// The type of customer address provided.
262#[derive(Copy, Clone, Eq, PartialEq)]
263pub enum CreateTaxCalculationCustomerDetailsAddressSource {
264    Billing,
265    Shipping,
266}
267impl CreateTaxCalculationCustomerDetailsAddressSource {
268    pub fn as_str(self) -> &'static str {
269        use CreateTaxCalculationCustomerDetailsAddressSource::*;
270        match self {
271            Billing => "billing",
272            Shipping => "shipping",
273        }
274    }
275}
276
277impl std::str::FromStr for CreateTaxCalculationCustomerDetailsAddressSource {
278    type Err = stripe_types::StripeParseError;
279    fn from_str(s: &str) -> Result<Self, Self::Err> {
280        use CreateTaxCalculationCustomerDetailsAddressSource::*;
281        match s {
282            "billing" => Ok(Billing),
283            "shipping" => Ok(Shipping),
284            _ => Err(stripe_types::StripeParseError),
285        }
286    }
287}
288impl std::fmt::Display for CreateTaxCalculationCustomerDetailsAddressSource {
289    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
290        f.write_str(self.as_str())
291    }
292}
293
294impl std::fmt::Debug for CreateTaxCalculationCustomerDetailsAddressSource {
295    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
296        f.write_str(self.as_str())
297    }
298}
299impl serde::Serialize for CreateTaxCalculationCustomerDetailsAddressSource {
300    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
301    where
302        S: serde::Serializer,
303    {
304        serializer.serialize_str(self.as_str())
305    }
306}
307#[cfg(feature = "deserialize")]
308impl<'de> serde::Deserialize<'de> for CreateTaxCalculationCustomerDetailsAddressSource {
309    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
310        use std::str::FromStr;
311        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
312        Self::from_str(&s).map_err(|_| {
313            serde::de::Error::custom(
314                "Unknown value for CreateTaxCalculationCustomerDetailsAddressSource",
315            )
316        })
317    }
318}
319/// The customer's tax IDs.
320/// Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result.
321/// Stripe Tax doesn't validate tax IDs for correctness.
322#[derive(Clone, Debug, serde::Serialize)]
323pub struct CreateTaxCalculationCustomerDetailsTaxIds {
324    /// 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`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_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`, `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`.
325    #[serde(rename = "type")]
326    pub type_: CreateTaxCalculationCustomerDetailsTaxIdsType,
327    /// Value of the tax ID.
328    pub value: String,
329}
330impl CreateTaxCalculationCustomerDetailsTaxIds {
331    pub fn new(
332        type_: impl Into<CreateTaxCalculationCustomerDetailsTaxIdsType>,
333        value: impl Into<String>,
334    ) -> Self {
335        Self { type_: type_.into(), value: value.into() }
336    }
337}
338/// 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`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_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`, `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`.
339#[derive(Clone, Eq, PartialEq)]
340#[non_exhaustive]
341pub enum CreateTaxCalculationCustomerDetailsTaxIdsType {
342    AdNrt,
343    AeTrn,
344    AlTin,
345    AmTin,
346    AoTin,
347    ArCuit,
348    AuAbn,
349    AuArn,
350    AwTin,
351    AzTin,
352    BaTin,
353    BbTin,
354    BdBin,
355    BfIfu,
356    BgUic,
357    BhVat,
358    BjIfu,
359    BoTin,
360    BrCnpj,
361    BrCpf,
362    BsTin,
363    ByTin,
364    CaBn,
365    CaGstHst,
366    CaPstBc,
367    CaPstMb,
368    CaPstSk,
369    CaQst,
370    CdNif,
371    ChUid,
372    ChVat,
373    ClTin,
374    CmNiu,
375    CnTin,
376    CoNit,
377    CrTin,
378    CvNif,
379    DeStn,
380    DoRcn,
381    EcRuc,
382    EgTin,
383    EsCif,
384    EtTin,
385    EuOssVat,
386    EuVat,
387    GbVat,
388    GeVat,
389    GnNif,
390    HkBr,
391    HrOib,
392    HuTin,
393    IdNpwp,
394    IlVat,
395    InGst,
396    IsVat,
397    JpCn,
398    JpRn,
399    JpTrn,
400    KePin,
401    KgTin,
402    KhTin,
403    KrBrn,
404    KzBin,
405    LaTin,
406    LiUid,
407    LiVat,
408    MaVat,
409    MdVat,
410    MePib,
411    MkVat,
412    MrNif,
413    MxRfc,
414    MyFrp,
415    MyItn,
416    MySst,
417    NgTin,
418    NoVat,
419    NoVoec,
420    NpPan,
421    NzGst,
422    OmVat,
423    PeRuc,
424    PhTin,
425    RoTin,
426    RsPib,
427    RuInn,
428    RuKpp,
429    SaVat,
430    SgGst,
431    SgUen,
432    SiTin,
433    SnNinea,
434    SrFin,
435    SvNit,
436    ThVat,
437    TjTin,
438    TrTin,
439    TwVat,
440    TzVat,
441    UaVat,
442    UgTin,
443    UsEin,
444    UyRuc,
445    UzTin,
446    UzVat,
447    VeRif,
448    VnTin,
449    ZaVat,
450    ZmTin,
451    ZwTin,
452    /// An unrecognized value from Stripe. Should not be used as a request parameter.
453    Unknown(String),
454}
455impl CreateTaxCalculationCustomerDetailsTaxIdsType {
456    pub fn as_str(&self) -> &str {
457        use CreateTaxCalculationCustomerDetailsTaxIdsType::*;
458        match self {
459            AdNrt => "ad_nrt",
460            AeTrn => "ae_trn",
461            AlTin => "al_tin",
462            AmTin => "am_tin",
463            AoTin => "ao_tin",
464            ArCuit => "ar_cuit",
465            AuAbn => "au_abn",
466            AuArn => "au_arn",
467            AwTin => "aw_tin",
468            AzTin => "az_tin",
469            BaTin => "ba_tin",
470            BbTin => "bb_tin",
471            BdBin => "bd_bin",
472            BfIfu => "bf_ifu",
473            BgUic => "bg_uic",
474            BhVat => "bh_vat",
475            BjIfu => "bj_ifu",
476            BoTin => "bo_tin",
477            BrCnpj => "br_cnpj",
478            BrCpf => "br_cpf",
479            BsTin => "bs_tin",
480            ByTin => "by_tin",
481            CaBn => "ca_bn",
482            CaGstHst => "ca_gst_hst",
483            CaPstBc => "ca_pst_bc",
484            CaPstMb => "ca_pst_mb",
485            CaPstSk => "ca_pst_sk",
486            CaQst => "ca_qst",
487            CdNif => "cd_nif",
488            ChUid => "ch_uid",
489            ChVat => "ch_vat",
490            ClTin => "cl_tin",
491            CmNiu => "cm_niu",
492            CnTin => "cn_tin",
493            CoNit => "co_nit",
494            CrTin => "cr_tin",
495            CvNif => "cv_nif",
496            DeStn => "de_stn",
497            DoRcn => "do_rcn",
498            EcRuc => "ec_ruc",
499            EgTin => "eg_tin",
500            EsCif => "es_cif",
501            EtTin => "et_tin",
502            EuOssVat => "eu_oss_vat",
503            EuVat => "eu_vat",
504            GbVat => "gb_vat",
505            GeVat => "ge_vat",
506            GnNif => "gn_nif",
507            HkBr => "hk_br",
508            HrOib => "hr_oib",
509            HuTin => "hu_tin",
510            IdNpwp => "id_npwp",
511            IlVat => "il_vat",
512            InGst => "in_gst",
513            IsVat => "is_vat",
514            JpCn => "jp_cn",
515            JpRn => "jp_rn",
516            JpTrn => "jp_trn",
517            KePin => "ke_pin",
518            KgTin => "kg_tin",
519            KhTin => "kh_tin",
520            KrBrn => "kr_brn",
521            KzBin => "kz_bin",
522            LaTin => "la_tin",
523            LiUid => "li_uid",
524            LiVat => "li_vat",
525            MaVat => "ma_vat",
526            MdVat => "md_vat",
527            MePib => "me_pib",
528            MkVat => "mk_vat",
529            MrNif => "mr_nif",
530            MxRfc => "mx_rfc",
531            MyFrp => "my_frp",
532            MyItn => "my_itn",
533            MySst => "my_sst",
534            NgTin => "ng_tin",
535            NoVat => "no_vat",
536            NoVoec => "no_voec",
537            NpPan => "np_pan",
538            NzGst => "nz_gst",
539            OmVat => "om_vat",
540            PeRuc => "pe_ruc",
541            PhTin => "ph_tin",
542            RoTin => "ro_tin",
543            RsPib => "rs_pib",
544            RuInn => "ru_inn",
545            RuKpp => "ru_kpp",
546            SaVat => "sa_vat",
547            SgGst => "sg_gst",
548            SgUen => "sg_uen",
549            SiTin => "si_tin",
550            SnNinea => "sn_ninea",
551            SrFin => "sr_fin",
552            SvNit => "sv_nit",
553            ThVat => "th_vat",
554            TjTin => "tj_tin",
555            TrTin => "tr_tin",
556            TwVat => "tw_vat",
557            TzVat => "tz_vat",
558            UaVat => "ua_vat",
559            UgTin => "ug_tin",
560            UsEin => "us_ein",
561            UyRuc => "uy_ruc",
562            UzTin => "uz_tin",
563            UzVat => "uz_vat",
564            VeRif => "ve_rif",
565            VnTin => "vn_tin",
566            ZaVat => "za_vat",
567            ZmTin => "zm_tin",
568            ZwTin => "zw_tin",
569            Unknown(v) => v,
570        }
571    }
572}
573
574impl std::str::FromStr for CreateTaxCalculationCustomerDetailsTaxIdsType {
575    type Err = std::convert::Infallible;
576    fn from_str(s: &str) -> Result<Self, Self::Err> {
577        use CreateTaxCalculationCustomerDetailsTaxIdsType::*;
578        match s {
579            "ad_nrt" => Ok(AdNrt),
580            "ae_trn" => Ok(AeTrn),
581            "al_tin" => Ok(AlTin),
582            "am_tin" => Ok(AmTin),
583            "ao_tin" => Ok(AoTin),
584            "ar_cuit" => Ok(ArCuit),
585            "au_abn" => Ok(AuAbn),
586            "au_arn" => Ok(AuArn),
587            "aw_tin" => Ok(AwTin),
588            "az_tin" => Ok(AzTin),
589            "ba_tin" => Ok(BaTin),
590            "bb_tin" => Ok(BbTin),
591            "bd_bin" => Ok(BdBin),
592            "bf_ifu" => Ok(BfIfu),
593            "bg_uic" => Ok(BgUic),
594            "bh_vat" => Ok(BhVat),
595            "bj_ifu" => Ok(BjIfu),
596            "bo_tin" => Ok(BoTin),
597            "br_cnpj" => Ok(BrCnpj),
598            "br_cpf" => Ok(BrCpf),
599            "bs_tin" => Ok(BsTin),
600            "by_tin" => Ok(ByTin),
601            "ca_bn" => Ok(CaBn),
602            "ca_gst_hst" => Ok(CaGstHst),
603            "ca_pst_bc" => Ok(CaPstBc),
604            "ca_pst_mb" => Ok(CaPstMb),
605            "ca_pst_sk" => Ok(CaPstSk),
606            "ca_qst" => Ok(CaQst),
607            "cd_nif" => Ok(CdNif),
608            "ch_uid" => Ok(ChUid),
609            "ch_vat" => Ok(ChVat),
610            "cl_tin" => Ok(ClTin),
611            "cm_niu" => Ok(CmNiu),
612            "cn_tin" => Ok(CnTin),
613            "co_nit" => Ok(CoNit),
614            "cr_tin" => Ok(CrTin),
615            "cv_nif" => Ok(CvNif),
616            "de_stn" => Ok(DeStn),
617            "do_rcn" => Ok(DoRcn),
618            "ec_ruc" => Ok(EcRuc),
619            "eg_tin" => Ok(EgTin),
620            "es_cif" => Ok(EsCif),
621            "et_tin" => Ok(EtTin),
622            "eu_oss_vat" => Ok(EuOssVat),
623            "eu_vat" => Ok(EuVat),
624            "gb_vat" => Ok(GbVat),
625            "ge_vat" => Ok(GeVat),
626            "gn_nif" => Ok(GnNif),
627            "hk_br" => Ok(HkBr),
628            "hr_oib" => Ok(HrOib),
629            "hu_tin" => Ok(HuTin),
630            "id_npwp" => Ok(IdNpwp),
631            "il_vat" => Ok(IlVat),
632            "in_gst" => Ok(InGst),
633            "is_vat" => Ok(IsVat),
634            "jp_cn" => Ok(JpCn),
635            "jp_rn" => Ok(JpRn),
636            "jp_trn" => Ok(JpTrn),
637            "ke_pin" => Ok(KePin),
638            "kg_tin" => Ok(KgTin),
639            "kh_tin" => Ok(KhTin),
640            "kr_brn" => Ok(KrBrn),
641            "kz_bin" => Ok(KzBin),
642            "la_tin" => Ok(LaTin),
643            "li_uid" => Ok(LiUid),
644            "li_vat" => Ok(LiVat),
645            "ma_vat" => Ok(MaVat),
646            "md_vat" => Ok(MdVat),
647            "me_pib" => Ok(MePib),
648            "mk_vat" => Ok(MkVat),
649            "mr_nif" => Ok(MrNif),
650            "mx_rfc" => Ok(MxRfc),
651            "my_frp" => Ok(MyFrp),
652            "my_itn" => Ok(MyItn),
653            "my_sst" => Ok(MySst),
654            "ng_tin" => Ok(NgTin),
655            "no_vat" => Ok(NoVat),
656            "no_voec" => Ok(NoVoec),
657            "np_pan" => Ok(NpPan),
658            "nz_gst" => Ok(NzGst),
659            "om_vat" => Ok(OmVat),
660            "pe_ruc" => Ok(PeRuc),
661            "ph_tin" => Ok(PhTin),
662            "ro_tin" => Ok(RoTin),
663            "rs_pib" => Ok(RsPib),
664            "ru_inn" => Ok(RuInn),
665            "ru_kpp" => Ok(RuKpp),
666            "sa_vat" => Ok(SaVat),
667            "sg_gst" => Ok(SgGst),
668            "sg_uen" => Ok(SgUen),
669            "si_tin" => Ok(SiTin),
670            "sn_ninea" => Ok(SnNinea),
671            "sr_fin" => Ok(SrFin),
672            "sv_nit" => Ok(SvNit),
673            "th_vat" => Ok(ThVat),
674            "tj_tin" => Ok(TjTin),
675            "tr_tin" => Ok(TrTin),
676            "tw_vat" => Ok(TwVat),
677            "tz_vat" => Ok(TzVat),
678            "ua_vat" => Ok(UaVat),
679            "ug_tin" => Ok(UgTin),
680            "us_ein" => Ok(UsEin),
681            "uy_ruc" => Ok(UyRuc),
682            "uz_tin" => Ok(UzTin),
683            "uz_vat" => Ok(UzVat),
684            "ve_rif" => Ok(VeRif),
685            "vn_tin" => Ok(VnTin),
686            "za_vat" => Ok(ZaVat),
687            "zm_tin" => Ok(ZmTin),
688            "zw_tin" => Ok(ZwTin),
689            v => Ok(Unknown(v.to_owned())),
690        }
691    }
692}
693impl std::fmt::Display for CreateTaxCalculationCustomerDetailsTaxIdsType {
694    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
695        f.write_str(self.as_str())
696    }
697}
698
699impl std::fmt::Debug for CreateTaxCalculationCustomerDetailsTaxIdsType {
700    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
701        f.write_str(self.as_str())
702    }
703}
704impl serde::Serialize for CreateTaxCalculationCustomerDetailsTaxIdsType {
705    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
706    where
707        S: serde::Serializer,
708    {
709        serializer.serialize_str(self.as_str())
710    }
711}
712#[cfg(feature = "deserialize")]
713impl<'de> serde::Deserialize<'de> for CreateTaxCalculationCustomerDetailsTaxIdsType {
714    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
715        use std::str::FromStr;
716        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
717        Ok(Self::from_str(&s).unwrap())
718    }
719}
720/// Overrides the tax calculation result to allow you to not collect tax from your customer.
721/// Use this if you've manually checked your customer's tax exemptions.
722/// Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies.
723#[derive(Copy, Clone, Eq, PartialEq)]
724pub enum CreateTaxCalculationCustomerDetailsTaxabilityOverride {
725    CustomerExempt,
726    None,
727    ReverseCharge,
728}
729impl CreateTaxCalculationCustomerDetailsTaxabilityOverride {
730    pub fn as_str(self) -> &'static str {
731        use CreateTaxCalculationCustomerDetailsTaxabilityOverride::*;
732        match self {
733            CustomerExempt => "customer_exempt",
734            None => "none",
735            ReverseCharge => "reverse_charge",
736        }
737    }
738}
739
740impl std::str::FromStr for CreateTaxCalculationCustomerDetailsTaxabilityOverride {
741    type Err = stripe_types::StripeParseError;
742    fn from_str(s: &str) -> Result<Self, Self::Err> {
743        use CreateTaxCalculationCustomerDetailsTaxabilityOverride::*;
744        match s {
745            "customer_exempt" => Ok(CustomerExempt),
746            "none" => Ok(None),
747            "reverse_charge" => Ok(ReverseCharge),
748            _ => Err(stripe_types::StripeParseError),
749        }
750    }
751}
752impl std::fmt::Display for CreateTaxCalculationCustomerDetailsTaxabilityOverride {
753    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
754        f.write_str(self.as_str())
755    }
756}
757
758impl std::fmt::Debug for CreateTaxCalculationCustomerDetailsTaxabilityOverride {
759    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
760        f.write_str(self.as_str())
761    }
762}
763impl serde::Serialize for CreateTaxCalculationCustomerDetailsTaxabilityOverride {
764    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
765    where
766        S: serde::Serializer,
767    {
768        serializer.serialize_str(self.as_str())
769    }
770}
771#[cfg(feature = "deserialize")]
772impl<'de> serde::Deserialize<'de> for CreateTaxCalculationCustomerDetailsTaxabilityOverride {
773    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
774        use std::str::FromStr;
775        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
776        Self::from_str(&s).map_err(|_| {
777            serde::de::Error::custom(
778                "Unknown value for CreateTaxCalculationCustomerDetailsTaxabilityOverride",
779            )
780        })
781    }
782}
783/// A list of items the customer is purchasing.
784#[derive(Clone, Debug, serde::Serialize)]
785pub struct CreateTaxCalculationLineItems {
786    /// A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
787    /// If `tax_behavior=inclusive`, then this amount includes taxes.
788    /// Otherwise, taxes are calculated on top of this amount.
789    pub amount: i64,
790    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
791    /// This can be useful for storing additional information about the object in a structured format.
792    #[serde(skip_serializing_if = "Option::is_none")]
793    pub metadata: Option<std::collections::HashMap<String, String>>,
794    /// If provided, the product's `tax_code` will be used as the line item's `tax_code`.
795    #[serde(skip_serializing_if = "Option::is_none")]
796    pub product: Option<String>,
797    /// The number of units of the item being purchased.
798    /// Used to calculate the per-unit price from the total `amount` for the line.
799    /// For example, if `amount=100` and `quantity=4`, the calculated unit price is 25.
800    #[serde(skip_serializing_if = "Option::is_none")]
801    pub quantity: Option<u64>,
802    /// A custom identifier for this line item, which must be unique across the line items in the calculation.
803    /// The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports).
804    #[serde(skip_serializing_if = "Option::is_none")]
805    pub reference: Option<String>,
806    /// Specifies whether the `amount` includes taxes. Defaults to `exclusive`.
807    #[serde(skip_serializing_if = "Option::is_none")]
808    pub tax_behavior: Option<CreateTaxCalculationLineItemsTaxBehavior>,
809    /// A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item.
810    /// If not provided, we will use the tax code from the provided `product` param.
811    /// If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings.
812    #[serde(skip_serializing_if = "Option::is_none")]
813    pub tax_code: Option<String>,
814}
815impl CreateTaxCalculationLineItems {
816    pub fn new(amount: impl Into<i64>) -> Self {
817        Self {
818            amount: amount.into(),
819            metadata: None,
820            product: None,
821            quantity: None,
822            reference: None,
823            tax_behavior: None,
824            tax_code: None,
825        }
826    }
827}
828/// Specifies whether the `amount` includes taxes. Defaults to `exclusive`.
829#[derive(Copy, Clone, Eq, PartialEq)]
830pub enum CreateTaxCalculationLineItemsTaxBehavior {
831    Exclusive,
832    Inclusive,
833}
834impl CreateTaxCalculationLineItemsTaxBehavior {
835    pub fn as_str(self) -> &'static str {
836        use CreateTaxCalculationLineItemsTaxBehavior::*;
837        match self {
838            Exclusive => "exclusive",
839            Inclusive => "inclusive",
840        }
841    }
842}
843
844impl std::str::FromStr for CreateTaxCalculationLineItemsTaxBehavior {
845    type Err = stripe_types::StripeParseError;
846    fn from_str(s: &str) -> Result<Self, Self::Err> {
847        use CreateTaxCalculationLineItemsTaxBehavior::*;
848        match s {
849            "exclusive" => Ok(Exclusive),
850            "inclusive" => Ok(Inclusive),
851            _ => Err(stripe_types::StripeParseError),
852        }
853    }
854}
855impl std::fmt::Display for CreateTaxCalculationLineItemsTaxBehavior {
856    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
857        f.write_str(self.as_str())
858    }
859}
860
861impl std::fmt::Debug for CreateTaxCalculationLineItemsTaxBehavior {
862    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
863        f.write_str(self.as_str())
864    }
865}
866impl serde::Serialize for CreateTaxCalculationLineItemsTaxBehavior {
867    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
868    where
869        S: serde::Serializer,
870    {
871        serializer.serialize_str(self.as_str())
872    }
873}
874#[cfg(feature = "deserialize")]
875impl<'de> serde::Deserialize<'de> for CreateTaxCalculationLineItemsTaxBehavior {
876    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
877        use std::str::FromStr;
878        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
879        Self::from_str(&s).map_err(|_| {
880            serde::de::Error::custom("Unknown value for CreateTaxCalculationLineItemsTaxBehavior")
881        })
882    }
883}
884/// Details about the address from which the goods are being shipped.
885#[derive(Clone, Debug, serde::Serialize)]
886pub struct CreateTaxCalculationShipFromDetails {
887    /// The address from which the goods are being shipped from.
888    pub address: CreateTaxCalculationShipFromDetailsAddress,
889}
890impl CreateTaxCalculationShipFromDetails {
891    pub fn new(address: impl Into<CreateTaxCalculationShipFromDetailsAddress>) -> Self {
892        Self { address: address.into() }
893    }
894}
895/// The address from which the goods are being shipped from.
896#[derive(Clone, Debug, serde::Serialize)]
897pub struct CreateTaxCalculationShipFromDetailsAddress {
898    /// City, district, suburb, town, or village.
899    #[serde(skip_serializing_if = "Option::is_none")]
900    pub city: Option<String>,
901    /// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
902    pub country: String,
903    /// Address line 1, such as the street, PO Box, or company name.
904    #[serde(skip_serializing_if = "Option::is_none")]
905    pub line1: Option<String>,
906    /// Address line 2, such as the apartment, suite, unit, or building.
907    #[serde(skip_serializing_if = "Option::is_none")]
908    pub line2: Option<String>,
909    /// ZIP or postal code.
910    #[serde(skip_serializing_if = "Option::is_none")]
911    pub postal_code: Option<String>,
912    /// 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".
913    #[serde(skip_serializing_if = "Option::is_none")]
914    pub state: Option<String>,
915}
916impl CreateTaxCalculationShipFromDetailsAddress {
917    pub fn new(country: impl Into<String>) -> Self {
918        Self {
919            city: None,
920            country: country.into(),
921            line1: None,
922            line2: None,
923            postal_code: None,
924            state: None,
925        }
926    }
927}
928/// Shipping cost details to be used for the calculation.
929#[derive(Clone, Debug, serde::Serialize)]
930pub struct CreateTaxCalculationShippingCost {
931    /// A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing the shipping charge.
932    /// If `tax_behavior=inclusive`, then this amount includes taxes.
933    /// Otherwise, taxes are calculated on top of this amount.
934    #[serde(skip_serializing_if = "Option::is_none")]
935    pub amount: Option<i64>,
936    /// If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used.
937    /// If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters.
938    #[serde(skip_serializing_if = "Option::is_none")]
939    pub shipping_rate: Option<String>,
940    /// Specifies whether the `amount` includes taxes.
941    /// If `tax_behavior=inclusive`, then the amount includes taxes.
942    /// Defaults to `exclusive`.
943    #[serde(skip_serializing_if = "Option::is_none")]
944    pub tax_behavior: Option<CreateTaxCalculationShippingCostTaxBehavior>,
945    /// The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping.
946    /// If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used.
947    #[serde(skip_serializing_if = "Option::is_none")]
948    pub tax_code: Option<String>,
949}
950impl CreateTaxCalculationShippingCost {
951    pub fn new() -> Self {
952        Self { amount: None, shipping_rate: None, tax_behavior: None, tax_code: None }
953    }
954}
955impl Default for CreateTaxCalculationShippingCost {
956    fn default() -> Self {
957        Self::new()
958    }
959}
960/// Specifies whether the `amount` includes taxes.
961/// If `tax_behavior=inclusive`, then the amount includes taxes.
962/// Defaults to `exclusive`.
963#[derive(Copy, Clone, Eq, PartialEq)]
964pub enum CreateTaxCalculationShippingCostTaxBehavior {
965    Exclusive,
966    Inclusive,
967}
968impl CreateTaxCalculationShippingCostTaxBehavior {
969    pub fn as_str(self) -> &'static str {
970        use CreateTaxCalculationShippingCostTaxBehavior::*;
971        match self {
972            Exclusive => "exclusive",
973            Inclusive => "inclusive",
974        }
975    }
976}
977
978impl std::str::FromStr for CreateTaxCalculationShippingCostTaxBehavior {
979    type Err = stripe_types::StripeParseError;
980    fn from_str(s: &str) -> Result<Self, Self::Err> {
981        use CreateTaxCalculationShippingCostTaxBehavior::*;
982        match s {
983            "exclusive" => Ok(Exclusive),
984            "inclusive" => Ok(Inclusive),
985            _ => Err(stripe_types::StripeParseError),
986        }
987    }
988}
989impl std::fmt::Display for CreateTaxCalculationShippingCostTaxBehavior {
990    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
991        f.write_str(self.as_str())
992    }
993}
994
995impl std::fmt::Debug for CreateTaxCalculationShippingCostTaxBehavior {
996    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
997        f.write_str(self.as_str())
998    }
999}
1000impl serde::Serialize for CreateTaxCalculationShippingCostTaxBehavior {
1001    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1002    where
1003        S: serde::Serializer,
1004    {
1005        serializer.serialize_str(self.as_str())
1006    }
1007}
1008#[cfg(feature = "deserialize")]
1009impl<'de> serde::Deserialize<'de> for CreateTaxCalculationShippingCostTaxBehavior {
1010    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1011        use std::str::FromStr;
1012        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
1013        Self::from_str(&s).map_err(|_| {
1014            serde::de::Error::custom(
1015                "Unknown value for CreateTaxCalculationShippingCostTaxBehavior",
1016            )
1017        })
1018    }
1019}
1020/// Calculates tax based on the input and returns a Tax `Calculation` object.
1021#[derive(Clone, Debug, serde::Serialize)]
1022pub struct CreateTaxCalculation {
1023    inner: CreateTaxCalculationBuilder,
1024}
1025impl CreateTaxCalculation {
1026    /// Construct a new `CreateTaxCalculation`.
1027    pub fn new(
1028        currency: impl Into<stripe_types::Currency>,
1029        line_items: impl Into<Vec<CreateTaxCalculationLineItems>>,
1030    ) -> Self {
1031        Self { inner: CreateTaxCalculationBuilder::new(currency.into(), line_items.into()) }
1032    }
1033    /// The ID of an existing customer to use for this calculation.
1034    /// If provided, the customer's address and tax IDs are copied to `customer_details`.
1035    pub fn customer(mut self, customer: impl Into<String>) -> Self {
1036        self.inner.customer = Some(customer.into());
1037        self
1038    }
1039    /// Details about the customer, including address and tax IDs.
1040    pub fn customer_details(
1041        mut self,
1042        customer_details: impl Into<CreateTaxCalculationCustomerDetails>,
1043    ) -> Self {
1044        self.inner.customer_details = Some(customer_details.into());
1045        self
1046    }
1047    /// Specifies which fields in the response should be expanded.
1048    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
1049        self.inner.expand = Some(expand.into());
1050        self
1051    }
1052    /// Details about the address from which the goods are being shipped.
1053    pub fn ship_from_details(
1054        mut self,
1055        ship_from_details: impl Into<CreateTaxCalculationShipFromDetails>,
1056    ) -> Self {
1057        self.inner.ship_from_details = Some(ship_from_details.into());
1058        self
1059    }
1060    /// Shipping cost details to be used for the calculation.
1061    pub fn shipping_cost(
1062        mut self,
1063        shipping_cost: impl Into<CreateTaxCalculationShippingCost>,
1064    ) -> Self {
1065        self.inner.shipping_cost = Some(shipping_cost.into());
1066        self
1067    }
1068    /// Timestamp of date at which the tax rules and rates in effect applies for the calculation.
1069    /// Measured in seconds since the Unix epoch.
1070    /// Can be up to 48 hours in the past, and up to 48 hours in the future.
1071    pub fn tax_date(mut self, tax_date: impl Into<stripe_types::Timestamp>) -> Self {
1072        self.inner.tax_date = Some(tax_date.into());
1073        self
1074    }
1075}
1076impl CreateTaxCalculation {
1077    /// Send the request and return the deserialized response.
1078    pub async fn send<C: StripeClient>(
1079        &self,
1080        client: &C,
1081    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
1082        self.customize().send(client).await
1083    }
1084
1085    /// Send the request and return the deserialized response, blocking until completion.
1086    pub fn send_blocking<C: StripeBlockingClient>(
1087        &self,
1088        client: &C,
1089    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
1090        self.customize().send_blocking(client)
1091    }
1092}
1093
1094impl StripeRequest for CreateTaxCalculation {
1095    type Output = stripe_misc::TaxCalculation;
1096
1097    fn build(&self) -> RequestBuilder {
1098        RequestBuilder::new(StripeMethod::Post, "/tax/calculations").form(&self.inner)
1099    }
1100}