-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_tender.go
49 lines (47 loc) · 3.19 KB
/
model_tender.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* Square Connect API
*
* Client library for accessing the Square Connect APIs
*
* API version: 2.0
* Contact: developers@squareup.com
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package models
// Represents a tender (i.e., a method of payment) used in a Square transaction.
type Tender struct {
// The tender's unique ID. It is the associated payment ID.
Id string `json:"id,omitempty"`
// The ID of the transaction's associated location.
LocationId string `json:"location_id,omitempty"`
// The ID of the tender's associated transaction.
TransactionId string `json:"transaction_id,omitempty"`
// The timestamp for when the tender was created, in RFC 3339 format.
CreatedAt string `json:"created_at,omitempty"`
// An optional note associated with the tender at the time of payment.
Note string `json:"note,omitempty"`
// The total amount of the tender, including `tip_money`. If the tender has a `payment_id`, the `total_money` of the corresponding [Payment](https://developer.squareup.com/reference/square_2023-12-13/objects/Payment) will be equal to the `amount_money` of the tender.
AmountMoney *Money `json:"amount_money,omitempty"`
// The tip's amount of the tender.
TipMoney *Money `json:"tip_money,omitempty"`
// The amount of any Square processing fees applied to the tender. This field is not immediately populated when a new transaction is created. It is usually available after about ten seconds.
ProcessingFeeMoney *Money `json:"processing_fee_money,omitempty"`
// If the tender is associated with a customer or represents a customer's card on file, this is the ID of the associated customer.
CustomerId string `json:"customer_id,omitempty"`
// The type of tender, such as `CARD` or `CASH`.
Type_ string `json:"type"`
// The details of the card tender. This value is present only if the value of `type` is `CARD`.
CardDetails *TenderCardDetails `json:"card_details,omitempty"`
// The details of the cash tender. This value is present only if the value of `type` is `CASH`.
CashDetails *TenderCashDetails `json:"cash_details,omitempty"`
// The details of the bank account tender. This value is present only if the value of `type` is `BANK_ACCOUNT`.
BankAccountDetails *TenderBankAccountDetails `json:"bank_account_details,omitempty"`
// The details of a Buy Now Pay Later tender. This value is present only if the value of `type` is `BUY_NOW_PAY_LATER`.
BuyNowPayLaterDetails *TenderBuyNowPayLaterDetails `json:"buy_now_pay_later_details,omitempty"`
// The details of a Square Account tender. This value is present only if the value of `type` is `SQUARE_ACCOUNT`.
SquareAccountDetails *TenderSquareAccountDetails `json:"square_account_details,omitempty"`
// Additional recipients (other than the merchant) receiving a portion of this tender. For example, fees assessed on the purchase by a third party integration.
AdditionalRecipients []AdditionalRecipient `json:"additional_recipients,omitempty"`
// The ID of the [Payment](https://developer.squareup.com/reference/square_2023-12-13/objects/Payment) that corresponds to this tender. This value is only present for payments created with the v2 Payments API.
PaymentId string `json:"payment_id,omitempty"`
}