Skip to main content

autogen_squareup/models/
bulk_update_customers_request.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/// BulkUpdateCustomersRequest : Defines the body parameters that can be included in requests to the [BulkUpdateCustomers](api-endpoint:Customers-BulkUpdateCustomers) endpoint.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BulkUpdateCustomersRequest {
17    /// A map of 1 to 100 individual update requests, represented by `customer ID: { customer data }` key-value pairs.  Each key is the ID of the [customer profile](entity:Customer) to update. To update a customer profile that was created by merging existing profiles, provide the ID of the newly created profile.  Each value contains the updated customer data. Only new or changed fields are required. To add or update a field, specify the new value. To remove a field, specify `null`.
18    #[serde(rename = "customers")]
19    pub customers: std::collections::HashMap<String, models::BulkUpdateCustomerData>,
20}
21
22impl BulkUpdateCustomersRequest {
23    /// Defines the body parameters that can be included in requests to the [BulkUpdateCustomers](api-endpoint:Customers-BulkUpdateCustomers) endpoint.
24    pub fn new(customers: std::collections::HashMap<String, models::BulkUpdateCustomerData>) -> BulkUpdateCustomersRequest {
25        BulkUpdateCustomersRequest {
26            customers,
27        }
28    }
29}
30