Skip to main content

autogen_squareup/models/
charge_request_additional_recipient.rs

1/*
2 * Square
3 *
4 * Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.
5 *
6 * The version of the OpenAPI document: 2.0
7 * Contact: developers@squareup.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ChargeRequestAdditionalRecipient : Represents an additional recipient (other than the merchant) entitled to a portion of the tender. Support is currently limited to USD, CAD and GBP currencies
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ChargeRequestAdditionalRecipient {
17    /// The location ID for a recipient (other than the merchant) receiving a portion of the tender.
18    #[serde(rename = "location_id")]
19    pub location_id: String,
20    /// The description of the additional recipient.
21    #[serde(rename = "description")]
22    pub description: String,
23    #[serde(rename = "amount_money")]
24    pub amount_money: Box<models::Money>,
25}
26
27impl ChargeRequestAdditionalRecipient {
28    /// Represents an additional recipient (other than the merchant) entitled to a portion of the tender. Support is currently limited to USD, CAD and GBP currencies
29    pub fn new(location_id: String, description: String, amount_money: models::Money) -> ChargeRequestAdditionalRecipient {
30        ChargeRequestAdditionalRecipient {
31            location_id,
32            description,
33            amount_money: Box::new(amount_money),
34        }
35    }
36}
37