stripe_core/payout/
requests.rs

1use stripe_client_core::{
2    RequestBuilder, StripeBlockingClient, StripeClient, StripeMethod, StripeRequest,
3};
4
5#[derive(Clone, Debug, serde::Serialize)]
6struct ListPayoutBuilder {
7    #[serde(skip_serializing_if = "Option::is_none")]
8    arrival_date: Option<stripe_types::RangeQueryTs>,
9    #[serde(skip_serializing_if = "Option::is_none")]
10    created: Option<stripe_types::RangeQueryTs>,
11    #[serde(skip_serializing_if = "Option::is_none")]
12    destination: Option<String>,
13    #[serde(skip_serializing_if = "Option::is_none")]
14    ending_before: Option<String>,
15    #[serde(skip_serializing_if = "Option::is_none")]
16    expand: Option<Vec<String>>,
17    #[serde(skip_serializing_if = "Option::is_none")]
18    limit: Option<i64>,
19    #[serde(skip_serializing_if = "Option::is_none")]
20    starting_after: Option<String>,
21    #[serde(skip_serializing_if = "Option::is_none")]
22    status: Option<String>,
23}
24impl ListPayoutBuilder {
25    fn new() -> Self {
26        Self {
27            arrival_date: None,
28            created: None,
29            destination: None,
30            ending_before: None,
31            expand: None,
32            limit: None,
33            starting_after: None,
34            status: None,
35        }
36    }
37}
38/// Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you.
39/// The payouts return in sorted order, with the most recently created payouts appearing first.
40#[derive(Clone, Debug, serde::Serialize)]
41pub struct ListPayout {
42    inner: ListPayoutBuilder,
43}
44impl ListPayout {
45    /// Construct a new `ListPayout`.
46    pub fn new() -> Self {
47        Self { inner: ListPayoutBuilder::new() }
48    }
49    /// Only return payouts that are expected to arrive during the given date interval.
50    pub fn arrival_date(mut self, arrival_date: impl Into<stripe_types::RangeQueryTs>) -> Self {
51        self.inner.arrival_date = Some(arrival_date.into());
52        self
53    }
54    /// Only return payouts that were created during the given date interval.
55    pub fn created(mut self, created: impl Into<stripe_types::RangeQueryTs>) -> Self {
56        self.inner.created = Some(created.into());
57        self
58    }
59    /// The ID of an external account - only return payouts sent to this external account.
60    pub fn destination(mut self, destination: impl Into<String>) -> Self {
61        self.inner.destination = Some(destination.into());
62        self
63    }
64    /// A cursor for use in pagination.
65    /// `ending_before` is an object ID that defines your place in the list.
66    /// 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.
67    pub fn ending_before(mut self, ending_before: impl Into<String>) -> Self {
68        self.inner.ending_before = Some(ending_before.into());
69        self
70    }
71    /// Specifies which fields in the response should be expanded.
72    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
73        self.inner.expand = Some(expand.into());
74        self
75    }
76    /// A limit on the number of objects to be returned.
77    /// Limit can range between 1 and 100, and the default is 10.
78    pub fn limit(mut self, limit: impl Into<i64>) -> Self {
79        self.inner.limit = Some(limit.into());
80        self
81    }
82    /// A cursor for use in pagination.
83    /// `starting_after` is an object ID that defines your place in the list.
84    /// 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.
85    pub fn starting_after(mut self, starting_after: impl Into<String>) -> Self {
86        self.inner.starting_after = Some(starting_after.into());
87        self
88    }
89    /// Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`.
90    pub fn status(mut self, status: impl Into<String>) -> Self {
91        self.inner.status = Some(status.into());
92        self
93    }
94}
95impl Default for ListPayout {
96    fn default() -> Self {
97        Self::new()
98    }
99}
100impl ListPayout {
101    /// Send the request and return the deserialized response.
102    pub async fn send<C: StripeClient>(
103        &self,
104        client: &C,
105    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
106        self.customize().send(client).await
107    }
108
109    /// Send the request and return the deserialized response, blocking until completion.
110    pub fn send_blocking<C: StripeBlockingClient>(
111        &self,
112        client: &C,
113    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
114        self.customize().send_blocking(client)
115    }
116
117    pub fn paginate(
118        &self,
119    ) -> stripe_client_core::ListPaginator<stripe_types::List<stripe_shared::Payout>> {
120        stripe_client_core::ListPaginator::new_list("/payouts", &self.inner)
121    }
122}
123
124impl StripeRequest for ListPayout {
125    type Output = stripe_types::List<stripe_shared::Payout>;
126
127    fn build(&self) -> RequestBuilder {
128        RequestBuilder::new(StripeMethod::Get, "/payouts").query(&self.inner)
129    }
130}
131#[derive(Clone, Debug, serde::Serialize)]
132struct RetrievePayoutBuilder {
133    #[serde(skip_serializing_if = "Option::is_none")]
134    expand: Option<Vec<String>>,
135}
136impl RetrievePayoutBuilder {
137    fn new() -> Self {
138        Self { expand: None }
139    }
140}
141/// Retrieves the details of an existing payout.
142/// Supply the unique payout ID from either a payout creation request or the payout list.
143/// Stripe returns the corresponding payout information.
144#[derive(Clone, Debug, serde::Serialize)]
145pub struct RetrievePayout {
146    inner: RetrievePayoutBuilder,
147    payout: stripe_shared::PayoutId,
148}
149impl RetrievePayout {
150    /// Construct a new `RetrievePayout`.
151    pub fn new(payout: impl Into<stripe_shared::PayoutId>) -> Self {
152        Self { payout: payout.into(), inner: RetrievePayoutBuilder::new() }
153    }
154    /// Specifies which fields in the response should be expanded.
155    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
156        self.inner.expand = Some(expand.into());
157        self
158    }
159}
160impl RetrievePayout {
161    /// Send the request and return the deserialized response.
162    pub async fn send<C: StripeClient>(
163        &self,
164        client: &C,
165    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
166        self.customize().send(client).await
167    }
168
169    /// Send the request and return the deserialized response, blocking until completion.
170    pub fn send_blocking<C: StripeBlockingClient>(
171        &self,
172        client: &C,
173    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
174        self.customize().send_blocking(client)
175    }
176}
177
178impl StripeRequest for RetrievePayout {
179    type Output = stripe_shared::Payout;
180
181    fn build(&self) -> RequestBuilder {
182        let payout = &self.payout;
183        RequestBuilder::new(StripeMethod::Get, format!("/payouts/{payout}")).query(&self.inner)
184    }
185}
186#[derive(Clone, Debug, serde::Serialize)]
187struct CreatePayoutBuilder {
188    amount: i64,
189    currency: stripe_types::Currency,
190    #[serde(skip_serializing_if = "Option::is_none")]
191    description: Option<String>,
192    #[serde(skip_serializing_if = "Option::is_none")]
193    destination: Option<String>,
194    #[serde(skip_serializing_if = "Option::is_none")]
195    expand: Option<Vec<String>>,
196    #[serde(skip_serializing_if = "Option::is_none")]
197    metadata: Option<std::collections::HashMap<String, String>>,
198    #[serde(skip_serializing_if = "Option::is_none")]
199    method: Option<CreatePayoutMethod>,
200    #[serde(skip_serializing_if = "Option::is_none")]
201    payout_method: Option<String>,
202    #[serde(skip_serializing_if = "Option::is_none")]
203    source_type: Option<CreatePayoutSourceType>,
204    #[serde(skip_serializing_if = "Option::is_none")]
205    statement_descriptor: Option<String>,
206}
207impl CreatePayoutBuilder {
208    fn new(amount: impl Into<i64>, currency: impl Into<stripe_types::Currency>) -> Self {
209        Self {
210            amount: amount.into(),
211            currency: currency.into(),
212            description: None,
213            destination: None,
214            expand: None,
215            metadata: None,
216            method: None,
217            payout_method: None,
218            source_type: None,
219            statement_descriptor: None,
220        }
221    }
222}
223/// The method used to send this payout, which is `standard` or `instant`.
224/// We support `instant` for payouts to debit cards and bank accounts in certain countries.
225/// Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks).
226#[derive(Copy, Clone, Eq, PartialEq)]
227pub enum CreatePayoutMethod {
228    Instant,
229    Standard,
230}
231impl CreatePayoutMethod {
232    pub fn as_str(self) -> &'static str {
233        use CreatePayoutMethod::*;
234        match self {
235            Instant => "instant",
236            Standard => "standard",
237        }
238    }
239}
240
241impl std::str::FromStr for CreatePayoutMethod {
242    type Err = stripe_types::StripeParseError;
243    fn from_str(s: &str) -> Result<Self, Self::Err> {
244        use CreatePayoutMethod::*;
245        match s {
246            "instant" => Ok(Instant),
247            "standard" => Ok(Standard),
248            _ => Err(stripe_types::StripeParseError),
249        }
250    }
251}
252impl std::fmt::Display for CreatePayoutMethod {
253    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
254        f.write_str(self.as_str())
255    }
256}
257
258impl std::fmt::Debug for CreatePayoutMethod {
259    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
260        f.write_str(self.as_str())
261    }
262}
263impl serde::Serialize for CreatePayoutMethod {
264    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
265    where
266        S: serde::Serializer,
267    {
268        serializer.serialize_str(self.as_str())
269    }
270}
271#[cfg(feature = "deserialize")]
272impl<'de> serde::Deserialize<'de> for CreatePayoutMethod {
273    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
274        use std::str::FromStr;
275        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
276        Self::from_str(&s)
277            .map_err(|_| serde::de::Error::custom("Unknown value for CreatePayoutMethod"))
278    }
279}
280/// The balance type of your Stripe balance to draw this payout from.
281/// Balances for different payment sources are kept separately.
282/// You can find the amounts with the Balances API.
283/// One of `bank_account`, `card`, or `fpx`.
284#[derive(Copy, Clone, Eq, PartialEq)]
285pub enum CreatePayoutSourceType {
286    BankAccount,
287    Card,
288    Fpx,
289}
290impl CreatePayoutSourceType {
291    pub fn as_str(self) -> &'static str {
292        use CreatePayoutSourceType::*;
293        match self {
294            BankAccount => "bank_account",
295            Card => "card",
296            Fpx => "fpx",
297        }
298    }
299}
300
301impl std::str::FromStr for CreatePayoutSourceType {
302    type Err = stripe_types::StripeParseError;
303    fn from_str(s: &str) -> Result<Self, Self::Err> {
304        use CreatePayoutSourceType::*;
305        match s {
306            "bank_account" => Ok(BankAccount),
307            "card" => Ok(Card),
308            "fpx" => Ok(Fpx),
309            _ => Err(stripe_types::StripeParseError),
310        }
311    }
312}
313impl std::fmt::Display for CreatePayoutSourceType {
314    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
315        f.write_str(self.as_str())
316    }
317}
318
319impl std::fmt::Debug for CreatePayoutSourceType {
320    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
321        f.write_str(self.as_str())
322    }
323}
324impl serde::Serialize for CreatePayoutSourceType {
325    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
326    where
327        S: serde::Serializer,
328    {
329        serializer.serialize_str(self.as_str())
330    }
331}
332#[cfg(feature = "deserialize")]
333impl<'de> serde::Deserialize<'de> for CreatePayoutSourceType {
334    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
335        use std::str::FromStr;
336        let s: std::borrow::Cow<'de, str> = serde::Deserialize::deserialize(deserializer)?;
337        Self::from_str(&s)
338            .map_err(|_| serde::de::Error::custom("Unknown value for CreatePayoutSourceType"))
339    }
340}
341/// To send funds to your own bank account, create a new payout object.
342/// Your [Stripe balance](https://stripe.com/docs/api#balance) must cover the payout amount.
343/// If it doesn’t, you receive an “Insufficient Funds” error.
344///
345/// If your API key is in test mode, money won’t actually be sent, though every other action occurs as if you’re in live mode.
346///
347/// If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from.
348/// The [balance object](https://stripe.com/docs/api#balance_object) details available and pending amounts by source type.
349#[derive(Clone, Debug, serde::Serialize)]
350pub struct CreatePayout {
351    inner: CreatePayoutBuilder,
352}
353impl CreatePayout {
354    /// Construct a new `CreatePayout`.
355    pub fn new(amount: impl Into<i64>, currency: impl Into<stripe_types::Currency>) -> Self {
356        Self { inner: CreatePayoutBuilder::new(amount.into(), currency.into()) }
357    }
358    /// An arbitrary string attached to the object. Often useful for displaying to users.
359    pub fn description(mut self, description: impl Into<String>) -> Self {
360        self.inner.description = Some(description.into());
361        self
362    }
363    /// The ID of a bank account or a card to send the payout to.
364    /// If you don't provide a destination, we use the default external account for the specified currency.
365    pub fn destination(mut self, destination: impl Into<String>) -> Self {
366        self.inner.destination = Some(destination.into());
367        self
368    }
369    /// Specifies which fields in the response should be expanded.
370    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
371        self.inner.expand = Some(expand.into());
372        self
373    }
374    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
375    /// This can be useful for storing additional information about the object in a structured format.
376    /// Individual keys can be unset by posting an empty value to them.
377    /// All keys can be unset by posting an empty value to `metadata`.
378    pub fn metadata(
379        mut self,
380        metadata: impl Into<std::collections::HashMap<String, String>>,
381    ) -> Self {
382        self.inner.metadata = Some(metadata.into());
383        self
384    }
385    /// The method used to send this payout, which is `standard` or `instant`.
386    /// We support `instant` for payouts to debit cards and bank accounts in certain countries.
387    /// Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks).
388    pub fn method(mut self, method: impl Into<CreatePayoutMethod>) -> Self {
389        self.inner.method = Some(method.into());
390        self
391    }
392    /// The ID of a v2 FinancialAccount to send funds to.
393    pub fn payout_method(mut self, payout_method: impl Into<String>) -> Self {
394        self.inner.payout_method = Some(payout_method.into());
395        self
396    }
397    /// The balance type of your Stripe balance to draw this payout from.
398    /// Balances for different payment sources are kept separately.
399    /// You can find the amounts with the Balances API.
400    /// One of `bank_account`, `card`, or `fpx`.
401    pub fn source_type(mut self, source_type: impl Into<CreatePayoutSourceType>) -> Self {
402        self.inner.source_type = Some(source_type.into());
403        self
404    }
405    /// A string that displays on the recipient's bank or card statement (up to 22 characters).
406    /// A `statement_descriptor` that's longer than 22 characters return an error.
407    /// Most banks truncate this information and display it inconsistently.
408    /// Some banks might not display it at all.
409    pub fn statement_descriptor(mut self, statement_descriptor: impl Into<String>) -> Self {
410        self.inner.statement_descriptor = Some(statement_descriptor.into());
411        self
412    }
413}
414impl CreatePayout {
415    /// Send the request and return the deserialized response.
416    pub async fn send<C: StripeClient>(
417        &self,
418        client: &C,
419    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
420        self.customize().send(client).await
421    }
422
423    /// Send the request and return the deserialized response, blocking until completion.
424    pub fn send_blocking<C: StripeBlockingClient>(
425        &self,
426        client: &C,
427    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
428        self.customize().send_blocking(client)
429    }
430}
431
432impl StripeRequest for CreatePayout {
433    type Output = stripe_shared::Payout;
434
435    fn build(&self) -> RequestBuilder {
436        RequestBuilder::new(StripeMethod::Post, "/payouts").form(&self.inner)
437    }
438}
439#[derive(Clone, Debug, serde::Serialize)]
440struct UpdatePayoutBuilder {
441    #[serde(skip_serializing_if = "Option::is_none")]
442    expand: Option<Vec<String>>,
443    #[serde(skip_serializing_if = "Option::is_none")]
444    metadata: Option<std::collections::HashMap<String, String>>,
445}
446impl UpdatePayoutBuilder {
447    fn new() -> Self {
448        Self { expand: None, metadata: None }
449    }
450}
451/// Updates the specified payout by setting the values of the parameters you pass.
452/// We don’t change parameters that you don’t provide.
453/// This request only accepts the metadata as arguments.
454#[derive(Clone, Debug, serde::Serialize)]
455pub struct UpdatePayout {
456    inner: UpdatePayoutBuilder,
457    payout: stripe_shared::PayoutId,
458}
459impl UpdatePayout {
460    /// Construct a new `UpdatePayout`.
461    pub fn new(payout: impl Into<stripe_shared::PayoutId>) -> Self {
462        Self { payout: payout.into(), inner: UpdatePayoutBuilder::new() }
463    }
464    /// Specifies which fields in the response should be expanded.
465    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
466        self.inner.expand = Some(expand.into());
467        self
468    }
469    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
470    /// This can be useful for storing additional information about the object in a structured format.
471    /// Individual keys can be unset by posting an empty value to them.
472    /// All keys can be unset by posting an empty value to `metadata`.
473    pub fn metadata(
474        mut self,
475        metadata: impl Into<std::collections::HashMap<String, String>>,
476    ) -> Self {
477        self.inner.metadata = Some(metadata.into());
478        self
479    }
480}
481impl UpdatePayout {
482    /// Send the request and return the deserialized response.
483    pub async fn send<C: StripeClient>(
484        &self,
485        client: &C,
486    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
487        self.customize().send(client).await
488    }
489
490    /// Send the request and return the deserialized response, blocking until completion.
491    pub fn send_blocking<C: StripeBlockingClient>(
492        &self,
493        client: &C,
494    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
495        self.customize().send_blocking(client)
496    }
497}
498
499impl StripeRequest for UpdatePayout {
500    type Output = stripe_shared::Payout;
501
502    fn build(&self) -> RequestBuilder {
503        let payout = &self.payout;
504        RequestBuilder::new(StripeMethod::Post, format!("/payouts/{payout}")).form(&self.inner)
505    }
506}
507#[derive(Clone, Debug, serde::Serialize)]
508struct CancelPayoutBuilder {
509    #[serde(skip_serializing_if = "Option::is_none")]
510    expand: Option<Vec<String>>,
511}
512impl CancelPayoutBuilder {
513    fn new() -> Self {
514        Self { expand: None }
515    }
516}
517/// You can cancel a previously created payout if its status is `pending`.
518/// Stripe refunds the funds to your available balance.
519/// You can’t cancel automatic Stripe payouts.
520#[derive(Clone, Debug, serde::Serialize)]
521pub struct CancelPayout {
522    inner: CancelPayoutBuilder,
523    payout: stripe_shared::PayoutId,
524}
525impl CancelPayout {
526    /// Construct a new `CancelPayout`.
527    pub fn new(payout: impl Into<stripe_shared::PayoutId>) -> Self {
528        Self { payout: payout.into(), inner: CancelPayoutBuilder::new() }
529    }
530    /// Specifies which fields in the response should be expanded.
531    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
532        self.inner.expand = Some(expand.into());
533        self
534    }
535}
536impl CancelPayout {
537    /// Send the request and return the deserialized response.
538    pub async fn send<C: StripeClient>(
539        &self,
540        client: &C,
541    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
542        self.customize().send(client).await
543    }
544
545    /// Send the request and return the deserialized response, blocking until completion.
546    pub fn send_blocking<C: StripeBlockingClient>(
547        &self,
548        client: &C,
549    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
550        self.customize().send_blocking(client)
551    }
552}
553
554impl StripeRequest for CancelPayout {
555    type Output = stripe_shared::Payout;
556
557    fn build(&self) -> RequestBuilder {
558        let payout = &self.payout;
559        RequestBuilder::new(StripeMethod::Post, format!("/payouts/{payout}/cancel"))
560            .form(&self.inner)
561    }
562}
563#[derive(Clone, Debug, serde::Serialize)]
564struct ReversePayoutBuilder {
565    #[serde(skip_serializing_if = "Option::is_none")]
566    expand: Option<Vec<String>>,
567    #[serde(skip_serializing_if = "Option::is_none")]
568    metadata: Option<std::collections::HashMap<String, String>>,
569}
570impl ReversePayoutBuilder {
571    fn new() -> Self {
572        Self { expand: None, metadata: None }
573    }
574}
575/// Reverses a payout by debiting the destination bank account.
576/// At this time, you can only reverse payouts for connected accounts to US bank accounts.
577/// If the payout is manual and in the `pending` status, use `/v1/payouts/:id/cancel` instead.
578///
579/// By requesting a reversal through `/v1/payouts/:id/reverse`, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required.
580#[derive(Clone, Debug, serde::Serialize)]
581pub struct ReversePayout {
582    inner: ReversePayoutBuilder,
583    payout: stripe_shared::PayoutId,
584}
585impl ReversePayout {
586    /// Construct a new `ReversePayout`.
587    pub fn new(payout: impl Into<stripe_shared::PayoutId>) -> Self {
588        Self { payout: payout.into(), inner: ReversePayoutBuilder::new() }
589    }
590    /// Specifies which fields in the response should be expanded.
591    pub fn expand(mut self, expand: impl Into<Vec<String>>) -> Self {
592        self.inner.expand = Some(expand.into());
593        self
594    }
595    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
596    /// This can be useful for storing additional information about the object in a structured format.
597    /// Individual keys can be unset by posting an empty value to them.
598    /// All keys can be unset by posting an empty value to `metadata`.
599    pub fn metadata(
600        mut self,
601        metadata: impl Into<std::collections::HashMap<String, String>>,
602    ) -> Self {
603        self.inner.metadata = Some(metadata.into());
604        self
605    }
606}
607impl ReversePayout {
608    /// Send the request and return the deserialized response.
609    pub async fn send<C: StripeClient>(
610        &self,
611        client: &C,
612    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
613        self.customize().send(client).await
614    }
615
616    /// Send the request and return the deserialized response, blocking until completion.
617    pub fn send_blocking<C: StripeBlockingClient>(
618        &self,
619        client: &C,
620    ) -> Result<<Self as StripeRequest>::Output, C::Err> {
621        self.customize().send_blocking(client)
622    }
623}
624
625impl StripeRequest for ReversePayout {
626    type Output = stripe_shared::Payout;
627
628    fn build(&self) -> RequestBuilder {
629        let payout = &self.payout;
630        RequestBuilder::new(StripeMethod::Post, format!("/payouts/{payout}/reverse"))
631            .form(&self.inner)
632    }
633}