-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_transaction.go
35 lines (33 loc) · 2.23 KB
/
model_transaction.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
/*
* 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 transaction processed with Square, either with the Connect API or with Square Point of Sale. The `tenders` field of this object lists all methods of payment used to pay in the transaction.
type Transaction struct {
// The transaction's unique ID, issued by Square payments servers.
Id string `json:"id,omitempty"`
// The ID of the transaction's associated location.
LocationId string `json:"location_id,omitempty"`
// The timestamp for when the transaction was created, in RFC 3339 format.
CreatedAt string `json:"created_at,omitempty"`
// The tenders used to pay in the transaction.
Tenders []Tender `json:"tenders,omitempty"`
// Refunds that have been applied to any tender in the transaction.
Refunds []Refund `json:"refunds,omitempty"`
// If the transaction was created with the [Charge](https://developer.squareup.com/reference/square_2023-12-13/transactions-api/charge) endpoint, this value is the same as the value provided for the `reference_id` parameter in the request to that endpoint. Otherwise, it is not set.
ReferenceId string `json:"reference_id,omitempty"`
// The Square product that processed the transaction.
Product string `json:"product,omitempty"`
// If the transaction was created in the Square Point of Sale app, this value is the ID generated for the transaction by Square Point of Sale. This ID has no relationship to the transaction's canonical `id`, which is generated by Square's backend servers. This value is generated for bookkeeping purposes, in case the transaction cannot immediately be completed (for example, if the transaction is processed in offline mode). It is not currently possible with the Connect API to perform a transaction lookup by this value.
ClientId string `json:"client_id,omitempty"`
// The shipping address provided in the request, if any.
ShippingAddress *Address `json:"shipping_address,omitempty"`
// The order_id is an identifier for the order associated with this transaction, if any.
OrderId string `json:"order_id,omitempty"`
}