square_api_client/models/enums/invoice_automatic_payment_source.rs
1//! Model for InvoiceAutomaticPaymentSource enum.
2
3use serde::{Deserialize, Serialize};
4
5/// Indicates the automatic payment method for an invoice payment request.
6#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
7#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
8pub enum InvoiceAutomaticPaymentSource {
9 /// An automatic payment is not configured for the payment request.
10 None,
11 /// Use a card on file as the automatic payment method. On the due date, Square charges the card
12 /// for the amount of the payment request.
13 ///
14 /// For `CARD_ON_FILE` payments, the invoice delivery method must be `EMAIL` and `card_id` must
15 /// be specified for the payment request before the invoice can be published.
16 CardOnFile,
17 /// Use a bank account on file as the automatic payment method. On the due date, Square charges
18 /// the bank account for the amount of the payment request.
19 ///
20 /// This payment method applies only to recurring invoices that sellers create in the Seller
21 /// Dashboard or other Square first-party applications. The bank account is provided by the
22 /// customer during the payment flow.
23 ///
24 /// You cannot set `BANK_ON_FILE` as a payment method using the Invoices API, but you can change
25 /// a `BANK_ON_FILE` payment method to `NONE` or `CARD_ON_FILE`. For `BANK_ON_FILE` payments,
26 /// the invoice delivery method must be `EMAIL`.
27 BankOnFile,
28}