models

package
v0.0.0-...-dc3cc4a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptDisputeRequest

type AcceptDisputeRequest interface{}

AcceptDisputeRequest Defines the request parameters for the `AcceptDispute` endpoint. Example: {"request_body":{}}

swagger:model AcceptDisputeRequest

type AcceptDisputeResponse

type AcceptDisputeResponse struct {

	// Details about the accepted dispute.
	Dispute *Dispute `json:"dispute,omitempty"`

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`
}

AcceptDisputeResponse Defines the fields in an `AcceptDispute` response. Example: {"dispute":{"amount_money":{"amount":2000,"currency":"USD"},"brand_dispute_id":"100000282394","card_brand":"visa","created_at":"2018-10-18T15:59:13.613Z","dispute_id":"XDgyFu7yo1E2S5lQGGpYn","disputed_payments":[{"payment_id":"6Ee10wvqhfipStz297mtUhBXvaB"}],"due_at":"2018-11-01T00:00:00.000Z","reason":"NO_KNOWLEDGE","state":"LOST","updated_at":"2018-10-18T15:59:13.613Z"}}

swagger:model AcceptDisputeResponse

func (*AcceptDisputeResponse) ContextValidate

func (m *AcceptDisputeResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this accept dispute response based on the context it is used

func (*AcceptDisputeResponse) MarshalBinary

func (m *AcceptDisputeResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AcceptDisputeResponse) UnmarshalBinary

func (m *AcceptDisputeResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AcceptDisputeResponse) Validate

func (m *AcceptDisputeResponse) Validate(formats strfmt.Registry) error

Validate validates this accept dispute response

type AccumulateLoyaltyPointsRequest

type AccumulateLoyaltyPointsRequest struct {

	// The points to add to the account.
	// If you are using the Orders API to manage orders, you
	// specify the order ID. Otherwise, specify the
	// points to add.
	// Required: true
	AccumulatePoints *LoyaltyEventAccumulatePoints `json:"accumulate_points"`

	// A unique string that identifies the `AccumulateLoyaltyPoints` request.
	// Keys can be any valid string but must be unique for every request.
	// Required: true
	// Max Length: 128
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`

	// The `location` where the purchase was made.
	// Required: true
	LocationID *string `json:"location_id"`
}

AccumulateLoyaltyPointsRequest A request to accumulate points for a purchase. Example: {"request_body":{"accumulate_points":{"order_id":"RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY"},"idempotency_key":"58b90739-c3e8-4b11-85f7-e636d48d72cb","location_id":"P034NEENMD09F"},"request_params":"?account_id=5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd"}

swagger:model AccumulateLoyaltyPointsRequest

func (*AccumulateLoyaltyPointsRequest) ContextValidate

func (m *AccumulateLoyaltyPointsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this accumulate loyalty points request based on the context it is used

func (*AccumulateLoyaltyPointsRequest) MarshalBinary

func (m *AccumulateLoyaltyPointsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AccumulateLoyaltyPointsRequest) UnmarshalBinary

func (m *AccumulateLoyaltyPointsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AccumulateLoyaltyPointsRequest) Validate

func (m *AccumulateLoyaltyPointsRequest) Validate(formats strfmt.Registry) error

Validate validates this accumulate loyalty points request

type AccumulateLoyaltyPointsResponse

type AccumulateLoyaltyPointsResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The resulting loyalty event.
	Event *LoyaltyEvent `json:"event,omitempty"`
}

AccumulateLoyaltyPointsResponse A response containing the resulting loyalty event. Example: {"event":{"accumulate_points":{"loyalty_program_id":"d619f755-2d17-41f3-990d-c04ecedd64dd","order_id":"RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY","points":6},"created_at":"2020-05-08T21:41:12Z","id":"ee46aafd-1af6-3695-a385-276e2ef0be26","location_id":"P034NEENMD09F","loyalty_account_id":"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd","source":"LOYALTY_API","type":"ACCUMULATE_POINTS"}}

swagger:model AccumulateLoyaltyPointsResponse

func (*AccumulateLoyaltyPointsResponse) ContextValidate

func (m *AccumulateLoyaltyPointsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this accumulate loyalty points response based on the context it is used

func (*AccumulateLoyaltyPointsResponse) MarshalBinary

func (m *AccumulateLoyaltyPointsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AccumulateLoyaltyPointsResponse) UnmarshalBinary

func (m *AccumulateLoyaltyPointsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AccumulateLoyaltyPointsResponse) Validate

Validate validates this accumulate loyalty points response

type ActionCancelReason

type ActionCancelReason string

ActionCancelReason action cancel reason

swagger:model ActionCancelReason

const (

	// ActionCancelReasonBUYERCANCELED captures enum value "BUYER_CANCELED"
	ActionCancelReasonBUYERCANCELED ActionCancelReason = "BUYER_CANCELED"

	// ActionCancelReasonSELLERCANCELED captures enum value "SELLER_CANCELED"
	ActionCancelReasonSELLERCANCELED ActionCancelReason = "SELLER_CANCELED"

	// ActionCancelReasonTIMEDOUT captures enum value "TIMED_OUT"
	ActionCancelReasonTIMEDOUT ActionCancelReason = "TIMED_OUT"
)

func (ActionCancelReason) ContextValidate

func (m ActionCancelReason) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this action cancel reason based on context it is used

func (ActionCancelReason) Validate

func (m ActionCancelReason) Validate(formats strfmt.Registry) error

Validate validates this action cancel reason

type AddGroupToCustomerRequest

type AddGroupToCustomerRequest interface{}

AddGroupToCustomerRequest Defines the fields that are included in the request body of a request to the [AddGroupToCustomer](#endpoint-addgrouptocustomer) endpoint. Example: {"request_body":{}}

swagger:model AddGroupToCustomerRequest

type AddGroupToCustomerResponse

type AddGroupToCustomerResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

AddGroupToCustomerResponse Defines the fields that are included in the response body of a request to the [AddGroupToCustomer](#endpoint-addgrouptocustomer) endpoint. Example: {}

swagger:model AddGroupToCustomerResponse

func (*AddGroupToCustomerResponse) ContextValidate

func (m *AddGroupToCustomerResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this add group to customer response based on the context it is used

func (*AddGroupToCustomerResponse) MarshalBinary

func (m *AddGroupToCustomerResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AddGroupToCustomerResponse) UnmarshalBinary

func (m *AddGroupToCustomerResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AddGroupToCustomerResponse) Validate

func (m *AddGroupToCustomerResponse) Validate(formats strfmt.Registry) error

Validate validates this add group to customer response

type AdditionalRecipient

type AdditionalRecipient struct {

	// The amount of money distributed to the recipient.
	// Required: true
	AmountMoney *Money `json:"amount_money"`

	// The description of the additional recipient.
	// Required: true
	// Max Length: 100
	// Min Length: 1
	Description *string `json:"description"`

	// The location ID for a recipient (other than the merchant) receiving a portion of this tender.
	// Required: true
	// Max Length: 50
	// Min Length: 1
	LocationID *string `json:"location_id"`

	// The unique ID for this `AdditionalRecipientReceivable`, assigned by the server.
	// Max Length: 192
	ReceivableID string `json:"receivable_id,omitempty"`
}

AdditionalRecipient Represents an additional recipient (other than the merchant) receiving a portion of this tender.

swagger:model AdditionalRecipient

func (*AdditionalRecipient) ContextValidate

func (m *AdditionalRecipient) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this additional recipient based on the context it is used

func (*AdditionalRecipient) MarshalBinary

func (m *AdditionalRecipient) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AdditionalRecipient) UnmarshalBinary

func (m *AdditionalRecipient) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AdditionalRecipient) Validate

func (m *AdditionalRecipient) Validate(formats strfmt.Registry) error

Validate validates this additional recipient

type Address

type Address struct {

	// The first line of the address.
	//
	// Fields that start with `address_line` provide the address's most specific
	// details, like street number, street name, and building name. They do *not*
	// provide less specific details like city, state/province, or country (these
	// details are provided in other fields).
	AddressLine1 string `json:"address_line_1,omitempty"`

	// The second line of the address, if any.
	AddressLine2 string `json:"address_line_2,omitempty"`

	// The third line of the address, if any.
	AddressLine3 string `json:"address_line_3,omitempty"`

	// A civil entity within the address's country. In the US, this
	// is the state.
	AdministrativeDistrictLevel1 string `json:"administrative_district_level_1,omitempty"`

	// A civil entity within the address's `administrative_district_level_1`.
	// In the US, this is the county.
	AdministrativeDistrictLevel2 string `json:"administrative_district_level_2,omitempty"`

	// A civil entity within the address's `administrative_district_level_2`,
	// if any.
	AdministrativeDistrictLevel3 string `json:"administrative_district_level_3,omitempty"`

	// The address's country, in ISO 3166-1-alpha-2 format.
	// See [Country](#type-country) for possible values
	Country string `json:"country,omitempty"`

	// Optional first name when it's representing recipient.
	FirstName string `json:"first_name,omitempty"`

	// Optional last name when it's representing recipient.
	LastName string `json:"last_name,omitempty"`

	// The city or town of the address.
	Locality string `json:"locality,omitempty"`

	// Optional organization name when it's representing recipient.
	Organization string `json:"organization,omitempty"`

	// The address's postal code.
	PostalCode string `json:"postal_code,omitempty"`

	// A civil region within the address's `locality`, if any.
	Sublocality string `json:"sublocality,omitempty"`

	// A civil region within the address's `sublocality`, if any.
	Sublocality2 string `json:"sublocality_2,omitempty"`

	// A civil region within the address's `sublocality_2`, if any.
	Sublocality3 string `json:"sublocality_3,omitempty"`
}

Address Represents a physical address.

swagger:model Address

func (*Address) ContextValidate

func (m *Address) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this address based on context it is used

func (*Address) MarshalBinary

func (m *Address) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Address) UnmarshalBinary

func (m *Address) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Address) Validate

func (m *Address) Validate(formats strfmt.Registry) error

Validate validates this address

type AdjustLoyaltyPointsRequest

type AdjustLoyaltyPointsRequest struct {

	// The points to adjust (add or subtract) and the reason for the adjustment.
	// Required: true
	AdjustPoints *LoyaltyEventAdjustPoints `json:"adjust_points"`

	// A unique string that identifies this `AdjustLoyaltyPoints` request.
	// Keys can be any valid string, but must be unique for every request.
	// Required: true
	// Max Length: 128
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`
}

AdjustLoyaltyPointsRequest A request to adjust (add or subtract) points manually. Example: {"request_body":{"adjust":{"points":10,"reason":"Complimentary points"},"idempotency_key":"bc29a517-3dc9-450e-aa76-fae39ee849d1"},"request_params":"?account_id=5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd"}

swagger:model AdjustLoyaltyPointsRequest

func (*AdjustLoyaltyPointsRequest) ContextValidate

func (m *AdjustLoyaltyPointsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this adjust loyalty points request based on the context it is used

func (*AdjustLoyaltyPointsRequest) MarshalBinary

func (m *AdjustLoyaltyPointsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AdjustLoyaltyPointsRequest) UnmarshalBinary

func (m *AdjustLoyaltyPointsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AdjustLoyaltyPointsRequest) Validate

func (m *AdjustLoyaltyPointsRequest) Validate(formats strfmt.Registry) error

Validate validates this adjust loyalty points request

type AdjustLoyaltyPointsResponse

type AdjustLoyaltyPointsResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The resulting event data for adjusting points.
	Event *LoyaltyEvent `json:"event,omitempty"`
}

AdjustLoyaltyPointsResponse A response that includes the loyalty event that resulted from the successful API call. Example: {"event":{"adjust_points":{"loyalty_program_id":"d619f755-2d17-41f3-990d-c04ecedd64dd","points":10,"reason":"Complimentary points"},"created_at":"2020-05-08T21:42:32Z","id":"613a6fca-8d67-39d0-bad2-3b4bc45c8637","loyalty_account_id":"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd","source":"LOYALTY_API","type":"ADJUST_POINTS"}}

swagger:model AdjustLoyaltyPointsResponse

func (*AdjustLoyaltyPointsResponse) ContextValidate

func (m *AdjustLoyaltyPointsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this adjust loyalty points response based on the context it is used

func (*AdjustLoyaltyPointsResponse) MarshalBinary

func (m *AdjustLoyaltyPointsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AdjustLoyaltyPointsResponse) UnmarshalBinary

func (m *AdjustLoyaltyPointsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AdjustLoyaltyPointsResponse) Validate

func (m *AdjustLoyaltyPointsResponse) Validate(formats strfmt.Registry) error

Validate validates this adjust loyalty points response

type AppointmentSegment

type AppointmentSegment struct {

	// The time span in minutes of an appointment segment.
	// Required: true
	// Maximum: 1500
	// Minimum: 0
	DurationMinutes *int64 `json:"duration_minutes"`

	// The ID of the `CatalogItemVariation` object representing the service booked in this segment.
	// Required: true
	// Min Length: 1
	ServiceVariationID *string `json:"service_variation_id"`

	// The current version of the item variation representing the service booked in this segment.
	// Required: true
	ServiceVariationVersion *int64 `json:"service_variation_version"`

	// The ID of the `TeamMember` object representing the team member booked in this segment.
	// Required: true
	// Min Length: 1
	TeamMemberID *string `json:"team_member_id"`
}

AppointmentSegment Defines an appointment segment of a booking.

swagger:model AppointmentSegment

func (*AppointmentSegment) ContextValidate

func (m *AppointmentSegment) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this appointment segment based on context it is used

func (*AppointmentSegment) MarshalBinary

func (m *AppointmentSegment) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AppointmentSegment) UnmarshalBinary

func (m *AppointmentSegment) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AppointmentSegment) Validate

func (m *AppointmentSegment) Validate(formats strfmt.Registry) error

Validate validates this appointment segment

type Availability

type Availability struct {

	// The list of appointment segments available for booking
	AppointmentSegments []*AppointmentSegment `json:"appointment_segments"`

	// The ID of the location available for booking.
	LocationID string `json:"location_id,omitempty"`

	// The RFC-3339 timestamp specifying the beginning time of the slot available for booking.
	StartAt string `json:"start_at,omitempty"`
}

Availability Describes a slot available for booking, encapsulating appointment segments, the location and starting time.

swagger:model Availability

func (*Availability) ContextValidate

func (m *Availability) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this availability based on the context it is used

func (*Availability) MarshalBinary

func (m *Availability) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Availability) UnmarshalBinary

func (m *Availability) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Availability) Validate

func (m *Availability) Validate(formats strfmt.Registry) error

Validate validates this availability

type BalancePaymentDetails

type BalancePaymentDetails struct {

	// The ID of the account used to fund the payment.
	AccountID string `json:"account_id,omitempty"`

	// The balance payment’s current state. The state can be COMPLETED or FAILED.
	Status string `json:"status,omitempty"`
}

BalancePaymentDetails Reflects the current status of a balance payment.

swagger:model BalancePaymentDetails

func (*BalancePaymentDetails) ContextValidate

func (m *BalancePaymentDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this balance payment details based on context it is used

func (*BalancePaymentDetails) MarshalBinary

func (m *BalancePaymentDetails) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BalancePaymentDetails) UnmarshalBinary

func (m *BalancePaymentDetails) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BalancePaymentDetails) Validate

func (m *BalancePaymentDetails) Validate(formats strfmt.Registry) error

Validate validates this balance payment details

type BankAccount

type BankAccount struct {

	// The last few digits of the account number.
	// Required: true
	// Min Length: 1
	AccountNumberSuffix *string `json:"account_number_suffix"`

	// The financial purpose of the associated bank account.
	// See [BankAccountType](#type-bankaccounttype) for possible values
	// Required: true
	AccountType *string `json:"account_type"`

	// Read only. Name of actual financial institution.
	// For example "Bank of America".
	// Max Length: 100
	BankName string `json:"bank_name,omitempty"`

	// The ISO 3166 Alpha-2 country code where the bank account is based.
	// See [Country](#type-country) for possible values
	// Required: true
	Country *string `json:"country"`

	// Indicates whether it is possible for Square to send money to this bank account.
	// Required: true
	Creditable *bool `json:"creditable"`

	// The 3-character ISO 4217 currency code indicating the operating
	// currency of the bank account. For example, the currency code for US dollars
	// is `USD`.
	// See [Currency](#type-currency) for possible values
	// Required: true
	Currency *string `json:"currency"`

	// Reference identifier that will be displayed to UK bank account owners
	// when collecting direct debit authorization. Only required for UK bank accounts.
	DebitMandateReferenceID string `json:"debit_mandate_reference_id,omitempty"`

	// Indicates whether it is possible for Square to take money from this
	// bank account.
	// Required: true
	Debitable *bool `json:"debitable"`

	// A Square-assigned, unique identifier for the bank account based on the
	// account information. The account fingerprint can be used to compare account
	// entries and determine if the they represent the same real-world bank account.
	Fingerprint string `json:"fingerprint,omitempty"`

	// Name of the account holder. This name must match the name
	// on the targeted bank account record.
	// Required: true
	// Min Length: 1
	HolderName *string `json:"holder_name"`

	// The unique, Square-issued identifier for the bank account.
	// Required: true
	// Max Length: 30
	// Min Length: 1
	ID *string `json:"id"`

	// The location to which the bank account belongs.
	LocationID string `json:"location_id,omitempty"`

	// Primary identifier for the bank. For more information, see
	// [Bank Accounts API](https://developer.squareup.com/docs/docs/bank-accounts-api).
	// Required: true
	// Max Length: 40
	PrimaryBankIdentificationNumber *string `json:"primary_bank_identification_number"`

	// Client-provided identifier for linking the banking account to an entity
	// in a third-party system (for example, a bank account number or a user identifier).
	ReferenceID string `json:"reference_id,omitempty"`

	// Secondary identifier for the bank. For more information, see
	// [Bank Accounts API](https://developer.squareup.com/docs/docs/bank-accounts-api).
	// Max Length: 40
	SecondaryBankIdentificationNumber string `json:"secondary_bank_identification_number,omitempty"`

	// Read-only. The current verification status of this BankAccount object.
	// See [BankAccountStatus](#type-bankaccountstatus) for possible values
	// Required: true
	Status *string `json:"status"`

	// The current version of the `BankAccount`.
	Version int64 `json:"version,omitempty"`
}

BankAccount Represents a bank account. For more information about linking a bank account to a Square account, see [Bank Accounts API](/docs/bank-accounts-api).

swagger:model BankAccount

func (*BankAccount) ContextValidate

func (m *BankAccount) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this bank account based on context it is used

func (*BankAccount) MarshalBinary

func (m *BankAccount) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BankAccount) UnmarshalBinary

func (m *BankAccount) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BankAccount) Validate

func (m *BankAccount) Validate(formats strfmt.Registry) error

Validate validates this bank account

type BankAccountStatus

type BankAccountStatus string

BankAccountStatus Indicates the current verification status of a `BankAccount` object.

swagger:model BankAccountStatus

const (

	// BankAccountStatusVERIFICATIONINPROGRESS captures enum value "VERIFICATION_IN_PROGRESS"
	BankAccountStatusVERIFICATIONINPROGRESS BankAccountStatus = "VERIFICATION_IN_PROGRESS"

	// BankAccountStatusVERIFIED captures enum value "VERIFIED"
	BankAccountStatusVERIFIED BankAccountStatus = "VERIFIED"

	// BankAccountStatusDISABLED captures enum value "DISABLED"
	BankAccountStatusDISABLED BankAccountStatus = "DISABLED"
)

func (BankAccountStatus) ContextValidate

func (m BankAccountStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this bank account status based on context it is used

func (BankAccountStatus) Validate

func (m BankAccountStatus) Validate(formats strfmt.Registry) error

Validate validates this bank account status

type BankAccountType

type BankAccountType string

BankAccountType Indicates the financial purpose of the bank account.

swagger:model BankAccountType

const (

	// BankAccountTypeCHECKING captures enum value "CHECKING"
	BankAccountTypeCHECKING BankAccountType = "CHECKING"

	// BankAccountTypeSAVINGS captures enum value "SAVINGS"
	BankAccountTypeSAVINGS BankAccountType = "SAVINGS"

	// BankAccountTypeINVESTMENT captures enum value "INVESTMENT"
	BankAccountTypeINVESTMENT BankAccountType = "INVESTMENT"

	// BankAccountTypeOTHER captures enum value "OTHER"
	BankAccountTypeOTHER BankAccountType = "OTHER"

	// BankAccountTypeBUSINESSCHECKING captures enum value "BUSINESS_CHECKING"
	BankAccountTypeBUSINESSCHECKING BankAccountType = "BUSINESS_CHECKING"
)

func (BankAccountType) ContextValidate

func (m BankAccountType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this bank account type based on context it is used

func (BankAccountType) Validate

func (m BankAccountType) Validate(formats strfmt.Registry) error

Validate validates this bank account type

type BatchChangeInventoryRequest

type BatchChangeInventoryRequest struct {

	// The set of physical counts and inventory adjustments to be made.
	// Changes are applied based on the client-supplied timestamp and may be sent
	// out of order.
	Changes []*InventoryChange `json:"changes"`

	// A client-supplied, universally unique identifier (UUID) for the
	// request.
	//
	// See [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency) in the
	// [API Development 101](https://developer.squareup.com/docs/basics/api101/overview) section for more
	// information.
	IdempotencyKey string `json:"idempotency_key,omitempty"`

	// Indicates whether the current physical count should be ignored if
	// the quantity is unchanged since the last physical count. Default: `true`.
	IgnoreUnchangedCounts bool `json:"ignore_unchanged_counts,omitempty"`
}

BatchChangeInventoryRequest batch change inventory request Example: {"request_body":{"changes":[{"physical_count":{"catalog_object_id":"W62UWFY35CWMYGVWK6TWJDNI","employee_id":"LRK57NSQ5X7PUD05","location_id":"C6W5YS5QM06F5","occurred_at":"2016-11-16T22:25:24.878Z","quantity":"53","reference_id":"1536bfbf-efed-48bf-b17d-a197141b2a92","state":"IN_STOCK"},"type":"PHYSICAL_COUNT"}],"idempotency_key":"8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe","ignore_unchanged_counts":true}}

swagger:model BatchChangeInventoryRequest

func (*BatchChangeInventoryRequest) ContextValidate

func (m *BatchChangeInventoryRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this batch change inventory request based on the context it is used

func (*BatchChangeInventoryRequest) MarshalBinary

func (m *BatchChangeInventoryRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BatchChangeInventoryRequest) UnmarshalBinary

func (m *BatchChangeInventoryRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BatchChangeInventoryRequest) Validate

func (m *BatchChangeInventoryRequest) Validate(formats strfmt.Registry) error

Validate validates this batch change inventory request

type BatchChangeInventoryResponse

type BatchChangeInventoryResponse struct {

	// The current counts for all objects referenced in the request.
	Counts []*InventoryCount `json:"counts"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

BatchChangeInventoryResponse batch change inventory response Example: {"counts":[{"calculated_at":"2016-11-16T22:28:01.223Z","catalog_object_id":"W62UWFY35CWMYGVWK6TWJDNI","catalog_object_type":"ITEM_VARIATION","location_id":"C6W5YS5QM06F5","quantity":"53","state":"IN_STOCK"}],"errors":[]}

swagger:model BatchChangeInventoryResponse

func (*BatchChangeInventoryResponse) ContextValidate

func (m *BatchChangeInventoryResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this batch change inventory response based on the context it is used

func (*BatchChangeInventoryResponse) MarshalBinary

func (m *BatchChangeInventoryResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BatchChangeInventoryResponse) UnmarshalBinary

func (m *BatchChangeInventoryResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BatchChangeInventoryResponse) Validate

func (m *BatchChangeInventoryResponse) Validate(formats strfmt.Registry) error

Validate validates this batch change inventory response

type BatchDeleteCatalogObjectsRequest

type BatchDeleteCatalogObjectsRequest struct {

	// The IDs of the CatalogObjects to be deleted. When an object is deleted, other objects
	// in the graph that depend on that object will be deleted as well (for example, deleting a
	// CatalogItem will delete its CatalogItemVariation.
	ObjectIds []string `json:"object_ids"`
}

BatchDeleteCatalogObjectsRequest batch delete catalog objects request Example: {"request_body":{"object_ids":["W62UWFY35CWMYGVWK6TWJDNI","AA27W3M2GGTF3H6AVPNB77CK"]}}

swagger:model BatchDeleteCatalogObjectsRequest

func (*BatchDeleteCatalogObjectsRequest) ContextValidate

func (m *BatchDeleteCatalogObjectsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this batch delete catalog objects request based on context it is used

func (*BatchDeleteCatalogObjectsRequest) MarshalBinary

func (m *BatchDeleteCatalogObjectsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BatchDeleteCatalogObjectsRequest) UnmarshalBinary

func (m *BatchDeleteCatalogObjectsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BatchDeleteCatalogObjectsRequest) Validate

Validate validates this batch delete catalog objects request

type BatchDeleteCatalogObjectsResponse

type BatchDeleteCatalogObjectsResponse struct {

	// The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) of this deletion in RFC 3339 format, e.g., "2016-09-04T23:59:33.123Z".
	DeletedAt string `json:"deleted_at,omitempty"`

	// The IDs of all CatalogObjects deleted by this request.
	DeletedObjectIds []string `json:"deleted_object_ids"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

BatchDeleteCatalogObjectsResponse batch delete catalog objects response Example: {"deleted_at":"2016-11-16T22:25:24.878Z","deleted_object_ids":["W62UWFY35CWMYGVWK6TWJDNI","AA27W3M2GGTF3H6AVPNB77CK"]}

swagger:model BatchDeleteCatalogObjectsResponse

func (*BatchDeleteCatalogObjectsResponse) ContextValidate

func (m *BatchDeleteCatalogObjectsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this batch delete catalog objects response based on the context it is used

func (*BatchDeleteCatalogObjectsResponse) MarshalBinary

func (m *BatchDeleteCatalogObjectsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BatchDeleteCatalogObjectsResponse) UnmarshalBinary

func (m *BatchDeleteCatalogObjectsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BatchDeleteCatalogObjectsResponse) Validate

Validate validates this batch delete catalog objects response

type BatchRetrieveCatalogObjectsRequest

type BatchRetrieveCatalogObjectsRequest struct {

	// The specific version of the catalog objects to be included in the response.
	// This allows you to retrieve historical versions of objects. The specified version value is matched against
	// the `CatalogObject`s' `version` attribute.
	CatalogVersion int64 `json:"catalog_version,omitempty"`

	// If `true`, the response will include additional objects that are related to the
	// requested objects, as follows:
	//
	// If the `objects` field of the response contains a CatalogItem, its associated
	// CatalogCategory objects, CatalogTax objects, CatalogImage objects and
	// CatalogModifierLists will be returned in the `related_objects` field of the
	// response. If the `objects` field of the response contains a CatalogItemVariation,
	// its parent CatalogItem will be returned in the `related_objects` field of
	// the response.
	IncludeRelatedObjects bool `json:"include_related_objects,omitempty"`

	// The IDs of the CatalogObjects to be retrieved.
	// Required: true
	ObjectIds []string `json:"object_ids"`
}

BatchRetrieveCatalogObjectsRequest batch retrieve catalog objects request Example: {"request_body":{"include_related_objects":true,"object_ids":["W62UWFY35CWMYGVWK6TWJDNI","AA27W3M2GGTF3H6AVPNB77CK"]}}

swagger:model BatchRetrieveCatalogObjectsRequest

func (*BatchRetrieveCatalogObjectsRequest) ContextValidate

func (m *BatchRetrieveCatalogObjectsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this batch retrieve catalog objects request based on context it is used

func (*BatchRetrieveCatalogObjectsRequest) MarshalBinary

func (m *BatchRetrieveCatalogObjectsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BatchRetrieveCatalogObjectsRequest) UnmarshalBinary

func (m *BatchRetrieveCatalogObjectsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BatchRetrieveCatalogObjectsRequest) Validate

Validate validates this batch retrieve catalog objects request

type BatchRetrieveCatalogObjectsResponse

type BatchRetrieveCatalogObjectsResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// A list of `CatalogObject`s returned.
	Objects []*CatalogObject `json:"objects"`

	// A list of `CatalogObject`s referenced by the object in the `objects` field.
	RelatedObjects []*CatalogObject `json:"related_objects"`
}

BatchRetrieveCatalogObjectsResponse batch retrieve catalog objects response Example: {"objects":[{"id":"W62UWFY35CWMYGVWK6TWJDNI","is_deleted":false,"item_data":{"category_id":"BJNQCF2FJ6S6UIDT65ABHLRX","description":"Hot Leaf Juice","name":"Tea","tax_ids":["HURXQOOAIC4IZSI2BEXQRYFY"],"variations":[{"id":"2TZFAOHWGG7PAK2QEXWYPZSP","is_deleted":false,"item_variation_data":{"item_id":"W62UWFY35CWMYGVWK6TWJDNI","name":"Mug","ordinal":0,"price_money":{"amount":150,"currency":"USD"},"pricing_type":"FIXED_PRICING"},"present_at_all_locations":true,"type":"ITEM_VARIATION","updated_at":"2016-11-16T22:25:24.878Z","version":1479335124878}]},"present_at_all_locations":true,"type":"ITEM","updated_at":"2016-11-16T22:25:24.878Z","version":1479335124878},{"id":"AA27W3M2GGTF3H6AVPNB77CK","is_deleted":false,"item_data":{"category_id":"BJNQCF2FJ6S6UIDT65ABHLRX","description":"Hot Bean Juice","name":"Coffee","tax_ids":["HURXQOOAIC4IZSI2BEXQRYFY"],"variations":[{"id":"LBTYIHNHU52WOIHWT7SNRIYH","is_deleted":false,"item_variation_data":{"item_id":"AA27W3M2GGTF3H6AVPNB77CK","name":"Regular","ordinal":0,"price_money":{"amount":250,"currency":"USD"},"pricing_type":"FIXED_PRICING"},"present_at_all_locations":true,"type":"ITEM_VARIATION","updated_at":"2016-11-16T22:25:24.878Z","version":1479335124878},{"id":"PKYIC7HGGKW5CYVSCVDEIMHY","is_deleted":false,"item_variation_data":{"item_id":"AA27W3M2GGTF3H6AVPNB77CK","name":"Large","ordinal":1,"price_money":{"amount":350,"currency":"USD"},"pricing_type":"FIXED_PRICING"},"present_at_all_locations":true,"type":"ITEM_VARIATION","updated_at":"2016-11-16T22:25:24.878Z","version":1479335124878}]},"present_at_all_locations":true,"type":"ITEM","updated_at":"2016-11-16T22:25:24.878Z","version":1479335124878}],"related_objects":[{"category_data":{"name":"Beverages"},"id":"BJNQCF2FJ6S6UIDT65ABHLRX","is_deleted":false,"present_at_all_locations":true,"type":"CATEGORY","updated_at":"2016-11-16T22:25:24.878Z","version":1479335124878},{"id":"HURXQOOAIC4IZSI2BEXQRYFY","is_deleted":false,"present_at_all_locations":true,"tax_data":{"calculation_phase":"TAX_SUBTOTAL_PHASE","enabled":true,"inclusion_type":"ADDITIVE","name":"Sales Tax","percentage":"5.0"},"type":"TAX","updated_at":"2016-11-16T22:25:24.878Z","version":1479335124878}]}

swagger:model BatchRetrieveCatalogObjectsResponse

func (*BatchRetrieveCatalogObjectsResponse) ContextValidate

func (m *BatchRetrieveCatalogObjectsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this batch retrieve catalog objects response based on the context it is used

func (*BatchRetrieveCatalogObjectsResponse) MarshalBinary

func (m *BatchRetrieveCatalogObjectsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BatchRetrieveCatalogObjectsResponse) UnmarshalBinary

func (m *BatchRetrieveCatalogObjectsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BatchRetrieveCatalogObjectsResponse) Validate

Validate validates this batch retrieve catalog objects response

type BatchRetrieveInventoryChangesRequest

type BatchRetrieveInventoryChangesRequest struct {

	// The filter to return results by `CatalogObject` ID.
	// The filter is only applicable when set. The default value is null.
	CatalogObjectIds []string `json:"catalog_object_ids"`

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this to retrieve the next set of results for the original query.
	//
	// See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information.
	Cursor string `json:"cursor,omitempty"`

	// The filter to return results by `Location` ID.
	// The filter is only applicable when set. The default value is null.
	LocationIds []string `json:"location_ids"`

	// The filter to return `ADJUSTMENT` query results by
	// `InventoryState`. This filter is only applied when set.
	// The default value is null.
	// See [InventoryState](#type-inventorystate) for possible values
	States []string `json:"states"`

	// The filter to return results by `InventoryChangeType` values other than `TRANSFER`.
	// The default value is `[PHYSICAL_COUNT, ADJUSTMENT]`.
	// See [InventoryChangeType](#type-inventorychangetype) for possible values
	Types []string `json:"types"`

	// The filter to return results with their `calculated_at` value
	// after the given time as specified in an RFC 3339 timestamp.
	// The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`).
	UpdatedAfter string `json:"updated_after,omitempty"`

	// The filter to return results with their `created_at` or `calculated_at` value
	// strictly before the given time as specified in an RFC 3339 timestamp.
	// The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`).
	UpdatedBefore string `json:"updated_before,omitempty"`
}

BatchRetrieveInventoryChangesRequest batch retrieve inventory changes request Example: {"request_body":{"catalog_object_ids":["W62UWFY35CWMYGVWK6TWJDNI"],"location_ids":["C6W5YS5QM06F5"],"states":["IN_STOCK"],"types":["PHYSICAL_COUNT"],"updated_after":"2016-11-01T00:00:00.000Z","updated_before":"2016-12-01T00:00:00.000Z"}}

swagger:model BatchRetrieveInventoryChangesRequest

func (*BatchRetrieveInventoryChangesRequest) ContextValidate

func (m *BatchRetrieveInventoryChangesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this batch retrieve inventory changes request based on context it is used

func (*BatchRetrieveInventoryChangesRequest) MarshalBinary

func (m *BatchRetrieveInventoryChangesRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BatchRetrieveInventoryChangesRequest) UnmarshalBinary

func (m *BatchRetrieveInventoryChangesRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BatchRetrieveInventoryChangesRequest) Validate

Validate validates this batch retrieve inventory changes request

type BatchRetrieveInventoryChangesResponse

type BatchRetrieveInventoryChangesResponse struct {

	// The current calculated inventory changes for the requested objects
	// and locations.
	Changes []*InventoryChange `json:"changes"`

	// The pagination cursor to be used in a subsequent request. If unset,
	// this is the final response.
	// See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

BatchRetrieveInventoryChangesResponse batch retrieve inventory changes response Example: {"changes":[{"physical_count":{"catalog_object_id":"W62UWFY35CWMYGVWK6TWJDNI","catalog_object_type":"ITEM_VARIATION","created_at":"2016-11-16T22:25:24.878Z","employee_id":"LRK57NSQ5X7PUD05","id":"46YDTW253DWGGK9HMAE6XCAO","location_id":"C6W5YS5QM06F5","occurred_at":"2016-11-16T22:24:49.028Z","quantity":"86","reference_id":"22c07cf4-5626-4224-89f9-691112019399","source":{"application_id":"416ff29c-86c4-4feb-b58c-9705f21f3ea0","name":"Square Point of Sale 4.37","product":"SQUARE_POS"},"state":"IN_STOCK"},"type":"PHYSICAL_COUNT"}],"errors":[]}

swagger:model BatchRetrieveInventoryChangesResponse

func (*BatchRetrieveInventoryChangesResponse) ContextValidate

func (m *BatchRetrieveInventoryChangesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this batch retrieve inventory changes response based on the context it is used

func (*BatchRetrieveInventoryChangesResponse) MarshalBinary

func (m *BatchRetrieveInventoryChangesResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BatchRetrieveInventoryChangesResponse) UnmarshalBinary

func (m *BatchRetrieveInventoryChangesResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BatchRetrieveInventoryChangesResponse) Validate

Validate validates this batch retrieve inventory changes response

type BatchRetrieveInventoryCountsRequest

type BatchRetrieveInventoryCountsRequest struct {

	// The filter to return results by `CatalogObject` ID.
	// The filter is applicable only when set.  The default is null.
	CatalogObjectIds []string `json:"catalog_object_ids"`

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this to retrieve the next set of results for the original query.
	//
	// See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information.
	Cursor string `json:"cursor,omitempty"`

	// The filter to return results by `Location` ID.
	// This filter is applicable only when set. The default is null.
	LocationIds []string `json:"location_ids"`

	// The filter to return results by `InventoryState`. The filter is only applicable when set.
	// Ignored are untracked states of `NONE`, `SOLD`, and `UNLINKED_RETURN`.
	// The default is null.
	// See [InventoryState](#type-inventorystate) for possible values
	States []string `json:"states"`

	// The filter to return results with their `calculated_at` value
	// after the given time as specified in an RFC 3339 timestamp.
	// The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`).
	UpdatedAfter string `json:"updated_after,omitempty"`
}

BatchRetrieveInventoryCountsRequest batch retrieve inventory counts request Example: {"request_body":{"catalog_object_ids":["W62UWFY35CWMYGVWK6TWJDNI"],"location_ids":["59TNP9SA8VGDA"],"updated_after":"2016-11-16T00:00:00.000Z"}}

swagger:model BatchRetrieveInventoryCountsRequest

func (*BatchRetrieveInventoryCountsRequest) ContextValidate

func (m *BatchRetrieveInventoryCountsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this batch retrieve inventory counts request based on context it is used

func (*BatchRetrieveInventoryCountsRequest) MarshalBinary

func (m *BatchRetrieveInventoryCountsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BatchRetrieveInventoryCountsRequest) UnmarshalBinary

func (m *BatchRetrieveInventoryCountsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BatchRetrieveInventoryCountsRequest) Validate

Validate validates this batch retrieve inventory counts request

type BatchRetrieveInventoryCountsResponse

type BatchRetrieveInventoryCountsResponse struct {

	// The current calculated inventory counts for the requested objects
	// and locations.
	Counts []*InventoryCount `json:"counts"`

	// The pagination cursor to be used in a subsequent request. If unset,
	// this is the final response.
	//
	// See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

BatchRetrieveInventoryCountsResponse batch retrieve inventory counts response Example: {"counts":[{"calculated_at":"2016-11-16T22:28:01.223Z","catalog_object_id":"W62UWFY35CWMYGVWK6TWJDNI","catalog_object_type":"ITEM_VARIATION","location_id":"59TNP9SA8VGDA","quantity":"79","state":"IN_STOCK"}],"errors":[]}

swagger:model BatchRetrieveInventoryCountsResponse

func (*BatchRetrieveInventoryCountsResponse) ContextValidate

func (m *BatchRetrieveInventoryCountsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this batch retrieve inventory counts response based on the context it is used

func (*BatchRetrieveInventoryCountsResponse) MarshalBinary

func (m *BatchRetrieveInventoryCountsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BatchRetrieveInventoryCountsResponse) UnmarshalBinary

func (m *BatchRetrieveInventoryCountsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BatchRetrieveInventoryCountsResponse) Validate

Validate validates this batch retrieve inventory counts response

type BatchRetrieveOrdersRequest

type BatchRetrieveOrdersRequest struct {

	// The ID of the location for these orders. This field is optional: omit it to retrieve
	// orders within the scope of the current authorization's merchant ID.
	LocationID string `json:"location_id,omitempty"`

	// The IDs of the orders to retrieve. A maximum of 100 orders can be retrieved per request.
	// Required: true
	OrderIds []string `json:"order_ids"`
}

BatchRetrieveOrdersRequest Defines the fields that are included in requests to the BatchRetrieveOrders endpoint. Example: {"request_body":{"location_id":"057P5VYJ4A5X1","order_ids":["CAISEM82RcpmcFBM0TfOyiHV3es","CAISENgvlJ6jLWAzERDzjyHVybY"]}}

swagger:model BatchRetrieveOrdersRequest

func (*BatchRetrieveOrdersRequest) ContextValidate

func (m *BatchRetrieveOrdersRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this batch retrieve orders request based on context it is used

func (*BatchRetrieveOrdersRequest) MarshalBinary

func (m *BatchRetrieveOrdersRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BatchRetrieveOrdersRequest) UnmarshalBinary

func (m *BatchRetrieveOrdersRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BatchRetrieveOrdersRequest) Validate

func (m *BatchRetrieveOrdersRequest) Validate(formats strfmt.Registry) error

Validate validates this batch retrieve orders request

type BatchRetrieveOrdersResponse

type BatchRetrieveOrdersResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The requested orders. This will omit any requested orders that do not exist.
	Orders []*Order `json:"orders"`
}

BatchRetrieveOrdersResponse Defines the fields that are included in the response body of a request to the BatchRetrieveOrders endpoint. Example: {"orders":[{"id":"CAISEM82RcpmcFBM0TfOyiHV3es","line_items":[{"base_price_money":{"amount":1599,"currency":"USD"},"name":"Awesome product","quantity":"1","total_money":{"amount":1599,"currency":"USD"},"uid":"945986d1-9586-11e6-ad5a-28cfe92138cf"},{"base_price_money":{"amount":2000,"currency":"USD"},"name":"Another awesome product","quantity":"3","total_money":{"amount":6000,"currency":"USD"},"uid":"a8f4168c-9586-11e6-bdf0-28cfe92138cf"}],"location_id":"057P5VYJ4A5X1","reference_id":"my-order-001","total_money":{"amount":7599,"currency":"USD"}}]}

swagger:model BatchRetrieveOrdersResponse

func (*BatchRetrieveOrdersResponse) ContextValidate

func (m *BatchRetrieveOrdersResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this batch retrieve orders response based on the context it is used

func (*BatchRetrieveOrdersResponse) MarshalBinary

func (m *BatchRetrieveOrdersResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BatchRetrieveOrdersResponse) UnmarshalBinary

func (m *BatchRetrieveOrdersResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BatchRetrieveOrdersResponse) Validate

func (m *BatchRetrieveOrdersResponse) Validate(formats strfmt.Registry) error

Validate validates this batch retrieve orders response

type BatchUpsertCatalogObjectsRequest

type BatchUpsertCatalogObjectsRequest struct {

	// A batch of CatalogObjects to be inserted/updated atomically.
	// The objects within a batch will be inserted in an all-or-nothing fashion, i.e., if an error occurs
	// attempting to insert or update an object within a batch, the entire batch will be rejected. However, an error
	// in one batch will not affect other batches within the same request.
	//
	// For each object, its `updated_at` field is ignored and replaced with a current [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates), and its
	// `is_deleted` field must not be set to `true`.
	//
	// To modify an existing object, supply its ID. To create a new object, use an ID starting
	// with `#`. These IDs may be used to create relationships between an object and attributes of
	// other objects that reference it. For example, you can create a CatalogItem with
	// ID `#ABC` and a CatalogItemVariation with its `item_id` attribute set to
	// `#ABC` in order to associate the CatalogItemVariation with its parent
	// CatalogItem.
	//
	// Any `#`-prefixed IDs are valid only within a single atomic batch, and will be replaced by server-generated IDs.
	//
	// Each batch may contain up to 1,000 objects. The total number of objects across all batches for a single request
	// may not exceed 10,000. If either of these limits is violated, an error will be returned and no objects will
	// be inserted or updated.
	// Required: true
	Batches []*CatalogObjectBatch `json:"batches"`

	// A value you specify that uniquely identifies this
	// request among all your requests. A common way to create
	// a valid idempotency key is to use a Universally unique
	// identifier (UUID).
	//
	// If you're unsure whether a particular request was successful,
	// you can reattempt it with the same idempotency key without
	// worrying about creating duplicate objects.
	//
	// See [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency) for more information.
	// Required: true
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`
}

BatchUpsertCatalogObjectsRequest batch upsert catalog objects request Example: {"request_body":{"batches":[{"objects":[{"id":"#Tea","item_data":{"category_id":"#Beverages","description":"Hot Leaf Juice","name":"Tea","tax_ids":["#SalesTax"],"variations":[{"id":"#Tea_Mug","item_variation_data":{"item_id":"#Tea","name":"Mug","price_money":{"amount":150,"currency":"USD"},"pricing_type":"FIXED_PRICING"},"present_at_all_locations":true,"type":"ITEM_VARIATION"}]},"present_at_all_locations":true,"type":"ITEM"},{"id":"#Coffee","item_data":{"category_id":"#Beverages","description":"Hot Bean Juice","name":"Coffee","tax_ids":["#SalesTax"],"variations":[{"id":"#Coffee_Regular","item_variation_data":{"item_id":"#Coffee","name":"Regular","price_money":{"amount":250,"currency":"USD"},"pricing_type":"FIXED_PRICING"},"present_at_all_locations":true,"type":"ITEM_VARIATION"},{"id":"#Coffee_Large","item_variation_data":{"item_id":"#Coffee","name":"Large","price_money":{"amount":350,"currency":"USD"},"pricing_type":"FIXED_PRICING"},"present_at_all_locations":true,"type":"ITEM_VARIATION"}]},"present_at_all_locations":true,"type":"ITEM"},{"category_data":{"name":"Beverages"},"id":"#Beverages","present_at_all_locations":true,"type":"CATEGORY"},{"id":"#SalesTax","present_at_all_locations":true,"tax_data":{"applies_to_custom_amounts":true,"calculation_phase":"TAX_SUBTOTAL_PHASE","enabled":true,"inclusion_type":"ADDITIVE","name":"Sales Tax","percentage":"5.0"},"type":"TAX"}]}],"idempotency_key":"789ff020-f723-43a9-b4b5-43b5dc1fa3dc"}}

swagger:model BatchUpsertCatalogObjectsRequest

func (*BatchUpsertCatalogObjectsRequest) ContextValidate

func (m *BatchUpsertCatalogObjectsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this batch upsert catalog objects request based on the context it is used

func (*BatchUpsertCatalogObjectsRequest) MarshalBinary

func (m *BatchUpsertCatalogObjectsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BatchUpsertCatalogObjectsRequest) UnmarshalBinary

func (m *BatchUpsertCatalogObjectsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BatchUpsertCatalogObjectsRequest) Validate

Validate validates this batch upsert catalog objects request

type BatchUpsertCatalogObjectsResponse

type BatchUpsertCatalogObjectsResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The mapping between client and server IDs for this upsert.
	IDMappings []*CatalogIDMapping `json:"id_mappings"`

	// The created successfully created CatalogObjects.
	Objects []*CatalogObject `json:"objects"`

	// The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) of this update in RFC 3339 format, e.g., "2016-09-04T23:59:33.123Z".
	UpdatedAt string `json:"updated_at,omitempty"`
}

BatchUpsertCatalogObjectsResponse batch upsert catalog objects response Example: {"id_mappings":[{"client_object_id":"#Tea","object_id":"ZSDZN34NAXDLC6D5ZQMNSOUM"},{"client_object_id":"#Coffee","object_id":"PJMCEBHHUS3OKDB6PYUHLCPP"},{"client_object_id":"#Beverages","object_id":"LYT72K3WGJFFCIMB63XARP3I"},{"client_object_id":"#SalesTax","object_id":"XHSHLHNWSI3HVI4BW5ZUZXI3"},{"client_object_id":"#Tea_Mug","object_id":"NAYHET5R52MIYCEF34ZMAHFM"},{"client_object_id":"#Coffee_Regular","object_id":"OTYDX45SPG7LJQUVCBZI4INH"},{"client_object_id":"#Coffee_Large","object_id":"GZDA3JB37FYVOPI4AOEBOITI"}],"objects":[{"id":"ZSDZN34NAXDLC6D5ZQMNSOUM","is_deleted":false,"item_data":{"category_id":"LYT72K3WGJFFCIMB63XARP3I","description":"Hot Leaf Juice","name":"Tea","tax_ids":["XHSHLHNWSI3HVI4BW5ZUZXI3"],"variations":[{"id":"NAYHET5R52MIYCEF34ZMAHFM","is_deleted":false,"item_variation_data":{"item_id":"ZSDZN34NAXDLC6D5ZQMNSOUM","name":"Mug","ordinal":0,"price_money":{"amount":150,"currency":"USD"},"pricing_type":"FIXED_PRICING"},"present_at_all_locations":true,"type":"ITEM_VARIATION","updated_at":"2017-05-10T18:48:39.798Z","version":1494442119798}]},"present_at_all_locations":true,"type":"ITEM","updated_at":"2017-05-10T18:48:39.798Z","version":1494442119798},{"id":"PJMCEBHHUS3OKDB6PYUHLCPP","is_deleted":false,"item_data":{"category_id":"LYT72K3WGJFFCIMB63XARP3I","description":"Hot Bean Juice","name":"Coffee","tax_ids":["XHSHLHNWSI3HVI4BW5ZUZXI3"],"variations":[{"id":"OTYDX45SPG7LJQUVCBZI4INH","is_deleted":false,"item_variation_data":{"item_id":"PJMCEBHHUS3OKDB6PYUHLCPP","name":"Regular","ordinal":0,"price_money":{"amount":250,"currency":"USD"},"pricing_type":"FIXED_PRICING"},"present_at_all_locations":true,"type":"ITEM_VARIATION","updated_at":"2017-05-10T18:48:39.798Z","version":1494442119798},{"id":"GZDA3JB37FYVOPI4AOEBOITI","is_deleted":false,"item_variation_data":{"item_id":"PJMCEBHHUS3OKDB6PYUHLCPP","name":"Large","ordinal":1,"price_money":{"amount":350,"currency":"USD"},"pricing_type":"FIXED_PRICING"},"present_at_all_locations":true,"type":"ITEM_VARIATION","updated_at":"2017-05-10T18:48:39.798Z","version":1494442119798}]},"present_at_all_locations":true,"type":"ITEM","updated_at":"2017-05-10T18:48:39.798Z","version":1494442119798},{"category_data":{"name":"Beverages"},"id":"LYT72K3WGJFFCIMB63XARP3I","is_deleted":false,"present_at_all_locations":true,"type":"CATEGORY","updated_at":"2017-05-10T18:48:39.798Z","version":1494442119798},{"id":"XHSHLHNWSI3HVI4BW5ZUZXI3","is_deleted":false,"present_at_all_locations":true,"tax_data":{"applies_to_custom_amounts":true,"calculation_phase":"TAX_SUBTOTAL_PHASE","enabled":true,"inclusion_type":"ADDITIVE","name":"Sales Tax","percentage":"5.0"},"type":"TAX","updated_at":"2017-05-10T18:48:39.798Z","version":1494442119798}]}

swagger:model BatchUpsertCatalogObjectsResponse

func (*BatchUpsertCatalogObjectsResponse) ContextValidate

func (m *BatchUpsertCatalogObjectsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this batch upsert catalog objects response based on the context it is used

func (*BatchUpsertCatalogObjectsResponse) MarshalBinary

func (m *BatchUpsertCatalogObjectsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BatchUpsertCatalogObjectsResponse) UnmarshalBinary

func (m *BatchUpsertCatalogObjectsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BatchUpsertCatalogObjectsResponse) Validate

Validate validates this batch upsert catalog objects response

type Booking

type Booking struct {

	// A list of appointment segments for this booking.
	AppointmentSegments []*AppointmentSegment `json:"appointment_segments"`

	// The timestamp specifying the creation time of this booking.
	CreatedAt string `json:"created_at,omitempty"`

	// The ID of the `Customer` object representing the customer attending this booking
	CustomerID string `json:"customer_id,omitempty"`

	// The free-text field for the customer to supply notes about the booking. For example, the note can be preferences that cannot be expressed by supported attributes of a relevant `CatalogObject` instance.
	// Max Length: 4096
	CustomerNote string `json:"customer_note,omitempty"`

	// A unique ID of this object representing a booking.
	ID string `json:"id,omitempty"`

	// The ID of the `Location` object representing the location where the booked service is provided.
	LocationID string `json:"location_id,omitempty"`

	// The free-text field for the seller to supply notes about the booking. For example, the note can be preferences that cannot be expressed by supported attributes of a specific `CatalogObject` instance.
	// This field should not be visible to customers.
	// Max Length: 4096
	SellerNote string `json:"seller_note,omitempty"`

	// The timestamp specifying the starting time of this booking.
	StartAt string `json:"start_at,omitempty"`

	// The status of the booking, describing where the booking stands with respect to the booking state machine.
	// See [BookingStatus](#type-bookingstatus) for possible values
	Status string `json:"status,omitempty"`

	// The timestamp specifying the most recent update time of this booking.
	UpdatedAt string `json:"updated_at,omitempty"`

	// The revision number for the booking used for optimistic concurrency.
	// Minimum: 0
	Version *int64 `json:"version,omitempty"`
}

Booking Represents a booking as a time-bound service contract for a seller's staff member to provide a specified service at a given location to a requesting customer in one or more appointment segments.

swagger:model Booking

func (*Booking) ContextValidate

func (m *Booking) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this booking based on the context it is used

func (*Booking) MarshalBinary

func (m *Booking) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Booking) UnmarshalBinary

func (m *Booking) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Booking) Validate

func (m *Booking) Validate(formats strfmt.Registry) error

Validate validates this booking

type BookingStatus

type BookingStatus string

BookingStatus Supported booking statuses.

swagger:model BookingStatus

const (

	// BookingStatusPENDING captures enum value "PENDING"
	BookingStatusPENDING BookingStatus = "PENDING"

	// BookingStatusCANCELLEDBYCUSTOMER captures enum value "CANCELLED_BY_CUSTOMER"
	BookingStatusCANCELLEDBYCUSTOMER BookingStatus = "CANCELLED_BY_CUSTOMER"

	// BookingStatusCANCELLEDBYSELLER captures enum value "CANCELLED_BY_SELLER"
	BookingStatusCANCELLEDBYSELLER BookingStatus = "CANCELLED_BY_SELLER"

	// BookingStatusDECLINED captures enum value "DECLINED"
	BookingStatusDECLINED BookingStatus = "DECLINED"

	// BookingStatusACCEPTED captures enum value "ACCEPTED"
	BookingStatusACCEPTED BookingStatus = "ACCEPTED"

	// BookingStatusNOSHOW captures enum value "NO_SHOW"
	BookingStatusNOSHOW BookingStatus = "NO_SHOW"
)

func (BookingStatus) ContextValidate

func (m BookingStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this booking status based on context it is used

func (BookingStatus) Validate

func (m BookingStatus) Validate(formats strfmt.Registry) error

Validate validates this booking status

type Break

type Break struct {

	// The `BreakType` this `Break` was templated on.
	// Required: true
	// Min Length: 1
	BreakTypeID *string `json:"break_type_id"`

	// RFC 3339; follows same timezone info as `Shift`. Precision up to
	// the minute is respected; seconds are truncated.
	EndAt string `json:"end_at,omitempty"`

	// Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of
	// the break.
	// Required: true
	// Min Length: 1
	ExpectedDuration *string `json:"expected_duration"`

	// UUID for this object
	ID string `json:"id,omitempty"`

	// Whether this break counts towards time worked for compensation
	// purposes.
	// Required: true
	IsPaid *bool `json:"is_paid"`

	// A human-readable name.
	// Required: true
	// Min Length: 1
	Name *string `json:"name"`

	// RFC 3339; follows same timezone info as `Shift`. Precision up to
	// the minute is respected; seconds are truncated.
	// Required: true
	// Min Length: 1
	StartAt *string `json:"start_at"`
}

Break A record of an employee's break during a shift.

swagger:model Break

func (*Break) ContextValidate

func (m *Break) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this break based on context it is used

func (*Break) MarshalBinary

func (m *Break) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Break) UnmarshalBinary

func (m *Break) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Break) Validate

func (m *Break) Validate(formats strfmt.Registry) error

Validate validates this break

type BreakType

type BreakType struct {

	// A human-readable name for this type of break. Will be displayed to
	// employees in Square products.
	// Required: true
	// Min Length: 1
	BreakName *string `json:"break_name"`

	// A read-only timestamp in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of
	// this break. Precision below minutes is truncated.
	// Required: true
	// Min Length: 1
	ExpectedDuration *string `json:"expected_duration"`

	// UUID for this object.
	// Max Length: 255
	ID string `json:"id,omitempty"`

	// Whether this break counts towards time worked for compensation
	// purposes.
	// Required: true
	IsPaid *bool `json:"is_paid"`

	// The ID of the business location this type of break applies to.
	// Required: true
	// Min Length: 1
	LocationID *string `json:"location_id"`

	// A read-only timestamp in RFC 3339 format.
	UpdatedAt string `json:"updated_at,omitempty"`

	// Used for resolving concurrency issues; request will fail if version
	// provided does not match server version at time of request. If a value is not
	// provided, Square's servers execute a "blind" write; potentially
	// overwriting another writer's data.
	Version int64 `json:"version,omitempty"`
}

BreakType A defined break template that sets an expectation for possible `Break` instances on a `Shift`.

swagger:model BreakType

func (*BreakType) ContextValidate

func (m *BreakType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this break type based on context it is used

func (*BreakType) MarshalBinary

func (m *BreakType) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BreakType) UnmarshalBinary

func (m *BreakType) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BreakType) Validate

func (m *BreakType) Validate(formats strfmt.Registry) error

Validate validates this break type

type BulkCreateTeamMembersRequest

type BulkCreateTeamMembersRequest struct {

	// The data which will be used to create the `TeamMember` objects. Each key is the `idempotency_key` that maps to the `CreateTeamMemberRequest`.
	// Required: true
	TeamMembers map[string]CreateTeamMemberRequest `json:"team_members"`
}

BulkCreateTeamMembersRequest Represents a bulk create request for `TeamMember` objects. Example: {"request_body":{"team_members":{"idempotency-key-1":{"team_member":{"assigned_locations":{"assignment_type":"EXPLICIT_LOCATIONS","location_ids":["YSGH2WBKG94QZ","GA2Y9HSJ8KRYT"]},"email_address":"joe_doe@gmail.com","family_name":"Doe","given_name":"Joe","phone_number":"+14159283333","reference_id":"reference_id_1"}},"idempotency-key-2":{"team_member":{"assigned_locations":{"assignment_type":"ALL_CURRENT_AND_FUTURE_LOCATIONS"},"email_address":"jane_smith@gmail.com","family_name":"Smith","given_name":"Jane","phone_number":"+14159223334","reference_id":"reference_id_2"}}}}}

swagger:model BulkCreateTeamMembersRequest

func (*BulkCreateTeamMembersRequest) ContextValidate

func (m *BulkCreateTeamMembersRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this bulk create team members request based on the context it is used

func (*BulkCreateTeamMembersRequest) MarshalBinary

func (m *BulkCreateTeamMembersRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BulkCreateTeamMembersRequest) UnmarshalBinary

func (m *BulkCreateTeamMembersRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BulkCreateTeamMembersRequest) Validate

func (m *BulkCreateTeamMembersRequest) Validate(formats strfmt.Registry) error

Validate validates this bulk create team members request

type BulkCreateTeamMembersResponse

type BulkCreateTeamMembersResponse struct {

	// The errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The successfully created `TeamMember` objects. Each key is the `idempotency_key` that maps to the `CreateTeamMemberRequest`.
	TeamMembers map[string]CreateTeamMemberResponse `json:"team_members,omitempty"`
}

BulkCreateTeamMembersResponse Represents a response from a bulk create request, containing the created `TeamMember` objects or error messages. Example: {"team_members":{"idempotency-key-1":{"team_member":{"assigned_locations":{"assignment_type":"EXPLICIT_LOCATIONS","location_ids":["GA2Y9HSJ8KRYT","YSGH2WBKG94QZ"]},"email_address":"joe_doe@gmail.com","family_name":"Doe","given_name":"Joe","id":"ywhG1qfIOoqsHfVRubFV","is_owner":false,"phone_number":"+14159283333","reference_id":"reference_id_1","status":"ACTIVE"}},"idempotency-key-2":{"team_member":{"assigned_locations":{"assignment_type":"ALL_CURRENT_AND_FUTURE_LOCATIONS"},"email_address":"jane_smith@gmail.com","family_name":"Smith","given_name":"Jane","id":"IF_Ncrg7fHhCqxVI9T6R","is_owner":false,"phone_number":"+14159223334","reference_id":"reference_id_2","status":"ACTIVE"}}}}

swagger:model BulkCreateTeamMembersResponse

func (*BulkCreateTeamMembersResponse) ContextValidate

func (m *BulkCreateTeamMembersResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this bulk create team members response based on the context it is used

func (*BulkCreateTeamMembersResponse) MarshalBinary

func (m *BulkCreateTeamMembersResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BulkCreateTeamMembersResponse) UnmarshalBinary

func (m *BulkCreateTeamMembersResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BulkCreateTeamMembersResponse) Validate

func (m *BulkCreateTeamMembersResponse) Validate(formats strfmt.Registry) error

Validate validates this bulk create team members response

type BulkUpdateTeamMembersRequest

type BulkUpdateTeamMembersRequest struct {

	// The data which will be used to update the `TeamMember` objects. Each key is the `team_member_id` that maps to the `UpdateTeamMemberRequest`.
	// Required: true
	TeamMembers map[string]UpdateTeamMemberRequest `json:"team_members"`
}

BulkUpdateTeamMembersRequest Represents a bulk update request for `TeamMember` objects. Example: {"request_body":{"team_members":{"AFMwA08kR-MIF-3Vs0OE":{"team_member":{"assigned_locations":{"assignment_type":"ALL_CURRENT_AND_FUTURE_LOCATIONS"},"email_address":"jane_smith@gmail.com","family_name":"Smith","given_name":"Jane","is_owner":false,"phone_number":"+14159223334","reference_id":"reference_id_2","status":"ACTIVE"}},"fpgteZNMaf0qOK-a4t6P":{"team_member":{"assigned_locations":{"assignment_type":"EXPLICIT_LOCATIONS","location_ids":["YSGH2WBKG94QZ","GA2Y9HSJ8KRYT"]},"email_address":"joe_doe@gmail.com","family_name":"Doe","given_name":"Joe","is_owner":false,"phone_number":"+14159283333","reference_id":"reference_id_1","status":"ACTIVE"}}}}}

swagger:model BulkUpdateTeamMembersRequest

func (*BulkUpdateTeamMembersRequest) ContextValidate

func (m *BulkUpdateTeamMembersRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this bulk update team members request based on the context it is used

func (*BulkUpdateTeamMembersRequest) MarshalBinary

func (m *BulkUpdateTeamMembersRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BulkUpdateTeamMembersRequest) UnmarshalBinary

func (m *BulkUpdateTeamMembersRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BulkUpdateTeamMembersRequest) Validate

func (m *BulkUpdateTeamMembersRequest) Validate(formats strfmt.Registry) error

Validate validates this bulk update team members request

type BulkUpdateTeamMembersResponse

type BulkUpdateTeamMembersResponse struct {

	// The errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The successfully updated `TeamMember` objects. Each key is the `team_member_id` that maps to the `UpdateTeamMemberRequest`.
	TeamMembers map[string]UpdateTeamMemberResponse `json:"team_members,omitempty"`
}

BulkUpdateTeamMembersResponse Represents a response from a bulk update request, containing the updated `TeamMember` objects or error messages. Example: {"team_members":{"AFMwA08kR-MIF-3Vs0OE":{"team_member":{"assigned_locations":{"assignment_type":"ALL_CURRENT_AND_FUTURE_LOCATIONS"},"created_at":"2020-06-11T22:46:57.001Z","email_address":"jane_smith@gmail.com","family_name":"Smith","given_name":"Jane","id":"AFMwA08kR-MIF-3Vs0OE","is_owner":false,"phone_number":"+14159223334","reference_id":"reference_id_2","status":"ACTIVE"}},"fpgteZNMaf0qOK-a4t6P":{"team_member":{"assigned_locations":{"assignment_type":"EXPLICIT_LOCATIONS","location_ids":["GA2Y9HSJ8KRYT","YSGH2WBKG94QZ"]},"created_at":"2020-06-11T22:46:57.095Z","email_address":"joe_doe@gmail.com","family_name":"Doe","given_name":"Joe","id":"fpgteZNMaf0qOK-a4t6P","is_owner":false,"phone_number":"+14159283333","reference_id":"reference_id_1","status":"ACTIVE"}}}}

swagger:model BulkUpdateTeamMembersResponse

func (*BulkUpdateTeamMembersResponse) ContextValidate

func (m *BulkUpdateTeamMembersResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this bulk update team members response based on the context it is used

func (*BulkUpdateTeamMembersResponse) MarshalBinary

func (m *BulkUpdateTeamMembersResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BulkUpdateTeamMembersResponse) UnmarshalBinary

func (m *BulkUpdateTeamMembersResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BulkUpdateTeamMembersResponse) Validate

func (m *BulkUpdateTeamMembersResponse) Validate(formats strfmt.Registry) error

Validate validates this bulk update team members response

type BusinessAppointmentSettings

type BusinessAppointmentSettings struct {

	// The time unit of the service duration for bookings.
	// See [BusinessAppointmentSettingsAlignmentTime](#type-businessappointmentsettingsalignmenttime) for possible values
	AlignmentTime string `json:"alignment_time,omitempty"`

	// Indicates whether a customer can choose from all available time slots and have a staff member assigned
	// automatically (`true`) or not (`false`).
	AnyTeamMemberBookingEnabled bool `json:"any_team_member_booking_enabled,omitempty"`

	// The flat-fee amount charged for a no-show booking.
	CancellationFeeMoney *Money `json:"cancellation_fee_money,omitempty"`

	// The cancellation policy adopted by the seller.
	// See [BusinessAppointmentSettingsCancellationPolicy](#type-businessappointmentsettingscancellationpolicy) for possible values
	CancellationPolicy string `json:"cancellation_policy,omitempty"`

	// The free-form text of the seller's cancellation policy.
	CancellationPolicyText string `json:"cancellation_policy_text,omitempty"`

	// The cut-off time in seconds for allowing clients to cancel or reschedule an appointment.
	CancellationWindowSeconds int64 `json:"cancellation_window_seconds,omitempty"`

	// Types of the location allowed for bookings.
	// See [BusinessAppointmentSettingsBookingLocationType](#type-businessappointmentsettingsbookinglocationtype) for possible values
	LocationTypes []string `json:"location_types"`

	// The maximum number of daily appointments per team member or per location.
	MaxAppointmentsPerDayLimit int64 `json:"max_appointments_per_day_limit,omitempty"`

	// Indicates whether the daily appointment limit applies to team members or to
	// business locations.
	// See [BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType](#type-businessappointmentsettingsmaxappointmentsperdaylimittype) for possible values
	MaxAppointmentsPerDayLimitType string `json:"max_appointments_per_day_limit_type,omitempty"`

	// The maximum lead time in seconds before a service can be booked. Bookings must be created at most this far ahead of the booking's starting time.
	MaxBookingLeadTimeSeconds int64 `json:"max_booking_lead_time_seconds,omitempty"`

	// The minimum lead time in seconds before a service can be booked. Bookings must be created at least this far ahead of the booking's starting time.
	MinBookingLeadTimeSeconds int64 `json:"min_booking_lead_time_seconds,omitempty"`

	// Indicates whether a customer can book multiple services in a single online booking.
	MultipleServiceBookingEnabled bool `json:"multiple_service_booking_enabled,omitempty"`

	// Indicates whether customers has an assigned staff member (`true`) or can select s staff member of their choice (`false`).
	SkipBookingFlowStaffSelection bool `json:"skip_booking_flow_staff_selection,omitempty"`
}

BusinessAppointmentSettings The service appointment settings, including where and how the service is provided.

swagger:model BusinessAppointmentSettings

func (*BusinessAppointmentSettings) ContextValidate

func (m *BusinessAppointmentSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this business appointment settings based on the context it is used

func (*BusinessAppointmentSettings) MarshalBinary

func (m *BusinessAppointmentSettings) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BusinessAppointmentSettings) UnmarshalBinary

func (m *BusinessAppointmentSettings) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BusinessAppointmentSettings) Validate

func (m *BusinessAppointmentSettings) Validate(formats strfmt.Registry) error

Validate validates this business appointment settings

type BusinessAppointmentSettingsAlignmentTime

type BusinessAppointmentSettingsAlignmentTime string

BusinessAppointmentSettingsAlignmentTime Time units of a service duration for bookings.

swagger:model BusinessAppointmentSettingsAlignmentTime

const (

	// BusinessAppointmentSettingsAlignmentTimeSERVICEDURATION captures enum value "SERVICE_DURATION"
	BusinessAppointmentSettingsAlignmentTimeSERVICEDURATION BusinessAppointmentSettingsAlignmentTime = "SERVICE_DURATION"

	// BusinessAppointmentSettingsAlignmentTimeQUARTERHOURLY captures enum value "QUARTER_HOURLY"
	BusinessAppointmentSettingsAlignmentTimeQUARTERHOURLY BusinessAppointmentSettingsAlignmentTime = "QUARTER_HOURLY"

	// BusinessAppointmentSettingsAlignmentTimeHALFHOURLY captures enum value "HALF_HOURLY"
	BusinessAppointmentSettingsAlignmentTimeHALFHOURLY BusinessAppointmentSettingsAlignmentTime = "HALF_HOURLY"

	// BusinessAppointmentSettingsAlignmentTimeHOURLY captures enum value "HOURLY"
	BusinessAppointmentSettingsAlignmentTimeHOURLY BusinessAppointmentSettingsAlignmentTime = "HOURLY"
)

func (BusinessAppointmentSettingsAlignmentTime) ContextValidate

ContextValidate validates this business appointment settings alignment time based on context it is used

func (BusinessAppointmentSettingsAlignmentTime) Validate

Validate validates this business appointment settings alignment time

type BusinessAppointmentSettingsBookingLocationType

type BusinessAppointmentSettingsBookingLocationType string

BusinessAppointmentSettingsBookingLocationType Types of location where service is provided.

swagger:model BusinessAppointmentSettingsBookingLocationType

const (

	// BusinessAppointmentSettingsBookingLocationTypeBUSINESSLOCATION captures enum value "BUSINESS_LOCATION"
	BusinessAppointmentSettingsBookingLocationTypeBUSINESSLOCATION BusinessAppointmentSettingsBookingLocationType = "BUSINESS_LOCATION"

	// BusinessAppointmentSettingsBookingLocationTypeCUSTOMERLOCATION captures enum value "CUSTOMER_LOCATION"
	BusinessAppointmentSettingsBookingLocationTypeCUSTOMERLOCATION BusinessAppointmentSettingsBookingLocationType = "CUSTOMER_LOCATION"

	// BusinessAppointmentSettingsBookingLocationTypePHONE captures enum value "PHONE"
	BusinessAppointmentSettingsBookingLocationTypePHONE BusinessAppointmentSettingsBookingLocationType = "PHONE"
)

func (BusinessAppointmentSettingsBookingLocationType) ContextValidate

ContextValidate validates this business appointment settings booking location type based on context it is used

func (BusinessAppointmentSettingsBookingLocationType) Validate

Validate validates this business appointment settings booking location type

type BusinessAppointmentSettingsCancellationPolicy

type BusinessAppointmentSettingsCancellationPolicy string

BusinessAppointmentSettingsCancellationPolicy The category of the seller’s cancellation policy.

swagger:model BusinessAppointmentSettingsCancellationPolicy

const (

	// BusinessAppointmentSettingsCancellationPolicyCANCELLATIONTREATEDASNOSHOW captures enum value "CANCELLATION_TREATED_AS_NO_SHOW"
	BusinessAppointmentSettingsCancellationPolicyCANCELLATIONTREATEDASNOSHOW BusinessAppointmentSettingsCancellationPolicy = "CANCELLATION_TREATED_AS_NO_SHOW"

	// BusinessAppointmentSettingsCancellationPolicyCUSTOMPOLICY captures enum value "CUSTOM_POLICY"
	BusinessAppointmentSettingsCancellationPolicyCUSTOMPOLICY BusinessAppointmentSettingsCancellationPolicy = "CUSTOM_POLICY"
)

func (BusinessAppointmentSettingsCancellationPolicy) ContextValidate

ContextValidate validates this business appointment settings cancellation policy based on context it is used

func (BusinessAppointmentSettingsCancellationPolicy) Validate

Validate validates this business appointment settings cancellation policy

type BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType

type BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType string

BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType Types of daily appointment limits.

swagger:model BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType

const (

	// BusinessAppointmentSettingsMaxAppointmentsPerDayLimitTypePERTEAMMEMBER captures enum value "PER_TEAM_MEMBER"
	BusinessAppointmentSettingsMaxAppointmentsPerDayLimitTypePERTEAMMEMBER BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType = "PER_TEAM_MEMBER"

	// BusinessAppointmentSettingsMaxAppointmentsPerDayLimitTypePERLOCATION captures enum value "PER_LOCATION"
	BusinessAppointmentSettingsMaxAppointmentsPerDayLimitTypePERLOCATION BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType = "PER_LOCATION"
)

func (BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType) ContextValidate

ContextValidate validates this business appointment settings max appointments per day limit type based on context it is used

func (BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType) Validate

Validate validates this business appointment settings max appointments per day limit type

type BusinessBookingProfile

type BusinessBookingProfile struct {

	// Indicates whether customers can cancel or reschedule their own bookings (`true`) or not (`false`).
	AllowUserCancel bool `json:"allow_user_cancel,omitempty"`

	// Indicates whether the seller is open for booking.
	BookingEnabled bool `json:"booking_enabled,omitempty"`

	// The policy for the seller to automatically accept booking requests (`ACCEPT_ALL`) or not (`REQUIRES_ACCEPTANCE`).
	// See [BusinessBookingProfileBookingPolicy](#type-businessbookingprofilebookingpolicy) for possible values
	BookingPolicy string `json:"booking_policy,omitempty"`

	// Settings for appointment-type bookings.
	BusinessAppointmentSettings *BusinessAppointmentSettings `json:"business_appointment_settings,omitempty"`

	// The RFC-3339 timestamp specifying the booking's creation time.
	CreatedAt string `json:"created_at,omitempty"`

	// The choice of customer's time zone information of a booking.
	// The Square online booking site and all notifications to customers uses either the seller location’s time zone
	// or the time zone the customer chooses at booking.
	// See [BusinessBookingProfileCustomerTimezoneChoice](#type-businessbookingprofilecustomertimezonechoice) for possible values
	CustomerTimezoneChoice string `json:"customer_timezone_choice,omitempty"`

	// The ID of the seller, obtainable using the Merchants API.
	SellerID string `json:"seller_id,omitempty"`
}

BusinessBookingProfile business booking profile

swagger:model BusinessBookingProfile

func (*BusinessBookingProfile) ContextValidate

func (m *BusinessBookingProfile) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this business booking profile based on the context it is used

func (*BusinessBookingProfile) MarshalBinary

func (m *BusinessBookingProfile) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BusinessBookingProfile) UnmarshalBinary

func (m *BusinessBookingProfile) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BusinessBookingProfile) Validate

func (m *BusinessBookingProfile) Validate(formats strfmt.Registry) error

Validate validates this business booking profile

type BusinessBookingProfileBookingPolicy

type BusinessBookingProfileBookingPolicy string

BusinessBookingProfileBookingPolicy Policies for accepting bookings.

swagger:model BusinessBookingProfileBookingPolicy

const (

	// BusinessBookingProfileBookingPolicyACCEPTALL captures enum value "ACCEPT_ALL"
	BusinessBookingProfileBookingPolicyACCEPTALL BusinessBookingProfileBookingPolicy = "ACCEPT_ALL"

	// BusinessBookingProfileBookingPolicyREQUIRESACCEPTANCE captures enum value "REQUIRES_ACCEPTANCE"
	BusinessBookingProfileBookingPolicyREQUIRESACCEPTANCE BusinessBookingProfileBookingPolicy = "REQUIRES_ACCEPTANCE"
)

func (BusinessBookingProfileBookingPolicy) ContextValidate

func (m BusinessBookingProfileBookingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this business booking profile booking policy based on context it is used

func (BusinessBookingProfileBookingPolicy) Validate

Validate validates this business booking profile booking policy

type BusinessBookingProfileCustomerTimezoneChoice

type BusinessBookingProfileCustomerTimezoneChoice string

BusinessBookingProfileCustomerTimezoneChoice Choices of customer-facing time zone used for bookings.

swagger:model BusinessBookingProfileCustomerTimezoneChoice

const (

	// BusinessBookingProfileCustomerTimezoneChoiceBUSINESSLOCATIONTIMEZONE captures enum value "BUSINESS_LOCATION_TIMEZONE"
	BusinessBookingProfileCustomerTimezoneChoiceBUSINESSLOCATIONTIMEZONE BusinessBookingProfileCustomerTimezoneChoice = "BUSINESS_LOCATION_TIMEZONE"

	// BusinessBookingProfileCustomerTimezoneChoiceCUSTOMERCHOICE captures enum value "CUSTOMER_CHOICE"
	BusinessBookingProfileCustomerTimezoneChoiceCUSTOMERCHOICE BusinessBookingProfileCustomerTimezoneChoice = "CUSTOMER_CHOICE"
)

func (BusinessBookingProfileCustomerTimezoneChoice) ContextValidate

ContextValidate validates this business booking profile customer timezone choice based on context it is used

func (BusinessBookingProfileCustomerTimezoneChoice) Validate

Validate validates this business booking profile customer timezone choice

type BusinessHours

type BusinessHours struct {

	// The list of time periods during which the business is open. There may be at most 10
	// periods per day.
	Periods []*BusinessHoursPeriod `json:"periods"`
}

BusinessHours Represents the hours of operation for a business location.

swagger:model BusinessHours

func (*BusinessHours) ContextValidate

func (m *BusinessHours) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this business hours based on the context it is used

func (*BusinessHours) MarshalBinary

func (m *BusinessHours) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BusinessHours) UnmarshalBinary

func (m *BusinessHours) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BusinessHours) Validate

func (m *BusinessHours) Validate(formats strfmt.Registry) error

Validate validates this business hours

type BusinessHoursPeriod

type BusinessHoursPeriod struct {

	// The day of week for this time period.
	// See [DayOfWeek](#type-dayofweek) for possible values
	DayOfWeek string `json:"day_of_week,omitempty"`

	// The end time of a business hours period, specified in local time using partial-time
	// RFC 3339 format.
	EndLocalTime string `json:"end_local_time,omitempty"`

	// The start time of a business hours period, specified in local time using partial-time
	// RFC 3339 format.
	StartLocalTime string `json:"start_local_time,omitempty"`
}

BusinessHoursPeriod Represents a period of time during which a business location is open.

swagger:model BusinessHoursPeriod

func (*BusinessHoursPeriod) ContextValidate

func (m *BusinessHoursPeriod) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this business hours period based on context it is used

func (*BusinessHoursPeriod) MarshalBinary

func (m *BusinessHoursPeriod) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BusinessHoursPeriod) UnmarshalBinary

func (m *BusinessHoursPeriod) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BusinessHoursPeriod) Validate

func (m *BusinessHoursPeriod) Validate(formats strfmt.Registry) error

Validate validates this business hours period

type CalculateLoyaltyPointsRequest

type CalculateLoyaltyPointsRequest struct {

	// The `order` ID for which to calculate the points.
	// Specify this field if your application uses the Orders API to process orders.
	// Otherwise, specify the `transaction_amount`.
	OrderID string `json:"order_id,omitempty"`

	// The purchase amount for which to calculate the points.
	// Specify this field if your application does not use the Orders API to process orders.
	// Otherwise, specify the `order_id`.
	TransactionAmountMoney *Money `json:"transaction_amount_money,omitempty"`
}

CalculateLoyaltyPointsRequest A request to calculate the points that a buyer can earn from a specified purchase. Example: {"request_body":{"order_id":"RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY"},"request_params":"?program_id=d619f755-2d17-41f3-990d-c04ecedd64dd"}

swagger:model CalculateLoyaltyPointsRequest

func (*CalculateLoyaltyPointsRequest) ContextValidate

func (m *CalculateLoyaltyPointsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this calculate loyalty points request based on the context it is used

func (*CalculateLoyaltyPointsRequest) MarshalBinary

func (m *CalculateLoyaltyPointsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CalculateLoyaltyPointsRequest) UnmarshalBinary

func (m *CalculateLoyaltyPointsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CalculateLoyaltyPointsRequest) Validate

func (m *CalculateLoyaltyPointsRequest) Validate(formats strfmt.Registry) error

Validate validates this calculate loyalty points request

type CalculateLoyaltyPointsResponse

type CalculateLoyaltyPointsResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The points that the buyer can earn from a specified purchase.
	// Minimum: 0
	Points *int64 `json:"points,omitempty"`
}

CalculateLoyaltyPointsResponse A response that includes the points that the buyer can earn from a specified purchase. Example: {"points":6}

swagger:model CalculateLoyaltyPointsResponse

func (*CalculateLoyaltyPointsResponse) ContextValidate

func (m *CalculateLoyaltyPointsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this calculate loyalty points response based on the context it is used

func (*CalculateLoyaltyPointsResponse) MarshalBinary

func (m *CalculateLoyaltyPointsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CalculateLoyaltyPointsResponse) UnmarshalBinary

func (m *CalculateLoyaltyPointsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CalculateLoyaltyPointsResponse) Validate

func (m *CalculateLoyaltyPointsResponse) Validate(formats strfmt.Registry) error

Validate validates this calculate loyalty points response

type CalculateOrderRequest

type CalculateOrderRequest struct {

	// The order to be calculated. Expects the entire order, not a sparse update.
	// Required: true
	Order *Order `json:"order"`

	// Identifies one or more loyalty reward tiers to apply during order calculation.
	// The discounts defined by the reward tiers are added to the order only to preview the
	// effect of applying the specified reward(s). The reward(s) do not correspond to actual
	// redemptions, that is, no `reward`s are created. Therefore, the reward `id`s are
	// random strings used only to reference the reward tier.
	ProposedRewards []*OrderReward `json:"proposed_rewards"`
}

CalculateOrderRequest calculate order request Example: {"request_body":{"idempotency_key":"b3e98fe3-b8de-471c-82f1-545f371e637c","order":{"discounts":[{"name":"50% Off","percentage":"50","scope":"ORDER"}],"line_items":[{"base_price_money":{"amount":500,"currency":"USD"},"name":"Item 1","quantity":"1"},{"base_price_money":{"amount":300,"currency":"USD"},"name":"Item 2","quantity":"2"}],"location_id":"D7AVYMEAPJ3A3"}}}

swagger:model CalculateOrderRequest

func (*CalculateOrderRequest) ContextValidate

func (m *CalculateOrderRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this calculate order request based on the context it is used

func (*CalculateOrderRequest) MarshalBinary

func (m *CalculateOrderRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CalculateOrderRequest) UnmarshalBinary

func (m *CalculateOrderRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CalculateOrderRequest) Validate

func (m *CalculateOrderRequest) Validate(formats strfmt.Registry) error

Validate validates this calculate order request

type CalculateOrderResponse

type CalculateOrderResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The calculated version of the order provided in the request.
	Order *Order `json:"order,omitempty"`
}

CalculateOrderResponse calculate order response Example: {"order":{"created_at":"2020-05-18T16:30:49.614Z","discounts":[{"applied_money":{"amount":550,"currency":"USD"},"name":"50% Off","percentage":"50","scope":"ORDER","type":"FIXED_PERCENTAGE","uid":"zGsRZP69aqSSR9lq9euSPB"}],"line_items":[{"applied_discounts":[{"applied_money":{"amount":250,"currency":"USD"},"discount_uid":"zGsRZP69aqSSR9lq9euSPB","uid":"9zr9S4dxvPAixvn0lpa1VC"}],"base_price_money":{"amount":500,"currency":"USD"},"gross_sales_money":{"amount":500,"currency":"USD"},"name":"Item 1","quantity":"1","total_discount_money":{"amount":250,"currency":"USD"},"total_money":{"amount":250,"currency":"USD"},"total_tax_money":{"amount":0,"currency":"USD"},"uid":"ULkg0tQTRK2bkU9fNv3IJD","variation_total_price_money":{"amount":500,"currency":"USD"}},{"applied_discounts":[{"applied_money":{"amount":300,"currency":"USD"},"discount_uid":"zGsRZP69aqSSR9lq9euSPB","uid":"qa8LwwZK82FgSEkQc2HYVC"}],"base_price_money":{"amount":300,"currency":"USD"},"gross_sales_money":{"amount":600,"currency":"USD"},"name":"Item 2","quantity":"2","total_discount_money":{"amount":300,"currency":"USD"},"total_money":{"amount":300,"currency":"USD"},"total_tax_money":{"amount":0,"currency":"USD"},"uid":"mumY8Nun4BC5aKe2yyx5a","variation_total_price_money":{"amount":600,"currency":"USD"}}],"location_id":"D7AVYMEAPJ3A3","net_amounts":{"discount_money":{"amount":550,"currency":"USD"},"service_charge_money":{"amount":0,"currency":"USD"},"tax_money":{"amount":0,"currency":"USD"},"tip_money":{"amount":0,"currency":"USD"},"total_money":{"amount":550,"currency":"USD"}},"state":"OPEN","total_discount_money":{"amount":550,"currency":"USD"},"total_money":{"amount":550,"currency":"USD"},"total_service_charge_money":{"amount":0,"currency":"USD"},"total_tax_money":{"amount":0,"currency":"USD"},"total_tip_money":{"amount":0,"currency":"USD"},"updated_at":"2020-05-18T16:30:49.614Z","version":1}}

swagger:model CalculateOrderResponse

func (*CalculateOrderResponse) ContextValidate

func (m *CalculateOrderResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this calculate order response based on the context it is used

func (*CalculateOrderResponse) MarshalBinary

func (m *CalculateOrderResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CalculateOrderResponse) UnmarshalBinary

func (m *CalculateOrderResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CalculateOrderResponse) Validate

func (m *CalculateOrderResponse) Validate(formats strfmt.Registry) error

Validate validates this calculate order response

type CancelBookingRequest

type CancelBookingRequest struct {

	// The revision number for the booking used for optimistic concurrency.
	// Minimum: 0
	BookingVersion *int64 `json:"booking_version,omitempty"`

	// A unique key to make this request an idempotent operation.
	// Max Length: 255
	IdempotencyKey string `json:"idempotency_key,omitempty"`
}

CancelBookingRequest cancel booking request Example: {"booking_version":1}

swagger:model CancelBookingRequest

func (*CancelBookingRequest) ContextValidate

func (m *CancelBookingRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this cancel booking request based on context it is used

func (*CancelBookingRequest) MarshalBinary

func (m *CancelBookingRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CancelBookingRequest) UnmarshalBinary

func (m *CancelBookingRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CancelBookingRequest) Validate

func (m *CancelBookingRequest) Validate(formats strfmt.Registry) error

Validate validates this cancel booking request

type CancelBookingResponse

type CancelBookingResponse struct {

	// The booking that was cancelled.
	Booking *Booking `json:"booking,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

CancelBookingResponse cancel booking response Example: {"booking":{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMXUrsBWWcHTt79t"}],"created_at":"2020-10-28T15:47:41Z","customer_id":"EX2QSVGTZN4K1E5QE1CBFNVQ8M","customer_note":"","id":"zkras0xv0xwswx","location_id":"LEQHH0YY8B42M","seller_note":"","start_at":"2020-11-26T13:00:00Z","status":"CANCELLED_BY_CUSTOMER","updated_at":"2020-10-28T15:49:25Z","version":1},"errors":[]}

swagger:model CancelBookingResponse

func (*CancelBookingResponse) ContextValidate

func (m *CancelBookingResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this cancel booking response based on the context it is used

func (*CancelBookingResponse) MarshalBinary

func (m *CancelBookingResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CancelBookingResponse) UnmarshalBinary

func (m *CancelBookingResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CancelBookingResponse) Validate

func (m *CancelBookingResponse) Validate(formats strfmt.Registry) error

Validate validates this cancel booking response

type CancelInvoiceRequest

type CancelInvoiceRequest struct {

	// The version of the `invoice` to cancel.
	// If you do not know the version, you can call
	// `GetInvoice](#endpoint-Invoices-GetInvoice) or [ListInvoices`.
	// Required: true
	Version *int64 `json:"version"`
}

CancelInvoiceRequest Describes a `CancelInvoice` request. Example: {"request_body":{"version":0}}

swagger:model CancelInvoiceRequest

func (*CancelInvoiceRequest) ContextValidate

func (m *CancelInvoiceRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this cancel invoice request based on context it is used

func (*CancelInvoiceRequest) MarshalBinary

func (m *CancelInvoiceRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CancelInvoiceRequest) UnmarshalBinary

func (m *CancelInvoiceRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CancelInvoiceRequest) Validate

func (m *CancelInvoiceRequest) Validate(formats strfmt.Registry) error

Validate validates this cancel invoice request

type CancelInvoiceResponse

type CancelInvoiceResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The canceled invoice.
	Invoice *Invoice `json:"invoice,omitempty"`
}

CancelInvoiceResponse The response returned by the `CancelInvoice` request. Example: {"invoice":{"created_at":"2020-06-18T17:45:13Z","custom_fields":[{"label":"Event Reference Number","placement":"ABOVE_LINE_ITEMS","value":"Ref. #1234"},{"label":"Terms of Service","placement":"BELOW_LINE_ITEMS","value":"The terms of service are..."}],"delivery_method":"EMAIL","description":"We appreciate your business!","id":"gt2zv1z6mnUm1V7KMxxf3w","invoice_number":"inv-100","location_id":"ES0RJRZYEC39A","order_id":"CAISENgvlJ6jLWAzERDzjyHVybY","payment_requests":[{"automatic_payment_source":"NONE","computed_amount_money":{"amount":10000,"currency":"USD"},"due_date":"2030-01-24","reminders":[{"message":"Your invoice is due tomorrow","relative_scheduled_days":-1,"status":"PENDING","uid":"beebd363-e47f-4075-8785-c235aaa7df11"}],"request_type":"BALANCE","tipping_enabled":true,"total_completed_amount_money":{"amount":0,"currency":"USD"},"uid":"2da7964f-f3d2-4f43-81e8-5aa220bf3355"}],"primary_recipient":{"customer_id":"JDKYHBWT1D4F8MFH63DBMEN8Y4","email_address":"Amelia.Earhart@example.com","family_name":"Earhart","given_name":"Amelia","phone_number":"1-212-555-4240"},"scheduled_at":"2030-01-13T10:00:00Z","status":"CANCELED","timezone":"America/Los_Angeles","title":"Event Planning Services","updated_at":"2020-06-18T18:23:11Z","version":1}}

swagger:model CancelInvoiceResponse

func (*CancelInvoiceResponse) ContextValidate

func (m *CancelInvoiceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this cancel invoice response based on the context it is used

func (*CancelInvoiceResponse) MarshalBinary

func (m *CancelInvoiceResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CancelInvoiceResponse) UnmarshalBinary

func (m *CancelInvoiceResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CancelInvoiceResponse) Validate

func (m *CancelInvoiceResponse) Validate(formats strfmt.Registry) error

Validate validates this cancel invoice response

type CancelPaymentByIdempotencyKeyRequest

type CancelPaymentByIdempotencyKeyRequest struct {

	// The `idempotency_key` identifying the payment to be canceled.
	// Required: true
	// Max Length: 45
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`
}

CancelPaymentByIdempotencyKeyRequest Specifies the idempotency key of a payment to cancel. Example: {"request_body":{"idempotency_key":"a7e36d40-d24b-11e8-b568-0800200c9a66"}}

swagger:model CancelPaymentByIdempotencyKeyRequest

func (*CancelPaymentByIdempotencyKeyRequest) ContextValidate

func (m *CancelPaymentByIdempotencyKeyRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this cancel payment by idempotency key request based on context it is used

func (*CancelPaymentByIdempotencyKeyRequest) MarshalBinary

func (m *CancelPaymentByIdempotencyKeyRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CancelPaymentByIdempotencyKeyRequest) UnmarshalBinary

func (m *CancelPaymentByIdempotencyKeyRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CancelPaymentByIdempotencyKeyRequest) Validate

Validate validates this cancel payment by idempotency key request

type CancelPaymentByIdempotencyKeyResponse

type CancelPaymentByIdempotencyKeyResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

CancelPaymentByIdempotencyKeyResponse The return value from the [CancelPaymentByIdempotencyKey](#endpoint-payments-cancelpaymentbyidempotencykey) endpoint. On success, `errors` is empty. Example: {}

swagger:model CancelPaymentByIdempotencyKeyResponse

func (*CancelPaymentByIdempotencyKeyResponse) ContextValidate

func (m *CancelPaymentByIdempotencyKeyResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this cancel payment by idempotency key response based on the context it is used

func (*CancelPaymentByIdempotencyKeyResponse) MarshalBinary

func (m *CancelPaymentByIdempotencyKeyResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CancelPaymentByIdempotencyKeyResponse) UnmarshalBinary

func (m *CancelPaymentByIdempotencyKeyResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CancelPaymentByIdempotencyKeyResponse) Validate

Validate validates this cancel payment by idempotency key response

type CancelPaymentRequest

type CancelPaymentRequest interface{}

CancelPaymentRequest Cancels (voids) a payment before it has been completed. Note: Only payments created with `autocomplete` set to `false` can be canceled. Example: {"request_body":{}}

swagger:model CancelPaymentRequest

type CancelPaymentResponse

type CancelPaymentResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The successfully canceled `Payment` object.
	Payment *Payment `json:"payment,omitempty"`
}

CancelPaymentResponse The return value from the [CancelPayment](#endpoint-payments-cancelpayment) endpoint. Example: {"payment":{"amount_money":{"amount":200,"currency":"USD"},"app_fee_money":{"amount":10,"currency":"USD"},"card_details":{"auth_result_code":"eWZBDh","avs_status":"AVS_ACCEPTED","card":{"bin":"411111","card_brand":"VISA","card_type":"DEBIT","exp_month":2,"exp_year":2024,"fingerprint":"sq-1-9PP0tWfcM6vIsYmfsesdjfhduHSDFNdJFNDfDNFjdfjpseirDErsaP","last_4":"1234","prepaid_type":"PREPAID"},"card_payment_timeline":{"authorized_at":"2018-10-17T20:38:46.753Z","voided_at":"2018-10-17T20:38:57.793Z"},"cvv_status":"CVV_ACCEPTED","entry_method":"KEYED","statement_description":"SQ *MY MERCHANT","status":"VOIDED"},"created_at":"2018-10-17T20:38:46.743Z","customer_id":"RDX9Z4XTIZR7MRZJUXNY9HUK6I","id":"GQTFp1ZlXdpoW4o6eGiZhbjosiDFf","location_id":"XTI0H92143A39","note":"Brief description","order_id":"m2Hr8Hk8A3CTyQQ1k4ynExg92tO3","reference_id":"123456","source_type":"CARD","status":"CANCELED","total_money":{"amount":200,"currency":"USD"},"updated_at":"2018-10-17T20:38:57.693Z"}}

swagger:model CancelPaymentResponse

func (*CancelPaymentResponse) ContextValidate

func (m *CancelPaymentResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this cancel payment response based on the context it is used

func (*CancelPaymentResponse) MarshalBinary

func (m *CancelPaymentResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CancelPaymentResponse) UnmarshalBinary

func (m *CancelPaymentResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CancelPaymentResponse) Validate

func (m *CancelPaymentResponse) Validate(formats strfmt.Registry) error

Validate validates this cancel payment response

type CancelSubscriptionRequest

type CancelSubscriptionRequest interface{}

CancelSubscriptionRequest Defines parameters in a [CancelSubscription](#endpoint-subscriptions-cancelsubscription) endpoint request.

swagger:model CancelSubscriptionRequest

type CancelSubscriptionResponse

type CancelSubscriptionResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The canceled subscription.
	Subscription *Subscription `json:"subscription,omitempty"`
}

CancelSubscriptionResponse Defines fields that are included in a [CancelSubscription](#endpoint-subscriptions-cancelsubscription) response. Example: {"subscription":{"canceled_date":"2020-05-01","card_id":"ccof:qy5x8hHGYsgLrp4Q4GB","created_at":"2020-08-03T21:53:10Z","customer_id":"CHFGVKYY8RSV93M5KCYTG4PN0G","id":"910afd30-464a-4e00-a8d8-2296eEXAMPLE","location_id":"S8GWD5R9QB376","paid_until_date":"2020-05-01","plan_id":"6JHXF3B2CW3YKHDV4XEM674H","start_date":"2020-04-24","status":"ACTIVE","timezone":"America/Los_Angeles","version":1594311617331}}

swagger:model CancelSubscriptionResponse

func (*CancelSubscriptionResponse) ContextValidate

func (m *CancelSubscriptionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this cancel subscription response based on the context it is used

func (*CancelSubscriptionResponse) MarshalBinary

func (m *CancelSubscriptionResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CancelSubscriptionResponse) UnmarshalBinary

func (m *CancelSubscriptionResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CancelSubscriptionResponse) Validate

func (m *CancelSubscriptionResponse) Validate(formats strfmt.Registry) error

Validate validates this cancel subscription response

type CancelTerminalCheckoutRequest

type CancelTerminalCheckoutRequest interface{}

CancelTerminalCheckoutRequest cancel terminal checkout request Example: {"request_body":{}}

swagger:model CancelTerminalCheckoutRequest

type CancelTerminalCheckoutResponse

type CancelTerminalCheckoutResponse struct {

	// The canceled `TerminalCheckout`
	Checkout *TerminalCheckout `json:"checkout,omitempty"`

	// Information on errors encountered during the request.
	Errors []*Error `json:"errors"`
}

CancelTerminalCheckoutResponse cancel terminal checkout response Example: {"checkout":{"amount_money":{"amount":123,"currency":"USD"},"app_id":"APP_ID","cancel_reason":"SELLER_CANCELED","created_at":"2020-03-16T15:31:19.934Z","deadline_duration":"PT10M","device_options":{"device_id":"dbb5d83a-7838-11ea-bc55-0242ac130003","skip_receipt_screen":true,"tip_settings":{"allow_tipping":true}},"id":"S1yDlPQx7slqO","reference_id":"id36815","status":"CANCELED","updated_at":"2020-03-16T15:31:45.787Z"}}

swagger:model CancelTerminalCheckoutResponse

func (*CancelTerminalCheckoutResponse) ContextValidate

func (m *CancelTerminalCheckoutResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this cancel terminal checkout response based on the context it is used

func (*CancelTerminalCheckoutResponse) MarshalBinary

func (m *CancelTerminalCheckoutResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CancelTerminalCheckoutResponse) UnmarshalBinary

func (m *CancelTerminalCheckoutResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CancelTerminalCheckoutResponse) Validate

func (m *CancelTerminalCheckoutResponse) Validate(formats strfmt.Registry) error

Validate validates this cancel terminal checkout response

type CancelTerminalRefundRequest

type CancelTerminalRefundRequest interface{}

CancelTerminalRefundRequest cancel terminal refund request Example: {"request_body":{}}

swagger:model CancelTerminalRefundRequest

type CancelTerminalRefundResponse

type CancelTerminalRefundResponse struct {

	// Information on errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The updated `TerminalRefund`
	Refund *TerminalRefund `json:"refund,omitempty"`
}

CancelTerminalRefundResponse cancel terminal refund response Example: {"refund":{"amount_money":{"amount":100,"currency":"CAD"},"app_id":"sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ","cancel_reason":"SELLER_CANCELED","card":{"bin":"411111","card_brand":"INTERAC","card_type":"CREDIT","exp_month":1,"exp_year":2022,"fingerprint":"sq-1-B1fP9MNNmZgVVaPKRND6oDKYbz25S2cTvg9Mzwg3RMTK1zT1PiGRT-AE3nTA8vSmmw","last_4":"1111"},"created_at":"2020-10-21T22:47:23.241Z","deadline_duration":"PT5M","device_id":"42690809-faa2-4701-a24b-19d3d34c9aaa","id":"g6ycb6HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY","location_id":"76C9W6K8CNNQ5","order_id":"kcuKDKreRaI4gF4TjmEgZjHk8Z7YY","payment_id":"5O5OvgkcNUhl7JBuINflcjKqUzXZY","reason":"reason","status":"CANCELED","updated_at":"2020-10-21T22:47:30.096Z"}}

swagger:model CancelTerminalRefundResponse

func (*CancelTerminalRefundResponse) ContextValidate

func (m *CancelTerminalRefundResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this cancel terminal refund response based on the context it is used

func (*CancelTerminalRefundResponse) MarshalBinary

func (m *CancelTerminalRefundResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CancelTerminalRefundResponse) UnmarshalBinary

func (m *CancelTerminalRefundResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CancelTerminalRefundResponse) Validate

func (m *CancelTerminalRefundResponse) Validate(formats strfmt.Registry) error

Validate validates this cancel terminal refund response

type CaptureTransactionRequest

type CaptureTransactionRequest interface{}

CaptureTransactionRequest capture transaction request Example: {}

swagger:model CaptureTransactionRequest

type CaptureTransactionResponse

type CaptureTransactionResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

CaptureTransactionResponse Defines the fields that are included in the response body of a request to the [CaptureTransaction](#endpoint-capturetransaction) endpoint. Example: {}

swagger:model CaptureTransactionResponse

func (*CaptureTransactionResponse) ContextValidate

func (m *CaptureTransactionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this capture transaction response based on the context it is used

func (*CaptureTransactionResponse) MarshalBinary

func (m *CaptureTransactionResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CaptureTransactionResponse) UnmarshalBinary

func (m *CaptureTransactionResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CaptureTransactionResponse) Validate

func (m *CaptureTransactionResponse) Validate(formats strfmt.Registry) error

Validate validates this capture transaction response

type Card

type Card struct {

	// The billing address for this card.
	BillingAddress *Address `json:"billing_address,omitempty"`

	// The first six digits of the card number, known as the Bank Identification Number (BIN). Only the Payments API
	// returns this field.
	// Max Length: 6
	Bin string `json:"bin,omitempty"`

	// The card's brand.
	// See [CardBrand](#type-cardbrand) for possible values
	CardBrand string `json:"card_brand,omitempty"`

	// The type of the card.
	// The Card object includes this field only in response to Payments API calls.
	// See [CardType](#type-cardtype) for possible values
	CardType string `json:"card_type,omitempty"`

	// The name of the cardholder.
	// Max Length: 96
	CardholderName string `json:"cardholder_name,omitempty"`

	// The expiration month of the associated card as an integer between 1 and 12.
	ExpMonth int64 `json:"exp_month,omitempty"`

	// The four-digit year of the card's expiration date.
	ExpYear int64 `json:"exp_year,omitempty"`

	// __Not currently set.__ Intended as a Square-assigned identifier, based
	// on the card number, to identify the card across multiple locations within a
	// single application.
	// Max Length: 255
	Fingerprint string `json:"fingerprint,omitempty"`

	// Unique ID for this card. Generated by Square.
	// Max Length: 64
	ID string `json:"id,omitempty"`

	// The last 4 digits of the card number.
	// Max Length: 4
	Last4 string `json:"last_4,omitempty"`

	// Indicates whether the Card is prepaid or not.
	// The Card object includes this field only in response to Payments API calls.
	// See [CardPrepaidType](#type-cardprepaidtype) for possible values
	PrepaidType string `json:"prepaid_type,omitempty"`
}

Card Represents the payment details of a card to be used for payments. These details are determined by the `card_nonce` generated by `SqPaymentForm`.

swagger:model Card

func (*Card) ContextValidate

func (m *Card) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this card based on the context it is used

func (*Card) MarshalBinary

func (m *Card) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Card) UnmarshalBinary

func (m *Card) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Card) Validate

func (m *Card) Validate(formats strfmt.Registry) error

Validate validates this card

type CardBrand

type CardBrand string

CardBrand Indicates a card's brand, such as `VISA` or `MASTERCARD`.

swagger:model CardBrand

const (

	// CardBrandOTHERBRAND captures enum value "OTHER_BRAND"
	CardBrandOTHERBRAND CardBrand = "OTHER_BRAND"

	// CardBrandVISA captures enum value "VISA"
	CardBrandVISA CardBrand = "VISA"

	// CardBrandMASTERCARD captures enum value "MASTERCARD"
	CardBrandMASTERCARD CardBrand = "MASTERCARD"

	// CardBrandAMERICANEXPRESS captures enum value "AMERICAN_EXPRESS"
	CardBrandAMERICANEXPRESS CardBrand = "AMERICAN_EXPRESS"

	// CardBrandDISCOVER captures enum value "DISCOVER"
	CardBrandDISCOVER CardBrand = "DISCOVER"

	// CardBrandDISCOVERDINERS captures enum value "DISCOVER_DINERS"
	CardBrandDISCOVERDINERS CardBrand = "DISCOVER_DINERS"

	// CardBrandJCB captures enum value "JCB"
	CardBrandJCB CardBrand = "JCB"

	// CardBrandCHINAUNIONPAY captures enum value "CHINA_UNIONPAY"
	CardBrandCHINAUNIONPAY CardBrand = "CHINA_UNIONPAY"

	// CardBrandSQUAREGIFTCARD captures enum value "SQUARE_GIFT_CARD"
	CardBrandSQUAREGIFTCARD CardBrand = "SQUARE_GIFT_CARD"

	// CardBrandSQUARECAPITALCARD captures enum value "SQUARE_CAPITAL_CARD"
	CardBrandSQUARECAPITALCARD CardBrand = "SQUARE_CAPITAL_CARD"

	// CardBrandINTERAC captures enum value "INTERAC"
	CardBrandINTERAC CardBrand = "INTERAC"

	// CardBrandEFTPOS captures enum value "EFTPOS"
	CardBrandEFTPOS CardBrand = "EFTPOS"

	// CardBrandFELICA captures enum value "FELICA"
	CardBrandFELICA CardBrand = "FELICA"
)

func (CardBrand) ContextValidate

func (m CardBrand) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this card brand based on context it is used

func (CardBrand) Validate

func (m CardBrand) Validate(formats strfmt.Registry) error

Validate validates this card brand

type CardPaymentDetails

type CardPaymentDetails struct {

	// For EMV payments, the cryptogram generated for the payment.
	// Max Length: 16
	ApplicationCryptogram string `json:"application_cryptogram,omitempty"`

	// For EMV payments, the application ID identifies the EMV application used for the payment.
	// Max Length: 32
	ApplicationIdentifier string `json:"application_identifier,omitempty"`

	// For EMV payments, the human-readable name of the EMV application used for the payment.
	// Max Length: 16
	ApplicationName string `json:"application_name,omitempty"`

	// The status code returned by the card issuer that describes the payment's
	// authorization status.
	// Max Length: 10
	AuthResultCode string `json:"auth_result_code,omitempty"`

	// The status code returned from the Address Verification System (AVS) check. The code can be
	// `AVS_ACCEPTED`, `AVS_REJECTED`, or `AVS_NOT_CHECKED`.
	// Max Length: 50
	AvsStatus string `json:"avs_status,omitempty"`

	// The credit card's non-confidential details.
	Card *Card `json:"card,omitempty"`

	// The timeline for card payments.
	CardPaymentTimeline *CardPaymentTimeline `json:"card_payment_timeline,omitempty"`

	// The status code returned from the Card Verification Value (CVV) check. The code can be
	// `CVV_ACCEPTED`, `CVV_REJECTED`, or `CVV_NOT_CHECKED`.
	// Max Length: 50
	CvvStatus string `json:"cvv_status,omitempty"`

	// Details about the device that took the payment.
	DeviceDetails *DeviceDetails `json:"device_details,omitempty"`

	// The method used to enter the card's details for the payment. The method can be
	// `KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`.
	// Max Length: 50
	EntryMethod string `json:"entry_method,omitempty"`

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// Whether the card must be physically present for the payment to
	// be refunded.  If set to `true`, the card must be present.
	RefundRequiresCardPresence bool `json:"refund_requires_card_presence,omitempty"`

	// The statement description sent to the card networks.
	//
	// Note: The actual statement description varies and is likely to be truncated and appended with
	// additional information on a per issuer basis.
	// Max Length: 50
	StatementDescription string `json:"statement_description,omitempty"`

	// The card payment's current state. The state can be AUTHORIZED, CAPTURED, VOIDED, or
	// FAILED.
	// Max Length: 50
	Status string `json:"status,omitempty"`

	// For EMV payments, the method used to verify the cardholder's identity. The method can be
	// `PIN`, `SIGNATURE`, `PIN_AND_SIGNATURE`, `ON_DEVICE`, or `NONE`.
	// Max Length: 50
	VerificationMethod string `json:"verification_method,omitempty"`

	// For EMV payments, the results of the cardholder verification. The result can be
	// `SUCCESS`, `FAILURE`, or `UNKNOWN`.
	// Max Length: 50
	VerificationResults string `json:"verification_results,omitempty"`
}

CardPaymentDetails Reflects the current status of a card payment.

swagger:model CardPaymentDetails

func (*CardPaymentDetails) ContextValidate

func (m *CardPaymentDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this card payment details based on the context it is used

func (*CardPaymentDetails) MarshalBinary

func (m *CardPaymentDetails) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CardPaymentDetails) UnmarshalBinary

func (m *CardPaymentDetails) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CardPaymentDetails) Validate

func (m *CardPaymentDetails) Validate(formats strfmt.Registry) error

Validate validates this card payment details

type CardPaymentTimeline

type CardPaymentTimeline struct {

	// The timestamp when the payment was authorized, in RFC 3339 format.
	AuthorizedAt string `json:"authorized_at,omitempty"`

	// The timestamp when the payment was captured, in RFC 3339 format.
	CapturedAt string `json:"captured_at,omitempty"`

	// The timestamp when the payment was voided, in RFC 3339 format.
	VoidedAt string `json:"voided_at,omitempty"`
}

CardPaymentTimeline The timeline for card payments.

swagger:model CardPaymentTimeline

func (*CardPaymentTimeline) ContextValidate

func (m *CardPaymentTimeline) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this card payment timeline based on context it is used

func (*CardPaymentTimeline) MarshalBinary

func (m *CardPaymentTimeline) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CardPaymentTimeline) UnmarshalBinary

func (m *CardPaymentTimeline) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CardPaymentTimeline) Validate

func (m *CardPaymentTimeline) Validate(formats strfmt.Registry) error

Validate validates this card payment timeline

type CardPrepaidType

type CardPrepaidType string

CardPrepaidType Indicates a card's prepaid type, such as `NOT_PREPAID` or `PREPAID`.

swagger:model CardPrepaidType

const (

	// CardPrepaidTypeUNKNOWNPREPAIDTYPE captures enum value "UNKNOWN_PREPAID_TYPE"
	CardPrepaidTypeUNKNOWNPREPAIDTYPE CardPrepaidType = "UNKNOWN_PREPAID_TYPE"

	// CardPrepaidTypeNOTPREPAID captures enum value "NOT_PREPAID"
	CardPrepaidTypeNOTPREPAID CardPrepaidType = "NOT_PREPAID"

	// CardPrepaidTypePREPAID captures enum value "PREPAID"
	CardPrepaidTypePREPAID CardPrepaidType = "PREPAID"
)

func (CardPrepaidType) ContextValidate

func (m CardPrepaidType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this card prepaid type based on context it is used

func (CardPrepaidType) Validate

func (m CardPrepaidType) Validate(formats strfmt.Registry) error

Validate validates this card prepaid type

type CardSquareProduct

type CardSquareProduct string

CardSquareProduct card square product

swagger:model CardSquareProduct

const (

	// CardSquareProductUNKNOWNSQUAREPRODUCT captures enum value "UNKNOWN_SQUARE_PRODUCT"
	CardSquareProductUNKNOWNSQUAREPRODUCT CardSquareProduct = "UNKNOWN_SQUARE_PRODUCT"

	// CardSquareProductCONNECTAPI captures enum value "CONNECT_API"
	CardSquareProductCONNECTAPI CardSquareProduct = "CONNECT_API"

	// CardSquareProductDASHBOARD captures enum value "DASHBOARD"
	CardSquareProductDASHBOARD CardSquareProduct = "DASHBOARD"

	// CardSquareProductREGISTERCLIENT captures enum value "REGISTER_CLIENT"
	CardSquareProductREGISTERCLIENT CardSquareProduct = "REGISTER_CLIENT"

	// CardSquareProductBUYERDASHBOARD captures enum value "BUYER_DASHBOARD"
	CardSquareProductBUYERDASHBOARD CardSquareProduct = "BUYER_DASHBOARD"

	// CardSquareProductWEB captures enum value "WEB"
	CardSquareProductWEB CardSquareProduct = "WEB"

	// CardSquareProductINVOICES captures enum value "INVOICES"
	CardSquareProductINVOICES CardSquareProduct = "INVOICES"

	// CardSquareProductGIFTCARD captures enum value "GIFT_CARD"
	CardSquareProductGIFTCARD CardSquareProduct = "GIFT_CARD"

	// CardSquareProductVIRTUALTERMINAL captures enum value "VIRTUAL_TERMINAL"
	CardSquareProductVIRTUALTERMINAL CardSquareProduct = "VIRTUAL_TERMINAL"

	// CardSquareProductREADERSDK captures enum value "READER_SDK"
	CardSquareProductREADERSDK CardSquareProduct = "READER_SDK"
)

func (CardSquareProduct) ContextValidate

func (m CardSquareProduct) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this card square product based on context it is used

func (CardSquareProduct) Validate

func (m CardSquareProduct) Validate(formats strfmt.Registry) error

Validate validates this card square product

type CardType

type CardType string

CardType Indicates a card's type, such as `CREDIT` or `DEBIT`.

swagger:model CardType

const (

	// CardTypeUNKNOWNCARDTYPE captures enum value "UNKNOWN_CARD_TYPE"
	CardTypeUNKNOWNCARDTYPE CardType = "UNKNOWN_CARD_TYPE"

	// CardTypeCREDIT captures enum value "CREDIT"
	CardTypeCREDIT CardType = "CREDIT"

	// CardTypeDEBIT captures enum value "DEBIT"
	CardTypeDEBIT CardType = "DEBIT"
)

func (CardType) ContextValidate

func (m CardType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this card type based on context it is used

func (CardType) Validate

func (m CardType) Validate(formats strfmt.Registry) error

Validate validates this card type

type CashDrawerDevice

type CashDrawerDevice struct {

	// The device Square-issued ID
	ID string `json:"id,omitempty"`

	// The device merchant-specified name.
	Name string `json:"name,omitempty"`
}

CashDrawerDevice cash drawer device

swagger:model CashDrawerDevice

func (*CashDrawerDevice) ContextValidate

func (m *CashDrawerDevice) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this cash drawer device based on context it is used

func (*CashDrawerDevice) MarshalBinary

func (m *CashDrawerDevice) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CashDrawerDevice) UnmarshalBinary

func (m *CashDrawerDevice) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CashDrawerDevice) Validate

func (m *CashDrawerDevice) Validate(formats strfmt.Registry) error

Validate validates this cash drawer device

type CashDrawerEventType

type CashDrawerEventType string

CashDrawerEventType The types of events on a CashDrawerShift. Each event type represents an employee action on the actual cash drawer represented by a CashDrawerShift.

swagger:model CashDrawerEventType

const (

	// CashDrawerEventTypeNOSALE captures enum value "NO_SALE"
	CashDrawerEventTypeNOSALE CashDrawerEventType = "NO_SALE"

	// CashDrawerEventTypeCASHTENDERPAYMENT captures enum value "CASH_TENDER_PAYMENT"
	CashDrawerEventTypeCASHTENDERPAYMENT CashDrawerEventType = "CASH_TENDER_PAYMENT"

	// CashDrawerEventTypeOTHERTENDERPAYMENT captures enum value "OTHER_TENDER_PAYMENT"
	CashDrawerEventTypeOTHERTENDERPAYMENT CashDrawerEventType = "OTHER_TENDER_PAYMENT"

	// CashDrawerEventTypeCASHTENDERCANCELLEDPAYMENT captures enum value "CASH_TENDER_CANCELLED_PAYMENT"
	CashDrawerEventTypeCASHTENDERCANCELLEDPAYMENT CashDrawerEventType = "CASH_TENDER_CANCELLED_PAYMENT"

	// CashDrawerEventTypeOTHERTENDERCANCELLEDPAYMENT captures enum value "OTHER_TENDER_CANCELLED_PAYMENT"
	CashDrawerEventTypeOTHERTENDERCANCELLEDPAYMENT CashDrawerEventType = "OTHER_TENDER_CANCELLED_PAYMENT"

	// CashDrawerEventTypeCASHTENDERREFUND captures enum value "CASH_TENDER_REFUND"
	CashDrawerEventTypeCASHTENDERREFUND CashDrawerEventType = "CASH_TENDER_REFUND"

	// CashDrawerEventTypeOTHERTENDERREFUND captures enum value "OTHER_TENDER_REFUND"
	CashDrawerEventTypeOTHERTENDERREFUND CashDrawerEventType = "OTHER_TENDER_REFUND"

	// CashDrawerEventTypePAIDIN captures enum value "PAID_IN"
	CashDrawerEventTypePAIDIN CashDrawerEventType = "PAID_IN"

	// CashDrawerEventTypePAIDOUT captures enum value "PAID_OUT"
	CashDrawerEventTypePAIDOUT CashDrawerEventType = "PAID_OUT"
)

func (CashDrawerEventType) ContextValidate

func (m CashDrawerEventType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this cash drawer event type based on context it is used

func (CashDrawerEventType) Validate

func (m CashDrawerEventType) Validate(formats strfmt.Registry) error

Validate validates this cash drawer event type

type CashDrawerShift

type CashDrawerShift struct {

	// The amount of money added to the cash drawer for reasons other than cash
	// payments. It is computed by summing the events of type PAID_IN. The amount is
	// always greater than or equal to zero.
	CashPaidInMoney *Money `json:"cash_paid_in_money,omitempty"`

	// The amount of money removed from the cash drawer for reasons other than
	// cash refunds. It is computed by summing the events of type PAID_OUT. The amount
	// is always greater than or equal to zero.
	CashPaidOutMoney *Money `json:"cash_paid_out_money,omitempty"`

	// The amount of money added to the cash drawer from cash payments.
	// This is computed by summing all events with the types CASH_TENDER_PAYMENT and
	// CASH_TENDER_CANCELED_PAYMENT. The amount is always greater than or equal to
	// zero.
	CashPaymentMoney *Money `json:"cash_payment_money,omitempty"`

	// The amount of money removed from the cash drawer from cash refunds.
	// It is computed by summing the events of type CASH_TENDER_REFUND. The amount
	// is always greater than or equal to zero.
	CashRefundsMoney *Money `json:"cash_refunds_money,omitempty"`

	// The time when the shift was closed, in ISO 8601 format.
	ClosedAt string `json:"closed_at,omitempty"`

	// The amount of money found in the cash drawer at the end of the shift
	// by an auditing employee. The amount should be positive.
	ClosedCashMoney *Money `json:"closed_cash_money,omitempty"`

	// The ID of the employee that closed the cash drawer shift by auditing
	// the cash drawer contents.
	ClosingEmployeeID string `json:"closing_employee_id,omitempty"`

	// The free-form text description of a cash drawer by an employee.
	Description string `json:"description,omitempty"`

	// The device running Square Point of Sale that was connected to the cash drawer.
	Device *CashDrawerDevice `json:"device,omitempty"`

	// The IDs of all employees that were logged into Square Point of Sale at any
	// point while the cash drawer shift was open.
	EmployeeIds []string `json:"employee_ids"`

	// The time when the shift ended, in ISO 8601 format.
	EndedAt string `json:"ended_at,omitempty"`

	// The ID of the employee that ended the cash drawer shift.
	EndingEmployeeID string `json:"ending_employee_id,omitempty"`

	// The amount of money that should be in the cash drawer at the end of the
	// shift, based on the shift's other money amounts.
	// This can be negative if employees have not correctly recorded all the events
	// on the cash drawer.
	// cash_paid_out_money is a summation of amounts from cash_payment_money (zero
	// or positive), cash_refunds_money (zero or negative), cash_paid_in_money (zero
	// or positive), and cash_paid_out_money (zero or negative) event types.
	ExpectedCashMoney *Money `json:"expected_cash_money,omitempty"`

	// The shift unique ID.
	ID string `json:"id,omitempty"`

	// The time when the shift began, in ISO 8601 format.
	OpenedAt string `json:"opened_at,omitempty"`

	// The amount of money in the cash drawer at the start of the shift.
	// The amount must be greater than or equal to zero.
	OpenedCashMoney *Money `json:"opened_cash_money,omitempty"`

	// The ID of the employee that started the cash drawer shift.
	OpeningEmployeeID string `json:"opening_employee_id,omitempty"`

	// The shift current state.
	// See [CashDrawerShiftState](#type-cashdrawershiftstate) for possible values
	State string `json:"state,omitempty"`
}

CashDrawerShift This model gives the details of a cash drawer shift. The cash_payment_money, cash_refund_money, cash_paid_in_money, and cash_paid_out_money fields are all computed by summing their respective event types.

swagger:model CashDrawerShift

func (*CashDrawerShift) ContextValidate

func (m *CashDrawerShift) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this cash drawer shift based on the context it is used

func (*CashDrawerShift) MarshalBinary

func (m *CashDrawerShift) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CashDrawerShift) UnmarshalBinary

func (m *CashDrawerShift) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CashDrawerShift) Validate

func (m *CashDrawerShift) Validate(formats strfmt.Registry) error

Validate validates this cash drawer shift

type CashDrawerShiftEvent

type CashDrawerShiftEvent struct {

	// The event time in ISO 8601 format.
	CreatedAt string `json:"created_at,omitempty"`

	// An optional description of the event, entered by the employee that
	// created the event.
	Description string `json:"description,omitempty"`

	// The ID of the employee that created the event.
	EmployeeID string `json:"employee_id,omitempty"`

	// The amount of money that was added to or removed from the cash drawer
	// in the event. The amount can be positive (for added money)
	// or zero (for other tender type payments). The addition or removal of money can be determined by
	// by the event type.
	EventMoney *Money `json:"event_money,omitempty"`

	// The type of cash drawer shift event.
	// See [CashDrawerEventType](#type-cashdrawereventtype) for possible values
	EventType string `json:"event_type,omitempty"`

	// The unique ID of the event.
	ID string `json:"id,omitempty"`
}

CashDrawerShiftEvent cash drawer shift event

swagger:model CashDrawerShiftEvent

func (*CashDrawerShiftEvent) ContextValidate

func (m *CashDrawerShiftEvent) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this cash drawer shift event based on the context it is used

func (*CashDrawerShiftEvent) MarshalBinary

func (m *CashDrawerShiftEvent) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CashDrawerShiftEvent) UnmarshalBinary

func (m *CashDrawerShiftEvent) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CashDrawerShiftEvent) Validate

func (m *CashDrawerShiftEvent) Validate(formats strfmt.Registry) error

Validate validates this cash drawer shift event

type CashDrawerShiftState

type CashDrawerShiftState string

CashDrawerShiftState The current state of a cash drawer shift.

swagger:model CashDrawerShiftState

const (

	// CashDrawerShiftStateOPEN captures enum value "OPEN"
	CashDrawerShiftStateOPEN CashDrawerShiftState = "OPEN"

	// CashDrawerShiftStateENDED captures enum value "ENDED"
	CashDrawerShiftStateENDED CashDrawerShiftState = "ENDED"

	// CashDrawerShiftStateCLOSED captures enum value "CLOSED"
	CashDrawerShiftStateCLOSED CashDrawerShiftState = "CLOSED"
)

func (CashDrawerShiftState) ContextValidate

func (m CashDrawerShiftState) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this cash drawer shift state based on context it is used

func (CashDrawerShiftState) Validate

func (m CashDrawerShiftState) Validate(formats strfmt.Registry) error

Validate validates this cash drawer shift state

type CashDrawerShiftSummary

type CashDrawerShiftSummary struct {

	// The shift close time in ISO 8601 format.
	ClosedAt string `json:"closed_at,omitempty"`

	// The amount of money found in the cash drawer at the end of the shift by
	// an auditing employee. The amount must be greater than or equal to zero.
	ClosedCashMoney *Money `json:"closed_cash_money,omitempty"`

	// An employee free-text description of a cash drawer shift.
	Description string `json:"description,omitempty"`

	// The shift end time in ISO 8601 format.
	EndedAt string `json:"ended_at,omitempty"`

	// The amount of money that should be in the cash drawer at the end of the
	// shift, based on the cash drawer events on the shift.
	// The amount is correct if all shift employees accurately recorded their
	// cash drawer shift events. Unrecorded events and events with the wrong amount
	// result in an incorrect expected_cash_money amount that can be negative.
	ExpectedCashMoney *Money `json:"expected_cash_money,omitempty"`

	// The shift unique ID.
	ID string `json:"id,omitempty"`

	// The shift start time in ISO 8601 format.
	OpenedAt string `json:"opened_at,omitempty"`

	// The amount of money in the cash drawer at the start of the shift. This
	// must be a positive amount.
	OpenedCashMoney *Money `json:"opened_cash_money,omitempty"`

	// The shift current state.
	// See [CashDrawerShiftState](#type-cashdrawershiftstate) for possible values
	State string `json:"state,omitempty"`
}

CashDrawerShiftSummary The summary of a closed cash drawer shift. This model contains only the money counted to start a cash drawer shift, counted at the end of the shift, and the amount that should be in the drawer at shift end based on summing all cash drawer shift events.

swagger:model CashDrawerShiftSummary

func (*CashDrawerShiftSummary) ContextValidate

func (m *CashDrawerShiftSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this cash drawer shift summary based on the context it is used

func (*CashDrawerShiftSummary) MarshalBinary

func (m *CashDrawerShiftSummary) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CashDrawerShiftSummary) UnmarshalBinary

func (m *CashDrawerShiftSummary) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CashDrawerShiftSummary) Validate

func (m *CashDrawerShiftSummary) Validate(formats strfmt.Registry) error

Validate validates this cash drawer shift summary

type CatalogCategory

type CatalogCategory struct {

	// The category name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
	// Max Length: 255
	Name string `json:"name,omitempty"`
}

CatalogCategory A category to which a `CatalogItem` instance belongs. Example: {"object":{"category_data":{"name":"Beverages"},"id":"#Beverages","present_at_all_locations":true,"type":"CATEGORY"}}

swagger:model CatalogCategory

func (*CatalogCategory) ContextValidate

func (m *CatalogCategory) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog category based on context it is used

func (*CatalogCategory) MarshalBinary

func (m *CatalogCategory) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogCategory) UnmarshalBinary

func (m *CatalogCategory) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogCategory) Validate

func (m *CatalogCategory) Validate(formats strfmt.Registry) error

Validate validates this catalog category

type CatalogCustomAttributeDefinition

type CatalogCustomAttributeDefinition struct {

	// The set of Catalog Object Types that this Custom Attribute may be applied to.
	// Currently, only `ITEM` and `ITEM_VARIATION` are allowed. At least one type must be included.
	// See [CatalogObjectType](#type-catalogobjecttype) for possible values
	// Required: true
	AllowedObjectTypes []string `json:"allowed_object_types"`

	// The visibility of a custom attribute to applications other than the application
	// that created the attribute.
	// See [CatalogCustomAttributeDefinitionAppVisibility](#type-catalogcustomattributedefinitionappvisibility) for possible values
	AppVisibility string `json:"app_visibility,omitempty"`

	// __Read-only.__ The number of custom attributes that reference this
	// custom attribute definition. Set by the server in response to a ListCatalog
	// request with `include_counts` set to `true`.  If the actual count is greater
	// than 100, `custom_attribute_usage_count` will be set to `100`.
	CustomAttributeUsageCount int64 `json:"custom_attribute_usage_count,omitempty"`

	// Seller-oriented description of the meaning of this Custom Attribute,
	// any constraints that the seller should observe, etc. May be displayed as a tooltip in Square UIs.
	// Max Length: 255
	Description string `json:"description,omitempty"`

	// The name of the desired custom attribute key that can be used to access
	// the custom attribute value on catalog objects. Cannot be modified after the
	// custom attribute definition has been created.
	// Must be between 1 and 60 characters, and may only contain the characters `[a-zA-Z0-9_-]`.
	// Max Length: 60
	// Min Length: 1
	// Pattern: ^[a-zA-Z0-9_-]*$
	Key string `json:"key,omitempty"`

	//  The name of this definition for API and seller-facing UI purposes.
	// The name must be unique within the (merchant, application) pair. Required.
	// May not be empty and may not exceed 255 characters. Can be modified after creation.
	// Required: true
	// Max Length: 255
	// Min Length: 1
	Name *string `json:"name"`

	// Optionally, populated when `type` = `NUMBER`, unset otherwise.
	NumberConfig *CatalogCustomAttributeDefinitionNumberConfig `json:"number_config,omitempty"`

	// Populated when `type` is set to `SELECTION`, unset otherwise.
	SelectionConfig *CatalogCustomAttributeDefinitionSelectionConfig `json:"selection_config,omitempty"`

	// The visibility of a custom attribute in seller-facing UIs (including Square Point
	// of Sale applications and Square Dashboard). May be modified.
	// See [CatalogCustomAttributeDefinitionSellerVisibility](#type-catalogcustomattributedefinitionsellervisibility) for possible values
	SellerVisibility string `json:"seller_visibility,omitempty"`

	// __Read only.__ Contains information about the application that
	// created this custom attribute definition.
	SourceApplication *SourceApplication `json:"source_application,omitempty"`

	// Optionally, populated when `type` = `STRING`, unset otherwise.
	StringConfig *CatalogCustomAttributeDefinitionStringConfig `json:"string_config,omitempty"`

	// The type of this custom attribute. Cannot be modified after creation.
	// Required.
	// See [CatalogCustomAttributeDefinitionType](#type-catalogcustomattributedefinitiontype) for possible values
	// Required: true
	Type *string `json:"type"`
}

CatalogCustomAttributeDefinition Contains information defining a custom attribute. Custom attributes are intended to store additional information about a catalog object or to associate a catalog object with an entity in another system. Do not use custom attributes to store any sensitive information (personally identifiable information, card details, etc.). [Read more about custom attributes](/catalog-api/add-custom-attributes)

swagger:model CatalogCustomAttributeDefinition

func (*CatalogCustomAttributeDefinition) ContextValidate

func (m *CatalogCustomAttributeDefinition) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this catalog custom attribute definition based on the context it is used

func (*CatalogCustomAttributeDefinition) MarshalBinary

func (m *CatalogCustomAttributeDefinition) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogCustomAttributeDefinition) UnmarshalBinary

func (m *CatalogCustomAttributeDefinition) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogCustomAttributeDefinition) Validate

Validate validates this catalog custom attribute definition

type CatalogCustomAttributeDefinitionAppVisibility

type CatalogCustomAttributeDefinitionAppVisibility string

CatalogCustomAttributeDefinitionAppVisibility Defines the visibility of a custom attribute to applications other than their creating application.

swagger:model CatalogCustomAttributeDefinitionAppVisibility

const (

	// CatalogCustomAttributeDefinitionAppVisibilityAPPVISIBILITYHIDDEN captures enum value "APP_VISIBILITY_HIDDEN"
	CatalogCustomAttributeDefinitionAppVisibilityAPPVISIBILITYHIDDEN CatalogCustomAttributeDefinitionAppVisibility = "APP_VISIBILITY_HIDDEN"

	// CatalogCustomAttributeDefinitionAppVisibilityAPPVISIBILITYREADONLY captures enum value "APP_VISIBILITY_READ_ONLY"
	CatalogCustomAttributeDefinitionAppVisibilityAPPVISIBILITYREADONLY CatalogCustomAttributeDefinitionAppVisibility = "APP_VISIBILITY_READ_ONLY"

	// CatalogCustomAttributeDefinitionAppVisibilityAPPVISIBILITYREADWRITEVALUES captures enum value "APP_VISIBILITY_READ_WRITE_VALUES"
	CatalogCustomAttributeDefinitionAppVisibilityAPPVISIBILITYREADWRITEVALUES CatalogCustomAttributeDefinitionAppVisibility = "APP_VISIBILITY_READ_WRITE_VALUES"
)

func (CatalogCustomAttributeDefinitionAppVisibility) ContextValidate

ContextValidate validates this catalog custom attribute definition app visibility based on context it is used

func (CatalogCustomAttributeDefinitionAppVisibility) Validate

Validate validates this catalog custom attribute definition app visibility

type CatalogCustomAttributeDefinitionNumberConfig

type CatalogCustomAttributeDefinitionNumberConfig struct {

	// An integer between 0 and 5 that represents the maximum number of
	// positions allowed after the decimal in number custom attribute values
	// For example:
	//
	// - if the precision is 0, the quantity can be 1, 2, 3, etc.
	// - if the precision is 1, the quantity can be 0.1, 0.2, etc.
	// - if the precision is 2, the quantity can be 0.01, 0.12, etc.
	//
	// Default: 5
	// Maximum: 5
	// Minimum: 0
	Precision *int64 `json:"precision,omitempty"`
}

CatalogCustomAttributeDefinitionNumberConfig catalog custom attribute definition number config

swagger:model CatalogCustomAttributeDefinitionNumberConfig

func (*CatalogCustomAttributeDefinitionNumberConfig) ContextValidate

ContextValidate validates this catalog custom attribute definition number config based on context it is used

func (*CatalogCustomAttributeDefinitionNumberConfig) MarshalBinary

MarshalBinary interface implementation

func (*CatalogCustomAttributeDefinitionNumberConfig) UnmarshalBinary

UnmarshalBinary interface implementation

func (*CatalogCustomAttributeDefinitionNumberConfig) Validate

Validate validates this catalog custom attribute definition number config

type CatalogCustomAttributeDefinitionSelectionConfig

type CatalogCustomAttributeDefinitionSelectionConfig struct {

	// The set of valid `CatalogCustomAttributeSelections`. Up to a maximum of 100
	// selections can be defined. Can be modified.
	AllowedSelections []*CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection `json:"allowed_selections"`

	// The maximum number of selections that can be set. The maximum value for this
	// attribute is 100. The default value is 1. The value can be modified, but changing the value will not
	// affect existing custom attribute values on objects. Clients need to
	// handle custom attributes with more selected values than allowed by this limit.
	// Maximum: 100
	MaxAllowedSelections int64 `json:"max_allowed_selections,omitempty"`
}

CatalogCustomAttributeDefinitionSelectionConfig Configuration associated with `SELECTION`-type custom attribute definitions.

swagger:model CatalogCustomAttributeDefinitionSelectionConfig

func (*CatalogCustomAttributeDefinitionSelectionConfig) ContextValidate

ContextValidate validate this catalog custom attribute definition selection config based on the context it is used

func (*CatalogCustomAttributeDefinitionSelectionConfig) MarshalBinary

MarshalBinary interface implementation

func (*CatalogCustomAttributeDefinitionSelectionConfig) UnmarshalBinary

UnmarshalBinary interface implementation

func (*CatalogCustomAttributeDefinitionSelectionConfig) Validate

Validate validates this catalog custom attribute definition selection config

type CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection

type CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection struct {

	// Selection name, unique within `allowed_selections`.
	// Required: true
	// Max Length: 255
	// Min Length: 1
	Name *string `json:"name"`

	// Unique ID set by Square.
	UID string `json:"uid,omitempty"`
}

CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection A named selection for this `SELECTION`-type custom attribute definition.

swagger:model CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection

func (*CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection) ContextValidate

ContextValidate validates this catalog custom attribute definition selection config custom attribute selection based on context it is used

func (*CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection) MarshalBinary

MarshalBinary interface implementation

func (*CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection) UnmarshalBinary

UnmarshalBinary interface implementation

func (*CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection) Validate

Validate validates this catalog custom attribute definition selection config custom attribute selection

type CatalogCustomAttributeDefinitionSellerVisibility

type CatalogCustomAttributeDefinitionSellerVisibility string

CatalogCustomAttributeDefinitionSellerVisibility Defines the visibility of a custom attribute to sellers in Square client applications, Square APIs or in Square UIs (including Square Point of Sale applications and Square Dashboard).

swagger:model CatalogCustomAttributeDefinitionSellerVisibility

const (

	// CatalogCustomAttributeDefinitionSellerVisibilitySELLERVISIBILITYHIDDEN captures enum value "SELLER_VISIBILITY_HIDDEN"
	CatalogCustomAttributeDefinitionSellerVisibilitySELLERVISIBILITYHIDDEN CatalogCustomAttributeDefinitionSellerVisibility = "SELLER_VISIBILITY_HIDDEN"

	// CatalogCustomAttributeDefinitionSellerVisibilitySELLERVISIBILITYREADWRITEVALUES captures enum value "SELLER_VISIBILITY_READ_WRITE_VALUES"
	CatalogCustomAttributeDefinitionSellerVisibilitySELLERVISIBILITYREADWRITEVALUES CatalogCustomAttributeDefinitionSellerVisibility = "SELLER_VISIBILITY_READ_WRITE_VALUES"
)

func (CatalogCustomAttributeDefinitionSellerVisibility) ContextValidate

ContextValidate validates this catalog custom attribute definition seller visibility based on context it is used

func (CatalogCustomAttributeDefinitionSellerVisibility) Validate

Validate validates this catalog custom attribute definition seller visibility

type CatalogCustomAttributeDefinitionStringConfig

type CatalogCustomAttributeDefinitionStringConfig struct {

	// If true, each Custom Attribute instance associated with this Custom Attribute
	// Definition must have a unique value within the seller's catalog. For
	// example, this may be used for a value like a SKU that should not be
	// duplicated within a seller's catalog. May not be modified after the
	// definition has been created.
	EnforceUniqueness bool `json:"enforce_uniqueness,omitempty"`
}

CatalogCustomAttributeDefinitionStringConfig Configuration associated with Custom Attribute Definitions of type `STRING`.

swagger:model CatalogCustomAttributeDefinitionStringConfig

func (*CatalogCustomAttributeDefinitionStringConfig) ContextValidate

ContextValidate validates this catalog custom attribute definition string config based on context it is used

func (*CatalogCustomAttributeDefinitionStringConfig) MarshalBinary

MarshalBinary interface implementation

func (*CatalogCustomAttributeDefinitionStringConfig) UnmarshalBinary

UnmarshalBinary interface implementation

func (*CatalogCustomAttributeDefinitionStringConfig) Validate

Validate validates this catalog custom attribute definition string config

type CatalogCustomAttributeDefinitionType

type CatalogCustomAttributeDefinitionType string

CatalogCustomAttributeDefinitionType Defines the possible types for a custom attribute.

swagger:model CatalogCustomAttributeDefinitionType

const (

	// CatalogCustomAttributeDefinitionTypeSTRING captures enum value "STRING"
	CatalogCustomAttributeDefinitionTypeSTRING CatalogCustomAttributeDefinitionType = "STRING"

	// CatalogCustomAttributeDefinitionTypeBOOLEAN captures enum value "BOOLEAN"
	CatalogCustomAttributeDefinitionTypeBOOLEAN CatalogCustomAttributeDefinitionType = "BOOLEAN"

	// CatalogCustomAttributeDefinitionTypeNUMBER captures enum value "NUMBER"
	CatalogCustomAttributeDefinitionTypeNUMBER CatalogCustomAttributeDefinitionType = "NUMBER"

	// CatalogCustomAttributeDefinitionTypeSELECTION captures enum value "SELECTION"
	CatalogCustomAttributeDefinitionTypeSELECTION CatalogCustomAttributeDefinitionType = "SELECTION"
)

func (CatalogCustomAttributeDefinitionType) ContextValidate

func (m CatalogCustomAttributeDefinitionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog custom attribute definition type based on context it is used

func (CatalogCustomAttributeDefinitionType) Validate

Validate validates this catalog custom attribute definition type

type CatalogCustomAttributeValue

type CatalogCustomAttributeValue struct {

	// A `true` or `false` value. Populated if `type` = `BOOLEAN`.
	BooleanValue bool `json:"boolean_value,omitempty"`

	// __Read-only.__ The id of the `CatalogCustomAttributeDefinition` this value belongs to.
	CustomAttributeDefinitionID string `json:"custom_attribute_definition_id,omitempty"`

	// __Read-only.__ A copy of key from the associated `CatalogCustomAttributeDefinition`.
	Key string `json:"key,omitempty"`

	// The name of the custom attribute.
	Name string `json:"name,omitempty"`

	// Populated if `type` = `NUMBER`. Contains a string
	// representation of a decimal number, using a `.` as the decimal separator.
	NumberValue string `json:"number_value,omitempty"`

	// One or more choices from `allowed_selections`. Populated if `type` = `SELECTION`.
	SelectionUIDValues []string `json:"selection_uid_values"`

	// The string value of the custom attribute.  Populated if `type` = `STRING`.
	StringValue string `json:"string_value,omitempty"`

	// __Read-only.__ A copy of type from the associated `CatalogCustomAttributeDefinition`.
	// See [CatalogCustomAttributeDefinitionType](#type-catalogcustomattributedefinitiontype) for possible values
	Type string `json:"type,omitempty"`
}

CatalogCustomAttributeValue An instance of a custom attribute. Custom attributes can be defined and added to `ITEM` and `ITEM_VARIATION` type catalog objects. [Read more about custom attributes](/catalog-api/add-custom-attributes).

swagger:model CatalogCustomAttributeValue

func (*CatalogCustomAttributeValue) ContextValidate

func (m *CatalogCustomAttributeValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog custom attribute value based on context it is used

func (*CatalogCustomAttributeValue) MarshalBinary

func (m *CatalogCustomAttributeValue) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogCustomAttributeValue) UnmarshalBinary

func (m *CatalogCustomAttributeValue) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogCustomAttributeValue) Validate

func (m *CatalogCustomAttributeValue) Validate(formats strfmt.Registry) error

Validate validates this catalog custom attribute value

type CatalogDiscount

type CatalogDiscount struct {

	// The amount of the discount. Specify an amount of `0` if `discount_type` is `VARIABLE_AMOUNT`.
	//
	// Do not use this field for percentage-based or variable discounts.
	AmountMoney *Money `json:"amount_money,omitempty"`

	// Indicates whether the discount is a fixed amount or percentage, or entered at the time of sale.
	// See [CatalogDiscountType](#type-catalogdiscounttype) for possible values
	DiscountType string `json:"discount_type,omitempty"`

	// The color of the discount display label in the Square Point of Sale app. This must be a valid hex color code.
	LabelColor string `json:"label_color,omitempty"`

	// Indicates whether this discount should reduce the price used to calculate tax.
	//
	// Most discounts should use `MODIFY_TAX_BASIS`. However, in some circumstances taxes must
	// be calculated based on an item's price, ignoring a particular discount. For example,
	// in many US jurisdictions, a manufacturer coupon or instant rebate reduces the price a
	// customer pays but does not reduce the sale price used to calculate how much sales tax is
	// due. In this case, the discount representing that manufacturer coupon should have
	// `DO_NOT_MODIFY_TAX_BASIS` for this field.
	//
	// If you are unsure whether you need to use this field, consult your tax professional.
	// See [CatalogDiscountModifyTaxBasis](#type-catalogdiscountmodifytaxbasis) for possible values
	ModifyTaxBasis string `json:"modify_tax_basis,omitempty"`

	// The discount name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
	// Max Length: 255
	Name string `json:"name,omitempty"`

	// The percentage of the discount as a string representation of a decimal number, using a `.` as the decimal
	// separator and without a `%` sign. A value of `7.5` corresponds to `7.5%`. Specify a percentage of `0` if `discount_type`
	// is `VARIABLE_PERCENTAGE`.
	//
	// Do not use this field for amount-based or variable discounts.
	Percentage string `json:"percentage,omitempty"`

	// Indicates whether a mobile staff member needs to enter their PIN to apply the
	// discount to a payment in the Square Point of Sale app.
	PinRequired bool `json:"pin_required,omitempty"`
}

CatalogDiscount A discount applicable to items. Example: {"object":{"discount_data":{"discount_type":"FIXED_PERCENTAGE","label_color":"red","name":"Welcome to the Dark(Roast) Side!","percentage":"5.4","pin_required":false},"id":"#Maythe4th","present_at_all_locations":true,"type":"DISCOUNT"}}

swagger:model CatalogDiscount

func (*CatalogDiscount) ContextValidate

func (m *CatalogDiscount) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this catalog discount based on the context it is used

func (*CatalogDiscount) MarshalBinary

func (m *CatalogDiscount) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogDiscount) UnmarshalBinary

func (m *CatalogDiscount) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogDiscount) Validate

func (m *CatalogDiscount) Validate(formats strfmt.Registry) error

Validate validates this catalog discount

type CatalogDiscountModifyTaxBasis

type CatalogDiscountModifyTaxBasis string

CatalogDiscountModifyTaxBasis catalog discount modify tax basis

swagger:model CatalogDiscountModifyTaxBasis

const (

	// CatalogDiscountModifyTaxBasisMODIFYTAXBASIS captures enum value "MODIFY_TAX_BASIS"
	CatalogDiscountModifyTaxBasisMODIFYTAXBASIS CatalogDiscountModifyTaxBasis = "MODIFY_TAX_BASIS"

	// CatalogDiscountModifyTaxBasisDONOTMODIFYTAXBASIS captures enum value "DO_NOT_MODIFY_TAX_BASIS"
	CatalogDiscountModifyTaxBasisDONOTMODIFYTAXBASIS CatalogDiscountModifyTaxBasis = "DO_NOT_MODIFY_TAX_BASIS"
)

func (CatalogDiscountModifyTaxBasis) ContextValidate

func (m CatalogDiscountModifyTaxBasis) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog discount modify tax basis based on context it is used

func (CatalogDiscountModifyTaxBasis) Validate

func (m CatalogDiscountModifyTaxBasis) Validate(formats strfmt.Registry) error

Validate validates this catalog discount modify tax basis

type CatalogDiscountType

type CatalogDiscountType string

CatalogDiscountType How to apply a CatalogDiscount to a CatalogItem.

swagger:model CatalogDiscountType

const (

	// CatalogDiscountTypeFIXEDPERCENTAGE captures enum value "FIXED_PERCENTAGE"
	CatalogDiscountTypeFIXEDPERCENTAGE CatalogDiscountType = "FIXED_PERCENTAGE"

	// CatalogDiscountTypeFIXEDAMOUNT captures enum value "FIXED_AMOUNT"
	CatalogDiscountTypeFIXEDAMOUNT CatalogDiscountType = "FIXED_AMOUNT"

	// CatalogDiscountTypeVARIABLEPERCENTAGE captures enum value "VARIABLE_PERCENTAGE"
	CatalogDiscountTypeVARIABLEPERCENTAGE CatalogDiscountType = "VARIABLE_PERCENTAGE"

	// CatalogDiscountTypeVARIABLEAMOUNT captures enum value "VARIABLE_AMOUNT"
	CatalogDiscountTypeVARIABLEAMOUNT CatalogDiscountType = "VARIABLE_AMOUNT"
)

func (CatalogDiscountType) ContextValidate

func (m CatalogDiscountType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog discount type based on context it is used

func (CatalogDiscountType) Validate

func (m CatalogDiscountType) Validate(formats strfmt.Registry) error

Validate validates this catalog discount type

type CatalogIDMapping

type CatalogIDMapping struct {

	// The client-supplied temporary `#`-prefixed ID for a new `CatalogObject`.
	ClientObjectID string `json:"client_object_id,omitempty"`

	// The permanent ID for the CatalogObject created by the server.
	ObjectID string `json:"object_id,omitempty"`
}

CatalogIDMapping A mapping between a temporary client-supplied ID and a permanent server-generated ID.

When calling [UpsertCatalogObject](#endpoint-Catalog-UpsertCatalogObject) or [BatchUpsertCatalogObjects](#endpoint-Catalog-BatchUpsertCatalogObjects) to create a CatalogObject(#type-CatalogObject) instance, you can supply a temporary ID for the to-be-created object, especially when the object is to be referenced elsewhere in the same request body. This temporary ID can be any string unique within the call, but must be prefixed by "#".

After the request is submitted and the object created, a permanent server-generated ID is assigned to the new object. The permanent ID is unique across the Square catalog.

swagger:model CatalogIdMapping

func (*CatalogIDMapping) ContextValidate

func (m *CatalogIDMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog Id mapping based on context it is used

func (*CatalogIDMapping) MarshalBinary

func (m *CatalogIDMapping) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogIDMapping) UnmarshalBinary

func (m *CatalogIDMapping) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogIDMapping) Validate

func (m *CatalogIDMapping) Validate(formats strfmt.Registry) error

Validate validates this catalog Id mapping

type CatalogImage

type CatalogImage struct {

	// A caption that describes what is shown in the image. Displayed in the
	// Square Online Store. This is a searchable attribute for use in applicable query filters.
	Caption string `json:"caption,omitempty"`

	// The internal name to identify this image in calls to the Square API.
	Name string `json:"name,omitempty"`

	// The URL of this image, generated by Square after an image is uploaded
	// using the `CreateCatalogImage` endpoint.
	URL string `json:"url,omitempty"`
}

CatalogImage An image file to use in Square catalogs. It can be associated with catalog items, item variations, and categories.

swagger:model CatalogImage

func (*CatalogImage) ContextValidate

func (m *CatalogImage) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog image based on context it is used

func (*CatalogImage) MarshalBinary

func (m *CatalogImage) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogImage) UnmarshalBinary

func (m *CatalogImage) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogImage) Validate

func (m *CatalogImage) Validate(formats strfmt.Registry) error

Validate validates this catalog image

type CatalogInfoRequest

type CatalogInfoRequest interface{}

CatalogInfoRequest catalog info request Example: {}

swagger:model CatalogInfoRequest

type CatalogInfoResponse

type CatalogInfoResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// Limits that apply to this API.
	Limits *CatalogInfoResponseLimits `json:"limits,omitempty"`

	// Names and abbreviations for standard units.
	StandardUnitDescriptionGroup *StandardUnitDescriptionGroup `json:"standard_unit_description_group,omitempty"`
}

CatalogInfoResponse catalog info response Example: {"limits":{"batch_delete_max_object_ids":200,"batch_retrieve_max_object_ids":1000,"batch_upsert_max_objects_per_batch":1000,"batch_upsert_max_total_objects":10000,"search_max_page_limit":1000,"update_item_modifier_lists_max_item_ids":1000,"update_item_modifier_lists_max_modifier_lists_to_disable":1000,"update_item_modifier_lists_max_modifier_lists_to_enable":1000,"update_item_taxes_max_item_ids":1000,"update_item_taxes_max_taxes_to_disable":1000,"update_item_taxes_max_taxes_to_enable":1000}}

swagger:model CatalogInfoResponse

func (*CatalogInfoResponse) ContextValidate

func (m *CatalogInfoResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this catalog info response based on the context it is used

func (*CatalogInfoResponse) MarshalBinary

func (m *CatalogInfoResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogInfoResponse) UnmarshalBinary

func (m *CatalogInfoResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogInfoResponse) Validate

func (m *CatalogInfoResponse) Validate(formats strfmt.Registry) error

Validate validates this catalog info response

type CatalogInfoResponseLimits

type CatalogInfoResponseLimits struct {

	// The maximum number of object IDs that may be included in a single
	// `/v2/catalog/batch-delete` request.
	BatchDeleteMaxObjectIds int64 `json:"batch_delete_max_object_ids,omitempty"`

	// The maximum number of object IDs that may appear in a `/v2/catalog/batch-retrieve`
	// request.
	BatchRetrieveMaxObjectIds int64 `json:"batch_retrieve_max_object_ids,omitempty"`

	// The maximum number of objects that may appear within a single batch in a
	// `/v2/catalog/batch-upsert` request.
	BatchUpsertMaxObjectsPerBatch int64 `json:"batch_upsert_max_objects_per_batch,omitempty"`

	// The maximum number of objects that may appear across all batches in a
	// `/v2/catalog/batch-upsert` request.
	BatchUpsertMaxTotalObjects int64 `json:"batch_upsert_max_total_objects,omitempty"`

	// The maximum number of results that may be returned in a page of a
	// `/v2/catalog/search` response.
	SearchMaxPageLimit int64 `json:"search_max_page_limit,omitempty"`

	// The maximum number of item IDs that may be included in a single
	// `/v2/catalog/update-item-modifier-lists` request.
	UpdateItemModifierListsMaxItemIds int64 `json:"update_item_modifier_lists_max_item_ids,omitempty"`

	// The maximum number of modifier list IDs to be disabled that may be included in
	// a single `/v2/catalog/update-item-modifier-lists` request.
	UpdateItemModifierListsMaxModifierListsToDisable int64 `json:"update_item_modifier_lists_max_modifier_lists_to_disable,omitempty"`

	// The maximum number of modifier list IDs to be enabled that may be included in
	// a single `/v2/catalog/update-item-modifier-lists` request.
	UpdateItemModifierListsMaxModifierListsToEnable int64 `json:"update_item_modifier_lists_max_modifier_lists_to_enable,omitempty"`

	// The maximum number of item IDs that may be included in a single
	// `/v2/catalog/update-item-taxes` request.
	UpdateItemTaxesMaxItemIds int64 `json:"update_item_taxes_max_item_ids,omitempty"`

	// The maximum number of tax IDs to be disabled that may be included in a single
	// `/v2/catalog/update-item-taxes` request.
	UpdateItemTaxesMaxTaxesToDisable int64 `json:"update_item_taxes_max_taxes_to_disable,omitempty"`

	// The maximum number of tax IDs to be enabled that may be included in a single
	// `/v2/catalog/update-item-taxes` request.
	UpdateItemTaxesMaxTaxesToEnable int64 `json:"update_item_taxes_max_taxes_to_enable,omitempty"`
}

CatalogInfoResponseLimits catalog info response limits

swagger:model CatalogInfoResponseLimits

func (*CatalogInfoResponseLimits) ContextValidate

func (m *CatalogInfoResponseLimits) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog info response limits based on context it is used

func (*CatalogInfoResponseLimits) MarshalBinary

func (m *CatalogInfoResponseLimits) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogInfoResponseLimits) UnmarshalBinary

func (m *CatalogInfoResponseLimits) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogInfoResponseLimits) Validate

func (m *CatalogInfoResponseLimits) Validate(formats strfmt.Registry) error

Validate validates this catalog info response limits

type CatalogItem

type CatalogItem struct {

	// The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used.
	// This attribute is searchable, and its value length is of Unicode code points.
	// Max Length: 24
	Abbreviation string `json:"abbreviation,omitempty"`

	// If `true`, the item can be added to electronically fulfilled orders from the merchant's online store.
	AvailableElectronically bool `json:"available_electronically,omitempty"`

	// If `true`, the item can be added to pickup orders from the merchant's online store.
	AvailableForPickup bool `json:"available_for_pickup,omitempty"`

	// If `true`, the item can be added to shipping orders from the merchant's online store.
	AvailableOnline bool `json:"available_online,omitempty"`

	// The ID of the item's category, if any.
	CategoryID string `json:"category_id,omitempty"`

	// The item's description. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
	// Max Length: 4096
	Description string `json:"description,omitempty"`

	// List of item options IDs for this item. Used to manage and group item
	// variations in a specified order.
	//
	// Maximum: 6 item options.
	ItemOptions []*CatalogItemOptionForItem `json:"item_options"`

	// The color of the item's display label in the Square Point of Sale app. This must be a valid hex color code.
	LabelColor string `json:"label_color,omitempty"`

	// A set of `CatalogItemModifierListInfo` objects
	// representing the modifier lists that apply to this item, along with the overrides and min
	// and max limits that are specific to this item. Modifier lists
	// may also be added to or deleted from an item using `UpdateItemModifierLists`.
	ModifierListInfo []*CatalogItemModifierListInfo `json:"modifier_list_info"`

	// The item's name. This is a searchable attribute for use in applicable query filters, its value must not be empty, and the length is of Unicode code points.
	// Max Length: 512
	Name string `json:"name,omitempty"`

	// The product type of the item. May not be changed once an item has been created.
	//
	// Only items of product type `REGULAR` or `APPOINTMENTS_SERVICE` may be created by this API; items with other product
	// types are read-only.
	// See [CatalogItemProductType](#type-catalogitemproducttype) for possible values
	ProductType string `json:"product_type,omitempty"`

	// If `false`, the Square Point of Sale app will present the `CatalogItem`'s
	// details screen immediately, allowing the merchant to choose `CatalogModifier`s
	// before adding the item to the cart.  This is the default behavior.
	//
	// If `true`, the Square Point of Sale app will immediately add the item to the cart with the pre-selected
	// modifiers, and merchants can edit modifiers by drilling down onto the item's details.
	//
	// Third-party clients are encouraged to implement similar behaviors.
	SkipModifierScreen bool `json:"skip_modifier_screen,omitempty"`

	// A set of IDs indicating the taxes enabled for
	// this item. When updating an item, any taxes listed here will be added to the item.
	// Taxes may also be added to or deleted from an item using `UpdateItemTaxes`.
	TaxIds []string `json:"tax_ids"`

	// A list of CatalogObjects containing the `CatalogItemVariation`s for this item.
	Variations []*CatalogObject `json:"variations"`
}

CatalogItem A CatalogObject(#type-CatalogObject) instance of the `ITEM` type, also referred to as an item, in the catalog. Example: {"object":{"id":"#Cocoa","item_data":{"abbreviation":"Ch","description":"Hot chocolate","name":"Cocoa","visibility":"PRIVATE"},"present_at_all_locations":true,"type":"ITEM"}}

swagger:model CatalogItem

func (*CatalogItem) ContextValidate

func (m *CatalogItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this catalog item based on the context it is used

func (*CatalogItem) MarshalBinary

func (m *CatalogItem) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogItem) UnmarshalBinary

func (m *CatalogItem) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogItem) Validate

func (m *CatalogItem) Validate(formats strfmt.Registry) error

Validate validates this catalog item

type CatalogItemModifierListInfo

type CatalogItemModifierListInfo struct {

	// If `true`, enable this `CatalogModifierList`. The default value is `true`.
	Enabled bool `json:"enabled,omitempty"`

	// If 0 or larger, the largest number of `CatalogModifier`s that can be selected from this `CatalogModifierList`.
	MaxSelectedModifiers int64 `json:"max_selected_modifiers,omitempty"`

	// If 0 or larger, the smallest number of `CatalogModifier`s that must be selected from this `CatalogModifierList`.
	MinSelectedModifiers int64 `json:"min_selected_modifiers,omitempty"`

	// The ID of the `CatalogModifierList` controlled by this `CatalogModifierListInfo`.
	// Required: true
	// Min Length: 1
	ModifierListID *string `json:"modifier_list_id"`

	// A set of `CatalogModifierOverride` objects that override whether a given `CatalogModifier` is enabled by default.
	ModifierOverrides []*CatalogModifierOverride `json:"modifier_overrides"`
}

CatalogItemModifierListInfo Options to control the properties of a `CatalogModifierList` applied to a `CatalogItem` instance.

swagger:model CatalogItemModifierListInfo

func (*CatalogItemModifierListInfo) ContextValidate

func (m *CatalogItemModifierListInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this catalog item modifier list info based on the context it is used

func (*CatalogItemModifierListInfo) MarshalBinary

func (m *CatalogItemModifierListInfo) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogItemModifierListInfo) UnmarshalBinary

func (m *CatalogItemModifierListInfo) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogItemModifierListInfo) Validate

func (m *CatalogItemModifierListInfo) Validate(formats strfmt.Registry) error

Validate validates this catalog item modifier list info

type CatalogItemOption

type CatalogItemOption struct {

	// The item option's human-readable description. Displayed in the Square
	// Point of Sale app for the seller and in the Online Store or on receipts for
	// the buyer. This is a searchable attribute for use in applicable query filters.
	Description string `json:"description,omitempty"`

	// The item option's display name for the customer. This is a searchable attribute for use in applicable query filters.
	DisplayName string `json:"display_name,omitempty"`

	// The item option's display name for the seller. Must be unique across
	// all item options. This is a searchable attribute for use in applicable query filters.
	Name string `json:"name,omitempty"`

	// If true, display colors for entries in `values` when present.
	ShowColors bool `json:"show_colors,omitempty"`

	// A list of CatalogObjects containing the
	// `CatalogItemOptionValue`s for this item.
	Values []*CatalogObject `json:"values"`
}

CatalogItemOption A group of variations for a `CatalogItem`.

swagger:model CatalogItemOption

func (*CatalogItemOption) ContextValidate

func (m *CatalogItemOption) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this catalog item option based on the context it is used

func (*CatalogItemOption) MarshalBinary

func (m *CatalogItemOption) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogItemOption) UnmarshalBinary

func (m *CatalogItemOption) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogItemOption) Validate

func (m *CatalogItemOption) Validate(formats strfmt.Registry) error

Validate validates this catalog item option

type CatalogItemOptionForItem

type CatalogItemOptionForItem struct {

	// The unique id of the item option, used to form the dimensions of the item option matrix in a specified order.
	ItemOptionID string `json:"item_option_id,omitempty"`
}

CatalogItemOptionForItem An option that can be assigned to an item. For example, a t-shirt item may offer a color option or a size option.

swagger:model CatalogItemOptionForItem

func (*CatalogItemOptionForItem) ContextValidate

func (m *CatalogItemOptionForItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog item option for item based on context it is used

func (*CatalogItemOptionForItem) MarshalBinary

func (m *CatalogItemOptionForItem) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogItemOptionForItem) UnmarshalBinary

func (m *CatalogItemOptionForItem) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogItemOptionForItem) Validate

func (m *CatalogItemOptionForItem) Validate(formats strfmt.Registry) error

Validate validates this catalog item option for item

type CatalogItemOptionValue

type CatalogItemOptionValue struct {

	// The HTML-supported hex color for the item option (e.g., "#ff8d4e85").
	// Only displayed if `show_colors` is enabled on the parent `ItemOption`. When
	// left unset, `color` defaults to white ("#ffffff") when `show_colors` is
	// enabled on the parent `ItemOption`.
	Color string `json:"color,omitempty"`

	// A human-readable description for the option value. This is a searchable attribute for use in applicable query filters.
	Description string `json:"description,omitempty"`

	// Unique ID of the associated item option.
	ItemOptionID string `json:"item_option_id,omitempty"`

	// Name of this item option value. This is a searchable attribute for use in applicable query filters.
	Name string `json:"name,omitempty"`

	// Determines where this option value appears in a list of option values.
	Ordinal int64 `json:"ordinal,omitempty"`
}

CatalogItemOptionValue An enumerated value that can link a `CatalogItemVariation` to an item option as one of its item option values.

swagger:model CatalogItemOptionValue

func (*CatalogItemOptionValue) ContextValidate

func (m *CatalogItemOptionValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog item option value based on context it is used

func (*CatalogItemOptionValue) MarshalBinary

func (m *CatalogItemOptionValue) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogItemOptionValue) UnmarshalBinary

func (m *CatalogItemOptionValue) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogItemOptionValue) Validate

func (m *CatalogItemOptionValue) Validate(formats strfmt.Registry) error

Validate validates this catalog item option value

type CatalogItemOptionValueForItemVariation

type CatalogItemOptionValueForItemVariation struct {

	// The unique id of an item option.
	ItemOptionID string `json:"item_option_id,omitempty"`

	// The unique id of the selected value for the item option.
	ItemOptionValueID string `json:"item_option_value_id,omitempty"`
}

CatalogItemOptionValueForItemVariation A `CatalogItemOptionValue` links an item variation to an item option as an item option value. For example, a t-shirt item may offer a color option and a size option. An item option value would represent each variation of t-shirt: For example, "Color:Red, Size:Small" or "Color:Blue, Size:Medium".

swagger:model CatalogItemOptionValueForItemVariation

func (*CatalogItemOptionValueForItemVariation) ContextValidate

ContextValidate validates this catalog item option value for item variation based on context it is used

func (*CatalogItemOptionValueForItemVariation) MarshalBinary

func (m *CatalogItemOptionValueForItemVariation) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogItemOptionValueForItemVariation) UnmarshalBinary

func (m *CatalogItemOptionValueForItemVariation) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogItemOptionValueForItemVariation) Validate

Validate validates this catalog item option value for item variation

type CatalogItemProductType

type CatalogItemProductType string

CatalogItemProductType The type of a CatalogItem. Connect V2 only allows the creation of `REGULAR` or `APPOINTMENTS_SERVICE` items.

swagger:model CatalogItemProductType

const (

	// CatalogItemProductTypeREGULAR captures enum value "REGULAR"
	CatalogItemProductTypeREGULAR CatalogItemProductType = "REGULAR"

	// CatalogItemProductTypeGIFTCARD captures enum value "GIFT_CARD"
	CatalogItemProductTypeGIFTCARD CatalogItemProductType = "GIFT_CARD"

	// CatalogItemProductTypeAPPOINTMENTSSERVICE captures enum value "APPOINTMENTS_SERVICE"
	CatalogItemProductTypeAPPOINTMENTSSERVICE CatalogItemProductType = "APPOINTMENTS_SERVICE"
)

func (CatalogItemProductType) ContextValidate

func (m CatalogItemProductType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog item product type based on context it is used

func (CatalogItemProductType) Validate

func (m CatalogItemProductType) Validate(formats strfmt.Registry) error

Validate validates this catalog item product type

type CatalogItemVariation

type CatalogItemVariation struct {

	// If the `CatalogItem` that owns this item variation is of type
	// `APPOINTMENTS_SERVICE`, a bool representing whether this service is available for booking.
	AvailableForBooking bool `json:"available_for_booking,omitempty"`

	// If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type`
	// is `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard.
	//
	// This value is always an integer.
	InventoryAlertThreshold int64 `json:"inventory_alert_threshold,omitempty"`

	// Indicates whether the item variation displays an alert when its inventory quantity is less than or equal
	// to its `inventory_alert_threshold`.
	// See [InventoryAlertType](#type-inventoryalerttype) for possible values
	InventoryAlertType string `json:"inventory_alert_type,omitempty"`

	// The ID of the `CatalogItem` associated with this item variation.
	ItemID string `json:"item_id,omitempty"`

	// List of item option values associated with this item variation. Listed
	// in the same order as the item options of the parent item.
	ItemOptionValues []*CatalogItemOptionValueForItemVariation `json:"item_option_values"`

	// Per-location price and inventory overrides.
	LocationOverrides []*ItemVariationLocationOverrides `json:"location_overrides"`

	// ID of the ‘CatalogMeasurementUnit’ that is used to measure the quantity
	// sold of this item variation. If left unset, the item will be sold in
	// whole quantities.
	MeasurementUnitID string `json:"measurement_unit_id,omitempty"`

	// The item variation's name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
	// Max Length: 255
	Name string `json:"name,omitempty"`

	// The order in which this item variation should be displayed. This value is read-only. On writes, the ordinal
	// for each item variation within a parent `CatalogItem` is set according to the item variations's
	// position. On reads, the value is not guaranteed to be sequential or unique.
	Ordinal int64 `json:"ordinal,omitempty"`

	// The item variation's price, if fixed pricing is used.
	PriceMoney *Money `json:"price_money,omitempty"`

	// Indicates whether the item variation's price is fixed or determined at the time
	// of sale.
	// See [CatalogPricingType](#type-catalogpricingtype) for possible values
	PricingType string `json:"pricing_type,omitempty"`

	// If the `CatalogItem` that owns this item variation is of type
	// `APPOINTMENTS_SERVICE`, then this is the duration of the service in milliseconds. For
	// example, a 30 minute appointment would have the value `1800000`, which is equal to
	// 30 (minutes) * 60 (seconds per minute) * 1000 (milliseconds per second).
	ServiceDuration int64 `json:"service_duration,omitempty"`

	// The item variation's SKU, if any. This is a searchable attribute for use in applicable query filters.
	Sku string `json:"sku,omitempty"`

	// Tokens of employees that can perform the service represented by this variation. Only valid for
	// variations of type `APPOINTMENTS_SERVICE`.
	TeamMemberIds []string `json:"team_member_ids"`

	// If `true`, inventory tracking is active for the variation.
	TrackInventory bool `json:"track_inventory,omitempty"`

	// The universal product code (UPC) of the item variation, if any. This is a searchable attribute for use in applicable query filters.
	//
	// The value of this attribute should be a number of 12-14 digits long.  This restriction is enforced on the Square Seller Dashboard,
	// Square Point of Sale or Retail Point of Sale apps, where this attribute shows in the GTIN field. If a non-compliant UPC value is assigned
	// to this attribute using the API, the value is not editable on the Seller Dashboard, Square Point of Sale or Retail Point of Sale apps
	// unless it is updated to fit the expected format.
	Upc string `json:"upc,omitempty"`

	// Arbitrary user metadata to associate with the item variation. This attribute value length is of Unicode code points.
	// Max Length: 255
	UserData string `json:"user_data,omitempty"`
}

CatalogItemVariation An item variation (i.e., product) in the Catalog object model. Each item may have a maximum of 250 item variations.

swagger:model CatalogItemVariation

func (*CatalogItemVariation) ContextValidate

func (m *CatalogItemVariation) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this catalog item variation based on the context it is used

func (*CatalogItemVariation) MarshalBinary

func (m *CatalogItemVariation) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogItemVariation) UnmarshalBinary

func (m *CatalogItemVariation) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogItemVariation) Validate

func (m *CatalogItemVariation) Validate(formats strfmt.Registry) error

Validate validates this catalog item variation

type CatalogMeasurementUnit

type CatalogMeasurementUnit struct {

	// Indicates the unit used to measure the quantity of a catalog item variation.
	MeasurementUnit *MeasurementUnit `json:"measurement_unit,omitempty"`

	// An integer between 0 and 5 that represents the maximum number of
	// positions allowed after the decimal in quantities measured with this unit.
	// For example:
	//
	// - if the precision is 0, the quantity can be 1, 2, 3, etc.
	// - if the precision is 1, the quantity can be 0.1, 0.2, etc.
	// - if the precision is 2, the quantity can be 0.01, 0.12, etc.
	//
	// Default: 3
	Precision int64 `json:"precision,omitempty"`
}

CatalogMeasurementUnit Represents the unit used to measure a `CatalogItemVariation` and specifies the precision for decimal quantities.

swagger:model CatalogMeasurementUnit

func (*CatalogMeasurementUnit) ContextValidate

func (m *CatalogMeasurementUnit) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this catalog measurement unit based on the context it is used

func (*CatalogMeasurementUnit) MarshalBinary

func (m *CatalogMeasurementUnit) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogMeasurementUnit) UnmarshalBinary

func (m *CatalogMeasurementUnit) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogMeasurementUnit) Validate

func (m *CatalogMeasurementUnit) Validate(formats strfmt.Registry) error

Validate validates this catalog measurement unit

type CatalogModifier

type CatalogModifier struct {

	// The ID of the `CatalogModifierList` associated with this modifier.
	ModifierListID string `json:"modifier_list_id,omitempty"`

	// The modifier name.  This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
	// Max Length: 255
	Name string `json:"name,omitempty"`

	// Determines where this `CatalogModifier` appears in the `CatalogModifierList`.
	Ordinal int64 `json:"ordinal,omitempty"`

	// The modifier price.
	PriceMoney *Money `json:"price_money,omitempty"`
}

CatalogModifier A modifier applicable to items at the time of sale. Example: {"object":{"modifier_data":{"name":"Almond Milk","price_money":{"amount":250,"currency":"USD"}},"present_at_all_locations":true,"type":"MODIFIER"}}

swagger:model CatalogModifier

func (*CatalogModifier) ContextValidate

func (m *CatalogModifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this catalog modifier based on the context it is used

func (*CatalogModifier) MarshalBinary

func (m *CatalogModifier) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogModifier) UnmarshalBinary

func (m *CatalogModifier) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogModifier) Validate

func (m *CatalogModifier) Validate(formats strfmt.Registry) error

Validate validates this catalog modifier

type CatalogModifierList

type CatalogModifierList struct {

	// The options included in the `CatalogModifierList`.
	// You must include at least one `CatalogModifier`.
	// Each CatalogObject must have type `MODIFIER` and contain
	// `CatalogModifier` data.
	Modifiers []*CatalogObject `json:"modifiers"`

	// The name for the `CatalogModifierList` instance. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
	// Max Length: 255
	Name string `json:"name,omitempty"`

	// Determines where this modifier list appears in a list of `CatalogModifierList` values.
	Ordinal int64 `json:"ordinal,omitempty"`

	// Indicates whether multiple options from the modifier list
	// can be applied to a single `CatalogItem`.
	// See [CatalogModifierListSelectionType](#type-catalogmodifierlistselectiontype) for possible values
	SelectionType string `json:"selection_type,omitempty"`
}

CatalogModifierList A list of modifiers applicable to items at the time of sale.

For example, a "Condiments" modifier list applicable to a "Hot Dog" item may contain "Ketchup", "Mustard", and "Relish" modifiers. Use the `selection_type` field to specify whether or not multiple selections from the modifier list are allowed. Example: {"id":"#MilkType","modifier_list_data":{"modifiers":[{"modifier_data":{"name":"Whole Milk","price_money":{"amount":0,"currency":"USD"}},"present_at_all_locations":true,"type":"MODIFIER"},{"modifier_data":{"name":"Almond Milk","price_money":{"amount":250,"currency":"USD"}},"present_at_all_locations":true,"type":"MODIFIER"},{"modifier_data":{"name":"Soy Milk","price_money":{"amount":250,"currency":"USD"}},"present_at_all_locations":true,"type":"MODIFIER"}],"name":"Milk Type","selection_type":"SINGLE"},"present_at_all_locations":true,"type":"MODIFIER_LIST"}

swagger:model CatalogModifierList

func (*CatalogModifierList) ContextValidate

func (m *CatalogModifierList) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this catalog modifier list based on the context it is used

func (*CatalogModifierList) MarshalBinary

func (m *CatalogModifierList) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogModifierList) UnmarshalBinary

func (m *CatalogModifierList) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogModifierList) Validate

func (m *CatalogModifierList) Validate(formats strfmt.Registry) error

Validate validates this catalog modifier list

type CatalogModifierListSelectionType

type CatalogModifierListSelectionType string

CatalogModifierListSelectionType Indicates whether a CatalogModifierList supports multiple selections.

swagger:model CatalogModifierListSelectionType

const (

	// CatalogModifierListSelectionTypeSINGLE captures enum value "SINGLE"
	CatalogModifierListSelectionTypeSINGLE CatalogModifierListSelectionType = "SINGLE"

	// CatalogModifierListSelectionTypeMULTIPLE captures enum value "MULTIPLE"
	CatalogModifierListSelectionTypeMULTIPLE CatalogModifierListSelectionType = "MULTIPLE"
)

func (CatalogModifierListSelectionType) ContextValidate

func (m CatalogModifierListSelectionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog modifier list selection type based on context it is used

func (CatalogModifierListSelectionType) Validate

Validate validates this catalog modifier list selection type

type CatalogModifierOverride

type CatalogModifierOverride struct {

	// The ID of the `CatalogModifier` whose default behavior is being overridden.
	// Required: true
	// Min Length: 1
	ModifierID *string `json:"modifier_id"`

	// If `true`, this `CatalogModifier` should be selected by default for this `CatalogItem`.
	OnByDefault bool `json:"on_by_default,omitempty"`
}

CatalogModifierOverride Options to control how to override the default behavior of the specified modifier.

swagger:model CatalogModifierOverride

func (*CatalogModifierOverride) ContextValidate

func (m *CatalogModifierOverride) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog modifier override based on context it is used

func (*CatalogModifierOverride) MarshalBinary

func (m *CatalogModifierOverride) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogModifierOverride) UnmarshalBinary

func (m *CatalogModifierOverride) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogModifierOverride) Validate

func (m *CatalogModifierOverride) Validate(formats strfmt.Registry) error

Validate validates this catalog modifier override

type CatalogObject

type CatalogObject struct {

	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	AbsentAtLocationIds []string `json:"absent_at_location_ids"`

	// The Connect v1 IDs for this object at each location where it is present, where they
	// differ from the object's Connect V2 ID. The field will only be present for objects that
	// have been created or modified by legacy APIs.
	CatalogV1Ids []*CatalogV1ID `json:"catalog_v1_ids"`

	// Structured data for a `CatalogCategory`, set for CatalogObjects of type `CATEGORY`.
	CategoryData *CatalogCategory `json:"category_data,omitempty"`

	// Structured data for a `CatalogCustomAttributeDefinition`, set for CatalogObjects of type `CUSTOM_ATTRIBUTE_DEFINITION`.
	CustomAttributeDefinitionData *CatalogCustomAttributeDefinition `json:"custom_attribute_definition_data,omitempty"`

	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a `CatalogCustomAttributeValue` object. The key is the `key` attribute
	// value defined in the associated `CatalogCustomAttributeDefinition`
	// object defined by the application making the request.
	//
	// If the `CatalogCustomAttributeDefinition` object is
	// defined by another application, the `CatalogCustomAttributeDefinition`'s key attribute value is prefixed by
	// the defining application ID. For example, if the `CatalogCustomAttributeDefinition` has a `key` attribute of
	// `"cocoa_brand"` and the defining application ID is `"abcd1234"`, the key in the map is `"abcd1234:cocoa_brand"`
	// if the application making the request is different from the application defining the custom attribute definition.
	// Otherwise, the key used in the map is simply `"cocoa_brand"`.
	//
	// Application-defined custom attributes that are set at a global (location-independent) level.
	// Custom attribute values are intended to store additional information about a catalog object
	// or associations with an entity in another system. Do not use custom attributes
	// to store any sensitive information (personally identifiable information, card details, etc.).
	CustomAttributeValues map[string]CatalogCustomAttributeValue `json:"custom_attribute_values,omitempty"`

	// Structured data for a `CatalogDiscount`, set for CatalogObjects of type `DISCOUNT`.
	DiscountData *CatalogDiscount `json:"discount_data,omitempty"`

	// An identifier to reference this object in the catalog. When a new `CatalogObject`
	// is inserted, the client should set the id to a temporary identifier starting with
	// a "`#`" character. Other objects being inserted or updated within the same request
	// may use this identifier to refer to the new object.
	//
	// When the server receives the new object, it will supply a unique identifier that
	// replaces the temporary identifier for all future references.
	// Required: true
	// Min Length: 1
	ID *string `json:"id"`

	// Structured data for a `CatalogImage`, set for CatalogObjects of type `IMAGE`.
	ImageData *CatalogImage `json:"image_data,omitempty"`

	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID string `json:"image_id,omitempty"`

	// If `true`, the object has been deleted from the database. Must be `false` for new objects
	// being inserted. When deleted, the `updated_at` field will equal the deletion time.
	IsDeleted bool `json:"is_deleted,omitempty"`

	// Structured data for a `CatalogItem`, set for CatalogObjects of type `ITEM`.
	ItemData *CatalogItem `json:"item_data,omitempty"`

	// Structured data for a `CatalogItemOption`, set for CatalogObjects of type `ITEM_OPTION`.
	ItemOptionData *CatalogItemOption `json:"item_option_data,omitempty"`

	// Structured data for a `CatalogItemOptionValue`, set for CatalogObjects of type `ITEM_OPTION_VAL`.
	ItemOptionValueData *CatalogItemOptionValue `json:"item_option_value_data,omitempty"`

	// Structured data for a `CatalogItemVariation`, set for CatalogObjects of type `ITEM_VARIATION`.
	ItemVariationData *CatalogItemVariation `json:"item_variation_data,omitempty"`

	// Structured data for a `CatalogMeasurementUnit`, set for CatalogObjects of type `MEASUREMENT_UNIT`.
	MeasurementUnitData *CatalogMeasurementUnit `json:"measurement_unit_data,omitempty"`

	// Structured data for a `CatalogModifier`, set for CatalogObjects of type `MODIFIER`.
	ModifierData *CatalogModifier `json:"modifier_data,omitempty"`

	// Structured data for a `CatalogModifierList`, set for CatalogObjects of type `MODIFIER_LIST`.
	ModifierListData *CatalogModifierList `json:"modifier_list_data,omitempty"`

	// If `true`, this object is present at all locations (including future locations), except where specified in
	// the `absent_at_location_ids` field. If `false`, this object is not present at any locations (including future locations),
	// except where specified in the `present_at_location_ids` field. If not specified, defaults to `true`.
	PresentAtAllLocations bool `json:"present_at_all_locations,omitempty"`

	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	PresentAtLocationIds []string `json:"present_at_location_ids"`

	// Structured data for a `CatalogPricingRule`, set for CatalogObjects of type `PRICING_RULE`.
	// A `CatalogPricingRule` object often works with a `CatalogProductSet` object or a `CatalogTimePeriod` object.
	PricingRuleData *CatalogPricingRule `json:"pricing_rule_data,omitempty"`

	// Structured data for a `CatalogProductSet`, set for CatalogObjects of type `PRODUCT_SET`.
	ProductSetData *CatalogProductSet `json:"product_set_data,omitempty"`

	// Structured data for a `CatalogQuickAmountsSettings`, set for CatalogObjects of type `QUICK_AMOUNTS_SETTINGS`.
	QuickAmountsSettingsData *CatalogQuickAmountsSettings `json:"quick_amounts_settings_data,omitempty"`

	// Structured data for a `CatalogSubscriptionPlan`, set for CatalogObjects of type `SUBSCRIPTION_PLAN`.
	SubscriptionPlanData *CatalogSubscriptionPlan `json:"subscription_plan_data,omitempty"`

	// Structured data for a `CatalogTax`, set for CatalogObjects of type `TAX`.
	TaxData *CatalogTax `json:"tax_data,omitempty"`

	// Structured data for a `CatalogTimePeriod`, set for CatalogObjects of type `TIME_PERIOD`.
	TimePeriodData *CatalogTimePeriod `json:"time_period_data,omitempty"`

	// The type of this object. Each object type has expected
	// properties expressed in a structured format within its corresponding `*_data` field below.
	// See [CatalogObjectType](#type-catalogobjecttype) for possible values
	// Required: true
	Type *string `json:"type"`

	// Last modification [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) in RFC 3339 format, e.g., `"2016-08-15T23:59:33.123Z"`
	// would indicate the UTC time (denoted by `Z`) of August 15, 2016 at 23:59:33 and 123 milliseconds.
	UpdatedAt string `json:"updated_at,omitempty"`

	// The version of the object. When updating an object, the version supplied
	// must match the version in the database, otherwise the write will be rejected as conflicting.
	Version int64 `json:"version,omitempty"`
}

CatalogObject The wrapper object for the Catalog entries of a given object type.

The type of a particular `CatalogObject` is determined by the value of the `type` attribute and only the corresponding data attribute can be set on the `CatalogObject` instance. For example, the following list shows some instances of `CatalogObject` of a given `type` and their corresponding data attribute that can be set: - For a `CatalogObject` of the `ITEM` type, set the `item_data` attribute to yield the `CatalogItem` object. - For a `CatalogObject` of the `ITEM_VARIATION` type, set the `item_variation_data` attribute to yield the `CatalogItemVariation` object. - For a `CatalogObject` of the `MODIFIER` type, set the `modifier_data` attribute to yield the `CatalogModifier` object. - For a `CatalogObject` of the `MODIFIER_LIST` type, set the `modifier_list_data` attribute to yield the `CatalogModifierList` object. - For a `CatalogObject` of the `CATEGORY` type, set the `category_data` attribute to yield the `CatalogCategory` object. - For a `CatalogObject` of the `DISCOUNT` type, set the `discount_data` attribute to yield the `CatalogDiscount` object. - For a `CatalogObject` of the `TAX` type, set the `tax_data` attribute to yield the `CatalogTax` object. - For a `CatalogObject` of the `IMAGE` type, set the `image_data` attribute to yield the `CatalogImageData` object. - For a `CatalogObject` of the `QUICK_AMOUNTS_SETTINGS` type, set the `quick_amounts_settings_data` attribute to yield the `CatalogQuickAmountsSettings` object. - For a `CatalogObject` of the `PRICING_RULE` type, set the `pricing_rule_data` attribute to yield the `CatalogPricingRule` object. - For a `CatalogObject` of the `TIME_PERIOD` type, set the `time_period_data` attribute to yield the `CatalogTimePeriod` object. - For a `CatalogObject` of the `PRODUCT_SET` type, set the `product_set_data` attribute to yield the `CatalogProductSet` object. - For a `CatalogObject` of the `SUBSCRIPTION_PLAN` type, set the `subscription_plan_data` attribute to yield the `CatalogSubscriptionPlan` object.

For a more detailed discussion of the Catalog data model, please see the [Design a Catalog](/catalog-api/design-a-catalog) guide. Example: {"catalog_object":{"absent_at_location_ids":["{{ LOCATIONID-1 }}","{{ LOCATIONID-N }}"],"category_data":"{{ CatalogCategory object only if type=CATEGORY }}","connect_v1_ids":{"catalog_v1_id":"{{ itemID from Catalog v1 }}","location_id":"{{ location where v1 ID is used }}"},"discount_data":"{{ CatalogDiscount object only if type=DISCOUNT }}","id":"{{ set by Catalog during object creation }}","is_deleted":"{{ [true | false] }}","item_data":"{{ CatalogItem object only if type=ITEM }}","item_variation_data":"{{ CatalogItemVariation object only if type=ITEM_VARIATION }}","modifier_data":"{{ CatalogModifier object only if type=MODIFIER }}","modifier_list_data":"{{ CatalogModifierList object only if type=MODIFIER_LIST }}","present_at_all_locations":"{{ [true | false] }}","present_at_location_ids":["{{ LOCATIONID-1 }}","{{ LOCATIONID-N }}"],"tax_data":"{{ CatalogTax object only if type=TAX }}","type":"{{ [ITEM | ITEM_VARIATION | MODIFIER | MODIFIER_LIST | CATEGORY | DISCOUNT | TAX] }}","updated_at":"{{ date \u0026 time of most recent update }}","version":"{{ version of the CatalogObject }}"}}

swagger:model CatalogObject

func (*CatalogObject) ContextValidate

func (m *CatalogObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this catalog object based on the context it is used

func (*CatalogObject) MarshalBinary

func (m *CatalogObject) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogObject) UnmarshalBinary

func (m *CatalogObject) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogObject) Validate

func (m *CatalogObject) Validate(formats strfmt.Registry) error

Validate validates this catalog object

type CatalogObjectBatch

type CatalogObjectBatch struct {

	// A list of CatalogObjects belonging to this batch.
	// Required: true
	Objects []*CatalogObject `json:"objects"`
}

CatalogObjectBatch A batch of catalog objects.

swagger:model CatalogObjectBatch

func (*CatalogObjectBatch) ContextValidate

func (m *CatalogObjectBatch) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this catalog object batch based on the context it is used

func (*CatalogObjectBatch) MarshalBinary

func (m *CatalogObjectBatch) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogObjectBatch) UnmarshalBinary

func (m *CatalogObjectBatch) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogObjectBatch) Validate

func (m *CatalogObjectBatch) Validate(formats strfmt.Registry) error

Validate validates this catalog object batch

type CatalogObjectReference

type CatalogObjectReference struct {

	// The version of the object.
	CatalogVersion int64 `json:"catalog_version,omitempty"`

	// The ID of the referenced object.
	ObjectID string `json:"object_id,omitempty"`
}

CatalogObjectReference A reference to a Catalog object at a specific version. In general this is used as an entry point into a graph of catalog objects, where the objects exist at a specific version.

swagger:model CatalogObjectReference

func (*CatalogObjectReference) ContextValidate

func (m *CatalogObjectReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog object reference based on context it is used

func (*CatalogObjectReference) MarshalBinary

func (m *CatalogObjectReference) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogObjectReference) UnmarshalBinary

func (m *CatalogObjectReference) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogObjectReference) Validate

func (m *CatalogObjectReference) Validate(formats strfmt.Registry) error

Validate validates this catalog object reference

type CatalogObjectType

type CatalogObjectType string

CatalogObjectType Possible types of CatalogObjects returned from the Catalog, each containing type-specific properties in the `*_data` field corresponding to the object type.

swagger:model CatalogObjectType

const (

	// CatalogObjectTypeITEM captures enum value "ITEM"
	CatalogObjectTypeITEM CatalogObjectType = "ITEM"

	// CatalogObjectTypeIMAGE captures enum value "IMAGE"
	CatalogObjectTypeIMAGE CatalogObjectType = "IMAGE"

	// CatalogObjectTypeCATEGORY captures enum value "CATEGORY"
	CatalogObjectTypeCATEGORY CatalogObjectType = "CATEGORY"

	// CatalogObjectTypeITEMVARIATION captures enum value "ITEM_VARIATION"
	CatalogObjectTypeITEMVARIATION CatalogObjectType = "ITEM_VARIATION"

	// CatalogObjectTypeTAX captures enum value "TAX"
	CatalogObjectTypeTAX CatalogObjectType = "TAX"

	// CatalogObjectTypeDISCOUNT captures enum value "DISCOUNT"
	CatalogObjectTypeDISCOUNT CatalogObjectType = "DISCOUNT"

	// CatalogObjectTypeMODIFIERLIST captures enum value "MODIFIER_LIST"
	CatalogObjectTypeMODIFIERLIST CatalogObjectType = "MODIFIER_LIST"

	// CatalogObjectTypeMODIFIER captures enum value "MODIFIER"
	CatalogObjectTypeMODIFIER CatalogObjectType = "MODIFIER"

	// CatalogObjectTypePRICINGRULE captures enum value "PRICING_RULE"
	CatalogObjectTypePRICINGRULE CatalogObjectType = "PRICING_RULE"

	// CatalogObjectTypePRODUCTSET captures enum value "PRODUCT_SET"
	CatalogObjectTypePRODUCTSET CatalogObjectType = "PRODUCT_SET"

	// CatalogObjectTypeTIMEPERIOD captures enum value "TIME_PERIOD"
	CatalogObjectTypeTIMEPERIOD CatalogObjectType = "TIME_PERIOD"

	// CatalogObjectTypeMEASUREMENTUNIT captures enum value "MEASUREMENT_UNIT"
	CatalogObjectTypeMEASUREMENTUNIT CatalogObjectType = "MEASUREMENT_UNIT"

	// CatalogObjectTypeSUBSCRIPTIONPLAN captures enum value "SUBSCRIPTION_PLAN"
	CatalogObjectTypeSUBSCRIPTIONPLAN CatalogObjectType = "SUBSCRIPTION_PLAN"

	// CatalogObjectTypeITEMOPTION captures enum value "ITEM_OPTION"
	CatalogObjectTypeITEMOPTION CatalogObjectType = "ITEM_OPTION"

	// CatalogObjectTypeITEMOPTIONVAL captures enum value "ITEM_OPTION_VAL"
	CatalogObjectTypeITEMOPTIONVAL CatalogObjectType = "ITEM_OPTION_VAL"

	// CatalogObjectTypeCUSTOMATTRIBUTEDEFINITION captures enum value "CUSTOM_ATTRIBUTE_DEFINITION"
	CatalogObjectTypeCUSTOMATTRIBUTEDEFINITION CatalogObjectType = "CUSTOM_ATTRIBUTE_DEFINITION"

	// CatalogObjectTypeQUICKAMOUNTSSETTINGS captures enum value "QUICK_AMOUNTS_SETTINGS"
	CatalogObjectTypeQUICKAMOUNTSSETTINGS CatalogObjectType = "QUICK_AMOUNTS_SETTINGS"
)

func (CatalogObjectType) ContextValidate

func (m CatalogObjectType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog object type based on context it is used

func (CatalogObjectType) Validate

func (m CatalogObjectType) Validate(formats strfmt.Registry) error

Validate validates this catalog object type

type CatalogPricingRule

type CatalogPricingRule struct {

	// __Deprecated__: Please use the `exclude_products_id` field to apply
	// an exclude set instead. Exclude sets allow better control over quantity
	// ranges and offer more flexibility for which matched items receive a discount.
	//
	// `CatalogProductSet` to apply the pricing to.
	// An apply rule matches within the subset of the cart that fits the match rules (the match set).
	// An apply rule can only match once in the match set.
	// If not supplied, the pricing will be applied to all products in the match set.
	// Other products retain their base price, or a price generated by other rules.
	ApplyProductsID string `json:"apply_products_id,omitempty"`

	// Unique ID for the `CatalogDiscount` to take off
	// the price of all matched items.
	DiscountID string `json:"discount_id,omitempty"`

	// `CatalogProductSet` to exclude from the pricing rule.
	// An exclude rule matches within the subset of the cart that fits the match rules (the match set).
	// An exclude rule can only match once in the match set.
	// If not supplied, the pricing will be applied to all products in the match set.
	// Other products retain their base price, or a price generated by other rules.
	ExcludeProductsID string `json:"exclude_products_id,omitempty"`

	// If an `exclude_products_id` was given, controls which subset of matched
	// products is excluded from any discounts.
	//
	// Default value: `LEAST_EXPENSIVE`
	// See [ExcludeStrategy](#type-excludestrategy) for possible values
	ExcludeStrategy string `json:"exclude_strategy,omitempty"`

	// Unique ID for the `CatalogProductSet` that will be matched by this rule. A match rule
	// matches within the entire cart, and can match multiple times. This field will always be set.
	MatchProductsID string `json:"match_products_id,omitempty"`

	// User-defined name for the pricing rule. For example, "Buy one get one
	// free" or "10% off".
	Name string `json:"name,omitempty"`

	// A list of unique IDs for the catalog time periods when
	// this pricing rule is in effect. If left unset, the pricing rule is always
	// in effect.
	TimePeriodIds []string `json:"time_period_ids"`

	// Represents the date the Pricing Rule is valid from. Represented in RFC 3339 full-date format (YYYY-MM-DD).
	ValidFromDate string `json:"valid_from_date,omitempty"`

	// Represents the local time the pricing rule should be valid from. Represented in RFC 3339 partial-time format
	// (HH:MM:SS). Partial seconds will be truncated.
	ValidFromLocalTime string `json:"valid_from_local_time,omitempty"`

	// Represents the date the Pricing Rule is valid until. Represented in RFC 3339 full-date format (YYYY-MM-DD).
	ValidUntilDate string `json:"valid_until_date,omitempty"`

	// Represents the local time the pricing rule should be valid until. Represented in RFC 3339 partial-time format
	// (HH:MM:SS). Partial seconds will be truncated.
	ValidUntilLocalTime string `json:"valid_until_local_time,omitempty"`
}

CatalogPricingRule Defines how discounts are automatically applied to a set of items that match the pricing rule during the active time period.

swagger:model CatalogPricingRule

func (*CatalogPricingRule) ContextValidate

func (m *CatalogPricingRule) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog pricing rule based on context it is used

func (*CatalogPricingRule) MarshalBinary

func (m *CatalogPricingRule) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogPricingRule) UnmarshalBinary

func (m *CatalogPricingRule) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogPricingRule) Validate

func (m *CatalogPricingRule) Validate(formats strfmt.Registry) error

Validate validates this catalog pricing rule

type CatalogPricingType

type CatalogPricingType string

CatalogPricingType Indicates whether the price of a CatalogItemVariation should be entered manually at the time of sale.

swagger:model CatalogPricingType

const (

	// CatalogPricingTypeFIXEDPRICING captures enum value "FIXED_PRICING"
	CatalogPricingTypeFIXEDPRICING CatalogPricingType = "FIXED_PRICING"

	// CatalogPricingTypeVARIABLEPRICING captures enum value "VARIABLE_PRICING"
	CatalogPricingTypeVARIABLEPRICING CatalogPricingType = "VARIABLE_PRICING"
)

func (CatalogPricingType) ContextValidate

func (m CatalogPricingType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog pricing type based on context it is used

func (CatalogPricingType) Validate

func (m CatalogPricingType) Validate(formats strfmt.Registry) error

Validate validates this catalog pricing type

type CatalogProductSet

type CatalogProductSet struct {

	// If set to `true`, the product set will include every item in the catalog.
	// Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set.
	AllProducts bool `json:"all_products,omitempty"`

	// User-defined name for the product set. For example, "Clearance Items"
	// or "Winter Sale Items".
	Name string `json:"name,omitempty"`

	// Unique IDs for any `CatalogObject` included in this product set.
	// All objects in this set must be included in an order for a pricing rule to apply.
	//
	// Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set.
	//
	// Max: 500 catalog object IDs.
	ProductIdsAll []string `json:"product_ids_all"`

	//  Unique IDs for any `CatalogObject` included in this product set. Any
	// number of these catalog objects can be in an order for a pricing rule to apply.
	//
	// This can be used with `product_ids_all` in a parent `CatalogProductSet` to
	// match groups of products for a bulk discount, such as a discount for an
	// entree and side combo.
	//
	// Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set.
	//
	// Max: 500 catalog object IDs.
	ProductIdsAny []string `json:"product_ids_any"`

	// If set, there must be exactly this many items from `products_any` or `products_all`
	// in the cart for the discount to apply.
	//
	// Cannot be combined with either `quantity_min` or `quantity_max`.
	QuantityExact int64 `json:"quantity_exact,omitempty"`

	// If set, the pricing rule will apply to a maximum of this many items from
	// `products_any` or `products_all`.
	QuantityMax int64 `json:"quantity_max,omitempty"`

	// If set, there must be at least this many items from `products_any` or `products_all`
	// in a cart for the discount to apply. See `quantity_exact`. Defaults to 0 if
	// `quantity_exact`, `quantity_min` and `quantity_max` are all unspecified.
	QuantityMin int64 `json:"quantity_min,omitempty"`
}

CatalogProductSet Represents a collection of catalog objects for the purpose of applying a `PricingRule`. Including a catalog object will include all of its subtypes. For example, including a category in a product set will include all of its items and associated item variations in the product set. Including an item in a product set will also include its item variations.

swagger:model CatalogProductSet

func (*CatalogProductSet) ContextValidate

func (m *CatalogProductSet) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog product set based on context it is used

func (*CatalogProductSet) MarshalBinary

func (m *CatalogProductSet) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogProductSet) UnmarshalBinary

func (m *CatalogProductSet) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogProductSet) Validate

func (m *CatalogProductSet) Validate(formats strfmt.Registry) error

Validate validates this catalog product set

type CatalogQuery

type CatalogQuery struct {

	// An exact query expression to return objects with attribute name and value
	// matching the specified attribute name and value exactly. Value matching is case insensitive.
	ExactQuery *CatalogQueryExact `json:"exact_query,omitempty"`

	// A query expression to return item variations (of the `CatalogItemVariation` that
	// contain all of the specified `CatalogItemOption` IDs.
	ItemVariationsForItemOptionValuesQuery *CatalogQueryItemVariationsForItemOptionValues `json:"item_variations_for_item_option_values_query,omitempty"`

	// A query expression to return items that contains the specified item options (as identified the corresponding `CatalogItemOption` IDs).
	ItemsForItemOptionsQuery *CatalogQueryItemsForItemOptions `json:"items_for_item_options_query,omitempty"`

	// A query expression to return items that have any of the given modifier list (as identified by the corresponding `CatalogModifierList`s IDs) enabled.
	ItemsForModifierListQuery *CatalogQueryItemsForModifierList `json:"items_for_modifier_list_query,omitempty"`

	// A query expression to return items that have any of the specified taxes (as identified by the corresponding `CatalogTax` object IDs) enabled.
	ItemsForTaxQuery *CatalogQueryItemsForTax `json:"items_for_tax_query,omitempty"`

	// A prefix query expression to return objects with attribute values
	// that have a prefix matching the specified string value. Value matching is case insensitive.
	PrefixQuery *CatalogQueryPrefix `json:"prefix_query,omitempty"`

	// A range query expression to return objects with numeric values
	// that lie in the specified range.
	RangeQuery *CatalogQueryRange `json:"range_query,omitempty"`

	// A set query expression to return objects with attribute name and value
	// matching the specified attribute name and any of the specified attribute values exactly.
	// Value matching is case insensitive.
	SetQuery *CatalogQuerySet `json:"set_query,omitempty"`

	// A query expression to sort returned query result by the given attribute.
	SortedAttributeQuery *CatalogQuerySortedAttribute `json:"sorted_attribute_query,omitempty"`

	// A text query expression to return objects whose searchable attributes contain all of the given
	// keywords, irrespective of their order. For example, if a `CatalogItem` contains custom attribute values of
	// `{"name": "t-shirt"}` and `{"description": "Small, Purple"}`, the query filter of `{"keywords": ["shirt", "sma", "purp"]}`
	// returns this item.
	TextQuery *CatalogQueryText `json:"text_query,omitempty"`
}

CatalogQuery A query composed of one or more different types of filters to narrow the scope of targeted objects when calling the `SearchCatalogObjects` endpoint.

Although a query can have multiple filters, only certain query types can be combined per call to [SearchCatalogObjects](#endpoint-Catalog-SearchCatalogObjects). Any combination of the following types may be used together: - [exact_query](#type-CatalogExactQuery) - [prefix_query](#type-CatalogPrefixQuery) - [range_query](#type-CatalogRangeQuery) - [sorted_attribute_query](#type-CatalogSortedAttribute) - [text_query](#type-CatalogTextQuery) All other query types cannot be combined with any others.

When a query filter is based on an attribute, the attribute must be searchable. Searchable attributes are listed as follows, along their parent types that can be searched for with applicable query filters.

* Searchable attribute and objects queryable by searchable attributes ** - `name`: `CatalogItem`, `CatalogItemVariation`, `CatalogCategory`, `CatalogTax`, `CatalogDiscount`, `CatalogModifier`, 'CatalogModifierList`, `CatalogItemOption`, `CatalogItemOptionValue` - `description`: `CatalogItem`, `CatalogItemOptionValue` - `abbreviation`: `CatalogItem` - `upc`: `CatalogItemVariation` - `sku`: `CatalogItemVariation` - `caption`: `CatalogImage` - `display_name`: `CatalogItemOption`

For example, to search for CatalogItem(#type-CatalogItem) objects by searchable attributes, you can use the `"name"`, `"description"`, or `"abbreviation"` attribute in an applicable query filter.

swagger:model CatalogQuery

func (*CatalogQuery) ContextValidate

func (m *CatalogQuery) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this catalog query based on the context it is used

func (*CatalogQuery) MarshalBinary

func (m *CatalogQuery) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogQuery) UnmarshalBinary

func (m *CatalogQuery) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogQuery) Validate

func (m *CatalogQuery) Validate(formats strfmt.Registry) error

Validate validates this catalog query

type CatalogQueryExact

type CatalogQueryExact struct {

	// The name of the attribute to be searched. Matching of the attribute name is exact.
	// Required: true
	// Min Length: 1
	AttributeName *string `json:"attribute_name"`

	// The desired value of the search attribute. Matching of the attribute value is case insensitive and can be partial.
	// For example, if a specified value of "sma", objects with the named attribute value of "Small", "small" are both matched.
	// Required: true
	AttributeValue *string `json:"attribute_value"`
}

CatalogQueryExact The query filter to return the search result by exact match of the specified attribute name and value.

swagger:model CatalogQueryExact

func (*CatalogQueryExact) ContextValidate

func (m *CatalogQueryExact) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog query exact based on context it is used

func (*CatalogQueryExact) MarshalBinary

func (m *CatalogQueryExact) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogQueryExact) UnmarshalBinary

func (m *CatalogQueryExact) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogQueryExact) Validate

func (m *CatalogQueryExact) Validate(formats strfmt.Registry) error

Validate validates this catalog query exact

type CatalogQueryItemVariationsForItemOptionValues

type CatalogQueryItemVariationsForItemOptionValues struct {

	// A set of `CatalogItemOptionValue` IDs to be used to find associated
	// `CatalogItemVariation`s. All ItemVariations that contain all of the given
	// Item Option Values (in any order) will be returned.
	ItemOptionValueIds []string `json:"item_option_value_ids"`
}

CatalogQueryItemVariationsForItemOptionValues The query filter to return the item variations containing the specified item option value IDs.

swagger:model CatalogQueryItemVariationsForItemOptionValues

func (*CatalogQueryItemVariationsForItemOptionValues) ContextValidate

ContextValidate validates this catalog query item variations for item option values based on context it is used

func (*CatalogQueryItemVariationsForItemOptionValues) MarshalBinary

MarshalBinary interface implementation

func (*CatalogQueryItemVariationsForItemOptionValues) UnmarshalBinary

UnmarshalBinary interface implementation

func (*CatalogQueryItemVariationsForItemOptionValues) Validate

Validate validates this catalog query item variations for item option values

type CatalogQueryItemsForItemOptions

type CatalogQueryItemsForItemOptions struct {

	// A set of `CatalogItemOption` IDs to be used to find associated
	// `CatalogItem`s. All Items that contain all of the given Item Options (in any order)
	// will be returned.
	ItemOptionIds []string `json:"item_option_ids"`
}

CatalogQueryItemsForItemOptions The query filter to return the items containing the specified item option IDs.

swagger:model CatalogQueryItemsForItemOptions

func (*CatalogQueryItemsForItemOptions) ContextValidate

func (m *CatalogQueryItemsForItemOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog query items for item options based on context it is used

func (*CatalogQueryItemsForItemOptions) MarshalBinary

func (m *CatalogQueryItemsForItemOptions) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogQueryItemsForItemOptions) UnmarshalBinary

func (m *CatalogQueryItemsForItemOptions) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogQueryItemsForItemOptions) Validate

Validate validates this catalog query items for item options

type CatalogQueryItemsForModifierList

type CatalogQueryItemsForModifierList struct {

	// A set of `CatalogModifierList` IDs to be used to find associated `CatalogItem`s.
	// Required: true
	ModifierListIds []string `json:"modifier_list_ids"`
}

CatalogQueryItemsForModifierList The query filter to return the items containing the specified modifier list IDs.

swagger:model CatalogQueryItemsForModifierList

func (*CatalogQueryItemsForModifierList) ContextValidate

func (m *CatalogQueryItemsForModifierList) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog query items for modifier list based on context it is used

func (*CatalogQueryItemsForModifierList) MarshalBinary

func (m *CatalogQueryItemsForModifierList) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogQueryItemsForModifierList) UnmarshalBinary

func (m *CatalogQueryItemsForModifierList) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogQueryItemsForModifierList) Validate

Validate validates this catalog query items for modifier list

type CatalogQueryItemsForTax

type CatalogQueryItemsForTax struct {

	// A set of `CatalogTax` IDs to be used to find associated `CatalogItem`s.
	// Required: true
	TaxIds []string `json:"tax_ids"`
}

CatalogQueryItemsForTax The query filter to return the items containing the specified tax IDs.

swagger:model CatalogQueryItemsForTax

func (*CatalogQueryItemsForTax) ContextValidate

func (m *CatalogQueryItemsForTax) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog query items for tax based on context it is used

func (*CatalogQueryItemsForTax) MarshalBinary

func (m *CatalogQueryItemsForTax) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogQueryItemsForTax) UnmarshalBinary

func (m *CatalogQueryItemsForTax) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogQueryItemsForTax) Validate

func (m *CatalogQueryItemsForTax) Validate(formats strfmt.Registry) error

Validate validates this catalog query items for tax

type CatalogQueryPrefix

type CatalogQueryPrefix struct {

	// The name of the attribute to be searched.
	// Required: true
	// Min Length: 1
	AttributeName *string `json:"attribute_name"`

	// The desired prefix of the search attribute value.
	// Required: true
	// Min Length: 1
	AttributePrefix *string `json:"attribute_prefix"`
}

CatalogQueryPrefix The query filter to return the search result whose named attribute values are prefixed by the specified attribute value.

swagger:model CatalogQueryPrefix

func (*CatalogQueryPrefix) ContextValidate

func (m *CatalogQueryPrefix) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog query prefix based on context it is used

func (*CatalogQueryPrefix) MarshalBinary

func (m *CatalogQueryPrefix) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogQueryPrefix) UnmarshalBinary

func (m *CatalogQueryPrefix) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogQueryPrefix) Validate

func (m *CatalogQueryPrefix) Validate(formats strfmt.Registry) error

Validate validates this catalog query prefix

type CatalogQueryRange

type CatalogQueryRange struct {

	// The desired maximum value for the search attribute (inclusive).
	AttributeMaxValue int64 `json:"attribute_max_value,omitempty"`

	// The desired minimum value for the search attribute (inclusive).
	AttributeMinValue int64 `json:"attribute_min_value,omitempty"`

	// The name of the attribute to be searched.
	// Required: true
	// Min Length: 1
	AttributeName *string `json:"attribute_name"`
}

CatalogQueryRange The query filter to return the search result whose named attribute values fall between the specified range.

swagger:model CatalogQueryRange

func (*CatalogQueryRange) ContextValidate

func (m *CatalogQueryRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog query range based on context it is used

func (*CatalogQueryRange) MarshalBinary

func (m *CatalogQueryRange) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogQueryRange) UnmarshalBinary

func (m *CatalogQueryRange) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogQueryRange) Validate

func (m *CatalogQueryRange) Validate(formats strfmt.Registry) error

Validate validates this catalog query range

type CatalogQuerySet

type CatalogQuerySet struct {

	// The name of the attribute to be searched. Matching of the attribute name is exact.
	// Required: true
	// Min Length: 1
	AttributeName *string `json:"attribute_name"`

	// The desired values of the search attribute. Matching of the attribute values is exact and case insensitive.
	// A maximum of 250 values may be searched in a request.
	// Required: true
	AttributeValues []string `json:"attribute_values"`
}

CatalogQuerySet The query filter to return the search result(s) by exact match of the specified `attribute_name` and any of the `attribute_values`.

swagger:model CatalogQuerySet

func (*CatalogQuerySet) ContextValidate

func (m *CatalogQuerySet) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog query set based on context it is used

func (*CatalogQuerySet) MarshalBinary

func (m *CatalogQuerySet) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogQuerySet) UnmarshalBinary

func (m *CatalogQuerySet) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogQuerySet) Validate

func (m *CatalogQuerySet) Validate(formats strfmt.Registry) error

Validate validates this catalog query set

type CatalogQuerySortedAttribute

type CatalogQuerySortedAttribute struct {

	// The attribute whose value is used as the sort key.
	// Required: true
	// Min Length: 1
	AttributeName *string `json:"attribute_name"`

	// The first attribute value to be returned by the query. Ascending sorts will return only
	// objects with this value or greater, while descending sorts will return only objects with this value
	// or less. If unset, start at the beginning (for ascending sorts) or end (for descending sorts).
	InitialAttributeValue string `json:"initial_attribute_value,omitempty"`

	// The desired sort order, `"ASC"` (ascending) or `"DESC"` (descending).
	// See [SortOrder](#type-sortorder) for possible values
	SortOrder string `json:"sort_order,omitempty"`
}

CatalogQuerySortedAttribute The query expression to specify the key to sort search results.

swagger:model CatalogQuerySortedAttribute

func (*CatalogQuerySortedAttribute) ContextValidate

func (m *CatalogQuerySortedAttribute) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog query sorted attribute based on context it is used

func (*CatalogQuerySortedAttribute) MarshalBinary

func (m *CatalogQuerySortedAttribute) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogQuerySortedAttribute) UnmarshalBinary

func (m *CatalogQuerySortedAttribute) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogQuerySortedAttribute) Validate

func (m *CatalogQuerySortedAttribute) Validate(formats strfmt.Registry) error

Validate validates this catalog query sorted attribute

type CatalogQueryText

type CatalogQueryText struct {

	// A list of 1, 2, or 3 search keywords. Keywords with fewer than 3 characters are ignored.
	// Required: true
	Keywords []string `json:"keywords"`
}

CatalogQueryText The query filter to return the search result whose searchable attribute values contain all of the specified keywords or tokens, independent of the token order or case.

swagger:model CatalogQueryText

func (*CatalogQueryText) ContextValidate

func (m *CatalogQueryText) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog query text based on context it is used

func (*CatalogQueryText) MarshalBinary

func (m *CatalogQueryText) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogQueryText) UnmarshalBinary

func (m *CatalogQueryText) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogQueryText) Validate

func (m *CatalogQueryText) Validate(formats strfmt.Registry) error

Validate validates this catalog query text

type CatalogQuickAmount

type CatalogQuickAmount struct {

	// Represents the actual amount of the Quick Amount with Money type.
	// Required: true
	Amount *Money `json:"amount"`

	// The order in which this Quick Amount should be displayed.
	Ordinal int64 `json:"ordinal,omitempty"`

	// Describes the ranking of the Quick Amount provided by machine learning model, in the range [0, 100].
	// MANUAL type amount will always have score = 100.
	Score int64 `json:"score,omitempty"`

	// Represents the type of the Quick Amount.
	// See [CatalogQuickAmountType](#type-catalogquickamounttype) for possible values
	// Required: true
	Type *string `json:"type"`
}

CatalogQuickAmount Represents a Quick Amount in the Catalog.

swagger:model CatalogQuickAmount

func (*CatalogQuickAmount) ContextValidate

func (m *CatalogQuickAmount) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this catalog quick amount based on the context it is used

func (*CatalogQuickAmount) MarshalBinary

func (m *CatalogQuickAmount) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogQuickAmount) UnmarshalBinary

func (m *CatalogQuickAmount) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogQuickAmount) Validate

func (m *CatalogQuickAmount) Validate(formats strfmt.Registry) error

Validate validates this catalog quick amount

type CatalogQuickAmountType

type CatalogQuickAmountType string

CatalogQuickAmountType Determines the type of a specific Quick Amount.

swagger:model CatalogQuickAmountType

const (

	// CatalogQuickAmountTypeQUICKAMOUNTTYPEMANUAL captures enum value "QUICK_AMOUNT_TYPE_MANUAL"
	CatalogQuickAmountTypeQUICKAMOUNTTYPEMANUAL CatalogQuickAmountType = "QUICK_AMOUNT_TYPE_MANUAL"

	// CatalogQuickAmountTypeQUICKAMOUNTTYPEAUTO captures enum value "QUICK_AMOUNT_TYPE_AUTO"
	CatalogQuickAmountTypeQUICKAMOUNTTYPEAUTO CatalogQuickAmountType = "QUICK_AMOUNT_TYPE_AUTO"
)

func (CatalogQuickAmountType) ContextValidate

func (m CatalogQuickAmountType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog quick amount type based on context it is used

func (CatalogQuickAmountType) Validate

func (m CatalogQuickAmountType) Validate(formats strfmt.Registry) error

Validate validates this catalog quick amount type

type CatalogQuickAmountsSettings

type CatalogQuickAmountsSettings struct {

	// Represents a set of Quick Amounts at this location.
	Amounts []*CatalogQuickAmount `json:"amounts"`

	// Represents location's eligibility for auto amounts
	// The boolean should be consistent with whether there are AUTO amounts in the `amounts`.
	EligibleForAutoAmounts bool `json:"eligible_for_auto_amounts,omitempty"`

	// Represents the option seller currently uses on Quick Amounts.
	// See [CatalogQuickAmountsSettingsOption](#type-catalogquickamountssettingsoption) for possible values
	// Required: true
	Option *string `json:"option"`
}

CatalogQuickAmountsSettings A parent Catalog Object model represents a set of Quick Amounts and the settings control the amounts.

swagger:model CatalogQuickAmountsSettings

func (*CatalogQuickAmountsSettings) ContextValidate

func (m *CatalogQuickAmountsSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this catalog quick amounts settings based on the context it is used

func (*CatalogQuickAmountsSettings) MarshalBinary

func (m *CatalogQuickAmountsSettings) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogQuickAmountsSettings) UnmarshalBinary

func (m *CatalogQuickAmountsSettings) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogQuickAmountsSettings) Validate

func (m *CatalogQuickAmountsSettings) Validate(formats strfmt.Registry) error

Validate validates this catalog quick amounts settings

type CatalogQuickAmountsSettingsOption

type CatalogQuickAmountsSettingsOption string

CatalogQuickAmountsSettingsOption Determines a seller's option on Quick Amounts feature.

swagger:model CatalogQuickAmountsSettingsOption

const (

	// CatalogQuickAmountsSettingsOptionDISABLED captures enum value "DISABLED"
	CatalogQuickAmountsSettingsOptionDISABLED CatalogQuickAmountsSettingsOption = "DISABLED"

	// CatalogQuickAmountsSettingsOptionMANUAL captures enum value "MANUAL"
	CatalogQuickAmountsSettingsOptionMANUAL CatalogQuickAmountsSettingsOption = "MANUAL"

	// CatalogQuickAmountsSettingsOptionAUTO captures enum value "AUTO"
	CatalogQuickAmountsSettingsOptionAUTO CatalogQuickAmountsSettingsOption = "AUTO"
)

func (CatalogQuickAmountsSettingsOption) ContextValidate

func (m CatalogQuickAmountsSettingsOption) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog quick amounts settings option based on context it is used

func (CatalogQuickAmountsSettingsOption) Validate

Validate validates this catalog quick amounts settings option

type CatalogSubscriptionPlan

type CatalogSubscriptionPlan struct {

	// The name of the plan.
	Name string `json:"name,omitempty"`

	// A list of SubscriptionPhase containing the `SubscriptionPhase` for this plan.
	Phases []*SubscriptionPhase `json:"phases"`
}

CatalogSubscriptionPlan Describes a subscription plan. For more information, see [Set Up and Manage a Subscription Plan](/docs/subscriptions-api/setup-plan).

swagger:model CatalogSubscriptionPlan

func (*CatalogSubscriptionPlan) ContextValidate

func (m *CatalogSubscriptionPlan) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this catalog subscription plan based on the context it is used

func (*CatalogSubscriptionPlan) MarshalBinary

func (m *CatalogSubscriptionPlan) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogSubscriptionPlan) UnmarshalBinary

func (m *CatalogSubscriptionPlan) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogSubscriptionPlan) Validate

func (m *CatalogSubscriptionPlan) Validate(formats strfmt.Registry) error

Validate validates this catalog subscription plan

type CatalogTax

type CatalogTax struct {

	// If `true`, the fee applies to custom amounts entered into the Square Point of Sale
	// app that are not associated with a particular `CatalogItem`.
	AppliesToCustomAmounts bool `json:"applies_to_custom_amounts,omitempty"`

	// Whether the tax is calculated based on a payment's subtotal or total.
	// See [TaxCalculationPhase](#type-taxcalculationphase) for possible values
	CalculationPhase string `json:"calculation_phase,omitempty"`

	// A Boolean flag to indicate whether the tax is displayed as enabled (`true`) in the Square Point of Sale app or not (`false`).
	Enabled bool `json:"enabled,omitempty"`

	// Whether the tax is `ADDITIVE` or `INCLUSIVE`.
	// See [TaxInclusionType](#type-taxinclusiontype) for possible values
	InclusionType string `json:"inclusion_type,omitempty"`

	// The tax's name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
	// Max Length: 255
	Name string `json:"name,omitempty"`

	// The percentage of the tax in decimal form, using a `'.'` as the decimal separator and without a `'%'` sign.
	// A value of `7.5` corresponds to 7.5%.
	Percentage string `json:"percentage,omitempty"`
}

CatalogTax A tax applicable to an item. Example: {"object":{"id":"#SalesTax","present_at_all_locations":true,"tax_data":{"calculation_phase":"TAX_SUBTOTAL_PHASE","enabled":true,"fee_applies_to_custom_amounts":true,"inclusion_type":"ADDITIVE","name":"Sales Tax","percentage":"5.0"},"type":"TAX"}}

swagger:model CatalogTax

func (*CatalogTax) ContextValidate

func (m *CatalogTax) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog tax based on context it is used

func (*CatalogTax) MarshalBinary

func (m *CatalogTax) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogTax) UnmarshalBinary

func (m *CatalogTax) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogTax) Validate

func (m *CatalogTax) Validate(formats strfmt.Registry) error

Validate validates this catalog tax

type CatalogTimePeriod

type CatalogTimePeriod struct {

	// An iCalendar (RFC 5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which
	// specifies the name, timing, duration and recurrence of this time period.
	//
	// Example:
	//
	// “`
	// DTSTART:20190707T180000
	// DURATION:P2H
	// RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR
	// “`
	//
	// Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported.
	// `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT`
	// and `END:VEVENT` is not required in the request. The response will always
	// include them.
	Event string `json:"event,omitempty"`
}

CatalogTimePeriod Represents a time period - either a single period or a repeating period.

swagger:model CatalogTimePeriod

func (*CatalogTimePeriod) ContextValidate

func (m *CatalogTimePeriod) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog time period based on context it is used

func (*CatalogTimePeriod) MarshalBinary

func (m *CatalogTimePeriod) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogTimePeriod) UnmarshalBinary

func (m *CatalogTimePeriod) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogTimePeriod) Validate

func (m *CatalogTimePeriod) Validate(formats strfmt.Registry) error

Validate validates this catalog time period

type CatalogV1ID

type CatalogV1ID struct {

	// The ID for an object used in the Square API V1, if the object ID differs from the Square API V2 object ID.
	CatalogV1ID string `json:"catalog_v1_id,omitempty"`

	// The ID of the `Location` this Connect V1 ID is associated with.
	LocationID string `json:"location_id,omitempty"`
}

CatalogV1ID A Square API V1 identifier of an item, including the object ID and its associated location ID.

swagger:model CatalogV1Id

func (*CatalogV1ID) ContextValidate

func (m *CatalogV1ID) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this catalog v1 Id based on context it is used

func (*CatalogV1ID) MarshalBinary

func (m *CatalogV1ID) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CatalogV1ID) UnmarshalBinary

func (m *CatalogV1ID) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CatalogV1ID) Validate

func (m *CatalogV1ID) Validate(formats strfmt.Registry) error

Validate validates this catalog v1 Id

type ChargeRequest

type ChargeRequest struct {

	// The basic primitive of multi-party transaction. The value is optional.
	// The transaction facilitated by you can be split from here.
	//
	// If you provide this value, the `amount_money` value in your additional_recipients
	// must not be more than 90% of the `amount_money` value in the charge request.
	// The `location_id` must be the valid location of the app owner merchant.
	//
	// This field requires the `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission.
	//
	// This field is currently not supported in sandbox.
	AdditionalRecipients []*AdditionalRecipient `json:"additional_recipients"`

	// The amount of money to charge.
	//
	// Note that you specify the amount in the
	// __smallest denomination of the applicable currency__. For example, US dollar
	// amounts are specified in cents. See
	// [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details.
	//
	// The value of `currency` must match the currency associated with the business
	// that is charging the card.
	// Required: true
	AmountMoney *Money `json:"amount_money"`

	// The buyer's billing address. This value is optional, but this transaction
	// is ineligible for chargeback protection if neither this parameter nor
	// `shipping_address` is provided.
	BillingAddress *Address `json:"billing_address,omitempty"`

	// The buyer's email address, if available. This value is optional,
	// but this transaction is ineligible for chargeback protection if it is not
	// provided.
	BuyerEmailAddress string `json:"buyer_email_address,omitempty"`

	// A nonce generated from the `SqPaymentForm` that represents the card
	// to charge.
	//
	// The application that provides a nonce to this endpoint must be the
	// _same application_ that generated the nonce with the `SqPaymentForm`.
	// Otherwise, the nonce is invalid.
	//
	// Do not provide a value for this field if you provide a value for
	// `customer_card_id`.
	// Max Length: 192
	CardNonce string `json:"card_nonce,omitempty"`

	// The ID of the customer card on file to charge. Do
	// not provide a value for this field if you provide a value for `card_nonce`.
	//
	// If you provide this value, you _must_ also provide a value for
	// `customer_id`.
	// Max Length: 192
	CustomerCardID string `json:"customer_card_id,omitempty"`

	// The ID of the customer to associate this transaction with. This field
	// is required if you provide a value for `customer_card_id`, and optional
	// otherwise.
	// Max Length: 50
	CustomerID string `json:"customer_id,omitempty"`

	// If `true`, the request will only perform an Auth on the provided
	// card. You can then later perform either a Capture (with the
	// `CaptureTransaction` or a Void
	// (with the `VoidTransaction`.
	//
	// Default value: `false`
	DelayCapture bool `json:"delay_capture,omitempty"`

	// A value you specify that uniquely identifies this
	// transaction among transactions you've created.
	//
	// If you're unsure whether a particular transaction succeeded,
	// you can reattempt it with the same idempotency key without
	// worrying about double-charging the buyer.
	//
	// See [Idempotency keys](#idempotencykeys) for more information.
	// Required: true
	// Max Length: 192
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`

	// An optional note to associate with the transaction.
	//
	// This value cannot exceed 60 characters.
	// Max Length: 60
	Note string `json:"note,omitempty"`

	// The ID of the order to associate with this transaction.
	//
	// If you provide this value, the `amount_money` value of your request must
	// __exactly match__ the value of the order's `total_money` field.
	// Max Length: 192
	OrderID string `json:"order_id,omitempty"`

	// An optional ID you can associate with the transaction for your own
	// purposes (such as to associate the transaction with an entity ID in your
	// own database).
	//
	// This value cannot exceed 40 characters.
	// Max Length: 40
	ReferenceID string `json:"reference_id,omitempty"`

	// The buyer's shipping address, if available. This value is optional,
	// but this transaction is ineligible for chargeback protection if neither this
	// parameter nor `billing_address` is provided.
	ShippingAddress *Address `json:"shipping_address,omitempty"`

	// A token generated by SqPaymentForm's verifyBuyer() that represents
	// customer's device info and 3ds challenge result.
	VerificationToken string `json:"verification_token,omitempty"`
}

ChargeRequest Defines the parameters that can be included in the body of a request to the [Charge](#endpoint-charge) endpoint.

Deprecated - recommend using [CreatePayment](#endpoint-payments-createpayment) Example: {"request_body":{"additional_recipients":[{"amount_money":{"amount":20,"currency":"USD"},"description":"Application fees","location_id":"057P5VYJ4A5X1"}],"amount_money":{"amount":200,"currency":"USD"},"billing_address":{"address_line_1":"500 Electric Ave","address_line_2":"Suite 600","administrative_district_level_1":"NY","country":"US","locality":"New York","postal_code":"10003"},"card_nonce":"card_nonce_from_square_123","delay_capture":false,"idempotency_key":"74ae1696-b1e3-4328-af6d-f1e04d947a13","note":"some optional note","reference_id":"some optional reference id","shipping_address":{"address_line_1":"123 Main St","administrative_district_level_1":"CA","country":"US","locality":"San Francisco","postal_code":"94114"}}}

swagger:model ChargeRequest

func (*ChargeRequest) ContextValidate

func (m *ChargeRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this charge request based on the context it is used

func (*ChargeRequest) MarshalBinary

func (m *ChargeRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ChargeRequest) UnmarshalBinary

func (m *ChargeRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ChargeRequest) Validate

func (m *ChargeRequest) Validate(formats strfmt.Registry) error

Validate validates this charge request

type ChargeRequestAdditionalRecipient

type ChargeRequestAdditionalRecipient struct {

	// The amount of money distributed to the recipient.
	// Required: true
	AmountMoney *Money `json:"amount_money"`

	// The description of the additional recipient.
	// Required: true
	// Max Length: 100
	// Min Length: 1
	Description *string `json:"description"`

	// The location ID for a recipient (other than the merchant) receiving a portion of the tender.
	// Required: true
	// Max Length: 50
	// Min Length: 1
	LocationID *string `json:"location_id"`
}

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

swagger:model ChargeRequestAdditionalRecipient

func (*ChargeRequestAdditionalRecipient) ContextValidate

func (m *ChargeRequestAdditionalRecipient) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this charge request additional recipient based on the context it is used

func (*ChargeRequestAdditionalRecipient) MarshalBinary

func (m *ChargeRequestAdditionalRecipient) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ChargeRequestAdditionalRecipient) UnmarshalBinary

func (m *ChargeRequestAdditionalRecipient) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ChargeRequestAdditionalRecipient) Validate

Validate validates this charge request additional recipient

type ChargeResponse

type ChargeResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The created transaction.
	Transaction *Transaction `json:"transaction,omitempty"`
}

ChargeResponse Defines the fields that are included in the response body of a request to the [Charge](#endpoint-charge) endpoint.

One of `errors` or `transaction` is present in a given response (never both). Example: {"transaction":{"created_at":"2016-03-10T22:57:56Z","id":"KnL67ZIwXCPtzOrqj0HrkxMF","location_id":"18YC4JDH91E1H","product":"EXTERNAL_API","reference_id":"some optional reference id","tenders":[{"additional_recipients":[{"amount_money":{"amount":20,"currency":"USD"},"description":"Application fees","location_id":"057P5VYJ4A5X1","receivable_id":"ISu5xwxJ5v0CMJTQq7RvqyMF"}],"amount_money":{"amount":200,"currency":"USD"},"card_details":{"card":{"card_brand":"VISA","last_4":"1111"},"entry_method":"KEYED","status":"CAPTURED"},"created_at":"2016-03-10T22:57:56Z","id":"MtZRYYdDrYNQbOvV7nbuBvMF","location_id":"18YC4JDH91E1H","note":"some optional note","transaction_id":"KnL67ZIwXCPtzOrqj0HrkxMF","type":"CARD"}]}}

swagger:model ChargeResponse

func (*ChargeResponse) ContextValidate

func (m *ChargeResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this charge response based on the context it is used

func (*ChargeResponse) MarshalBinary

func (m *ChargeResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ChargeResponse) UnmarshalBinary

func (m *ChargeResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ChargeResponse) Validate

func (m *ChargeResponse) Validate(formats strfmt.Registry) error

Validate validates this charge response

type CheckAppointmentsOnboardedRequest

type CheckAppointmentsOnboardedRequest interface{}

CheckAppointmentsOnboardedRequest check appointments onboarded request

swagger:model CheckAppointmentsOnboardedRequest

type CheckAppointmentsOnboardedResponse

type CheckAppointmentsOnboardedResponse struct {

	// Indicates whether the seller has enabled the Square Appointments service (`true`) or not (`false`).
	AppointmentsOnboarded bool `json:"appointments_onboarded,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

CheckAppointmentsOnboardedResponse check appointments onboarded response

swagger:model CheckAppointmentsOnboardedResponse

func (*CheckAppointmentsOnboardedResponse) ContextValidate

func (m *CheckAppointmentsOnboardedResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this check appointments onboarded response based on the context it is used

func (*CheckAppointmentsOnboardedResponse) MarshalBinary

func (m *CheckAppointmentsOnboardedResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CheckAppointmentsOnboardedResponse) UnmarshalBinary

func (m *CheckAppointmentsOnboardedResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CheckAppointmentsOnboardedResponse) Validate

Validate validates this check appointments onboarded response

type Checkout

type Checkout struct {

	// Additional recipients (other than the merchant) receiving a portion of this checkout.
	// For example, fees assessed on the purchase by a third party integration.
	AdditionalRecipients []*AdditionalRecipient `json:"additional_recipients"`

	// If `true`, Square Checkout will collect shipping information on your
	// behalf and store that information with the transaction information in your
	// Square Dashboard.
	//
	// Default: `false`.
	AskForShippingAddress bool `json:"ask_for_shipping_address,omitempty"`

	// The URL that the buyer's browser should be redirected to after the
	// checkout is completed.
	CheckoutPageURL string `json:"checkout_page_url,omitempty"`

	// The time when the checkout was created, in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// ID generated by Square Checkout when a new checkout is requested.
	ID string `json:"id,omitempty"`

	// The email address to display on the Square Checkout confirmation page
	// and confirmation email that the buyer can use to contact the merchant.
	//
	// If this value is not set, the confirmation page and email will display the
	// primary email address associated with the merchant's Square account.
	//
	// Default: none; only exists if explicitly set.
	MerchantSupportEmail string `json:"merchant_support_email,omitempty"`

	// Order to be checked out.
	Order *Order `json:"order,omitempty"`

	// If provided, the buyer's email is pre-populated on the checkout page
	// as an editable text field.
	//
	// Default: none; only exists if explicitly set.
	PrePopulateBuyerEmail string `json:"pre_populate_buyer_email,omitempty"`

	// If provided, the buyer's shipping info is pre-populated on the
	// checkout page as editable text fields.
	//
	// Default: none; only exists if explicitly set.
	PrePopulateShippingAddress *Address `json:"pre_populate_shipping_address,omitempty"`

	// The URL to redirect to after checkout is completed with `checkoutId`,
	// Square's `orderId`, `transactionId`, and `referenceId` appended as URL
	// parameters. For example, if the provided redirect_url is
	// `http://www.example.com/order-complete`, a successful transaction redirects
	// the customer to:
	//
	// <pre><code>http://www.example.com/order-complete?checkoutId=xxxxxx&amp;orderId=xxxxxx&amp;referenceId=xxxxxx&amp;transactionId=xxxxxx</code></pre>
	//
	// If you do not provide a redirect URL, Square Checkout will display an order
	// confirmation page on your behalf; however Square strongly recommends that
	// you provide a redirect URL so you can verify the transaction results and
	// finalize the order through your existing/normal confirmation workflow.
	RedirectURL string `json:"redirect_url,omitempty"`
}

Checkout Square Checkout lets merchants accept online payments for supported payment types using a checkout workflow hosted on squareup.com.

swagger:model Checkout

func (*Checkout) ContextValidate

func (m *Checkout) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this checkout based on the context it is used

func (*Checkout) MarshalBinary

func (m *Checkout) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Checkout) UnmarshalBinary

func (m *Checkout) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Checkout) Validate

func (m *Checkout) Validate(formats strfmt.Registry) error

Validate validates this checkout

type CompletePaymentRequest

type CompletePaymentRequest interface{}

CompletePaymentRequest Completes (captures) a payment.

By default, payments are set to `autocomplete` immediately after they are created. To complete payments manually, set `autocomplete` to `false`. Example: {"request_body":{}}

swagger:model CompletePaymentRequest

type CompletePaymentResponse

type CompletePaymentResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The successfully completed payment.
	Payment *Payment `json:"payment,omitempty"`
}

CompletePaymentResponse The return value from a [CompletePayment](#endpoint-payments-completepayment) call. Example: {"payment":{"amount_money":{"amount":200,"currency":"USD"},"app_fee_money":{"amount":10,"currency":"USD"},"card_details":{"auth_result_code":"MhIjEN","avs_status":"AVS_ACCEPTED","card":{"bin":"411111","card_brand":"VISA","card_type":"DEBIT","exp_month":7,"exp_year":2026,"fingerprint":"sq-1-TpmjbNBMFdibiIjpQI5LiRgNUBC7u1689i0TgHjnlyHEWYB7tnn-K4QbW4ttvtaqXw","last_4":"2796","prepaid_type":"PREPAID"},"card_payment_timeline":{"authorized_at":"2019-07-10T13:23:49.234Z","captured_at":"2019-07-10T13:23:49.446Z"},"cvv_status":"CVV_ACCEPTED","entry_method":"ON_FILE","statement_description":"SQ *MY MERCHANT","status":"CAPTURED"},"created_at":"2019-07-10T13:39:55.317Z","customer_id":"RDX9Z4XTIZR7MRZJUXNY9HUK6I","id":"GQTFp1ZlXdpoW4o6eGiZhbjosiDFf","location_id":"XTI0H92143A39","note":"Brief description","order_id":"m2Hr8Hk8A3CTyQQ1k4ynExg92tO3","receipt_number":"GQTF","receipt_url":"https://squareup.com/receipt/preview/GQTFp1ZlXdpoW4o6eGiZhbjosiDFf","reference_id":"123456","source_type":"CARD","status":"COMPLETED","total_money":{"amount":200,"currency":"USD"},"updated_at":"2019-07-10T13:40:05.982Z"}}

swagger:model CompletePaymentResponse

func (*CompletePaymentResponse) ContextValidate

func (m *CompletePaymentResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this complete payment response based on the context it is used

func (*CompletePaymentResponse) MarshalBinary

func (m *CompletePaymentResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CompletePaymentResponse) UnmarshalBinary

func (m *CompletePaymentResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CompletePaymentResponse) Validate

func (m *CompletePaymentResponse) Validate(formats strfmt.Registry) error

Validate validates this complete payment response

type Coordinates

type Coordinates struct {

	// The latitude of the coordinate expressed in degrees.
	Latitude float64 `json:"latitude,omitempty"`

	// The longitude of the coordinate expressed in degrees.
	Longitude float64 `json:"longitude,omitempty"`
}

Coordinates Latitude and longitude coordinates.

swagger:model Coordinates

func (*Coordinates) ContextValidate

func (m *Coordinates) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this coordinates based on context it is used

func (*Coordinates) MarshalBinary

func (m *Coordinates) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Coordinates) UnmarshalBinary

func (m *Coordinates) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Coordinates) Validate

func (m *Coordinates) Validate(formats strfmt.Registry) error

Validate validates this coordinates

type Country

type Country string

Country Indicates the country associated with another entity, such as a business. Values are in [ISO 3166-1-alpha-2 format](http://www.iso.org/iso/home/standards/country_codes.htm).

swagger:model Country

const (

	// CountryZZ captures enum value "ZZ"
	CountryZZ Country = "ZZ"

	// CountryAD captures enum value "AD"
	CountryAD Country = "AD"

	// CountryAE captures enum value "AE"
	CountryAE Country = "AE"

	// CountryAF captures enum value "AF"
	CountryAF Country = "AF"

	// CountryAG captures enum value "AG"
	CountryAG Country = "AG"

	// CountryAI captures enum value "AI"
	CountryAI Country = "AI"

	// CountryAL captures enum value "AL"
	CountryAL Country = "AL"

	// CountryAM captures enum value "AM"
	CountryAM Country = "AM"

	// CountryAO captures enum value "AO"
	CountryAO Country = "AO"

	// CountryAQ captures enum value "AQ"
	CountryAQ Country = "AQ"

	// CountryAR captures enum value "AR"
	CountryAR Country = "AR"

	// CountryAS captures enum value "AS"
	CountryAS Country = "AS"

	// CountryAT captures enum value "AT"
	CountryAT Country = "AT"

	// CountryAU captures enum value "AU"
	CountryAU Country = "AU"

	// CountryAW captures enum value "AW"
	CountryAW Country = "AW"

	// CountryAX captures enum value "AX"
	CountryAX Country = "AX"

	// CountryAZ captures enum value "AZ"
	CountryAZ Country = "AZ"

	// CountryBA captures enum value "BA"
	CountryBA Country = "BA"

	// CountryBB captures enum value "BB"
	CountryBB Country = "BB"

	// CountryBD captures enum value "BD"
	CountryBD Country = "BD"

	// CountryBE captures enum value "BE"
	CountryBE Country = "BE"

	// CountryBF captures enum value "BF"
	CountryBF Country = "BF"

	// CountryBG captures enum value "BG"
	CountryBG Country = "BG"

	// CountryBH captures enum value "BH"
	CountryBH Country = "BH"

	// CountryBI captures enum value "BI"
	CountryBI Country = "BI"

	// CountryBJ captures enum value "BJ"
	CountryBJ Country = "BJ"

	// CountryBL captures enum value "BL"
	CountryBL Country = "BL"

	// CountryBM captures enum value "BM"
	CountryBM Country = "BM"

	// CountryBN captures enum value "BN"
	CountryBN Country = "BN"

	// CountryBO captures enum value "BO"
	CountryBO Country = "BO"

	// CountryBQ captures enum value "BQ"
	CountryBQ Country = "BQ"

	// CountryBR captures enum value "BR"
	CountryBR Country = "BR"

	// CountryBS captures enum value "BS"
	CountryBS Country = "BS"

	// CountryBT captures enum value "BT"
	CountryBT Country = "BT"

	// CountryBV captures enum value "BV"
	CountryBV Country = "BV"

	// CountryBW captures enum value "BW"
	CountryBW Country = "BW"

	// CountryBY captures enum value "BY"
	CountryBY Country = "BY"

	// CountryBZ captures enum value "BZ"
	CountryBZ Country = "BZ"

	// CountryCA captures enum value "CA"
	CountryCA Country = "CA"

	// CountryCC captures enum value "CC"
	CountryCC Country = "CC"

	// CountryCD captures enum value "CD"
	CountryCD Country = "CD"

	// CountryCF captures enum value "CF"
	CountryCF Country = "CF"

	// CountryCG captures enum value "CG"
	CountryCG Country = "CG"

	// CountryCH captures enum value "CH"
	CountryCH Country = "CH"

	// CountryCI captures enum value "CI"
	CountryCI Country = "CI"

	// CountryCK captures enum value "CK"
	CountryCK Country = "CK"

	// CountryCL captures enum value "CL"
	CountryCL Country = "CL"

	// CountryCM captures enum value "CM"
	CountryCM Country = "CM"

	// CountryCN captures enum value "CN"
	CountryCN Country = "CN"

	// CountryCO captures enum value "CO"
	CountryCO Country = "CO"

	// CountryCR captures enum value "CR"
	CountryCR Country = "CR"

	// CountryCU captures enum value "CU"
	CountryCU Country = "CU"

	// CountryCV captures enum value "CV"
	CountryCV Country = "CV"

	// CountryCW captures enum value "CW"
	CountryCW Country = "CW"

	// CountryCX captures enum value "CX"
	CountryCX Country = "CX"

	// CountryCY captures enum value "CY"
	CountryCY Country = "CY"

	// CountryCZ captures enum value "CZ"
	CountryCZ Country = "CZ"

	// CountryDE captures enum value "DE"
	CountryDE Country = "DE"

	// CountryDJ captures enum value "DJ"
	CountryDJ Country = "DJ"

	// CountryDK captures enum value "DK"
	CountryDK Country = "DK"

	// CountryDM captures enum value "DM"
	CountryDM Country = "DM"

	// CountryDO captures enum value "DO"
	CountryDO Country = "DO"

	// CountryDZ captures enum value "DZ"
	CountryDZ Country = "DZ"

	// CountryEC captures enum value "EC"
	CountryEC Country = "EC"

	// CountryEE captures enum value "EE"
	CountryEE Country = "EE"

	// CountryEG captures enum value "EG"
	CountryEG Country = "EG"

	// CountryEH captures enum value "EH"
	CountryEH Country = "EH"

	// CountryER captures enum value "ER"
	CountryER Country = "ER"

	// CountryES captures enum value "ES"
	CountryES Country = "ES"

	// CountryET captures enum value "ET"
	CountryET Country = "ET"

	// CountryFI captures enum value "FI"
	CountryFI Country = "FI"

	// CountryFJ captures enum value "FJ"
	CountryFJ Country = "FJ"

	// CountryFK captures enum value "FK"
	CountryFK Country = "FK"

	// CountryFM captures enum value "FM"
	CountryFM Country = "FM"

	// CountryFO captures enum value "FO"
	CountryFO Country = "FO"

	// CountryFR captures enum value "FR"
	CountryFR Country = "FR"

	// CountryGA captures enum value "GA"
	CountryGA Country = "GA"

	// CountryGB captures enum value "GB"
	CountryGB Country = "GB"

	// CountryGD captures enum value "GD"
	CountryGD Country = "GD"

	// CountryGE captures enum value "GE"
	CountryGE Country = "GE"

	// CountryGF captures enum value "GF"
	CountryGF Country = "GF"

	// CountryGG captures enum value "GG"
	CountryGG Country = "GG"

	// CountryGH captures enum value "GH"
	CountryGH Country = "GH"

	// CountryGI captures enum value "GI"
	CountryGI Country = "GI"

	// CountryGL captures enum value "GL"
	CountryGL Country = "GL"

	// CountryGM captures enum value "GM"
	CountryGM Country = "GM"

	// CountryGN captures enum value "GN"
	CountryGN Country = "GN"

	// CountryGP captures enum value "GP"
	CountryGP Country = "GP"

	// CountryGQ captures enum value "GQ"
	CountryGQ Country = "GQ"

	// CountryGR captures enum value "GR"
	CountryGR Country = "GR"

	// CountryGS captures enum value "GS"
	CountryGS Country = "GS"

	// CountryGT captures enum value "GT"
	CountryGT Country = "GT"

	// CountryGU captures enum value "GU"
	CountryGU Country = "GU"

	// CountryGW captures enum value "GW"
	CountryGW Country = "GW"

	// CountryGY captures enum value "GY"
	CountryGY Country = "GY"

	// CountryHK captures enum value "HK"
	CountryHK Country = "HK"

	// CountryHM captures enum value "HM"
	CountryHM Country = "HM"

	// CountryHN captures enum value "HN"
	CountryHN Country = "HN"

	// CountryHR captures enum value "HR"
	CountryHR Country = "HR"

	// CountryHT captures enum value "HT"
	CountryHT Country = "HT"

	// CountryHU captures enum value "HU"
	CountryHU Country = "HU"

	// CountryID captures enum value "ID"
	CountryID Country = "ID"

	// CountryIE captures enum value "IE"
	CountryIE Country = "IE"

	// CountryIL captures enum value "IL"
	CountryIL Country = "IL"

	// CountryIM captures enum value "IM"
	CountryIM Country = "IM"

	// CountryIN captures enum value "IN"
	CountryIN Country = "IN"

	// CountryIO captures enum value "IO"
	CountryIO Country = "IO"

	// CountryIQ captures enum value "IQ"
	CountryIQ Country = "IQ"

	// CountryIR captures enum value "IR"
	CountryIR Country = "IR"

	// CountryIS captures enum value "IS"
	CountryIS Country = "IS"

	// CountryIT captures enum value "IT"
	CountryIT Country = "IT"

	// CountryJE captures enum value "JE"
	CountryJE Country = "JE"

	// CountryJM captures enum value "JM"
	CountryJM Country = "JM"

	// CountryJO captures enum value "JO"
	CountryJO Country = "JO"

	// CountryJP captures enum value "JP"
	CountryJP Country = "JP"

	// CountryKE captures enum value "KE"
	CountryKE Country = "KE"

	// CountryKG captures enum value "KG"
	CountryKG Country = "KG"

	// CountryKH captures enum value "KH"
	CountryKH Country = "KH"

	// CountryKI captures enum value "KI"
	CountryKI Country = "KI"

	// CountryKM captures enum value "KM"
	CountryKM Country = "KM"

	// CountryKN captures enum value "KN"
	CountryKN Country = "KN"

	// CountryKP captures enum value "KP"
	CountryKP Country = "KP"

	// CountryKR captures enum value "KR"
	CountryKR Country = "KR"

	// CountryKW captures enum value "KW"
	CountryKW Country = "KW"

	// CountryKY captures enum value "KY"
	CountryKY Country = "KY"

	// CountryKZ captures enum value "KZ"
	CountryKZ Country = "KZ"

	// CountryLA captures enum value "LA"
	CountryLA Country = "LA"

	// CountryLB captures enum value "LB"
	CountryLB Country = "LB"

	// CountryLC captures enum value "LC"
	CountryLC Country = "LC"

	// CountryLI captures enum value "LI"
	CountryLI Country = "LI"

	// CountryLK captures enum value "LK"
	CountryLK Country = "LK"

	// CountryLR captures enum value "LR"
	CountryLR Country = "LR"

	// CountryLS captures enum value "LS"
	CountryLS Country = "LS"

	// CountryLT captures enum value "LT"
	CountryLT Country = "LT"

	// CountryLU captures enum value "LU"
	CountryLU Country = "LU"

	// CountryLV captures enum value "LV"
	CountryLV Country = "LV"

	// CountryLY captures enum value "LY"
	CountryLY Country = "LY"

	// CountryMA captures enum value "MA"
	CountryMA Country = "MA"

	// CountryMC captures enum value "MC"
	CountryMC Country = "MC"

	// CountryMD captures enum value "MD"
	CountryMD Country = "MD"

	// CountryME captures enum value "ME"
	CountryME Country = "ME"

	// CountryMF captures enum value "MF"
	CountryMF Country = "MF"

	// CountryMG captures enum value "MG"
	CountryMG Country = "MG"

	// CountryMH captures enum value "MH"
	CountryMH Country = "MH"

	// CountryMK captures enum value "MK"
	CountryMK Country = "MK"

	// CountryML captures enum value "ML"
	CountryML Country = "ML"

	// CountryMM captures enum value "MM"
	CountryMM Country = "MM"

	// CountryMN captures enum value "MN"
	CountryMN Country = "MN"

	// CountryMO captures enum value "MO"
	CountryMO Country = "MO"

	// CountryMP captures enum value "MP"
	CountryMP Country = "MP"

	// CountryMQ captures enum value "MQ"
	CountryMQ Country = "MQ"

	// CountryMR captures enum value "MR"
	CountryMR Country = "MR"

	// CountryMS captures enum value "MS"
	CountryMS Country = "MS"

	// CountryMT captures enum value "MT"
	CountryMT Country = "MT"

	// CountryMU captures enum value "MU"
	CountryMU Country = "MU"

	// CountryMV captures enum value "MV"
	CountryMV Country = "MV"

	// CountryMW captures enum value "MW"
	CountryMW Country = "MW"

	// CountryMX captures enum value "MX"
	CountryMX Country = "MX"

	// CountryMY captures enum value "MY"
	CountryMY Country = "MY"

	// CountryMZ captures enum value "MZ"
	CountryMZ Country = "MZ"

	// CountryNA captures enum value "NA"
	CountryNA Country = "NA"

	// CountryNC captures enum value "NC"
	CountryNC Country = "NC"

	// CountryNE captures enum value "NE"
	CountryNE Country = "NE"

	// CountryNF captures enum value "NF"
	CountryNF Country = "NF"

	// CountryNG captures enum value "NG"
	CountryNG Country = "NG"

	// CountryNI captures enum value "NI"
	CountryNI Country = "NI"

	// CountryNL captures enum value "NL"
	CountryNL Country = "NL"

	// CountryNO captures enum value "NO"
	CountryNO Country = "NO"

	// CountryNP captures enum value "NP"
	CountryNP Country = "NP"

	// CountryNR captures enum value "NR"
	CountryNR Country = "NR"

	// CountryNU captures enum value "NU"
	CountryNU Country = "NU"

	// CountryNZ captures enum value "NZ"
	CountryNZ Country = "NZ"

	// CountryOM captures enum value "OM"
	CountryOM Country = "OM"

	// CountryPA captures enum value "PA"
	CountryPA Country = "PA"

	// CountryPE captures enum value "PE"
	CountryPE Country = "PE"

	// CountryPF captures enum value "PF"
	CountryPF Country = "PF"

	// CountryPG captures enum value "PG"
	CountryPG Country = "PG"

	// CountryPH captures enum value "PH"
	CountryPH Country = "PH"

	// CountryPK captures enum value "PK"
	CountryPK Country = "PK"

	// CountryPL captures enum value "PL"
	CountryPL Country = "PL"

	// CountryPM captures enum value "PM"
	CountryPM Country = "PM"

	// CountryPN captures enum value "PN"
	CountryPN Country = "PN"

	// CountryPR captures enum value "PR"
	CountryPR Country = "PR"

	// CountryPS captures enum value "PS"
	CountryPS Country = "PS"

	// CountryPT captures enum value "PT"
	CountryPT Country = "PT"

	// CountryPW captures enum value "PW"
	CountryPW Country = "PW"

	// CountryPY captures enum value "PY"
	CountryPY Country = "PY"

	// CountryQA captures enum value "QA"
	CountryQA Country = "QA"

	// CountryRE captures enum value "RE"
	CountryRE Country = "RE"

	// CountryRO captures enum value "RO"
	CountryRO Country = "RO"

	// CountryRS captures enum value "RS"
	CountryRS Country = "RS"

	// CountryRU captures enum value "RU"
	CountryRU Country = "RU"

	// CountryRW captures enum value "RW"
	CountryRW Country = "RW"

	// CountrySA captures enum value "SA"
	CountrySA Country = "SA"

	// CountrySB captures enum value "SB"
	CountrySB Country = "SB"

	// CountrySC captures enum value "SC"
	CountrySC Country = "SC"

	// CountrySD captures enum value "SD"
	CountrySD Country = "SD"

	// CountrySE captures enum value "SE"
	CountrySE Country = "SE"

	// CountrySG captures enum value "SG"
	CountrySG Country = "SG"

	// CountrySH captures enum value "SH"
	CountrySH Country = "SH"

	// CountrySI captures enum value "SI"
	CountrySI Country = "SI"

	// CountrySJ captures enum value "SJ"
	CountrySJ Country = "SJ"

	// CountrySK captures enum value "SK"
	CountrySK Country = "SK"

	// CountrySL captures enum value "SL"
	CountrySL Country = "SL"

	// CountrySM captures enum value "SM"
	CountrySM Country = "SM"

	// CountrySN captures enum value "SN"
	CountrySN Country = "SN"

	// CountrySO captures enum value "SO"
	CountrySO Country = "SO"

	// CountrySR captures enum value "SR"
	CountrySR Country = "SR"

	// CountrySS captures enum value "SS"
	CountrySS Country = "SS"

	// CountryST captures enum value "ST"
	CountryST Country = "ST"

	// CountrySV captures enum value "SV"
	CountrySV Country = "SV"

	// CountrySX captures enum value "SX"
	CountrySX Country = "SX"

	// CountrySY captures enum value "SY"
	CountrySY Country = "SY"

	// CountrySZ captures enum value "SZ"
	CountrySZ Country = "SZ"

	// CountryTC captures enum value "TC"
	CountryTC Country = "TC"

	// CountryTD captures enum value "TD"
	CountryTD Country = "TD"

	// CountryTF captures enum value "TF"
	CountryTF Country = "TF"

	// CountryTG captures enum value "TG"
	CountryTG Country = "TG"

	// CountryTH captures enum value "TH"
	CountryTH Country = "TH"

	// CountryTJ captures enum value "TJ"
	CountryTJ Country = "TJ"

	// CountryTK captures enum value "TK"
	CountryTK Country = "TK"

	// CountryTL captures enum value "TL"
	CountryTL Country = "TL"

	// CountryTM captures enum value "TM"
	CountryTM Country = "TM"

	// CountryTN captures enum value "TN"
	CountryTN Country = "TN"

	// CountryTO captures enum value "TO"
	CountryTO Country = "TO"

	// CountryTR captures enum value "TR"
	CountryTR Country = "TR"

	// CountryTT captures enum value "TT"
	CountryTT Country = "TT"

	// CountryTV captures enum value "TV"
	CountryTV Country = "TV"

	// CountryTW captures enum value "TW"
	CountryTW Country = "TW"

	// CountryTZ captures enum value "TZ"
	CountryTZ Country = "TZ"

	// CountryUA captures enum value "UA"
	CountryUA Country = "UA"

	// CountryUG captures enum value "UG"
	CountryUG Country = "UG"

	// CountryUM captures enum value "UM"
	CountryUM Country = "UM"

	// CountryUS captures enum value "US"
	CountryUS Country = "US"

	// CountryUY captures enum value "UY"
	CountryUY Country = "UY"

	// CountryUZ captures enum value "UZ"
	CountryUZ Country = "UZ"

	// CountryVA captures enum value "VA"
	CountryVA Country = "VA"

	// CountryVC captures enum value "VC"
	CountryVC Country = "VC"

	// CountryVE captures enum value "VE"
	CountryVE Country = "VE"

	// CountryVG captures enum value "VG"
	CountryVG Country = "VG"

	// CountryVI captures enum value "VI"
	CountryVI Country = "VI"

	// CountryVN captures enum value "VN"
	CountryVN Country = "VN"

	// CountryVU captures enum value "VU"
	CountryVU Country = "VU"

	// CountryWF captures enum value "WF"
	CountryWF Country = "WF"

	// CountryWS captures enum value "WS"
	CountryWS Country = "WS"

	// CountryYE captures enum value "YE"
	CountryYE Country = "YE"

	// CountryYT captures enum value "YT"
	CountryYT Country = "YT"

	// CountryZA captures enum value "ZA"
	CountryZA Country = "ZA"

	// CountryZM captures enum value "ZM"
	CountryZM Country = "ZM"

	// CountryZW captures enum value "ZW"
	CountryZW Country = "ZW"
)

func (Country) ContextValidate

func (m Country) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this country based on context it is used

func (Country) Validate

func (m Country) Validate(formats strfmt.Registry) error

Validate validates this country

type CreateBookingRequest

type CreateBookingRequest struct {

	// The details of the booking to be created.
	// Required: true
	Booking *Booking `json:"booking"`

	// A unique key to make this request an idempotent operation.
	// Max Length: 255
	IdempotencyKey string `json:"idempotency_key,omitempty"`
}

CreateBookingRequest create booking request Example: {"booking":{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMXUrsBWWcHTt79t"}],"customer_id":"EX2QSVGTZN4K1E5QE1CBFNVQ8M","location_id":"LEQHH0YY8B42M","start_at":"2020-11-26T13:00:00Z"}}

swagger:model CreateBookingRequest

func (*CreateBookingRequest) ContextValidate

func (m *CreateBookingRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create booking request based on the context it is used

func (*CreateBookingRequest) MarshalBinary

func (m *CreateBookingRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateBookingRequest) UnmarshalBinary

func (m *CreateBookingRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateBookingRequest) Validate

func (m *CreateBookingRequest) Validate(formats strfmt.Registry) error

Validate validates this create booking request

type CreateBookingResponse

type CreateBookingResponse struct {

	// The booking that was created.
	Booking *Booking `json:"booking,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

CreateBookingResponse create booking response Example: {"booking":{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMXUrsBWWcHTt79t"}],"created_at":"2020-10-28T15:47:41Z","customer_id":"EX2QSVGTZN4K1E5QE1CBFNVQ8M","customer_note":"","id":"zkras0xv0xwswx","location_id":"LEQHH0YY8B42M","seller_note":"","start_at":"2020-11-26T13:00:00Z","status":"ACCEPTED","updated_at":"2020-10-28T15:47:41Z","version":0},"errors":[]}

swagger:model CreateBookingResponse

func (*CreateBookingResponse) ContextValidate

func (m *CreateBookingResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create booking response based on the context it is used

func (*CreateBookingResponse) MarshalBinary

func (m *CreateBookingResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateBookingResponse) UnmarshalBinary

func (m *CreateBookingResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateBookingResponse) Validate

func (m *CreateBookingResponse) Validate(formats strfmt.Registry) error

Validate validates this create booking response

type CreateBreakTypeRequest

type CreateBreakTypeRequest struct {

	// The `BreakType` to be created.
	// Required: true
	BreakType *BreakType `json:"break_type"`

	// Unique string value to insure idempotency of the operation
	// Max Length: 128
	IdempotencyKey string `json:"idempotency_key,omitempty"`
}

CreateBreakTypeRequest A request to create a new `BreakType` Example: {"request_body":{"break_type":{"break_name":"Lunch Break","expected_duration":"PT30M","is_paid":true,"location_id":"CGJN03P1D08GF"},"idempotency_key":"PAD3NG5KSN2GL"}}

swagger:model CreateBreakTypeRequest

func (*CreateBreakTypeRequest) ContextValidate

func (m *CreateBreakTypeRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create break type request based on the context it is used

func (*CreateBreakTypeRequest) MarshalBinary

func (m *CreateBreakTypeRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateBreakTypeRequest) UnmarshalBinary

func (m *CreateBreakTypeRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateBreakTypeRequest) Validate

func (m *CreateBreakTypeRequest) Validate(formats strfmt.Registry) error

Validate validates this create break type request

type CreateBreakTypeResponse

type CreateBreakTypeResponse struct {

	// The `BreakType` that was created by the request.
	BreakType *BreakType `json:"break_type,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

CreateBreakTypeResponse The response to the request to create a `BreakType`. Contains the created `BreakType` object. May contain a set of `Error` objects if the request resulted in errors. Example: {"break_type":{"break_name":"Lunch Break","created_at":"2019-02-26T22:42:54Z","expected_duration":"PT30M","id":"49SSVDJG76WF3","is_paid":true,"location_id":"CGJN03P1D08GF","updated_at":"2019-02-26T22:42:54Z","version":1}}

swagger:model CreateBreakTypeResponse

func (*CreateBreakTypeResponse) ContextValidate

func (m *CreateBreakTypeResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create break type response based on the context it is used

func (*CreateBreakTypeResponse) MarshalBinary

func (m *CreateBreakTypeResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateBreakTypeResponse) UnmarshalBinary

func (m *CreateBreakTypeResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateBreakTypeResponse) Validate

func (m *CreateBreakTypeResponse) Validate(formats strfmt.Registry) error

Validate validates this create break type response

type CreateCheckoutRequest

type CreateCheckoutRequest struct {

	// The basic primitive of multi-party transaction. The value is optional.
	// The transaction facilitated by you can be split from here.
	//
	// If you provide this value, the `amount_money` value in your additional_recipients
	// must not be more than 90% of the `total_money` calculated by Square for your order.
	// The `location_id` must be the valid location of the app owner merchant.
	//
	// This field requires `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission.
	//
	// This field is currently not supported in sandbox.
	AdditionalRecipients []*ChargeRequestAdditionalRecipient `json:"additional_recipients"`

	// If `true`, Square Checkout will collect shipping information on your
	// behalf and store that information with the transaction information in your
	// Square Dashboard.
	//
	// Default: `false`.
	AskForShippingAddress bool `json:"ask_for_shipping_address,omitempty"`

	// A unique string that identifies this checkout among others
	// you've created. It can be any valid string but must be unique for every
	// order sent to Square Checkout for a given location ID.
	//
	// The idempotency key is used to avoid processing the same order more than
	// once. If you're unsure whether a particular checkout was created
	// successfully, you can reattempt it with the same idempotency key and all the
	// same other parameters without worrying about creating duplicates.
	//
	// We recommend using a random number/string generator native to the language
	// you are working in to generate strings for your idempotency keys.
	//
	// See the [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency) guide for more information.
	// Required: true
	// Max Length: 192
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`

	// The email address to display on the Square Checkout confirmation page
	// and confirmation email that the buyer can use to contact the merchant.
	//
	// If this value is not set, the confirmation page and email will display the
	// primary email address associated with the merchant's Square account.
	//
	// Default: none; only exists if explicitly set.
	// Max Length: 254
	MerchantSupportEmail string `json:"merchant_support_email,omitempty"`

	// An optional note to associate with the checkout object.
	//
	// This value cannot exceed 60 characters.
	// Max Length: 60
	Note string `json:"note,omitempty"`

	// The order including line items to be checked out.
	// Required: true
	Order *CreateOrderRequest `json:"order"`

	// If provided, the buyer's email is pre-populated on the checkout page
	// as an editable text field.
	//
	// Default: none; only exists if explicitly set.
	// Max Length: 254
	PrePopulateBuyerEmail string `json:"pre_populate_buyer_email,omitempty"`

	// If provided, the buyer's shipping info is pre-populated on the
	// checkout page as editable text fields.
	//
	// Default: none; only exists if explicitly set.
	PrePopulateShippingAddress *Address `json:"pre_populate_shipping_address,omitempty"`

	// The URL to redirect to after checkout is completed with `checkoutId`,
	// Square's `orderId`, `transactionId`, and `referenceId` appended as URL
	// parameters. For example, if the provided redirect_url is
	// `http://www.example.com/order-complete`, a successful transaction redirects
	// the customer to:
	//
	// <pre><code>http://www.example.com/order-complete?checkoutId=xxxxxx&amp;orderId=xxxxxx&amp;referenceId=xxxxxx&amp;transactionId=xxxxxx</code></pre>
	//
	// If you do not provide a redirect URL, Square Checkout will display an order
	// confirmation page on your behalf; however Square strongly recommends that
	// you provide a redirect URL so you can verify the transaction results and
	// finalize the order through your existing/normal confirmation workflow.
	//
	// Default: none; only exists if explicitly set.
	// Max Length: 800
	RedirectURL string `json:"redirect_url,omitempty"`
}

CreateCheckoutRequest Defines the parameters that can be included in the body of a request to the __CreateCheckout__ endpoint. Example: {"request_body":{"additional_recipients":[{"amount_money":{"amount":60,"currency":"USD"},"description":"Application fees","location_id":"057P5VYJ4A5X1"}],"ask_for_shipping_address":true,"idempotency_key":"86ae1696-b1e3-4328-af6d-f1e04d947ad6","merchant_support_email":"merchant+support@website.com","order":{"idempotency_key":"12ae1696-z1e3-4328-af6d-f1e04d947gd4","order":{"customer_id":"customer_id","discounts":[{"amount_money":{"amount":100,"currency":"USD"},"scope":"LINE_ITEM","type":"FIXED_AMOUNT","uid":"56ae1696-z1e3-9328-af6d-f1e04d947gd4"}],"line_items":[{"applied_discounts":[{"discount_uid":"56ae1696-z1e3-9328-af6d-f1e04d947gd4"}],"applied_taxes":[{"tax_uid":"38ze1696-z1e3-5628-af6d-f1e04d947fg3"}],"base_price_money":{"amount":1500,"currency":"USD"},"name":"Printed T Shirt","quantity":"2"},{"base_price_money":{"amount":2500,"currency":"USD"},"name":"Slim Jeans","quantity":"1"},{"base_price_money":{"amount":3500,"currency":"USD"},"name":"Woven Sweater","quantity":"3"}],"location_id":"location_id","reference_id":"reference_id","taxes":[{"percentage":"7.75","scope":"LINE_ITEM","type":"INCLUSIVE","uid":"38ze1696-z1e3-5628-af6d-f1e04d947fg3"}]}},"pre_populate_buyer_email":"example@email.com","pre_populate_shipping_address":{"address_line_1":"1455 Market St.","address_line_2":"Suite 600","administrative_district_level_1":"CA","country":"US","first_name":"Jane","last_name":"Doe","locality":"San Francisco","postal_code":"94103"},"redirect_url":"https://merchant.website.com/order-confirm"}}

swagger:model CreateCheckoutRequest

func (*CreateCheckoutRequest) ContextValidate

func (m *CreateCheckoutRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create checkout request based on the context it is used

func (*CreateCheckoutRequest) MarshalBinary

func (m *CreateCheckoutRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateCheckoutRequest) UnmarshalBinary

func (m *CreateCheckoutRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateCheckoutRequest) Validate

func (m *CreateCheckoutRequest) Validate(formats strfmt.Registry) error

Validate validates this create checkout request

type CreateCheckoutResponse

type CreateCheckoutResponse struct {

	// The newly created checkout.
	// If the same request was made with the same idempotency_key, this will be the checkout created with the idempotency_key.
	Checkout *Checkout `json:"checkout,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

CreateCheckoutResponse Defines the fields that are included in the response body of a request to the __CreateCheckout__ endpoint. Example: {"checkout":{"additional_recipients":[{"amount_money":{"amount":60,"currency":"USD"},"description":"Application fees","location_id":"057P5VYJ4A5X1"}],"ask_for_shipping_address":true,"checkout_page_url":"https://connect.squareup.com/v2/checkout?c=CAISEHGimXh-C3RIT4og1a6u1qw\u0026l=CYTKRM7R7JMV8","created_at":"2017-06-16T22:25:35Z","id":"CAISEHGimXh-C3RIT4og1a6u1qw","merchant_support_email":"merchant+support@website.com","order":{"customer_id":"customer_id","discounts":[{"amount_money":{"amount":100,"currency":"USD"},"applied_money":{"amount":100,"currency":"USD"},"scope":"LINE_ITEM","type":"FIXED_AMOUNT","uid":"56ae1696-z1e3-9328-af6d-f1e04d947gd4"}],"line_items":[{"applied_discounts":[{"applied_money":{"amount":100,"currency":"USD"},"discount_uid":"56ae1696-z1e3-9328-af6d-f1e04d947gd4"}],"applied_taxes":[{"applied_money":{"amount":103,"currency":"USD"},"tax_uid":"38ze1696-z1e3-5628-af6d-f1e04d947fg3"}],"base_price_money":{"amount":1500,"currency":"USD"},"name":"Printed T Shirt","quantity":"2","total_discount_money":{"amount":100,"currency":"USD"},"total_money":{"amount":1503,"currency":"USD"},"total_tax_money":{"amount":103,"currency":"USD"}},{"base_price_money":{"amount":2500,"currency":"USD"},"name":"Slim Jeans","quantity":"1","total_money":{"amount":2500,"currency":"USD"}},{"base_price_money":{"amount":3500,"currency":"USD"},"name":"Woven Sweater","quantity":"3","total_money":{"amount":10500,"currency":"USD"}}],"location_id":"location_id","reference_id":"reference_id","taxes":[{"percentage":"7.75","scope":"LINE_ITEM","type":"INCLUSIVE","uid":"38ze1696-z1e3-5628-af6d-f1e04d947fg3"}],"total_discount_money":{"amount":100,"currency":"USD"},"total_money":{"amount":14503,"currency":"USD"},"total_tax_money":{"amount":103,"currency":"USD"}},"pre_populate_buyer_email":"example@email.com","pre_populate_shipping_address":{"address_line_1":"1455 Market St.","address_line_2":"Suite 600","administrative_district_level_1":"CA","country":"US","first_name":"Jane","last_name":"Doe","locality":"San Francisco","postal_code":"94103"},"redirect_url":"https://merchant.website.com/order-confirm","version":1}}

swagger:model CreateCheckoutResponse

func (*CreateCheckoutResponse) ContextValidate

func (m *CreateCheckoutResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create checkout response based on the context it is used

func (*CreateCheckoutResponse) MarshalBinary

func (m *CreateCheckoutResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateCheckoutResponse) UnmarshalBinary

func (m *CreateCheckoutResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateCheckoutResponse) Validate

func (m *CreateCheckoutResponse) Validate(formats strfmt.Registry) error

Validate validates this create checkout response

type CreateCustomerCardRequest

type CreateCustomerCardRequest struct {

	// Address information for the card on file. Only the `postal_code`
	// field is required for payments in the US and Canada.
	BillingAddress *Address `json:"billing_address,omitempty"`

	// A card nonce representing the credit card to link to the customer.
	//
	// Card nonces are generated by the Square Payment Form when customers enter
	// their card information. See
	// [Embedding the payment form](https://developer.squareup.com/docs/payment-form/payment-form-walkthrough) for
	// more information.
	//
	// __NOTE:__ Card nonces generated by digital wallets (e.g., Apple Pay)
	// cannot be used to create a customer card.
	// Required: true
	CardNonce *string `json:"card_nonce"`

	// The full name printed on the credit card.
	CardholderName string `json:"cardholder_name,omitempty"`

	// An identifying token generated by `SqPaymentForm.verifyBuyer()`.
	// Verification tokens encapsulate customer device information and 3-D Secure
	// challenge results to indicate that Square has verified the buyer identity.
	VerificationToken string `json:"verification_token,omitempty"`
}

CreateCustomerCardRequest Defines the fields that are included in the request body of a request to the CreateCustomerCard endpoint. Example: {"request_body":{"billing_address":{"address_line_1":"500 Electric Ave","address_line_2":"Suite 600","administrative_district_level_1":"NY","country":"US","locality":"New York","postal_code":"10003"},"card_nonce":"YOUR_CARD_NONCE","cardholder_name":"Amelia Earhart"}}

swagger:model CreateCustomerCardRequest

func (*CreateCustomerCardRequest) ContextValidate

func (m *CreateCustomerCardRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create customer card request based on the context it is used

func (*CreateCustomerCardRequest) MarshalBinary

func (m *CreateCustomerCardRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateCustomerCardRequest) UnmarshalBinary

func (m *CreateCustomerCardRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateCustomerCardRequest) Validate

func (m *CreateCustomerCardRequest) Validate(formats strfmt.Registry) error

Validate validates this create customer card request

type CreateCustomerCardResponse

type CreateCustomerCardResponse struct {

	// The created card on file.
	Card *Card `json:"card,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

CreateCustomerCardResponse Defines the fields that are included in the response body of a request to the CreateCustomerCard endpoint.

One of `errors` or `card` is present in a given response (never both). Example: {"card":{"billing_address":{"address_line_1":"500 Electric Ave","address_line_2":"Suite 600","administrative_district_level_1":"NY","country":"US","locality":"New York","postal_code":"10003"},"card_brand":"VISA","cardholder_name":"Amelia Earhart","exp_month":11,"exp_year":2018,"id":"icard-card_id","last_4":"1111"}}

swagger:model CreateCustomerCardResponse

func (*CreateCustomerCardResponse) ContextValidate

func (m *CreateCustomerCardResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create customer card response based on the context it is used

func (*CreateCustomerCardResponse) MarshalBinary

func (m *CreateCustomerCardResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateCustomerCardResponse) UnmarshalBinary

func (m *CreateCustomerCardResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateCustomerCardResponse) Validate

func (m *CreateCustomerCardResponse) Validate(formats strfmt.Registry) error

Validate validates this create customer card response

type CreateCustomerGroupRequest

type CreateCustomerGroupRequest struct {

	// The customer group to create.
	// Required: true
	Group *CustomerGroup `json:"group"`

	// The idempotency key for the request. See the [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency)
	// guide for more information.
	IdempotencyKey string `json:"idempotency_key,omitempty"`
}

CreateCustomerGroupRequest Defines the body parameters that can be provided in a request to the [CreateCustomerGroup](#endpoint-createcustomegroup) endpoint. Example: {"request_body":{"group":{"name":"Loyal Customers"}}}

swagger:model CreateCustomerGroupRequest

func (*CreateCustomerGroupRequest) ContextValidate

func (m *CreateCustomerGroupRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create customer group request based on the context it is used

func (*CreateCustomerGroupRequest) MarshalBinary

func (m *CreateCustomerGroupRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateCustomerGroupRequest) UnmarshalBinary

func (m *CreateCustomerGroupRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateCustomerGroupRequest) Validate

func (m *CreateCustomerGroupRequest) Validate(formats strfmt.Registry) error

Validate validates this create customer group request

type CreateCustomerGroupResponse

type CreateCustomerGroupResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The successfully created customer group.
	Group *CustomerGroup `json:"group,omitempty"`
}

CreateCustomerGroupResponse Defines the fields that are included in the response body of a request to the [CreateCustomerGroup](#endpoint-createcustomergroup) endpoint.

One of `errors` or `group` is present in a given response (never both). Example: {"group":{"created_at":"2020-04-13T21:54:57.863Z","id":"2TAT3CMH4Q0A9M87XJZED0WMR3","name":"Loyal Customers","updated_at":"2020-04-13T21:54:58Z"}}

swagger:model CreateCustomerGroupResponse

func (*CreateCustomerGroupResponse) ContextValidate

func (m *CreateCustomerGroupResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create customer group response based on the context it is used

func (*CreateCustomerGroupResponse) MarshalBinary

func (m *CreateCustomerGroupResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateCustomerGroupResponse) UnmarshalBinary

func (m *CreateCustomerGroupResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateCustomerGroupResponse) Validate

func (m *CreateCustomerGroupResponse) Validate(formats strfmt.Registry) error

Validate validates this create customer group response

type CreateCustomerRequest

type CreateCustomerRequest struct {

	// The physical address associated with the customer profile.
	Address *Address `json:"address,omitempty"`

	// The birthday associated with the customer profile, in RFC 3339 format.
	// Year is optional, timezone and times are not allowed.
	// For example: `0000-09-01T00:00:00-00:00` indicates a birthday on September 1st.
	// `1998-09-01T00:00:00-00:00` indications a birthday on September 1st __1998__.
	Birthday string `json:"birthday,omitempty"`

	// A business name associated with the customer profile.
	CompanyName string `json:"company_name,omitempty"`

	// The email address associated with the customer profile.
	EmailAddress string `json:"email_address,omitempty"`

	// The family (i.e., last) name associated with the customer profile.
	FamilyName string `json:"family_name,omitempty"`

	// The given (i.e., first) name associated with the customer profile.
	GivenName string `json:"given_name,omitempty"`

	// The idempotency key for the request.	See the
	// [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency) guide for more information.
	IdempotencyKey string `json:"idempotency_key,omitempty"`

	// A nickname for the customer profile.
	Nickname string `json:"nickname,omitempty"`

	// A custom note associated with the customer profile.
	Note string `json:"note,omitempty"`

	// The 11-digit phone number associated with the customer profile.
	PhoneNumber string `json:"phone_number,omitempty"`

	// An optional, second ID used to associate the customer profile with an
	// entity in another system.
	ReferenceID string `json:"reference_id,omitempty"`
}

CreateCustomerRequest Defines the body parameters that can be provided in a request to the CreateCustomer endpoint. Example: {"request_body":{"address":{"address_line_1":"500 Electric Ave","address_line_2":"Suite 600","administrative_district_level_1":"NY","country":"US","locality":"New York","postal_code":"10003"},"email_address":"Amelia.Earhart@example.com","family_name":"Earhart","given_name":"Amelia","note":"a customer","phone_number":"1-212-555-4240","reference_id":"YOUR_REFERENCE_ID"}}

swagger:model CreateCustomerRequest

func (*CreateCustomerRequest) ContextValidate

func (m *CreateCustomerRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create customer request based on the context it is used

func (*CreateCustomerRequest) MarshalBinary

func (m *CreateCustomerRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateCustomerRequest) UnmarshalBinary

func (m *CreateCustomerRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateCustomerRequest) Validate

func (m *CreateCustomerRequest) Validate(formats strfmt.Registry) error

Validate validates this create customer request

type CreateCustomerResponse

type CreateCustomerResponse struct {

	// The created customer.
	Customer *Customer `json:"customer,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

CreateCustomerResponse Defines the fields that are included in the response body of a request to the CreateCustomer endpoint.

One of `errors` or `customer` is present in a given response (never both). Example: {"customer":{"address":{"address_line_1":"500 Electric Ave","address_line_2":"Suite 600","administrative_district_level_1":"NY","country":"US","locality":"New York","postal_code":"10003"},"created_at":"2016-03-23T20:21:54.859Z","email_address":"Amelia.Earhart@example.com","family_name":"Earhart","given_name":"Amelia","id":"JDKYHBWT1D4F8MFH63DBMEN8Y4","note":"a customer","phone_number":"1-212-555-4240","reference_id":"YOUR_REFERENCE_ID","updated_at":"2016-03-23T20:21:54.859Z"}}

swagger:model CreateCustomerResponse

func (*CreateCustomerResponse) ContextValidate

func (m *CreateCustomerResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create customer response based on the context it is used

func (*CreateCustomerResponse) MarshalBinary

func (m *CreateCustomerResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateCustomerResponse) UnmarshalBinary

func (m *CreateCustomerResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateCustomerResponse) Validate

func (m *CreateCustomerResponse) Validate(formats strfmt.Registry) error

Validate validates this create customer response

type CreateDeviceCodeRequest

type CreateDeviceCodeRequest struct {

	// The device code to create.
	// Required: true
	DeviceCode *DeviceCode `json:"device_code"`

	// A unique string that identifies this CreateDeviceCode request. Keys can
	// be any valid string but must be unique for every CreateDeviceCode request.
	//
	// See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information.
	// Required: true
	// Max Length: 128
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`
}

CreateDeviceCodeRequest create device code request Example: {"request_body":{"device_code":{"location_id":"B5E4484SHHNYH","name":"Counter 1","product_type":"TERMINAL_API"},"idempotency_key":"01bb00a6-0c86-4770-94ed-f5fca973cd56"}}

swagger:model CreateDeviceCodeRequest

func (*CreateDeviceCodeRequest) ContextValidate

func (m *CreateDeviceCodeRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create device code request based on the context it is used

func (*CreateDeviceCodeRequest) MarshalBinary

func (m *CreateDeviceCodeRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateDeviceCodeRequest) UnmarshalBinary

func (m *CreateDeviceCodeRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateDeviceCodeRequest) Validate

func (m *CreateDeviceCodeRequest) Validate(formats strfmt.Registry) error

Validate validates this create device code request

type CreateDeviceCodeResponse

type CreateDeviceCodeResponse struct {

	// The created DeviceCode object containing the device code string.
	DeviceCode *DeviceCode `json:"device_code,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

CreateDeviceCodeResponse create device code response Example: {"device_code":{"code":"EBCARJ","created_at":"2020-02-06T18:44:33.000Z","id":"B3Z6NAMYQSMTM","location_id":"B5E4484SHHNYH","name":"Counter 1","pair_by":"2020-02-06T18:49:33.000Z","product_type":"TERMINAL_API","status":"UNPAIRED","status_changed_at":"2020-02-06T18:44:33.000Z"}}

swagger:model CreateDeviceCodeResponse

func (*CreateDeviceCodeResponse) ContextValidate

func (m *CreateDeviceCodeResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create device code response based on the context it is used

func (*CreateDeviceCodeResponse) MarshalBinary

func (m *CreateDeviceCodeResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateDeviceCodeResponse) UnmarshalBinary

func (m *CreateDeviceCodeResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateDeviceCodeResponse) Validate

func (m *CreateDeviceCodeResponse) Validate(formats strfmt.Registry) error

Validate validates this create device code response

type CreateDisputeEvidenceTextRequest

type CreateDisputeEvidenceTextRequest struct {

	// The evidence string.
	// Required: true
	// Max Length: 500
	// Min Length: 1
	EvidenceText *string `json:"evidence_text"`

	// The type of evidence you are uploading.
	// See [DisputeEvidenceType](#type-disputeevidencetype) for possible values
	EvidenceType string `json:"evidence_type,omitempty"`

	// The Unique ID. For more information, see [Idempotency](https://developer.squareup.com/docs/docs/working-with-apis/idempotency).
	// Required: true
	// Max Length: 45
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`
}

CreateDisputeEvidenceTextRequest Defines the parameters for a `CreateDisputeEvidenceText` request. Example: {"request_body":{"evidence_text":"1Z8888888888888888","evidence_type":"TRACKING_NUMBER","idempotency_key":"ed3ee3933d946f1514d505d173c82648"}}

swagger:model CreateDisputeEvidenceTextRequest

func (*CreateDisputeEvidenceTextRequest) ContextValidate

func (m *CreateDisputeEvidenceTextRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this create dispute evidence text request based on context it is used

func (*CreateDisputeEvidenceTextRequest) MarshalBinary

func (m *CreateDisputeEvidenceTextRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateDisputeEvidenceTextRequest) UnmarshalBinary

func (m *CreateDisputeEvidenceTextRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateDisputeEvidenceTextRequest) Validate

Validate validates this create dispute evidence text request

type CreateDisputeEvidenceTextResponse

type CreateDisputeEvidenceTextResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The newly uploaded dispute evidence metadata.
	Evidence *DisputeEvidence `json:"evidence,omitempty"`
}

CreateDisputeEvidenceTextResponse Defines the fields in a `CreateDisputeEvidenceText` response. Example: {"evidence":{"dispute_id":"bVTprrwk0gygTLZ96VX1oB","evidence_id":"TOomLInj6iWmP3N8qfCXrB","evidence_text":"1Z8888888888888888","uploaded_at":"2018-10-18T16:01:10.000Z"}}

swagger:model CreateDisputeEvidenceTextResponse

func (*CreateDisputeEvidenceTextResponse) ContextValidate

func (m *CreateDisputeEvidenceTextResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create dispute evidence text response based on the context it is used

func (*CreateDisputeEvidenceTextResponse) MarshalBinary

func (m *CreateDisputeEvidenceTextResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateDisputeEvidenceTextResponse) UnmarshalBinary

func (m *CreateDisputeEvidenceTextResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateDisputeEvidenceTextResponse) Validate

Validate validates this create dispute evidence text response

type CreateInvoiceRequest

type CreateInvoiceRequest struct {

	// A unique string that identifies the `CreateInvoice` request. If you do not
	// provide `idempotency_key` (or provide an empty string as the value), the endpoint
	// treats each request as independent.
	//
	// For more information, see [Idempotency](https://developer.squareup.com/docs/docs/working-with-apis/idempotency).
	// Max Length: 128
	IdempotencyKey string `json:"idempotency_key,omitempty"`

	// The invoice to create.
	// Required: true
	Invoice *Invoice `json:"invoice"`
}

CreateInvoiceRequest Describes a `CreateInvoice` request. Example: {"request_body":{"custom_fields":[{"label":"Event Reference Number","placement":"ABOVE_LINE_ITEMS","value":"Ref. #1234"},{"label":"Terms of Service","placement":"BELOW_LINE_ITEMS","value":"The terms of service are..."}],"idempotency_key":"ce3748f9-5fc1-4762-aa12-aae5e843f1f4","invoice":{"delivery_method":"EMAIL","description":"We appreciate your business!","invoice_number":"inv-100","location_id":"ES0RJRZYEC39A","order_id":"CAISENgvlJ6jLWAzERDzjyHVybY","payment_requests":[{"automatic_payment_source":"NONE","due_date":"2030-01-24","reminders":[{"message":"Your invoice is due tomorrow","relative_scheduled_days":-1}],"request_type":"BALANCE","tipping_enabled":true}],"primary_recipient":{"customer_id":"JDKYHBWT1D4F8MFH63DBMEN8Y4"},"scheduled_at":"2030-01-13T10:00:00Z","title":"Event Planning Services"}}}

swagger:model CreateInvoiceRequest

func (*CreateInvoiceRequest) ContextValidate

func (m *CreateInvoiceRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create invoice request based on the context it is used

func (*CreateInvoiceRequest) MarshalBinary

func (m *CreateInvoiceRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateInvoiceRequest) UnmarshalBinary

func (m *CreateInvoiceRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateInvoiceRequest) Validate

func (m *CreateInvoiceRequest) Validate(formats strfmt.Registry) error

Validate validates this create invoice request

type CreateInvoiceResponse

type CreateInvoiceResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The newly created invoice.
	Invoice *Invoice `json:"invoice,omitempty"`
}

CreateInvoiceResponse The response returned by the `CreateInvoice` request. Example: {"invoice":{"created_at":"2020-06-18T17:45:13Z","custom_fields":[{"label":"Event Reference Number","placement":"ABOVE_LINE_ITEMS","value":"Ref. #1234"},{"label":"Terms of Service","placement":"BELOW_LINE_ITEMS","value":"The terms of service are..."}],"delivery_method":"EMAIL","description":"We appreciate your business!","id":"gt2zv1z6mnUm1V7KMxxf3w","invoice_number":"inv-100","location_id":"ES0RJRZYEC39A","order_id":"CAISENgvlJ6jLWAzERDzjyHVybY","payment_requests":[{"automatic_payment_source":"NONE","computed_amount_money":{"amount":10000,"currency":"USD"},"due_date":"2030-01-24","reminders":[{"message":"Your invoice is due tomorrow","relative_scheduled_days":-1,"status":"PENDING","uid":"beebd363-e47f-4075-8785-c235aaa7df11"}],"request_type":"BALANCE","tipping_enabled":true,"total_completed_amount_money":{"amount":0,"currency":"USD"},"uid":"2da7964f-f3d2-4f43-81e8-5aa220bf3355"}],"primary_recipient":{"customer_id":"JDKYHBWT1D4F8MFH63DBMEN8Y4","email_address":"Amelia.Earhart@example.com","family_name":"Earhart","given_name":"Amelia","phone_number":"1-212-555-4240"},"scheduled_at":"2030-01-13T10:00:00Z","status":"DRAFT","timezone":"America/Los_Angeles","title":"Event Planning Services","updated_at":"2020-06-18T17:45:13Z","version":0}}

swagger:model CreateInvoiceResponse

func (*CreateInvoiceResponse) ContextValidate

func (m *CreateInvoiceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create invoice response based on the context it is used

func (*CreateInvoiceResponse) MarshalBinary

func (m *CreateInvoiceResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateInvoiceResponse) UnmarshalBinary

func (m *CreateInvoiceResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateInvoiceResponse) Validate

func (m *CreateInvoiceResponse) Validate(formats strfmt.Registry) error

Validate validates this create invoice response

type CreateLocationRequest

type CreateLocationRequest struct {

	// The initial values of the location being created. The `name` field is required and must be unique within a seller account.
	// All other fields are optional. Unspecified fields will be set to default
	// values using existing location data.
	Location *Location `json:"location,omitempty"`
}

CreateLocationRequest Request object for the [CreateLocation](#endpoint-createlocation) endpoint. Example: {"request_body":{"location":{"address":{"address_line_1":"1234 Peachtree St. NE","administrative_district_level_1":"GA","locality":"Atlanta","postal_code":"30309"},"description":"My new location.","facebook_url":null,"name":"New location name"}}}

swagger:model CreateLocationRequest

func (*CreateLocationRequest) ContextValidate

func (m *CreateLocationRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create location request based on the context it is used

func (*CreateLocationRequest) MarshalBinary

func (m *CreateLocationRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateLocationRequest) UnmarshalBinary

func (m *CreateLocationRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateLocationRequest) Validate

func (m *CreateLocationRequest) Validate(formats strfmt.Registry) error

Validate validates this create location request

type CreateLocationResponse

type CreateLocationResponse struct {

	// Information on errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The newly created `Location`.
	Location *Location `json:"location,omitempty"`
}

CreateLocationResponse Response object returned by the [CreateLocation](#endpoint-createlocation) endpoint. Example: {"location":{"address":{"address_line_1":"1234 Peachtree St. NE","administrative_district_level_1":"GA","locality":"Atlanta","postal_code":"30309"},"capabilities":["CREDIT_CARD_PROCESSING"],"coordinates":{"latitude":33.788567,"longitude":-84.466947},"country":"US","created_at":"2019-07-19T17:58:25Z","currency":"USD","description":"My new location.","id":"LOCATION_ID","instagram_username":"instagram","language_code":"en-US","mcc":"1234","merchant_id":"MERCHANT_ID","name":"New location name","status":"ACTIVE","twitter_username":"twitter","type":"PHYSICAL","website_url":"examplewebsite.com"}}

swagger:model CreateLocationResponse

func (*CreateLocationResponse) ContextValidate

func (m *CreateLocationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create location response based on the context it is used

func (*CreateLocationResponse) MarshalBinary

func (m *CreateLocationResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateLocationResponse) UnmarshalBinary

func (m *CreateLocationResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateLocationResponse) Validate

func (m *CreateLocationResponse) Validate(formats strfmt.Registry) error

Validate validates this create location response

type CreateLoyaltyAccountRequest

type CreateLoyaltyAccountRequest struct {

	// A unique string that identifies this `CreateLoyaltyAccount` request.
	// Keys can be any valid string, but must be unique for every request.
	// Required: true
	// Max Length: 128
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`

	// The loyalty account to create.
	// Required: true
	LoyaltyAccount *LoyaltyAccount `json:"loyalty_account"`
}

CreateLoyaltyAccountRequest A request to create a new loyalty account. Example: {"request_body":{"idempotency_key":"ec78c477-b1c3-4899-a209-a4e71337c996","loyalty_account":{"mappings":[{"type":"PHONE","value":"+14155551234"}],"program_id":"d619f755-2d17-41f3-990d-c04ecedd64dd"}}}

swagger:model CreateLoyaltyAccountRequest

func (*CreateLoyaltyAccountRequest) ContextValidate

func (m *CreateLoyaltyAccountRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create loyalty account request based on the context it is used

func (*CreateLoyaltyAccountRequest) MarshalBinary

func (m *CreateLoyaltyAccountRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateLoyaltyAccountRequest) UnmarshalBinary

func (m *CreateLoyaltyAccountRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateLoyaltyAccountRequest) Validate

func (m *CreateLoyaltyAccountRequest) Validate(formats strfmt.Registry) error

Validate validates this create loyalty account request

type CreateLoyaltyAccountResponse

type CreateLoyaltyAccountResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The newly created loyalty account.
	LoyaltyAccount *LoyaltyAccount `json:"loyalty_account,omitempty"`
}

CreateLoyaltyAccountResponse A response that includes loyalty account created. Example: {"loyalty_account":{"balance":0,"created_at":"2020-05-08T21:44:32Z","id":"79b807d2-d786-46a9-933b-918028d7a8c5","lifetime_points":0,"mappings":[{"created_at":"2020-05-08T21:44:32Z","id":"66aaab3f-da99-49ed-8b19-b87f851c844f","type":"PHONE","value":"+14155551234"}],"program_id":"d619f755-2d17-41f3-990d-c04ecedd64dd","updated_at":"2020-05-08T21:44:32Z"}}

swagger:model CreateLoyaltyAccountResponse

func (*CreateLoyaltyAccountResponse) ContextValidate

func (m *CreateLoyaltyAccountResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create loyalty account response based on the context it is used

func (*CreateLoyaltyAccountResponse) MarshalBinary

func (m *CreateLoyaltyAccountResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateLoyaltyAccountResponse) UnmarshalBinary

func (m *CreateLoyaltyAccountResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateLoyaltyAccountResponse) Validate

func (m *CreateLoyaltyAccountResponse) Validate(formats strfmt.Registry) error

Validate validates this create loyalty account response

type CreateLoyaltyRewardRequest

type CreateLoyaltyRewardRequest struct {

	// A unique string that identifies this `CreateLoyaltyReward` request.
	// Keys can be any valid string, but must be unique for every request.
	// Required: true
	// Max Length: 128
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`

	// The reward to create.
	// Required: true
	Reward *LoyaltyReward `json:"reward"`
}

CreateLoyaltyRewardRequest A request to create a loyalty reward. Example: {"request_body":{"idempotency_key":"18c2e5ea-a620-4b1f-ad60-7b167285e451","reward":{"loyalty_account_id":"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd","order_id":"RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY","reward_tier_id":"e1b39225-9da5-43d1-a5db-782cdd8ad94f"}}}

swagger:model CreateLoyaltyRewardRequest

func (*CreateLoyaltyRewardRequest) ContextValidate

func (m *CreateLoyaltyRewardRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create loyalty reward request based on the context it is used

func (*CreateLoyaltyRewardRequest) MarshalBinary

func (m *CreateLoyaltyRewardRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateLoyaltyRewardRequest) UnmarshalBinary

func (m *CreateLoyaltyRewardRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateLoyaltyRewardRequest) Validate

func (m *CreateLoyaltyRewardRequest) Validate(formats strfmt.Registry) error

Validate validates this create loyalty reward request

type CreateLoyaltyRewardResponse

type CreateLoyaltyRewardResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The loyalty reward created.
	Reward *LoyaltyReward `json:"reward,omitempty"`
}

CreateLoyaltyRewardResponse A response that includes the loyalty reward created. Example: {"reward":{"created_at":"2020-05-01T21:49:54Z","id":"a8f43ebe-2ad6-3001-bdd5-7d7c2da08943","loyalty_account_id":"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd","order_id":"RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY","points":10,"reward_tier_id":"e1b39225-9da5-43d1-a5db-782cdd8ad94f","status":"ISSUED","updated_at":"2020-05-01T21:49:54Z"}}

swagger:model CreateLoyaltyRewardResponse

func (*CreateLoyaltyRewardResponse) ContextValidate

func (m *CreateLoyaltyRewardResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create loyalty reward response based on the context it is used

func (*CreateLoyaltyRewardResponse) MarshalBinary

func (m *CreateLoyaltyRewardResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateLoyaltyRewardResponse) UnmarshalBinary

func (m *CreateLoyaltyRewardResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateLoyaltyRewardResponse) Validate

func (m *CreateLoyaltyRewardResponse) Validate(formats strfmt.Registry) error

Validate validates this create loyalty reward response

type CreateMobileAuthorizationCodeRequest

type CreateMobileAuthorizationCodeRequest struct {

	// The Square location ID the authorization code should be tied to.
	LocationID string `json:"location_id,omitempty"`
}

CreateMobileAuthorizationCodeRequest Defines the body parameters that can be provided in a request to the __CreateMobileAuthorizationCode__ endpoint. Example: {"request_body":{"location_id":"YOUR_LOCATION_ID"},"request_url":"/mobile/authorization-code"}

swagger:model CreateMobileAuthorizationCodeRequest

func (*CreateMobileAuthorizationCodeRequest) ContextValidate

func (m *CreateMobileAuthorizationCodeRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this create mobile authorization code request based on context it is used

func (*CreateMobileAuthorizationCodeRequest) MarshalBinary

func (m *CreateMobileAuthorizationCodeRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateMobileAuthorizationCodeRequest) UnmarshalBinary

func (m *CreateMobileAuthorizationCodeRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateMobileAuthorizationCodeRequest) Validate

Validate validates this create mobile authorization code request

type CreateMobileAuthorizationCodeResponse

type CreateMobileAuthorizationCodeResponse struct {

	// Generated authorization code that connects a mobile application instance
	// to a Square account.
	AuthorizationCode string `json:"authorization_code,omitempty"`

	// An error object that provides details about how creation of authorization
	// code failed.
	Error *Error `json:"error,omitempty"`

	// The timestamp when `authorization_code` expires in
	// [RFC 3339](https://tools.ietf.org/html/rfc3339) format, e.g., "2016-09-04T23:59:33.123Z".
	ExpiresAt string `json:"expires_at,omitempty"`
}

CreateMobileAuthorizationCodeResponse Defines the fields that are included in the response body of a request to the __CreateMobileAuthorizationCode__ endpoint. Example: {"authorization_code":"YOUR_MOBILE_AUTHORIZATION_CODE","expires_at":"2019-01-10T19:42:08Z"}

swagger:model CreateMobileAuthorizationCodeResponse

func (*CreateMobileAuthorizationCodeResponse) ContextValidate

func (m *CreateMobileAuthorizationCodeResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create mobile authorization code response based on the context it is used

func (*CreateMobileAuthorizationCodeResponse) MarshalBinary

func (m *CreateMobileAuthorizationCodeResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateMobileAuthorizationCodeResponse) UnmarshalBinary

func (m *CreateMobileAuthorizationCodeResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateMobileAuthorizationCodeResponse) Validate

Validate validates this create mobile authorization code response

type CreateOrderRequest

type CreateOrderRequest struct {

	// A value you specify that uniquely identifies this
	// order among orders you've created.
	//
	// If you're unsure whether a particular order was created successfully,
	// you can reattempt it with the same idempotency key without
	// worrying about creating duplicate orders.
	//
	// See [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency) for more information.
	// Max Length: 192
	IdempotencyKey string `json:"idempotency_key,omitempty"`

	// The order to create. If this field is set, then the only other top-level field that can be
	// set is the idempotency_key.
	Order *Order `json:"order,omitempty"`
}

CreateOrderRequest create order request Example: {"request_body":{"idempotency_key":"8193148c-9586-11e6-99f9-28cfe92138cf","order":{"discounts":[{"name":"Labor Day Sale","percentage":"5","scope":"ORDER","uid":"labor-day-sale"},{"catalog_object_id":"DB7L55ZH2BGWI4H23ULIWOQ7","scope":"ORDER","uid":"membership-discount"},{"amount_money":{"amount":100,"currency":"USD"},"name":"Sale - $1.00 off","scope":"LINE_ITEM","uid":"one-dollar-off"}],"line_items":[{"base_price_money":{"amount":1599,"currency":"USD"},"name":"New York Strip Steak","quantity":"1"},{"applied_discounts":[{"discount_uid":"one-dollar-off"}],"catalog_object_id":"BEMYCSMIJL46OCDV4KYIKXIB","modifiers":[{"catalog_object_id":"CHQX7Y4KY6N5KINJKZCFURPZ"}],"quantity":"2"}],"location_id":"057P5VYJ4A5X1","reference_id":"my-order-001","taxes":[{"name":"State Sales Tax","percentage":"9","scope":"ORDER","uid":"state-sales-tax"}]}}}

swagger:model CreateOrderRequest

func (*CreateOrderRequest) ContextValidate

func (m *CreateOrderRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create order request based on the context it is used

func (*CreateOrderRequest) MarshalBinary

func (m *CreateOrderRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateOrderRequest) UnmarshalBinary

func (m *CreateOrderRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateOrderRequest) Validate

func (m *CreateOrderRequest) Validate(formats strfmt.Registry) error

Validate validates this create order request

type CreateOrderResponse

type CreateOrderResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The newly created order.
	Order *Order `json:"order,omitempty"`
}

CreateOrderResponse Defines the fields that are included in the response body of a request to the CreateOrder endpoint.

One of `errors` or `order` is present in a given response (never both). Example: {"order":{"created_at":"2020-01-17T20:47:53.293Z","discounts":[{"applied_money":{"amount":30,"currency":"USD"},"catalog_object_id":"DB7L55ZH2BGWI4H23ULIWOQ7","name":"Membership Discount","percentage":"0.5","scope":"ORDER","type":"FIXED_PERCENTAGE","uid":"membership-discount"},{"applied_money":{"amount":303,"currency":"USD"},"name":"Labor Day Sale","percentage":"5","scope":"ORDER","type":"FIXED_PERCENTAGE","uid":"labor-day-sale"},{"amount_money":{"amount":100,"currency":"USD"},"applied_money":{"amount":100,"currency":"USD"},"name":"Sale - $1.00 off","scope":"LINE_ITEM","type":"FIXED_AMOUNT","uid":"one-dollar-off"}],"id":"CAISENgvlJ6jLWAzERDzjyHVybY","line_items":[{"applied_discounts":[{"applied_money":{"amount":8,"currency":"USD"},"discount_uid":"membership-discount","uid":"jWdgP1TpHPFBuVrz81mXVC"},{"applied_money":{"amount":79,"currency":"USD"},"discount_uid":"labor-day-sale","uid":"jnZOjjVY57eRcQAVgEwFuC"}],"applied_taxes":[{"applied_money":{"amount":136,"currency":"USD"},"tax_uid":"state-sales-tax","uid":"aKG87ArnDpvMLSZJHxWUl"}],"base_price_money":{"amount":1599,"currency":"USD"},"gross_sales_money":{"amount":1599,"currency":"USD"},"name":"New York Strip Steak","quantity":"1","total_discount_money":{"amount":87,"currency":"USD"},"total_money":{"amount":1648,"currency":"USD"},"total_tax_money":{"amount":136,"currency":"USD"},"uid":"8uSwfzvUImn3IRrvciqlXC","variation_total_price_money":{"amount":1599,"currency":"USD"}},{"applied_discounts":[{"applied_money":{"amount":22,"currency":"USD"},"discount_uid":"membership-discount","uid":"nUXvdsIItfKko0dbYtY58C"},{"applied_money":{"amount":224,"currency":"USD"},"discount_uid":"labor-day-sale","uid":"qSdkOOOernlVQqsJ94SPjB"},{"applied_money":{"amount":100,"currency":"USD"},"discount_uid":"one-dollar-off","uid":"y7bVl4njrWAnfDwmz19izB"}],"applied_taxes":[{"applied_money":{"amount":374,"currency":"USD"},"tax_uid":"state-sales-tax","uid":"v1dAgrfUVUPTnVTf9sRPz"}],"base_price_money":{"amount":2200,"currency":"USD"},"catalog_object_id":"BEMYCSMIJL46OCDV4KYIKXIB","gross_sales_money":{"amount":4500,"currency":"USD"},"modifiers":[{"base_price_money":{"amount":50,"currency":"USD"},"catalog_object_id":"CHQX7Y4KY6N5KINJKZCFURPZ","name":"Well","total_price_money":{"amount":100,"currency":"USD"},"uid":"Lo3qMMckDluu9Qsb58d4CC"}],"name":"New York Steak","quantity":"2","total_discount_money":{"amount":346,"currency":"USD"},"total_money":{"amount":4528,"currency":"USD"},"total_tax_money":{"amount":374,"currency":"USD"},"uid":"v8ZuEXpOJpb0bazLuvrLDB","variation_name":"Larger","variation_total_price_money":{"amount":4400,"currency":"USD"}}],"location_id":"057P5VYJ4A5X1","net_amounts":{"discount_money":{"amount":433,"currency":"USD"},"service_charge_money":{"amount":0,"currency":"USD"},"tax_money":{"amount":510,"currency":"USD"},"tip_money":{"amount":0,"currency":"USD"},"total_money":{"amount":6176,"currency":"USD"}},"reference_id":"my-order-001","source":{"name":"My App"},"state":"OPEN","taxes":[{"applied_money":{"amount":510,"currency":"USD"},"name":"State Sales Tax","percentage":"9","scope":"ORDER","type":"ADDITIVE","uid":"state-sales-tax"}],"total_discount_money":{"amount":433,"currency":"USD"},"total_money":{"amount":6176,"currency":"USD"},"total_service_charge_money":{"amount":0,"currency":"USD"},"total_tax_money":{"amount":510,"currency":"USD"},"total_tip_money":{"amount":0,"currency":"USD"},"updated_at":"2020-01-17T20:47:53.293Z","version":1}}

swagger:model CreateOrderResponse

func (*CreateOrderResponse) ContextValidate

func (m *CreateOrderResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create order response based on the context it is used

func (*CreateOrderResponse) MarshalBinary

func (m *CreateOrderResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateOrderResponse) UnmarshalBinary

func (m *CreateOrderResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateOrderResponse) Validate

func (m *CreateOrderResponse) Validate(formats strfmt.Registry) error

Validate validates this create order response

type CreatePaymentRequest

type CreatePaymentRequest struct {

	// If set to `true` and charging a Square Gift Card, a payment might be returned with
	// `amount_money` equal to less than what was requested. For example, a request for $20 when charging
	// a Square Gift Card with a balance of $5 results in an APPROVED payment of $5. You might choose
	// to prompt the buyer for an additional payment to cover the remainder or cancel the Gift Card
	// payment. This field cannot be `true` when `autocomplete = true`.
	//
	// For more information, see
	// [Partial amount with Square Gift Cards](https://developer.squareup.com/docs/payments-api/take-payments#partial-payment-gift-card).
	//
	// Default: false
	AcceptPartialAuthorization bool `json:"accept_partial_authorization,omitempty"`

	// The amount of money to accept for this payment, not including `tip_money`.
	//
	// The amount must be specified in the smallest denomination of the applicable currency
	// (for example, US dollar amounts are specified in cents). For more information, see
	// [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).
	//
	// The currency code must match the currency associated with the business
	// that is accepting the payment.
	// Required: true
	AmountMoney *Money `json:"amount_money"`

	// The amount of money that the developer is taking as a fee
	// for facilitating the payment on behalf of the seller.
	//
	// The amount cannot be more than 90% of the total amount of the payment.
	//
	// The amount must be specified in the smallest denomination of the applicable currency
	// (for example, US dollar amounts are specified in cents). For more information, see
	// [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).
	//
	// The fee currency code must match the currency associated with the seller
	// that is accepting the payment. The application must be from a developer
	// account in the same country and using the same currency code as the seller.
	//
	// For more information about the application fee scenario, see
	// [Take Payments and Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees).
	AppFeeMoney *Money `json:"app_fee_money,omitempty"`

	// If set to `true`, this payment will be completed when possible. If
	// set to `false`, this payment is held in an approved state until either
	// explicitly completed (captured) or canceled (voided). For more information, see
	// [Delayed capture](https://developer.squareup.com/docs/payments-api/take-payments#delayed-payments).
	//
	// Default: true
	Autocomplete bool `json:"autocomplete,omitempty"`

	// The buyer's billing address.
	BillingAddress *Address `json:"billing_address,omitempty"`

	// The buyer's email address.
	// Max Length: 255
	BuyerEmailAddress string `json:"buyer_email_address,omitempty"`

	// The `Customer` ID of the customer associated with the payment.
	//
	// This is required if the `source_id` refers to a card on file created using the Customers API.
	CustomerID string `json:"customer_id,omitempty"`

	// The duration of time after the payment's creation when Square automatically cancels the
	// payment. This automatic cancellation applies only to payments that do not reach a terminal state
	// (COMPLETED, CANCELED, or FAILED) before the `delay_duration` time period.
	//
	// This parameter should be specified as a time duration, in RFC 3339 format, with a minimum value
	// of 1 minute.
	//
	// Note: This feature is only supported for card payments. This parameter can only be set for a delayed
	// capture payment (`autocomplete=false`).
	//
	// Default:
	//
	// - Card-present payments: "PT36H" (36 hours) from the creation time.
	// - Card-not-present payments: "P7D" (7 days) from the creation time.
	DelayDuration string `json:"delay_duration,omitempty"`

	// A unique string that identifies this `CreatePayment` request. Keys can be any valid string
	// but must be unique for every `CreatePayment` request.
	//
	// Max: 45 characters
	//
	// Note: The number of allowed characters might be less than the stated maximum, if multi-byte
	// characters are used.
	//
	// For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).
	// Required: true
	// Max Length: 45
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`

	// The location ID to associate with the payment. If not specified, the default location is
	// used.
	LocationID string `json:"location_id,omitempty"`

	// An optional note to be entered by the developer when creating a payment.
	//
	// Limit 500 characters.
	// Max Length: 500
	Note string `json:"note,omitempty"`

	// Associates a previously created order with this payment.
	OrderID string `json:"order_id,omitempty"`

	// A user-defined ID to associate with the payment.
	//
	// You can use this field to associate the payment to an entity in an external system
	// (for example, you might specify an order ID that is generated by a third-party shopping cart).
	//
	// Limit 40 characters.
	// Max Length: 40
	ReferenceID string `json:"reference_id,omitempty"`

	// The buyer's shipping address.
	ShippingAddress *Address `json:"shipping_address,omitempty"`

	// The ID for the source of funds for this payment. This can be a nonce
	// generated by the Square payment form or a card on file made with the Customers API.
	// Required: true
	// Min Length: 1
	SourceID *string `json:"source_id"`

	// Optional additional payment information to include on the customer's card statement
	// as part of the statement description. This can be, for example, an invoice number, ticket number,
	// or short description that uniquely identifies the purchase.
	//
	// Note that the `statement_description_identifier` might get truncated on the statement description
	// to fit the required information including the Square identifier (SQ *) and name of the
	// seller taking the payment.
	// Max Length: 20
	StatementDescriptionIdentifier string `json:"statement_description_identifier,omitempty"`

	// The amount designated as a tip, in addition to `amount_money`.
	//
	// The amount must be specified in the smallest denomination of the applicable currency
	// (for example, US dollar amounts are specified in cents). For more information, see
	// [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).
	//
	// The currency code must match the currency associated with the business
	// that is accepting the payment.
	TipMoney *Money `json:"tip_money,omitempty"`

	// An identifying token generated by `SqPaymentForm.verifyBuyer()`.
	// Verification tokens encapsulate customer device information and 3-D Secure
	// challenge results to indicate that Square has verified the buyer identity.
	//
	// For more information, see [SCA Overview](https://developer.squareup.com/docs/sca-overview).
	VerificationToken string `json:"verification_token,omitempty"`
}

CreatePaymentRequest Creates a payment from a provided source (such as a nonce or a card on file).

The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees.

For more information, see [Payments and Refunds APIs Overview](/payments-api/overview).

For information about application fees in a payment, see [Take Payments and Collect Fees](/payments-api/take-payments-and-collect-fees). Example: {"request_body":{"amount_money":{"amount":200,"currency":"USD"},"app_fee_money":{"amount":10,"currency":"USD"},"autocomplete":true,"customer_id":"VDKXEEKPJN48QDG3BGGFAK05P8","idempotency_key":"4935a656-a929-4792-b97c-8848be85c27c","location_id":"XK3DBG77NJBFX","note":"Brief description","reference_id":"123456","source_id":"ccof:uIbfJXhXETSP197M3GB"}}

swagger:model CreatePaymentRequest

func (*CreatePaymentRequest) ContextValidate

func (m *CreatePaymentRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create payment request based on the context it is used

func (*CreatePaymentRequest) MarshalBinary

func (m *CreatePaymentRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreatePaymentRequest) UnmarshalBinary

func (m *CreatePaymentRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreatePaymentRequest) Validate

func (m *CreatePaymentRequest) Validate(formats strfmt.Registry) error

Validate validates this create payment request

type CreatePaymentResponse

type CreatePaymentResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The newly created payment.
	Payment *Payment `json:"payment,omitempty"`
}

CreatePaymentResponse Defines the fields that are included in the response body of a request to the [CreatePayment](#endpoint-payments-createpayment) endpoint.

Note: If there are errors processing the request, the payment field might not be present, or it might be present with a status of `FAILED`. Example: {"payment":{"amount_money":{"amount":200,"currency":"USD"},"app_fee_money":{"amount":10,"currency":"USD"},"card_details":{"auth_result_code":"nsAyY2","avs_status":"AVS_ACCEPTED","card":{"bin":"411111","card_brand":"VISA","card_type":"DEBIT","exp_month":7,"exp_year":2026,"fingerprint":"sq-1-TpmjbNBMFdibiIjpQI5LiRgNUBC7u1689i0TgHjnlyHEWYB7tnn-K4QbW4ttvtaqXw","last_4":"1111","prepaid_type":"PREPAID"},"card_payment_timeline":{"authorized_at":"2019-07-10T13:23:49.234Z","captured_at":"2019-07-10T13:23:49.446Z"},"cvv_status":"CVV_ACCEPTED","entry_method":"ON_FILE","statement_description":"SQ *MY MERCHANT","status":"CAPTURED"},"created_at":"2019-07-10T13:23:49.154Z","customer_id":"RDX9Z4XTIZR7MRZJUXNY9HUK6I","id":"GQTFp1ZlXdpoW4o6eGiZhbjosiDFf","location_id":"XTI0H92143A39","note":"Brief description","order_id":"m2Hr8Hk8A3CTyQQ1k4ynExg92tO3","receipt_number":"GQTF","receipt_url":"https://squareup.com/receipt/preview/GQTFp1ZlXdpoW4o6eGiZhbjosiDFf","reference_id":"123456","source_type":"CARD","status":"COMPLETED","total_money":{"amount":200,"currency":"USD"},"updated_at":"2019-07-10T13:23:49.446Z"}}

swagger:model CreatePaymentResponse

func (*CreatePaymentResponse) ContextValidate

func (m *CreatePaymentResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create payment response based on the context it is used

func (*CreatePaymentResponse) MarshalBinary

func (m *CreatePaymentResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreatePaymentResponse) UnmarshalBinary

func (m *CreatePaymentResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreatePaymentResponse) Validate

func (m *CreatePaymentResponse) Validate(formats strfmt.Registry) error

Validate validates this create payment response

type CreateRefundRequest

type CreateRefundRequest struct {

	// The amount of money to refund.
	//
	// Note that you specify the amount in the
	// __smallest denomination of the applicable currency__. For example, US dollar
	// amounts are specified in cents. See
	// [Working with monetary amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for details.
	//
	// This amount cannot exceed the amount that was originally charged to the
	// tender that corresponds to `tender_id`.
	// Required: true
	AmountMoney *Money `json:"amount_money"`

	// A value you specify that uniquely identifies this
	// refund among refunds you've created for the tender.
	//
	// If you're unsure whether a particular refund succeeded,
	// you can reattempt it with the same idempotency key without
	// worrying about duplicating the refund.
	//
	// See [Idempotency keys](#idempotencykeys) for more information.
	// Required: true
	// Max Length: 192
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`

	// A description of the reason for the refund.
	//
	// Default value: `Refund via API`
	// Max Length: 192
	Reason string `json:"reason,omitempty"`

	// The ID of the tender to refund.
	//
	// A “Transaction“ has one or more `tenders` (i.e., methods
	// of payment) associated with it, and you refund each tender separately with
	// the Connect API.
	// Required: true
	// Max Length: 192
	// Min Length: 1
	TenderID *string `json:"tender_id"`
}

CreateRefundRequest Defines the body parameters that can be included in a request to the [CreateRefund](#endpoint-createrefund) endpoint.

Deprecated - recommend using [RefundPayment](#endpoint-refunds-refundpayment) Example: {"request_body":{"amount_money":{"amount":100,"currency":"USD"},"idempotency_key":"86ae1696-b1e3-4328-af6d-f1e04d947ad2","reason":"a reason","tender_id":"MtZRYYdDrYNQbOvV7nbuBvMF"}}

swagger:model CreateRefundRequest

func (*CreateRefundRequest) ContextValidate

func (m *CreateRefundRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create refund request based on the context it is used

func (*CreateRefundRequest) MarshalBinary

func (m *CreateRefundRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateRefundRequest) UnmarshalBinary

func (m *CreateRefundRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateRefundRequest) Validate

func (m *CreateRefundRequest) Validate(formats strfmt.Registry) error

Validate validates this create refund request

type CreateRefundResponse

type CreateRefundResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The created refund.
	Refund *Refund `json:"refund,omitempty"`
}

CreateRefundResponse Defines the fields that are included in the response body of a request to the [CreateRefund](#endpoint-createrefund) endpoint.

One of `errors` or `refund` is present in a given response (never both). Example: {"refund":{"additional_recipients":[{"amount_money":{"amount":10,"currency":"USD"},"description":"Application fees","location_id":"057P5VYJ4A5X1","receivable_id":"ISu5xwxJ5v0CMJTQq7RvqyMF"}],"amount_money":{"amount":100,"currency":"USD"},"created_at":"2016-02-12T00:28:18Z","id":"b27436d1-7f8e-5610-45c6-417ef71434b4-SW","location_id":"18YC4JDH91E1H","reason":"some reason","status":"PENDING","tender_id":"MtZRYYdDrYNQbOvV7nbuBvMF","transaction_id":"KnL67ZIwXCPtzOrqj0HrkxMF"}}

swagger:model CreateRefundResponse

func (*CreateRefundResponse) ContextValidate

func (m *CreateRefundResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create refund response based on the context it is used

func (*CreateRefundResponse) MarshalBinary

func (m *CreateRefundResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateRefundResponse) UnmarshalBinary

func (m *CreateRefundResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateRefundResponse) Validate

func (m *CreateRefundResponse) Validate(formats strfmt.Registry) error

Validate validates this create refund response

type CreateShiftRequest

type CreateShiftRequest struct {

	// Unique string value to insure the idempotency of the operation.
	// Max Length: 128
	IdempotencyKey string `json:"idempotency_key,omitempty"`

	// The `Shift` to be created
	// Required: true
	Shift *Shift `json:"shift"`
}

CreateShiftRequest Represents a request to create a `Shift` Example: {"request_body":{"idempotency_key":"HIDSNG5KS478L","shift":{"breaks":[{"break_type_id":"REGS1EQR1TPZ5","end_at":"2019-01-25T06:16:00-05:00","expected_duration":"PT5M","is_paid":true,"name":"Tea Break","start_at":"2019-01-25T06:11:00-05:00"}],"end_at":"2019-01-25T13:11:00-05:00","location_id":"PAA1RJZZKXBFG","start_at":"2019-01-25T03:11:00-05:00","team_member_id":"ormj0jJJZ5OZIzxrZYJI","wage":{"hourly_rate":{"amount":1100,"currency":"USD"},"title":"Barista"}}}}

swagger:model CreateShiftRequest

func (*CreateShiftRequest) ContextValidate

func (m *CreateShiftRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create shift request based on the context it is used

func (*CreateShiftRequest) MarshalBinary

func (m *CreateShiftRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateShiftRequest) UnmarshalBinary

func (m *CreateShiftRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateShiftRequest) Validate

func (m *CreateShiftRequest) Validate(formats strfmt.Registry) error

Validate validates this create shift request

type CreateShiftResponse

type CreateShiftResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The `Shift` that was created on the request.
	Shift *Shift `json:"shift,omitempty"`
}

CreateShiftResponse The response to the request to create a `Shift`. Contains the created `Shift` object. May contain a set of `Error` objects if the request resulted in errors. Example: {"shift":{"breaks":[{"break_type_id":"REGS1EQR1TPZ5","end_at":"2019-01-25T06:16:00-05:00","expected_duration":"PT5M","id":"X7GAQYVVRRG6P","is_paid":true,"name":"Tea Break","start_at":"2019-01-25T06:11:00-05:00"}],"created_at":"2019-02-28T00:39:02Z","employee_id":"ormj0jJJZ5OZIzxrZYJI","end_at":"2019-01-25T13:11:00-05:00","id":"K0YH4CV5462JB","location_id":"PAA1RJZZKXBFG","start_at":"2019-01-25T03:11:00-05:00","status":"CLOSED","team_member_id":"ormj0jJJZ5OZIzxrZYJI","timezone":"America/New_York","updated_at":"2019-02-28T00:39:02Z","version":1,"wage":{"hourly_rate":{"amount":1100,"currency":"USD"},"title":"Barista"}}}

swagger:model CreateShiftResponse

func (*CreateShiftResponse) ContextValidate

func (m *CreateShiftResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create shift response based on the context it is used

func (*CreateShiftResponse) MarshalBinary

func (m *CreateShiftResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateShiftResponse) UnmarshalBinary

func (m *CreateShiftResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateShiftResponse) Validate

func (m *CreateShiftResponse) Validate(formats strfmt.Registry) error

Validate validates this create shift response

type CreateSubscriptionRequest

type CreateSubscriptionRequest struct {

	// The date when the subscription should be canceled, in
	// YYYY-MM-DD format (for example, 2025-02-29). This overrides the plan configuration
	// if it comes before the date the subscription would otherwise end.
	CanceledDate string `json:"canceled_date,omitempty"`

	// The ID of the `customer](#type-customer) [card` to charge.
	// If not specified, Square sends an invoice via email. For an example to
	// create a customer and add a card on file, see [Subscriptions Walkthrough](https://developer.squareup.com/docs/docs/subscriptions-api/walkthrough).
	CardID string `json:"card_id,omitempty"`

	// The ID of the `customer` profile.
	// Required: true
	// Min Length: 1
	CustomerID *string `json:"customer_id"`

	// A unique string that identifies this `CreateSubscription` request.
	// If you do not provide a unique string (or provide an empty string as the value),
	// the endpoint treats each request as independent.
	//
	// For more information, see [Idempotency keys](https://developer.squareup.com/docs/docs/working-with-apis/idempotency).
	// Required: true
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`

	// The ID of the location the subscription is associated with.
	// Required: true
	// Min Length: 1
	LocationID *string `json:"location_id"`

	// The ID of the subscription plan. For more information, see
	// [Subscription Plan Overview](https://developer.squareup.com/docs/docs/subscriptions/overview).
	// Required: true
	// Min Length: 1
	PlanID *string `json:"plan_id"`

	// A custom price to apply for the subscription. If specified,
	// it overrides the price configured by the subscription plan.
	PriceOverrideMoney *Money `json:"price_override_money,omitempty"`

	// The start date of the subscription, in YYYY-MM-DD format. For example,
	// 2013-01-15. If the start date is left empty, the subscription begins
	// immediately.
	StartDate string `json:"start_date,omitempty"`

	// The tax to add when billing the subscription.
	// The percentage is expressed in decimal form, using a `'.'` as the decimal
	// separator and without a `'%'` sign. For example, a value of 7.5
	// corresponds to 7.5%.
	// Max Length: 10
	TaxPercentage string `json:"tax_percentage,omitempty"`

	// The timezone that is used in date calculations for the subscription. If unset, defaults to
	// the location timezone. If a timezone is not configured for the location, defaults to "America/New_York".
	// Format: the IANA Timezone Database identifier for the location timezone. For
	// a list of time zones, see [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
	Timezone string `json:"timezone,omitempty"`
}

CreateSubscriptionRequest Defines parameters in a [CreateSubscription](#endpoint-subscriptions-createsubscription) endpoint request. Example: {"request_body":{"card_id":"ccof:qy5x8hHGYsgLrp4Q4GB","customer_id":"CHFGVKYY8RSV93M5KCYTG4PN0G","idempotency_key":"8193148c-9586-11e6-99f9-28cfe92138cf","location_id":"S8GWD5R9QB376","plan_id":"6JHXF3B2CW3YKHDV4XEM674H","price_override_money":{"amount":100,"currency":"USD"},"start_date":"2020-08-01","tax_percentage":"5","timezone":"America/Los_Angeles"}}

swagger:model CreateSubscriptionRequest

func (*CreateSubscriptionRequest) ContextValidate

func (m *CreateSubscriptionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create subscription request based on the context it is used

func (*CreateSubscriptionRequest) MarshalBinary

func (m *CreateSubscriptionRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateSubscriptionRequest) UnmarshalBinary

func (m *CreateSubscriptionRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateSubscriptionRequest) Validate

func (m *CreateSubscriptionRequest) Validate(formats strfmt.Registry) error

Validate validates this create subscription request

type CreateSubscriptionResponse

type CreateSubscriptionResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The newly created subscription.
	//
	// For more information, see
	// [Subscription object](https://developer.squareup.com/docs/docs/subscriptions-api/overview#subscription-object).
	Subscription *Subscription `json:"subscription,omitempty"`
}

CreateSubscriptionResponse Defines the fields that are included in the response from the [CreateSubscription](#endpoint-subscriptions-createsubscription) endpoint. Example: {"subscription":{"card_id":"ccof:qy5x8hHGYsgLrp4Q4GB","created_at":"2020-08-03T21:53:10Z","customer_id":"CHFGVKYY8RSV93M5KCYTG4PN0G","id":"56214fb2-cc85-47a1-93bc-44f3766bb56f","location_id":"S8GWD5R9QB376","plan_id":"6JHXF3B2CW3YKHDV4XEM674H","price_override_money":{"amount":100,"currency":"USD"},"start_date":"2020-08-01","status":"PENDING","tax_percentage":"5","timezone":"America/Los_Angeles","version":1594155459464}}

swagger:model CreateSubscriptionResponse

func (*CreateSubscriptionResponse) ContextValidate

func (m *CreateSubscriptionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create subscription response based on the context it is used

func (*CreateSubscriptionResponse) MarshalBinary

func (m *CreateSubscriptionResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateSubscriptionResponse) UnmarshalBinary

func (m *CreateSubscriptionResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateSubscriptionResponse) Validate

func (m *CreateSubscriptionResponse) Validate(formats strfmt.Registry) error

Validate validates this create subscription response

type CreateTeamMemberRequest

type CreateTeamMemberRequest struct {

	// A unique string that identifies this CreateTeamMember request.
	// Keys can be any valid string but must be unique for every request.
	// See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information.
	// <br>
	// <b>Min Length 1    Max Length 45</b>
	IdempotencyKey string `json:"idempotency_key,omitempty"`

	// <b>Required</b> The data which will be used to create the `TeamMember` object.
	TeamMember *TeamMember `json:"team_member,omitempty"`
}

CreateTeamMemberRequest Represents a create request for a `TeamMember` object. Example: {"request_body":{"idempotency_key":"idempotency-key-0","team_member":{"assigned_locations":{"assignment_type":"EXPLICIT_LOCATIONS","location_ids":["YSGH2WBKG94QZ","GA2Y9HSJ8KRYT"]},"email_address":"joe_doe@gmail.com","family_name":"Doe","given_name":"Joe","phone_number":"+14159283333","reference_id":"reference_id_1","status":"ACTIVE"}}}

swagger:model CreateTeamMemberRequest

func (*CreateTeamMemberRequest) ContextValidate

func (m *CreateTeamMemberRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create team member request based on the context it is used

func (*CreateTeamMemberRequest) MarshalBinary

func (m *CreateTeamMemberRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateTeamMemberRequest) UnmarshalBinary

func (m *CreateTeamMemberRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateTeamMemberRequest) Validate

func (m *CreateTeamMemberRequest) Validate(formats strfmt.Registry) error

Validate validates this create team member request

type CreateTeamMemberResponse

type CreateTeamMemberResponse struct {

	// The errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The successfully created `TeamMember` object.
	TeamMember *TeamMember `json:"team_member,omitempty"`
}

CreateTeamMemberResponse Represents a response from a create request, containing the created `TeamMember` object or error messages. Example: {"team_member":{"assigned_locations":{"assignment_type":"EXPLICIT_LOCATIONS","location_ids":["GA2Y9HSJ8KRYT","YSGH2WBKG94QZ"]},"email_address":"joe_doe@gmail.com","family_name":"Doe","given_name":"Joe","id":"1yJlHapkseYnNPETIU1B","is_owner":false,"phone_number":"+14159283333","reference_id":"reference_id_1","status":"ACTIVE"}}

swagger:model CreateTeamMemberResponse

func (*CreateTeamMemberResponse) ContextValidate

func (m *CreateTeamMemberResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create team member response based on the context it is used

func (*CreateTeamMemberResponse) MarshalBinary

func (m *CreateTeamMemberResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateTeamMemberResponse) UnmarshalBinary

func (m *CreateTeamMemberResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateTeamMemberResponse) Validate

func (m *CreateTeamMemberResponse) Validate(formats strfmt.Registry) error

Validate validates this create team member response

type CreateTerminalCheckoutRequest

type CreateTerminalCheckoutRequest struct {

	// The checkout to create.
	// Required: true
	Checkout *TerminalCheckout `json:"checkout"`

	// A unique string that identifies this `CreateCheckout` request. Keys can be any valid string but
	// must be unique for every `CreateCheckout` request.
	//
	// See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information.
	// Required: true
	// Max Length: 64
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`
}

CreateTerminalCheckoutRequest create terminal checkout request Example: {"request_body":{"checkout":{"amount_money":{"amount":2610,"currency":"USD"},"device_options":{"device_id":"dbb5d83a-7838-11ea-bc55-0242ac130003"},"note":"A brief note","reference_id":"id11572"},"idempotency_key":"28a0c3bc-7839-11ea-bc55-0242ac130003"}}

swagger:model CreateTerminalCheckoutRequest

func (*CreateTerminalCheckoutRequest) ContextValidate

func (m *CreateTerminalCheckoutRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create terminal checkout request based on the context it is used

func (*CreateTerminalCheckoutRequest) MarshalBinary

func (m *CreateTerminalCheckoutRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateTerminalCheckoutRequest) UnmarshalBinary

func (m *CreateTerminalCheckoutRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateTerminalCheckoutRequest) Validate

func (m *CreateTerminalCheckoutRequest) Validate(formats strfmt.Registry) error

Validate validates this create terminal checkout request

type CreateTerminalCheckoutResponse

type CreateTerminalCheckoutResponse struct {

	// The created `TerminalCheckout`
	Checkout *TerminalCheckout `json:"checkout,omitempty"`

	// Information on errors encountered during the request.
	Errors []*Error `json:"errors"`
}

CreateTerminalCheckoutResponse create terminal checkout response Example: {"checkout":{"amount_money":{"amount":2610,"currency":"USD"},"app_id":"APP_ID","created_at":"2020-04-06T16:39:32.545Z","deadline_duration":"PT10M","device_options":{"device_id":"dbb5d83a-7838-11ea-bc55-0242ac130003","skip_receipt_screen":false,"tip_settings":{"allow_tipping":false}},"id":"08YceKh7B3ZqO","note":"A brief note","reference_id":"id11572","status":"PENDING","updated_at":"2020-04-06T16:39:32.545Z"}}

swagger:model CreateTerminalCheckoutResponse

func (*CreateTerminalCheckoutResponse) ContextValidate

func (m *CreateTerminalCheckoutResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create terminal checkout response based on the context it is used

func (*CreateTerminalCheckoutResponse) MarshalBinary

func (m *CreateTerminalCheckoutResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateTerminalCheckoutResponse) UnmarshalBinary

func (m *CreateTerminalCheckoutResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateTerminalCheckoutResponse) Validate

func (m *CreateTerminalCheckoutResponse) Validate(formats strfmt.Registry) error

Validate validates this create terminal checkout response

type CreateTerminalRefundRequest

type CreateTerminalRefundRequest struct {

	// A unique string that identifies this `CreateRefund` request. Keys can be any valid string but
	// must be unique for every `CreateRefund` request.
	//
	// See [Idempotency keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information.
	// Required: true
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`

	// The refund to create.
	Refund *TerminalRefund `json:"refund,omitempty"`
}

CreateTerminalRefundRequest create terminal refund request Example: {"request_body":{"idempotency_key":"402a640b-b26f-401f-b406-46f839590c04","refund":{"amount_money":{"amount":111,"currency":"CAD"},"device_id":"f72dfb8e-4d65-4e56-aade-ec3fb8d33291","payment_id":"5O5OvgkcNUhl7JBuINflcjKqUzXZY","reason":"Returning items"}}}

swagger:model CreateTerminalRefundRequest

func (*CreateTerminalRefundRequest) ContextValidate

func (m *CreateTerminalRefundRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create terminal refund request based on the context it is used

func (*CreateTerminalRefundRequest) MarshalBinary

func (m *CreateTerminalRefundRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateTerminalRefundRequest) UnmarshalBinary

func (m *CreateTerminalRefundRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateTerminalRefundRequest) Validate

func (m *CreateTerminalRefundRequest) Validate(formats strfmt.Registry) error

Validate validates this create terminal refund request

type CreateTerminalRefundResponse

type CreateTerminalRefundResponse struct {

	// Information on errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The created `TerminalRefund`
	Refund *TerminalRefund `json:"refund,omitempty"`
}

CreateTerminalRefundResponse create terminal refund response Example: {"refund":{"amount_money":{"amount":111,"currency":"CAD"},"app_id":"sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ","card":{"bin":"411111","card_brand":"INTERAC","card_type":"CREDIT","exp_month":1,"exp_year":2022,"fingerprint":"sq-1-B1fP9MNNmZgVVaPKRND6oDKYbz25S2cTvg9Mzwg3RMTK1zT1PiGRT-AE3nTA8vSmmw","last_4":"1111"},"created_at":"2020-09-29T15:21:46.771Z","deadline_duration":"PT5M","device_id":"f72dfb8e-4d65-4e56-aade-ec3fb8d33291","id":"009DP5HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY","location_id":"76C9W6K8CNNQ5","order_id":"kcuKDKreRaI4gF4TjmEgZjHk8Z7YY","payment_id":"5O5OvgkcNUhl7JBuINflcjKqUzXZY","reason":"Returning items","status":"PENDING","updated_at":"2020-09-29T15:21:46.771Z"}}

swagger:model CreateTerminalRefundResponse

func (*CreateTerminalRefundResponse) ContextValidate

func (m *CreateTerminalRefundResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this create terminal refund response based on the context it is used

func (*CreateTerminalRefundResponse) MarshalBinary

func (m *CreateTerminalRefundResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateTerminalRefundResponse) UnmarshalBinary

func (m *CreateTerminalRefundResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateTerminalRefundResponse) Validate

func (m *CreateTerminalRefundResponse) Validate(formats strfmt.Registry) error

Validate validates this create terminal refund response

type Currency

type Currency string

Currency Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://wikipedia.org/wiki/ISO_4217).

swagger:model Currency

const (

	// CurrencyUNKNOWNCURRENCY captures enum value "UNKNOWN_CURRENCY"
	CurrencyUNKNOWNCURRENCY Currency = "UNKNOWN_CURRENCY"

	// CurrencyAED captures enum value "AED"
	CurrencyAED Currency = "AED"

	// CurrencyAFN captures enum value "AFN"
	CurrencyAFN Currency = "AFN"

	// CurrencyALL captures enum value "ALL"
	CurrencyALL Currency = "ALL"

	// CurrencyAMD captures enum value "AMD"
	CurrencyAMD Currency = "AMD"

	// CurrencyANG captures enum value "ANG"
	CurrencyANG Currency = "ANG"

	// CurrencyAOA captures enum value "AOA"
	CurrencyAOA Currency = "AOA"

	// CurrencyARS captures enum value "ARS"
	CurrencyARS Currency = "ARS"

	// CurrencyAUD captures enum value "AUD"
	CurrencyAUD Currency = "AUD"

	// CurrencyAWG captures enum value "AWG"
	CurrencyAWG Currency = "AWG"

	// CurrencyAZN captures enum value "AZN"
	CurrencyAZN Currency = "AZN"

	// CurrencyBAM captures enum value "BAM"
	CurrencyBAM Currency = "BAM"

	// CurrencyBBD captures enum value "BBD"
	CurrencyBBD Currency = "BBD"

	// CurrencyBDT captures enum value "BDT"
	CurrencyBDT Currency = "BDT"

	// CurrencyBGN captures enum value "BGN"
	CurrencyBGN Currency = "BGN"

	// CurrencyBHD captures enum value "BHD"
	CurrencyBHD Currency = "BHD"

	// CurrencyBIF captures enum value "BIF"
	CurrencyBIF Currency = "BIF"

	// CurrencyBMD captures enum value "BMD"
	CurrencyBMD Currency = "BMD"

	// CurrencyBND captures enum value "BND"
	CurrencyBND Currency = "BND"

	// CurrencyBOB captures enum value "BOB"
	CurrencyBOB Currency = "BOB"

	// CurrencyBOV captures enum value "BOV"
	CurrencyBOV Currency = "BOV"

	// CurrencyBRL captures enum value "BRL"
	CurrencyBRL Currency = "BRL"

	// CurrencyBSD captures enum value "BSD"
	CurrencyBSD Currency = "BSD"

	// CurrencyBTN captures enum value "BTN"
	CurrencyBTN Currency = "BTN"

	// CurrencyBWP captures enum value "BWP"
	CurrencyBWP Currency = "BWP"

	// CurrencyBYR captures enum value "BYR"
	CurrencyBYR Currency = "BYR"

	// CurrencyBZD captures enum value "BZD"
	CurrencyBZD Currency = "BZD"

	// CurrencyCAD captures enum value "CAD"
	CurrencyCAD Currency = "CAD"

	// CurrencyCDF captures enum value "CDF"
	CurrencyCDF Currency = "CDF"

	// CurrencyCHE captures enum value "CHE"
	CurrencyCHE Currency = "CHE"

	// CurrencyCHF captures enum value "CHF"
	CurrencyCHF Currency = "CHF"

	// CurrencyCHW captures enum value "CHW"
	CurrencyCHW Currency = "CHW"

	// CurrencyCLF captures enum value "CLF"
	CurrencyCLF Currency = "CLF"

	// CurrencyCLP captures enum value "CLP"
	CurrencyCLP Currency = "CLP"

	// CurrencyCNY captures enum value "CNY"
	CurrencyCNY Currency = "CNY"

	// CurrencyCOP captures enum value "COP"
	CurrencyCOP Currency = "COP"

	// CurrencyCOU captures enum value "COU"
	CurrencyCOU Currency = "COU"

	// CurrencyCRC captures enum value "CRC"
	CurrencyCRC Currency = "CRC"

	// CurrencyCUC captures enum value "CUC"
	CurrencyCUC Currency = "CUC"

	// CurrencyCUP captures enum value "CUP"
	CurrencyCUP Currency = "CUP"

	// CurrencyCVE captures enum value "CVE"
	CurrencyCVE Currency = "CVE"

	// CurrencyCZK captures enum value "CZK"
	CurrencyCZK Currency = "CZK"

	// CurrencyDJF captures enum value "DJF"
	CurrencyDJF Currency = "DJF"

	// CurrencyDKK captures enum value "DKK"
	CurrencyDKK Currency = "DKK"

	// CurrencyDOP captures enum value "DOP"
	CurrencyDOP Currency = "DOP"

	// CurrencyDZD captures enum value "DZD"
	CurrencyDZD Currency = "DZD"

	// CurrencyEGP captures enum value "EGP"
	CurrencyEGP Currency = "EGP"

	// CurrencyERN captures enum value "ERN"
	CurrencyERN Currency = "ERN"

	// CurrencyETB captures enum value "ETB"
	CurrencyETB Currency = "ETB"

	// CurrencyEUR captures enum value "EUR"
	CurrencyEUR Currency = "EUR"

	// CurrencyFJD captures enum value "FJD"
	CurrencyFJD Currency = "FJD"

	// CurrencyFKP captures enum value "FKP"
	CurrencyFKP Currency = "FKP"

	// CurrencyGBP captures enum value "GBP"
	CurrencyGBP Currency = "GBP"

	// CurrencyGEL captures enum value "GEL"
	CurrencyGEL Currency = "GEL"

	// CurrencyGHS captures enum value "GHS"
	CurrencyGHS Currency = "GHS"

	// CurrencyGIP captures enum value "GIP"
	CurrencyGIP Currency = "GIP"

	// CurrencyGMD captures enum value "GMD"
	CurrencyGMD Currency = "GMD"

	// CurrencyGNF captures enum value "GNF"
	CurrencyGNF Currency = "GNF"

	// CurrencyGTQ captures enum value "GTQ"
	CurrencyGTQ Currency = "GTQ"

	// CurrencyGYD captures enum value "GYD"
	CurrencyGYD Currency = "GYD"

	// CurrencyHKD captures enum value "HKD"
	CurrencyHKD Currency = "HKD"

	// CurrencyHNL captures enum value "HNL"
	CurrencyHNL Currency = "HNL"

	// CurrencyHRK captures enum value "HRK"
	CurrencyHRK Currency = "HRK"

	// CurrencyHTG captures enum value "HTG"
	CurrencyHTG Currency = "HTG"

	// CurrencyHUF captures enum value "HUF"
	CurrencyHUF Currency = "HUF"

	// CurrencyIDR captures enum value "IDR"
	CurrencyIDR Currency = "IDR"

	// CurrencyILS captures enum value "ILS"
	CurrencyILS Currency = "ILS"

	// CurrencyINR captures enum value "INR"
	CurrencyINR Currency = "INR"

	// CurrencyIQD captures enum value "IQD"
	CurrencyIQD Currency = "IQD"

	// CurrencyIRR captures enum value "IRR"
	CurrencyIRR Currency = "IRR"

	// CurrencyISK captures enum value "ISK"
	CurrencyISK Currency = "ISK"

	// CurrencyJMD captures enum value "JMD"
	CurrencyJMD Currency = "JMD"

	// CurrencyJOD captures enum value "JOD"
	CurrencyJOD Currency = "JOD"

	// CurrencyJPY captures enum value "JPY"
	CurrencyJPY Currency = "JPY"

	// CurrencyKES captures enum value "KES"
	CurrencyKES Currency = "KES"

	// CurrencyKGS captures enum value "KGS"
	CurrencyKGS Currency = "KGS"

	// CurrencyKHR captures enum value "KHR"
	CurrencyKHR Currency = "KHR"

	// CurrencyKMF captures enum value "KMF"
	CurrencyKMF Currency = "KMF"

	// CurrencyKPW captures enum value "KPW"
	CurrencyKPW Currency = "KPW"

	// CurrencyKRW captures enum value "KRW"
	CurrencyKRW Currency = "KRW"

	// CurrencyKWD captures enum value "KWD"
	CurrencyKWD Currency = "KWD"

	// CurrencyKYD captures enum value "KYD"
	CurrencyKYD Currency = "KYD"

	// CurrencyKZT captures enum value "KZT"
	CurrencyKZT Currency = "KZT"

	// CurrencyLAK captures enum value "LAK"
	CurrencyLAK Currency = "LAK"

	// CurrencyLBP captures enum value "LBP"
	CurrencyLBP Currency = "LBP"

	// CurrencyLKR captures enum value "LKR"
	CurrencyLKR Currency = "LKR"

	// CurrencyLRD captures enum value "LRD"
	CurrencyLRD Currency = "LRD"

	// CurrencyLSL captures enum value "LSL"
	CurrencyLSL Currency = "LSL"

	// CurrencyLTL captures enum value "LTL"
	CurrencyLTL Currency = "LTL"

	// CurrencyLVL captures enum value "LVL"
	CurrencyLVL Currency = "LVL"

	// CurrencyLYD captures enum value "LYD"
	CurrencyLYD Currency = "LYD"

	// CurrencyMAD captures enum value "MAD"
	CurrencyMAD Currency = "MAD"

	// CurrencyMDL captures enum value "MDL"
	CurrencyMDL Currency = "MDL"

	// CurrencyMGA captures enum value "MGA"
	CurrencyMGA Currency = "MGA"

	// CurrencyMKD captures enum value "MKD"
	CurrencyMKD Currency = "MKD"

	// CurrencyMMK captures enum value "MMK"
	CurrencyMMK Currency = "MMK"

	// CurrencyMNT captures enum value "MNT"
	CurrencyMNT Currency = "MNT"

	// CurrencyMOP captures enum value "MOP"
	CurrencyMOP Currency = "MOP"

	// CurrencyMRO captures enum value "MRO"
	CurrencyMRO Currency = "MRO"

	// CurrencyMUR captures enum value "MUR"
	CurrencyMUR Currency = "MUR"

	// CurrencyMVR captures enum value "MVR"
	CurrencyMVR Currency = "MVR"

	// CurrencyMWK captures enum value "MWK"
	CurrencyMWK Currency = "MWK"

	// CurrencyMXN captures enum value "MXN"
	CurrencyMXN Currency = "MXN"

	// CurrencyMXV captures enum value "MXV"
	CurrencyMXV Currency = "MXV"

	// CurrencyMYR captures enum value "MYR"
	CurrencyMYR Currency = "MYR"

	// CurrencyMZN captures enum value "MZN"
	CurrencyMZN Currency = "MZN"

	// CurrencyNAD captures enum value "NAD"
	CurrencyNAD Currency = "NAD"

	// CurrencyNGN captures enum value "NGN"
	CurrencyNGN Currency = "NGN"

	// CurrencyNIO captures enum value "NIO"
	CurrencyNIO Currency = "NIO"

	// CurrencyNOK captures enum value "NOK"
	CurrencyNOK Currency = "NOK"

	// CurrencyNPR captures enum value "NPR"
	CurrencyNPR Currency = "NPR"

	// CurrencyNZD captures enum value "NZD"
	CurrencyNZD Currency = "NZD"

	// CurrencyOMR captures enum value "OMR"
	CurrencyOMR Currency = "OMR"

	// CurrencyPAB captures enum value "PAB"
	CurrencyPAB Currency = "PAB"

	// CurrencyPEN captures enum value "PEN"
	CurrencyPEN Currency = "PEN"

	// CurrencyPGK captures enum value "PGK"
	CurrencyPGK Currency = "PGK"

	// CurrencyPHP captures enum value "PHP"
	CurrencyPHP Currency = "PHP"

	// CurrencyPKR captures enum value "PKR"
	CurrencyPKR Currency = "PKR"

	// CurrencyPLN captures enum value "PLN"
	CurrencyPLN Currency = "PLN"

	// CurrencyPYG captures enum value "PYG"
	CurrencyPYG Currency = "PYG"

	// CurrencyQAR captures enum value "QAR"
	CurrencyQAR Currency = "QAR"

	// CurrencyRON captures enum value "RON"
	CurrencyRON Currency = "RON"

	// CurrencyRSD captures enum value "RSD"
	CurrencyRSD Currency = "RSD"

	// CurrencyRUB captures enum value "RUB"
	CurrencyRUB Currency = "RUB"

	// CurrencyRWF captures enum value "RWF"
	CurrencyRWF Currency = "RWF"

	// CurrencySAR captures enum value "SAR"
	CurrencySAR Currency = "SAR"

	// CurrencySBD captures enum value "SBD"
	CurrencySBD Currency = "SBD"

	// CurrencySCR captures enum value "SCR"
	CurrencySCR Currency = "SCR"

	// CurrencySDG captures enum value "SDG"
	CurrencySDG Currency = "SDG"

	// CurrencySEK captures enum value "SEK"
	CurrencySEK Currency = "SEK"

	// CurrencySGD captures enum value "SGD"
	CurrencySGD Currency = "SGD"

	// CurrencySHP captures enum value "SHP"
	CurrencySHP Currency = "SHP"

	// CurrencySLL captures enum value "SLL"
	CurrencySLL Currency = "SLL"

	// CurrencySOS captures enum value "SOS"
	CurrencySOS Currency = "SOS"

	// CurrencySRD captures enum value "SRD"
	CurrencySRD Currency = "SRD"

	// CurrencySSP captures enum value "SSP"
	CurrencySSP Currency = "SSP"

	// CurrencySTD captures enum value "STD"
	CurrencySTD Currency = "STD"

	// CurrencySVC captures enum value "SVC"
	CurrencySVC Currency = "SVC"

	// CurrencySYP captures enum value "SYP"
	CurrencySYP Currency = "SYP"

	// CurrencySZL captures enum value "SZL"
	CurrencySZL Currency = "SZL"

	// CurrencyTHB captures enum value "THB"
	CurrencyTHB Currency = "THB"

	// CurrencyTJS captures enum value "TJS"
	CurrencyTJS Currency = "TJS"

	// CurrencyTMT captures enum value "TMT"
	CurrencyTMT Currency = "TMT"

	// CurrencyTND captures enum value "TND"
	CurrencyTND Currency = "TND"

	// CurrencyTOP captures enum value "TOP"
	CurrencyTOP Currency = "TOP"

	// CurrencyTRY captures enum value "TRY"
	CurrencyTRY Currency = "TRY"

	// CurrencyTTD captures enum value "TTD"
	CurrencyTTD Currency = "TTD"

	// CurrencyTWD captures enum value "TWD"
	CurrencyTWD Currency = "TWD"

	// CurrencyTZS captures enum value "TZS"
	CurrencyTZS Currency = "TZS"

	// CurrencyUAH captures enum value "UAH"
	CurrencyUAH Currency = "UAH"

	// CurrencyUGX captures enum value "UGX"
	CurrencyUGX Currency = "UGX"

	// CurrencyUSD captures enum value "USD"
	CurrencyUSD Currency = "USD"

	// CurrencyUSN captures enum value "USN"
	CurrencyUSN Currency = "USN"

	// CurrencyUSS captures enum value "USS"
	CurrencyUSS Currency = "USS"

	// CurrencyUYI captures enum value "UYI"
	CurrencyUYI Currency = "UYI"

	// CurrencyUYU captures enum value "UYU"
	CurrencyUYU Currency = "UYU"

	// CurrencyUZS captures enum value "UZS"
	CurrencyUZS Currency = "UZS"

	// CurrencyVEF captures enum value "VEF"
	CurrencyVEF Currency = "VEF"

	// CurrencyVND captures enum value "VND"
	CurrencyVND Currency = "VND"

	// CurrencyVUV captures enum value "VUV"
	CurrencyVUV Currency = "VUV"

	// CurrencyWST captures enum value "WST"
	CurrencyWST Currency = "WST"

	// CurrencyXAF captures enum value "XAF"
	CurrencyXAF Currency = "XAF"

	// CurrencyXAG captures enum value "XAG"
	CurrencyXAG Currency = "XAG"

	// CurrencyXAU captures enum value "XAU"
	CurrencyXAU Currency = "XAU"

	// CurrencyXBA captures enum value "XBA"
	CurrencyXBA Currency = "XBA"

	// CurrencyXBB captures enum value "XBB"
	CurrencyXBB Currency = "XBB"

	// CurrencyXBC captures enum value "XBC"
	CurrencyXBC Currency = "XBC"

	// CurrencyXBD captures enum value "XBD"
	CurrencyXBD Currency = "XBD"

	// CurrencyXCD captures enum value "XCD"
	CurrencyXCD Currency = "XCD"

	// CurrencyXDR captures enum value "XDR"
	CurrencyXDR Currency = "XDR"

	// CurrencyXOF captures enum value "XOF"
	CurrencyXOF Currency = "XOF"

	// CurrencyXPD captures enum value "XPD"
	CurrencyXPD Currency = "XPD"

	// CurrencyXPF captures enum value "XPF"
	CurrencyXPF Currency = "XPF"

	// CurrencyXPT captures enum value "XPT"
	CurrencyXPT Currency = "XPT"

	// CurrencyXTS captures enum value "XTS"
	CurrencyXTS Currency = "XTS"

	// CurrencyXXX captures enum value "XXX"
	CurrencyXXX Currency = "XXX"

	// CurrencyYER captures enum value "YER"
	CurrencyYER Currency = "YER"

	// CurrencyZAR captures enum value "ZAR"
	CurrencyZAR Currency = "ZAR"

	// CurrencyZMK captures enum value "ZMK"
	CurrencyZMK Currency = "ZMK"

	// CurrencyZMW captures enum value "ZMW"
	CurrencyZMW Currency = "ZMW"

	// CurrencyBTC captures enum value "BTC"
	CurrencyBTC Currency = "BTC"
)

func (Currency) ContextValidate

func (m Currency) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this currency based on context it is used

func (Currency) Validate

func (m Currency) Validate(formats strfmt.Registry) error

Validate validates this currency

type CustomAttributeFilter

type CustomAttributeFilter struct {

	// A query expression to filter items or item variations by matching their custom attributes'
	// `boolean_value` property values
	// against the specified Boolean expression.
	BoolFilter bool `json:"bool_filter,omitempty"`

	// A query expression to filter items or item variations by matching their custom attributes'
	// `custom_attribute_definition_id`
	// property value against the the specified id.
	CustomAttributeDefinitionID string `json:"custom_attribute_definition_id,omitempty"`

	// A query expression to filter items or item variations by matching their custom attributes'
	// `key` property value against
	// the specified key.
	Key string `json:"key,omitempty"`

	// A query expression to filter items or item variations with their custom attributes
	// containing a number value within the specified range.
	NumberFilter *Range `json:"number_filter,omitempty"`

	// A query expression to filter items or item variations by matching  their custom attributes'
	// `selection_uid_values`
	// values against the specified selection uids.
	SelectionUidsFilter []string `json:"selection_uids_filter"`

	// A query expression to filter items or item variations by matching their custom attributes'
	// `string_value`  property value
	// against the specified text.
	StringFilter string `json:"string_filter,omitempty"`
}

CustomAttributeFilter Supported custom attribute query expressions for calling the [SearchCatalogItems](#endpoint-Catalog-SearchCatalogItems) endpoint to search for items or item variations.

swagger:model CustomAttributeFilter

func (*CustomAttributeFilter) ContextValidate

func (m *CustomAttributeFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this custom attribute filter based on the context it is used

func (*CustomAttributeFilter) MarshalBinary

func (m *CustomAttributeFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CustomAttributeFilter) UnmarshalBinary

func (m *CustomAttributeFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CustomAttributeFilter) Validate

func (m *CustomAttributeFilter) Validate(formats strfmt.Registry) error

Validate validates this custom attribute filter

type Customer

type Customer struct {

	// The physical address associated with the customer profile.
	Address *Address `json:"address,omitempty"`

	// The birthday associated with the customer profile, in RFC 3339 format.
	// Year is optional, timezone and times are not allowed.
	// For example: `0000-09-01T00:00:00-00:00` indicates a birthday on September 1st.
	// `1998-09-01T00:00:00-00:00` indications a birthday on September 1st __1998__.
	Birthday string `json:"birthday,omitempty"`

	// Payment details of cards stored on file for the customer profile.
	Cards []*Card `json:"cards"`

	// A business name associated with the customer profile.
	CompanyName string `json:"company_name,omitempty"`

	// The timestamp when the customer profile was created, in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// A creation source represents the method used to create the
	// customer profile.
	// See [CustomerCreationSource](#type-customercreationsource) for possible values
	CreationSource string `json:"creation_source,omitempty"`

	// The email address associated with the customer profile.
	EmailAddress string `json:"email_address,omitempty"`

	// The family (i.e., last) name associated with the customer profile.
	FamilyName string `json:"family_name,omitempty"`

	// The given (i.e., first) name associated with the customer profile.
	GivenName string `json:"given_name,omitempty"`

	// The IDs of customer groups the customer belongs to.
	GroupIds []string `json:"group_ids"`

	// The customer groups and segments the customer belongs to. This deprecated field has been replaced with  the dedicated `group_ids` for customer groups and the dedicated `segment_ids` field for customer segments. You can retrieve information about a given customer group and segment respectively using the Customer Groups API and Customer Segments API.
	Groups []*CustomerGroupInfo `json:"groups"`

	// A unique Square-assigned ID for the customer profile.
	ID string `json:"id,omitempty"`

	// A nickname for the customer profile.
	Nickname string `json:"nickname,omitempty"`

	// A custom note associated with the customer profile.
	Note string `json:"note,omitempty"`

	// The 11-digit phone number associated with the customer profile.
	PhoneNumber string `json:"phone_number,omitempty"`

	// Represents general customer preferences.
	Preferences *CustomerPreferences `json:"preferences,omitempty"`

	// An optional, second ID used to associate the customer profile with an
	// entity in another system.
	ReferenceID string `json:"reference_id,omitempty"`

	// The IDs of segments the customer belongs to.
	SegmentIds []string `json:"segment_ids"`

	// The timestamp when the customer profile was last updated, in RFC 3339 format.
	UpdatedAt string `json:"updated_at,omitempty"`
}

Customer Represents a Square customer profile, which can have one or more cards on file associated with it.

swagger:model Customer

func (*Customer) ContextValidate

func (m *Customer) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this customer based on the context it is used

func (*Customer) MarshalBinary

func (m *Customer) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Customer) UnmarshalBinary

func (m *Customer) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Customer) Validate

func (m *Customer) Validate(formats strfmt.Registry) error

Validate validates this customer

type CustomerCreationSource

type CustomerCreationSource string

CustomerCreationSource Indicates the method used to create the customer profile.

swagger:model CustomerCreationSource

const (

	// CustomerCreationSourceOTHER captures enum value "OTHER"
	CustomerCreationSourceOTHER CustomerCreationSource = "OTHER"

	// CustomerCreationSourceAPPOINTMENTS captures enum value "APPOINTMENTS"
	CustomerCreationSourceAPPOINTMENTS CustomerCreationSource = "APPOINTMENTS"

	// CustomerCreationSourceCOUPON captures enum value "COUPON"
	CustomerCreationSourceCOUPON CustomerCreationSource = "COUPON"

	// CustomerCreationSourceDELETIONRECOVERY captures enum value "DELETION_RECOVERY"
	CustomerCreationSourceDELETIONRECOVERY CustomerCreationSource = "DELETION_RECOVERY"

	// CustomerCreationSourceDIRECTORY captures enum value "DIRECTORY"
	CustomerCreationSourceDIRECTORY CustomerCreationSource = "DIRECTORY"

	// CustomerCreationSourceEGIFTING captures enum value "EGIFTING"
	CustomerCreationSourceEGIFTING CustomerCreationSource = "EGIFTING"

	// CustomerCreationSourceEMAILCOLLECTION captures enum value "EMAIL_COLLECTION"
	CustomerCreationSourceEMAILCOLLECTION CustomerCreationSource = "EMAIL_COLLECTION"

	// CustomerCreationSourceFEEDBACK captures enum value "FEEDBACK"
	CustomerCreationSourceFEEDBACK CustomerCreationSource = "FEEDBACK"

	// CustomerCreationSourceIMPORT captures enum value "IMPORT"
	CustomerCreationSourceIMPORT CustomerCreationSource = "IMPORT"

	// CustomerCreationSourceINVOICES captures enum value "INVOICES"
	CustomerCreationSourceINVOICES CustomerCreationSource = "INVOICES"

	// CustomerCreationSourceLOYALTY captures enum value "LOYALTY"
	CustomerCreationSourceLOYALTY CustomerCreationSource = "LOYALTY"

	// CustomerCreationSourceMARKETING captures enum value "MARKETING"
	CustomerCreationSourceMARKETING CustomerCreationSource = "MARKETING"

	// CustomerCreationSourceMERGE captures enum value "MERGE"
	CustomerCreationSourceMERGE CustomerCreationSource = "MERGE"

	// CustomerCreationSourceONLINESTORE captures enum value "ONLINE_STORE"
	CustomerCreationSourceONLINESTORE CustomerCreationSource = "ONLINE_STORE"

	// CustomerCreationSourceINSTANTPROFILE captures enum value "INSTANT_PROFILE"
	CustomerCreationSourceINSTANTPROFILE CustomerCreationSource = "INSTANT_PROFILE"

	// CustomerCreationSourceTERMINAL captures enum value "TERMINAL"
	CustomerCreationSourceTERMINAL CustomerCreationSource = "TERMINAL"

	// CustomerCreationSourceTHIRDPARTY captures enum value "THIRD_PARTY"
	CustomerCreationSourceTHIRDPARTY CustomerCreationSource = "THIRD_PARTY"

	// CustomerCreationSourceTHIRDPARTYIMPORT captures enum value "THIRD_PARTY_IMPORT"
	CustomerCreationSourceTHIRDPARTYIMPORT CustomerCreationSource = "THIRD_PARTY_IMPORT"

	// CustomerCreationSourceUNMERGERECOVERY captures enum value "UNMERGE_RECOVERY"
	CustomerCreationSourceUNMERGERECOVERY CustomerCreationSource = "UNMERGE_RECOVERY"
)

func (CustomerCreationSource) ContextValidate

func (m CustomerCreationSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this customer creation source based on context it is used

func (CustomerCreationSource) Validate

func (m CustomerCreationSource) Validate(formats strfmt.Registry) error

Validate validates this customer creation source

type CustomerCreationSourceFilter

type CustomerCreationSourceFilter struct {

	// Indicates whether a customer profile matching the filter criteria
	// should be included in the result or excluded from the result.
	//
	// Default: `INCLUDE`.
	// See [CustomerInclusionExclusion](#type-customerinclusionexclusion) for possible values
	Rule string `json:"rule,omitempty"`

	// The list of creation sources used as filtering criteria.
	// See [CustomerCreationSource](#type-customercreationsource) for possible values
	Values []string `json:"values"`
}

CustomerCreationSourceFilter Creation source filter.

If one or more creation sources are set, customer profiles are included in, or excluded from, the result if they match at least one of the filter criteria.

swagger:model CustomerCreationSourceFilter

func (*CustomerCreationSourceFilter) ContextValidate

func (m *CustomerCreationSourceFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this customer creation source filter based on context it is used

func (*CustomerCreationSourceFilter) MarshalBinary

func (m *CustomerCreationSourceFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CustomerCreationSourceFilter) UnmarshalBinary

func (m *CustomerCreationSourceFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CustomerCreationSourceFilter) Validate

func (m *CustomerCreationSourceFilter) Validate(formats strfmt.Registry) error

Validate validates this customer creation source filter

type CustomerFilter

type CustomerFilter struct {

	// A filter to select customers based on when they were created.
	CreatedAt *TimeRange `json:"created_at,omitempty"`

	// A filter to select customers based on their creation source.
	CreationSource *CustomerCreationSourceFilter `json:"creation_source,omitempty"`

	// A filter to [select customers by email address](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#search-by-email-address)
	// visible to the seller.
	// This filter is case insensitive.
	//
	// For [exact matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#exact-search-by-email-address), this filter causes the search to return customer profiles
	// whose `email_address` field value are identical to the email address provided
	// in the query.
	//
	// For [fuzzy matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#fuzzy-search-by-email-address),
	// this filter causes the search to return customer profiles
	// whose `email_address` field value has a token-wise partial match against the filtering
	// expression in the query. For example, with `Steven gmail` provided in a search
	// query, the search returns customers whose email address can be `steven.johnson&#64;gmail.com`
	// or `mygmail&#64;stevensbakery.com`. Email addresses are tokenized by replacing, by spaces,
	// punctuations including periods (`.`), underscores (`_`), and the `&#64;` symbols. A match is
	// found if a tokenized email address contains all the tokens in the search query,
	// irrespective of the token order.
	EmailAddress *CustomerTextFilter `json:"email_address,omitempty"`

	// A filter to select customers based on their group membership.
	//
	// The `group_ids` is a JSON object of the following general format:
	// “`
	// "group_ids": {
	// "any":  ["{group_a_id}", "{group_b_id}", ...],
	// "all":  ["{group_1_id}", "{group_2_id}", ...],
	// 'none": ["{group_i_id}", "{group_ii_id}", ...]
	// }
	// “`
	//
	// You can use any combination of the above `group_ids` fields (also known as `FilterValue` properties)
	// to specify how customers are selected based on their group membership.
	// With the `any` option, the search returns customers in Groups `A` or `B` or ... of the list.
	// With the `all` option, the search returns customers in Groups `1` and `2` and ... of the list.
	// With the `none` option, the search returns customers not in Groups `i` and not in `ii` and not in ... of the list.
	//
	// If any of the search conditions are not met, including when an invalid or non-existent group ID is provided, the result is an empty list.
	//
	// You can use the `group_ids` search filter with other available filters.
	//
	// You cannot use the `group_ids` filter to select customers based on segment membership.
	GroupIds *FilterValue `json:"group_ids,omitempty"`

	// A filter to [select customers by their phone numbers](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#search-by-phone-number) visible to the seller.
	// This filter is case insensitive.
	//
	// For [exact matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#exact-search-by-phone-number),
	// this filter causes the search to return customers whose phone number
	// matches the specified query expression. The number in the query must be of an E.164-compliant
	// form. In particular, it must include the leading `+` sign followed by a country code and then a
	// subscriber number. The standard E.614 form of a US phone number is `+12061112222` of
	// the domestic version or `+0012061112222` of the international version. The E.164-compliant
	// variations include `+1 (206) 111-2222` or `+001 (206) 111-2222`, respectively. To match
	// the query expression, stored customers' phone numbers are converted to the standard
	// E.164 form of the national and internationalized versions.
	//
	//
	// For [fuzzy matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#fuzzy-search-by-phone-number),
	// this filter causes the search to return customers whose phone number matches partially
	// the token or tokens provided in the query expression. For example, if the search query contains
	// `415-123-45`, the filter selects those customers with phone numbers of `415-123-4567` or
	// `234-151-2345`. The search does not return customers with the phone number of `415-123-4678`.
	// Similarly, if the search query contains `415` as part of the phone number, the search returns
	// those customers with phone numbers of `(415)-123-4567`, `(123) 415-1567`, and `1 (415) 123-4567`.
	PhoneNumber *CustomerTextFilter `json:"phone_number,omitempty"`

	// A filter to [select customers by their reference IDs](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#search-by-reference-id).
	// This filter is case insensitive.
	//
	// [Exact matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#exact-search-by-reference-id)
	// of a customer's reference ID against a query's reference ID is evaluated as
	// exact match between two strings, character by character in the given order.
	//
	// [Fuzzy matching](https://developer.squareup.com/docs/docs/customers-api/cookbook/search-customers#fuzzy-search-by-reference-id) of stored reference IDs against queried reference IDs works
	// exactly the same as fuzzy matching on email addresses. Non-alphanumeric characters
	// are replaced by spaces to tokenize stored and queried reference IDs. A match is found
	// if a tokenized stored reference ID contains all tokens specified in any order in the query. For example,
	// a query of `NYC M` will match customer profiles with the `reference_id` value of `NYC_M_35_JOHNSON`
	// and `NYC_27_MURRAY`.
	ReferenceID *CustomerTextFilter `json:"reference_id,omitempty"`

	// A filter to select customers based on when they were updated.
	UpdatedAt *TimeRange `json:"updated_at,omitempty"`
}

CustomerFilter Represents a set of `CustomerQuery` filters used to limit the set of `Customers` returned by `SearchCustomers`.

swagger:model CustomerFilter

func (*CustomerFilter) ContextValidate

func (m *CustomerFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this customer filter based on the context it is used

func (*CustomerFilter) MarshalBinary

func (m *CustomerFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CustomerFilter) UnmarshalBinary

func (m *CustomerFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CustomerFilter) Validate

func (m *CustomerFilter) Validate(formats strfmt.Registry) error

Validate validates this customer filter

type CustomerGroup

type CustomerGroup struct {

	// The timestamp when the customer group was created, in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// Unique Square-generated ID for the customer group.
	// Max Length: 255
	ID string `json:"id,omitempty"`

	// Name of the customer group.
	// Required: true
	Name *string `json:"name"`

	// The timestamp when the customer group was last updated, in RFC 3339 format.
	UpdatedAt string `json:"updated_at,omitempty"`
}

CustomerGroup Represents a group of customer profiles.

Customer groups can be created, modified, and have their membership defined either via the Customers API or within Customer Directory in the Square Dashboard or Point of Sale.

swagger:model CustomerGroup

func (*CustomerGroup) ContextValidate

func (m *CustomerGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this customer group based on context it is used

func (*CustomerGroup) MarshalBinary

func (m *CustomerGroup) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CustomerGroup) UnmarshalBinary

func (m *CustomerGroup) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CustomerGroup) Validate

func (m *CustomerGroup) Validate(formats strfmt.Registry) error

Validate validates this customer group

type CustomerGroupInfo

type CustomerGroupInfo struct {

	// The ID of the Customer Group.
	// Required: true
	ID *string `json:"id"`

	// The name of the Customer Group.
	// Required: true
	Name *string `json:"name"`
}

CustomerGroupInfo Contains some brief information about a Customer Group with its identifier included.

swagger:model CustomerGroupInfo

func (*CustomerGroupInfo) ContextValidate

func (m *CustomerGroupInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this customer group info based on context it is used

func (*CustomerGroupInfo) MarshalBinary

func (m *CustomerGroupInfo) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CustomerGroupInfo) UnmarshalBinary

func (m *CustomerGroupInfo) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CustomerGroupInfo) Validate

func (m *CustomerGroupInfo) Validate(formats strfmt.Registry) error

Validate validates this customer group info

type CustomerInclusionExclusion

type CustomerInclusionExclusion string

CustomerInclusionExclusion Indicates whether customers should be included in, or excluded from, the result set when they match the filtering criteria.

swagger:model CustomerInclusionExclusion

const (

	// CustomerInclusionExclusionINCLUDE captures enum value "INCLUDE"
	CustomerInclusionExclusionINCLUDE CustomerInclusionExclusion = "INCLUDE"

	// CustomerInclusionExclusionEXCLUDE captures enum value "EXCLUDE"
	CustomerInclusionExclusionEXCLUDE CustomerInclusionExclusion = "EXCLUDE"
)

func (CustomerInclusionExclusion) ContextValidate

func (m CustomerInclusionExclusion) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this customer inclusion exclusion based on context it is used

func (CustomerInclusionExclusion) Validate

func (m CustomerInclusionExclusion) Validate(formats strfmt.Registry) error

Validate validates this customer inclusion exclusion

type CustomerPreferences

type CustomerPreferences struct {

	// The customer has unsubscribed from receiving marketing campaign emails.
	EmailUnsubscribed bool `json:"email_unsubscribed,omitempty"`
}

CustomerPreferences Represents communication preferences for the customer profile.

swagger:model CustomerPreferences

func (*CustomerPreferences) ContextValidate

func (m *CustomerPreferences) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this customer preferences based on context it is used

func (*CustomerPreferences) MarshalBinary

func (m *CustomerPreferences) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CustomerPreferences) UnmarshalBinary

func (m *CustomerPreferences) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CustomerPreferences) Validate

func (m *CustomerPreferences) Validate(formats strfmt.Registry) error

Validate validates this customer preferences

type CustomerQuery

type CustomerQuery struct {

	// A list of filtering criteria.
	Filter *CustomerFilter `json:"filter,omitempty"`

	// Sorting criteria for query results. The default behavior is to sort
	// customers alphabetically by `given_name` and `family_name`.
	Sort *CustomerSort `json:"sort,omitempty"`
}

CustomerQuery Represents a query (including filtering criteria, sorting criteria, or both) used to search for customer profiles.

swagger:model CustomerQuery

func (*CustomerQuery) ContextValidate

func (m *CustomerQuery) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this customer query based on the context it is used

func (*CustomerQuery) MarshalBinary

func (m *CustomerQuery) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CustomerQuery) UnmarshalBinary

func (m *CustomerQuery) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CustomerQuery) Validate

func (m *CustomerQuery) Validate(formats strfmt.Registry) error

Validate validates this customer query

type CustomerSegment

type CustomerSegment struct {

	// The timestamp when the segment was created, in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// Unique Square-generated ID for the segment.
	// Max Length: 255
	ID string `json:"id,omitempty"`

	// Name of the segment.
	// Required: true
	Name *string `json:"name"`

	// The timestamp when the segment was last updated, in RFC 3339 format.
	UpdatedAt string `json:"updated_at,omitempty"`
}

CustomerSegment Represents a group of customer profiles that match one or more predefined filter criteria.

Segments (also known as Smart Groups) are defined and created within Customer Directory in the Square Dashboard or Point of Sale.

swagger:model CustomerSegment

func (*CustomerSegment) ContextValidate

func (m *CustomerSegment) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this customer segment based on context it is used

func (*CustomerSegment) MarshalBinary

func (m *CustomerSegment) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CustomerSegment) UnmarshalBinary

func (m *CustomerSegment) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CustomerSegment) Validate

func (m *CustomerSegment) Validate(formats strfmt.Registry) error

Validate validates this customer segment

type CustomerSort

type CustomerSort struct {

	//  Use one or more customer attributes as the sort key to sort searched customer profiles.
	// For example, use creation date (`created_at`) of customers or default attributes as the sort key.
	//
	//
	// Default: `DEFAULT`.
	// See [CustomerSortField](#type-customersortfield) for possible values
	Field string `json:"field,omitempty"`

	// Indicates the order in which results should be sorted based on the
	// sort field value. Strings use standard alphabetic comparison
	// to determine order. Strings representing numbers are sorted as strings.
	//
	// Default: `ASC`.
	// See [SortOrder](#type-sortorder) for possible values
	Order string `json:"order,omitempty"`
}

CustomerSort Specifies how searched customers profiles are sorted, including the sort key and sort order.

swagger:model CustomerSort

func (*CustomerSort) ContextValidate

func (m *CustomerSort) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this customer sort based on context it is used

func (*CustomerSort) MarshalBinary

func (m *CustomerSort) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CustomerSort) UnmarshalBinary

func (m *CustomerSort) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CustomerSort) Validate

func (m *CustomerSort) Validate(formats strfmt.Registry) error

Validate validates this customer sort

type CustomerSortField

type CustomerSortField string

CustomerSortField Specifies customer attributes as the sort key to customer profiles returned from a search.

swagger:model CustomerSortField

const (

	// CustomerSortFieldDEFAULT captures enum value "DEFAULT"
	CustomerSortFieldDEFAULT CustomerSortField = "DEFAULT"

	// CustomerSortFieldCREATEDAT captures enum value "CREATED_AT"
	CustomerSortFieldCREATEDAT CustomerSortField = "CREATED_AT"
)

func (CustomerSortField) ContextValidate

func (m CustomerSortField) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this customer sort field based on context it is used

func (CustomerSortField) Validate

func (m CustomerSortField) Validate(formats strfmt.Registry) error

Validate validates this customer sort field

type CustomerTextFilter

type CustomerTextFilter struct {

	// Use the exact filter to select customers whose attributes match exactly the specified query.
	Exact string `json:"exact,omitempty"`

	// Use the fuzzy filter to select customers whose attributes match the specified query
	// in a fuzzy manner. When the fuzzy option is used, search queries are tokenized, and then
	// each query token must be matched somewhere in the searched attribute. For single token queries,
	// this is effectively the same behavior as a partial match operation.
	Fuzzy string `json:"fuzzy,omitempty"`
}

CustomerTextFilter A filter to select customers based on exact or fuzzy matching of customer attributes against a specified query. Depending on customer attributes, the filter can be case sensitive. This filter can be either exact or fuzzy. It cannot be both.

swagger:model CustomerTextFilter

func (*CustomerTextFilter) ContextValidate

func (m *CustomerTextFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this customer text filter based on context it is used

func (*CustomerTextFilter) MarshalBinary

func (m *CustomerTextFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CustomerTextFilter) UnmarshalBinary

func (m *CustomerTextFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CustomerTextFilter) Validate

func (m *CustomerTextFilter) Validate(formats strfmt.Registry) error

Validate validates this customer text filter

type DateRange

type DateRange struct {

	// String in `YYYY-MM-DD` format, e.g. `2017-10-31` per the ISO 8601
	// extended format for calendar dates.
	// The end of a date range (inclusive)
	EndDate string `json:"end_date,omitempty"`

	// String in `YYYY-MM-DD` format, e.g. `2017-10-31` per the ISO 8601
	// extended format for calendar dates.
	// The beginning of a date range (inclusive)
	StartDate string `json:"start_date,omitempty"`
}

DateRange A range defined by two dates. Used for filtering a query for Connect v2 objects that have date properties.

swagger:model DateRange

func (*DateRange) ContextValidate

func (m *DateRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this date range based on context it is used

func (*DateRange) MarshalBinary

func (m *DateRange) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DateRange) UnmarshalBinary

func (m *DateRange) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DateRange) Validate

func (m *DateRange) Validate(formats strfmt.Registry) error

Validate validates this date range

type DayOfWeek

type DayOfWeek string

DayOfWeek Indicates the specific day of the week.

swagger:model DayOfWeek

const (

	// DayOfWeekSUN captures enum value "SUN"
	DayOfWeekSUN DayOfWeek = "SUN"

	// DayOfWeekMON captures enum value "MON"
	DayOfWeekMON DayOfWeek = "MON"

	// DayOfWeekTUE captures enum value "TUE"
	DayOfWeekTUE DayOfWeek = "TUE"

	// DayOfWeekWED captures enum value "WED"
	DayOfWeekWED DayOfWeek = "WED"

	// DayOfWeekTHU captures enum value "THU"
	DayOfWeekTHU DayOfWeek = "THU"

	// DayOfWeekFRI captures enum value "FRI"
	DayOfWeekFRI DayOfWeek = "FRI"

	// DayOfWeekSAT captures enum value "SAT"
	DayOfWeekSAT DayOfWeek = "SAT"
)

func (DayOfWeek) ContextValidate

func (m DayOfWeek) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this day of week based on context it is used

func (DayOfWeek) Validate

func (m DayOfWeek) Validate(formats strfmt.Registry) error

Validate validates this day of week

type DeleteBreakTypeRequest

type DeleteBreakTypeRequest interface{}

DeleteBreakTypeRequest A request to delete a `BreakType` Example: {}

swagger:model DeleteBreakTypeRequest

type DeleteBreakTypeResponse

type DeleteBreakTypeResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

DeleteBreakTypeResponse The response to a request to delete a `BreakType`. May contain a set of `Error` objects if the request resulted in errors. Example: {}

swagger:model DeleteBreakTypeResponse

func (*DeleteBreakTypeResponse) ContextValidate

func (m *DeleteBreakTypeResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this delete break type response based on the context it is used

func (*DeleteBreakTypeResponse) MarshalBinary

func (m *DeleteBreakTypeResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeleteBreakTypeResponse) UnmarshalBinary

func (m *DeleteBreakTypeResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeleteBreakTypeResponse) Validate

func (m *DeleteBreakTypeResponse) Validate(formats strfmt.Registry) error

Validate validates this delete break type response

type DeleteCatalogObjectRequest

type DeleteCatalogObjectRequest interface{}

DeleteCatalogObjectRequest delete catalog object request Example: {}

swagger:model DeleteCatalogObjectRequest

type DeleteCatalogObjectResponse

type DeleteCatalogObjectResponse struct {

	// The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// of this deletion in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`.
	DeletedAt string `json:"deleted_at,omitempty"`

	// The IDs of all catalog objects deleted by this request.
	// Multiple IDs may be returned when associated objects are also deleted, for example
	// a catalog item variation will be deleted (and its ID included in this field)
	// when its parent catalog item is deleted.
	DeletedObjectIds []string `json:"deleted_object_ids"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

DeleteCatalogObjectResponse delete catalog object response Example: {"deleted_at":"2016-11-16T22:25:24.878Z","deleted_object_ids":["7SB3ZQYJ5GDMVFL7JK46JCHT","KQLFFHA6K6J3YQAQAWDQAL57"]}

swagger:model DeleteCatalogObjectResponse

func (*DeleteCatalogObjectResponse) ContextValidate

func (m *DeleteCatalogObjectResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this delete catalog object response based on the context it is used

func (*DeleteCatalogObjectResponse) MarshalBinary

func (m *DeleteCatalogObjectResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeleteCatalogObjectResponse) UnmarshalBinary

func (m *DeleteCatalogObjectResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeleteCatalogObjectResponse) Validate

func (m *DeleteCatalogObjectResponse) Validate(formats strfmt.Registry) error

Validate validates this delete catalog object response

type DeleteCustomerCardRequest

type DeleteCustomerCardRequest interface{}

DeleteCustomerCardRequest Defines the fields that are included in requests to the DeleteCustomerCard endpoint. Example: {}

swagger:model DeleteCustomerCardRequest

type DeleteCustomerCardResponse

type DeleteCustomerCardResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

DeleteCustomerCardResponse Defines the fields that are included in the response body of a request to the DeleteCustomerCard endpoint. Example: {}

swagger:model DeleteCustomerCardResponse

func (*DeleteCustomerCardResponse) ContextValidate

func (m *DeleteCustomerCardResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this delete customer card response based on the context it is used

func (*DeleteCustomerCardResponse) MarshalBinary

func (m *DeleteCustomerCardResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeleteCustomerCardResponse) UnmarshalBinary

func (m *DeleteCustomerCardResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeleteCustomerCardResponse) Validate

func (m *DeleteCustomerCardResponse) Validate(formats strfmt.Registry) error

Validate validates this delete customer card response

type DeleteCustomerGroupRequest

type DeleteCustomerGroupRequest interface{}

DeleteCustomerGroupRequest Defines the fields that can be provided in a request to the [DeleteCustomerGroup](#endpoint-deletecustomergroup) endpoint. Example: {"request_body":{}}

swagger:model DeleteCustomerGroupRequest

type DeleteCustomerGroupResponse

type DeleteCustomerGroupResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

DeleteCustomerGroupResponse Defines the fields that are included in the response body of a request to the [DeleteCustomerGroup](#endpoint-deletecustomergroup) endpoint. Example: {}

swagger:model DeleteCustomerGroupResponse

func (*DeleteCustomerGroupResponse) ContextValidate

func (m *DeleteCustomerGroupResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this delete customer group response based on the context it is used

func (*DeleteCustomerGroupResponse) MarshalBinary

func (m *DeleteCustomerGroupResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeleteCustomerGroupResponse) UnmarshalBinary

func (m *DeleteCustomerGroupResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeleteCustomerGroupResponse) Validate

func (m *DeleteCustomerGroupResponse) Validate(formats strfmt.Registry) error

Validate validates this delete customer group response

type DeleteCustomerRequest

type DeleteCustomerRequest interface{}

DeleteCustomerRequest Defines the fields that are included in a request to the DeleteCustomer endpoint. Example: {}

swagger:model DeleteCustomerRequest

type DeleteCustomerResponse

type DeleteCustomerResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

DeleteCustomerResponse Defines the fields that are included in the response body of a request to the DeleteCustomer endpoint. Example: {}

swagger:model DeleteCustomerResponse

func (*DeleteCustomerResponse) ContextValidate

func (m *DeleteCustomerResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this delete customer response based on the context it is used

func (*DeleteCustomerResponse) MarshalBinary

func (m *DeleteCustomerResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeleteCustomerResponse) UnmarshalBinary

func (m *DeleteCustomerResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeleteCustomerResponse) Validate

func (m *DeleteCustomerResponse) Validate(formats strfmt.Registry) error

Validate validates this delete customer response

type DeleteInvoiceRequest

type DeleteInvoiceRequest struct {

	// The version of the `invoice` to delete.
	// If you do not know the version, you can call `GetInvoice` or
	// `ListInvoices`.
	Version int64 `json:"version,omitempty"`
}

DeleteInvoiceRequest Describes a `DeleteInvoice` request.

swagger:model DeleteInvoiceRequest

func (*DeleteInvoiceRequest) ContextValidate

func (m *DeleteInvoiceRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this delete invoice request based on context it is used

func (*DeleteInvoiceRequest) MarshalBinary

func (m *DeleteInvoiceRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeleteInvoiceRequest) UnmarshalBinary

func (m *DeleteInvoiceRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeleteInvoiceRequest) Validate

func (m *DeleteInvoiceRequest) Validate(formats strfmt.Registry) error

Validate validates this delete invoice request

type DeleteInvoiceResponse

type DeleteInvoiceResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`
}

DeleteInvoiceResponse Describes a `DeleteInvoice` response. Example: {}

swagger:model DeleteInvoiceResponse

func (*DeleteInvoiceResponse) ContextValidate

func (m *DeleteInvoiceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this delete invoice response based on the context it is used

func (*DeleteInvoiceResponse) MarshalBinary

func (m *DeleteInvoiceResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeleteInvoiceResponse) UnmarshalBinary

func (m *DeleteInvoiceResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeleteInvoiceResponse) Validate

func (m *DeleteInvoiceResponse) Validate(formats strfmt.Registry) error

Validate validates this delete invoice response

type DeleteLoyaltyRewardRequest

type DeleteLoyaltyRewardRequest interface{}

DeleteLoyaltyRewardRequest A request to delete a loyalty reward. Example: {"request_params":"?reward_id=9f18ac21-233a-31c3-be77-b45840f5a810"}

swagger:model DeleteLoyaltyRewardRequest

type DeleteLoyaltyRewardResponse

type DeleteLoyaltyRewardResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

DeleteLoyaltyRewardResponse A response returned by the API call. Example: {}

swagger:model DeleteLoyaltyRewardResponse

func (*DeleteLoyaltyRewardResponse) ContextValidate

func (m *DeleteLoyaltyRewardResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this delete loyalty reward response based on the context it is used

func (*DeleteLoyaltyRewardResponse) MarshalBinary

func (m *DeleteLoyaltyRewardResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeleteLoyaltyRewardResponse) UnmarshalBinary

func (m *DeleteLoyaltyRewardResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeleteLoyaltyRewardResponse) Validate

func (m *DeleteLoyaltyRewardResponse) Validate(formats strfmt.Registry) error

Validate validates this delete loyalty reward response

type DeleteShiftRequest

type DeleteShiftRequest interface{}

DeleteShiftRequest A request to delete a `Shift` Example: {}

swagger:model DeleteShiftRequest

type DeleteShiftResponse

type DeleteShiftResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

DeleteShiftResponse The response to a request to delete a `Shift`. May contain a set of `Error` objects if the request resulted in errors. Example: {}

swagger:model DeleteShiftResponse

func (*DeleteShiftResponse) ContextValidate

func (m *DeleteShiftResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this delete shift response based on the context it is used

func (*DeleteShiftResponse) MarshalBinary

func (m *DeleteShiftResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeleteShiftResponse) UnmarshalBinary

func (m *DeleteShiftResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeleteShiftResponse) Validate

func (m *DeleteShiftResponse) Validate(formats strfmt.Registry) error

Validate validates this delete shift response

type Device

type Device struct {

	// The device's Square-issued ID.
	ID string `json:"id,omitempty"`

	// The device's merchant-specified name.
	Name string `json:"name,omitempty"`
}

Device device

swagger:model Device

func (*Device) ContextValidate

func (m *Device) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this device based on context it is used

func (*Device) MarshalBinary

func (m *Device) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Device) UnmarshalBinary

func (m *Device) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Device) Validate

func (m *Device) Validate(formats strfmt.Registry) error

Validate validates this device

type DeviceCheckoutOptions

type DeviceCheckoutOptions struct {

	// The unique ID of the device intended for this `TerminalCheckout`.
	// A list of `DeviceCode` objects can be retrieved from the /v2/devices/codes endpoint.
	// Match a `DeviceCode.device_id` value with `device_id` to get the associated device code.
	// Required: true
	DeviceID *string `json:"device_id"`

	// Instruct the device to skip the receipt screen. Defaults to false.
	SkipReceiptScreen bool `json:"skip_receipt_screen,omitempty"`

	// Tip specific settings
	TipSettings *TipSettings `json:"tip_settings,omitempty"`
}

DeviceCheckoutOptions device checkout options

swagger:model DeviceCheckoutOptions

func (*DeviceCheckoutOptions) ContextValidate

func (m *DeviceCheckoutOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this device checkout options based on the context it is used

func (*DeviceCheckoutOptions) MarshalBinary

func (m *DeviceCheckoutOptions) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeviceCheckoutOptions) UnmarshalBinary

func (m *DeviceCheckoutOptions) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeviceCheckoutOptions) Validate

func (m *DeviceCheckoutOptions) Validate(formats strfmt.Registry) error

Validate validates this device checkout options

type DeviceCode

type DeviceCode struct {

	// The unique code that can be used to login.
	Code string `json:"code,omitempty"`

	// When this DeviceCode was created. Timestamp in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// The unique id of the device that used this code. Populated when the device is paired up.
	DeviceID string `json:"device_id,omitempty"`

	// The unique id for this device code.
	ID string `json:"id,omitempty"`

	// The location assigned to this code.
	// Max Length: 50
	LocationID string `json:"location_id,omitempty"`

	// An optional user-defined name for the device code.
	// Max Length: 128
	Name string `json:"name,omitempty"`

	// When this DeviceCode will expire and no longer login. Timestamp in RFC 3339 format.
	PairBy string `json:"pair_by,omitempty"`

	// When this DeviceCode was paired. Timestamp in RFC 3339 format.
	PairedAt string `json:"paired_at,omitempty"`

	// The targeting product type of the device code.
	// See [ProductType](#type-producttype) for possible values
	// Required: true
	ProductType *string `json:"product_type"`

	// The pairing status of the device code.
	// See [DeviceCodeStatus](#type-devicecodestatus) for possible values
	Status string `json:"status,omitempty"`

	// When this DeviceCode's status was last changed. Timestamp in RFC 3339 format.
	StatusChangedAt string `json:"status_changed_at,omitempty"`
}

DeviceCode device code

swagger:model DeviceCode

func (*DeviceCode) ContextValidate

func (m *DeviceCode) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this device code based on context it is used

func (*DeviceCode) MarshalBinary

func (m *DeviceCode) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeviceCode) UnmarshalBinary

func (m *DeviceCode) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeviceCode) Validate

func (m *DeviceCode) Validate(formats strfmt.Registry) error

Validate validates this device code

type DeviceCodeStatus

type DeviceCodeStatus string

DeviceCodeStatus DeviceCode.Status enum.

swagger:model DeviceCodeStatus

const (

	// DeviceCodeStatusUNKNOWN captures enum value "UNKNOWN"
	DeviceCodeStatusUNKNOWN DeviceCodeStatus = "UNKNOWN"

	// DeviceCodeStatusUNPAIRED captures enum value "UNPAIRED"
	DeviceCodeStatusUNPAIRED DeviceCodeStatus = "UNPAIRED"

	// DeviceCodeStatusPAIRED captures enum value "PAIRED"
	DeviceCodeStatusPAIRED DeviceCodeStatus = "PAIRED"

	// DeviceCodeStatusEXPIRED captures enum value "EXPIRED"
	DeviceCodeStatusEXPIRED DeviceCodeStatus = "EXPIRED"
)

func (DeviceCodeStatus) ContextValidate

func (m DeviceCodeStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this device code status based on context it is used

func (DeviceCodeStatus) Validate

func (m DeviceCodeStatus) Validate(formats strfmt.Registry) error

Validate validates this device code status

type DeviceDetails

type DeviceDetails struct {

	// The Square-issued ID of the device.
	// Max Length: 255
	DeviceID string `json:"device_id,omitempty"`

	// The Square-issued installation ID for the device.
	// Max Length: 255
	DeviceInstallationID string `json:"device_installation_id,omitempty"`

	// The name of the device set by the seller.
	// Max Length: 255
	DeviceName string `json:"device_name,omitempty"`
}

DeviceDetails Details about the device that took the payment.

swagger:model DeviceDetails

func (*DeviceDetails) ContextValidate

func (m *DeviceDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this device details based on context it is used

func (*DeviceDetails) MarshalBinary

func (m *DeviceDetails) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DeviceDetails) UnmarshalBinary

func (m *DeviceDetails) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DeviceDetails) Validate

func (m *DeviceDetails) Validate(formats strfmt.Registry) error

Validate validates this device details

type Dispute

type Dispute struct {

	// The disputed amount. The amount can be less than the entire transaction amount.
	// For example, a cardholder purchased multiple items, however initiated dispute only for some of the items.
	AmountMoney *Money `json:"amount_money,omitempty"`

	// The ID of the dispute in the card brand system, generated by the card brand.
	// Max Length: 40
	// Min Length: 1
	BrandDisputeID string `json:"brand_dispute_id,omitempty"`

	// The card brand used in the disputed payment.
	// See [CardBrand](#type-cardbrand) for possible values
	CardBrand string `json:"card_brand,omitempty"`

	// The timestamp when the dispute was created, in RFC 3339 format.
	// Max Length: 40
	// Min Length: 1
	CreatedAt string `json:"created_at,omitempty"`

	// The unique ID for this `Dispute`, generated by Square.
	// Max Length: 40
	// Min Length: 1
	DisputeID string `json:"dispute_id,omitempty"`

	// The payment challenged in this dispute.
	DisputedPayment *DisputedPayment `json:"disputed_payment,omitempty"`

	// The time when the next action is due, in RFC 3339 format.
	// Max Length: 40
	// Min Length: 1
	DueAt string `json:"due_at,omitempty"`

	// The IDs of the evidence associated with the dispute.
	EvidenceIds []string `json:"evidence_ids"`

	// The ID of the location where the dispute originated.
	// Max Length: 40
	// Min Length: 1
	LocationID string `json:"location_id,omitempty"`

	// The dispute reason why the cardholder initiated the dispute with their bank.
	// See [DisputeReason](#type-disputereason) for possible values
	Reason string `json:"reason,omitempty"`

	// The timestamp when the dispute was reported, in RFC 3339 format.
	// Max Length: 40
	// Min Length: 1
	ReportedDate string `json:"reported_date,omitempty"`

	// The current state of this dispute.
	// See [DisputeState](#type-disputestate) for possible values
	State string `json:"state,omitempty"`

	// The timestamp when the dispute was last updated, in RFC 3339 format.
	// Max Length: 40
	// Min Length: 1
	UpdatedAt string `json:"updated_at,omitempty"`

	// The current version of the `Dispute`.
	Version int64 `json:"version,omitempty"`
}

Dispute Represents a dispute a cardholder initiated with their bank.

swagger:model Dispute

func (*Dispute) ContextValidate

func (m *Dispute) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this dispute based on the context it is used

func (*Dispute) MarshalBinary

func (m *Dispute) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Dispute) UnmarshalBinary

func (m *Dispute) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Dispute) Validate

func (m *Dispute) Validate(formats strfmt.Registry) error

Validate validates this dispute

type DisputeEvidence

type DisputeEvidence struct {

	// The ID of the dispute the evidence is associated with.
	// Max Length: 40
	// Min Length: 1
	DisputeID string `json:"dispute_id,omitempty"`

	// The Square-generated ID of the evidence.
	// Max Length: 40
	// Min Length: 1
	EvidenceID string `json:"evidence_id,omitempty"`

	// The type of the evidence.
	// See [DisputeEvidenceType](#type-disputeevidencetype) for possible values
	EvidenceType string `json:"evidence_type,omitempty"`

	// The time when the next action is due, in RFC 3339 format.
	// Max Length: 40
	// Min Length: 1
	UploadedAt string `json:"uploaded_at,omitempty"`
}

DisputeEvidence dispute evidence

swagger:model DisputeEvidence

func (*DisputeEvidence) ContextValidate

func (m *DisputeEvidence) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this dispute evidence based on context it is used

func (*DisputeEvidence) MarshalBinary

func (m *DisputeEvidence) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DisputeEvidence) UnmarshalBinary

func (m *DisputeEvidence) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DisputeEvidence) Validate

func (m *DisputeEvidence) Validate(formats strfmt.Registry) error

Validate validates this dispute evidence

type DisputeEvidenceFile

type DisputeEvidenceFile struct {

	// The file name including the file extension. For example: "receipt.tiff".
	// Max Length: 40
	// Min Length: 1
	Filename string `json:"filename,omitempty"`

	// Dispute evidence files must be application/pdf, image/heic, image/heif, image/jpeg, image/png, or image/tiff formats.
	// Max Length: 40
	// Min Length: 1
	Filetype string `json:"filetype,omitempty"`
}

DisputeEvidenceFile A file to be uploaded as dispute evidence.

swagger:model DisputeEvidenceFile

func (*DisputeEvidenceFile) ContextValidate

func (m *DisputeEvidenceFile) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this dispute evidence file based on context it is used

func (*DisputeEvidenceFile) MarshalBinary

func (m *DisputeEvidenceFile) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DisputeEvidenceFile) UnmarshalBinary

func (m *DisputeEvidenceFile) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DisputeEvidenceFile) Validate

func (m *DisputeEvidenceFile) Validate(formats strfmt.Registry) error

Validate validates this dispute evidence file

type DisputeEvidenceType

type DisputeEvidenceType string

DisputeEvidenceType The type of the dispute evidence.

swagger:model DisputeEvidenceType

const (

	// DisputeEvidenceTypeGENERICEVIDENCE captures enum value "GENERIC_EVIDENCE"
	DisputeEvidenceTypeGENERICEVIDENCE DisputeEvidenceType = "GENERIC_EVIDENCE"

	// DisputeEvidenceTypeONLINEORAPPACCESSLOG captures enum value "ONLINE_OR_APP_ACCESS_LOG"
	DisputeEvidenceTypeONLINEORAPPACCESSLOG DisputeEvidenceType = "ONLINE_OR_APP_ACCESS_LOG"

	// DisputeEvidenceTypeAUTHORIZATIONDOCUMENTATION captures enum value "AUTHORIZATION_DOCUMENTATION"
	DisputeEvidenceTypeAUTHORIZATIONDOCUMENTATION DisputeEvidenceType = "AUTHORIZATION_DOCUMENTATION"

	// DisputeEvidenceTypeCANCELLATIONORREFUNDDOCUMENTATION captures enum value "CANCELLATION_OR_REFUND_DOCUMENTATION"
	DisputeEvidenceTypeCANCELLATIONORREFUNDDOCUMENTATION DisputeEvidenceType = "CANCELLATION_OR_REFUND_DOCUMENTATION"

	// DisputeEvidenceTypeCARDHOLDERCOMMUNICATION captures enum value "CARDHOLDER_COMMUNICATION"
	DisputeEvidenceTypeCARDHOLDERCOMMUNICATION DisputeEvidenceType = "CARDHOLDER_COMMUNICATION"

	// DisputeEvidenceTypeCARDHOLDERINFORMATION captures enum value "CARDHOLDER_INFORMATION"
	DisputeEvidenceTypeCARDHOLDERINFORMATION DisputeEvidenceType = "CARDHOLDER_INFORMATION"

	// DisputeEvidenceTypePURCHASEACKNOWLEDGEMENT captures enum value "PURCHASE_ACKNOWLEDGEMENT"
	DisputeEvidenceTypePURCHASEACKNOWLEDGEMENT DisputeEvidenceType = "PURCHASE_ACKNOWLEDGEMENT"

	// DisputeEvidenceTypeDUPLICATECHARGEDOCUMENTATION captures enum value "DUPLICATE_CHARGE_DOCUMENTATION"
	DisputeEvidenceTypeDUPLICATECHARGEDOCUMENTATION DisputeEvidenceType = "DUPLICATE_CHARGE_DOCUMENTATION"

	// DisputeEvidenceTypePRODUCTORSERVICEDESCRIPTION captures enum value "PRODUCT_OR_SERVICE_DESCRIPTION"
	DisputeEvidenceTypePRODUCTORSERVICEDESCRIPTION DisputeEvidenceType = "PRODUCT_OR_SERVICE_DESCRIPTION"

	// DisputeEvidenceTypeRECEIPT captures enum value "RECEIPT"
	DisputeEvidenceTypeRECEIPT DisputeEvidenceType = "RECEIPT"

	// DisputeEvidenceTypeSERVICERECEIVEDDOCUMENTATION captures enum value "SERVICE_RECEIVED_DOCUMENTATION"
	DisputeEvidenceTypeSERVICERECEIVEDDOCUMENTATION DisputeEvidenceType = "SERVICE_RECEIVED_DOCUMENTATION"

	// DisputeEvidenceTypePROOFOFDELIVERYDOCUMENTATION captures enum value "PROOF_OF_DELIVERY_DOCUMENTATION"
	DisputeEvidenceTypePROOFOFDELIVERYDOCUMENTATION DisputeEvidenceType = "PROOF_OF_DELIVERY_DOCUMENTATION"

	// DisputeEvidenceTypeRELATEDTRANSACTIONDOCUMENTATION captures enum value "RELATED_TRANSACTION_DOCUMENTATION"
	DisputeEvidenceTypeRELATEDTRANSACTIONDOCUMENTATION DisputeEvidenceType = "RELATED_TRANSACTION_DOCUMENTATION"

	// DisputeEvidenceTypeREBUTTALEXPLANATION captures enum value "REBUTTAL_EXPLANATION"
	DisputeEvidenceTypeREBUTTALEXPLANATION DisputeEvidenceType = "REBUTTAL_EXPLANATION"

	// DisputeEvidenceTypeTRACKINGNUMBER captures enum value "TRACKING_NUMBER"
	DisputeEvidenceTypeTRACKINGNUMBER DisputeEvidenceType = "TRACKING_NUMBER"
)

func (DisputeEvidenceType) ContextValidate

func (m DisputeEvidenceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this dispute evidence type based on context it is used

func (DisputeEvidenceType) Validate

func (m DisputeEvidenceType) Validate(formats strfmt.Registry) error

Validate validates this dispute evidence type

type DisputeReason

type DisputeReason string

DisputeReason The list of possible reasons why a cardholder might initiate a dispute with their bank.

swagger:model DisputeReason

const (

	// DisputeReasonAMOUNTDIFFERS captures enum value "AMOUNT_DIFFERS"
	DisputeReasonAMOUNTDIFFERS DisputeReason = "AMOUNT_DIFFERS"

	// DisputeReasonCANCELLED captures enum value "CANCELLED"
	DisputeReasonCANCELLED DisputeReason = "CANCELLED"

	// DisputeReasonDUPLICATE captures enum value "DUPLICATE"
	DisputeReasonDUPLICATE DisputeReason = "DUPLICATE"

	// DisputeReasonNOKNOWLEDGE captures enum value "NO_KNOWLEDGE"
	DisputeReasonNOKNOWLEDGE DisputeReason = "NO_KNOWLEDGE"

	// DisputeReasonNOTASDESCRIBED captures enum value "NOT_AS_DESCRIBED"
	DisputeReasonNOTASDESCRIBED DisputeReason = "NOT_AS_DESCRIBED"

	// DisputeReasonNOTRECEIVED captures enum value "NOT_RECEIVED"
	DisputeReasonNOTRECEIVED DisputeReason = "NOT_RECEIVED"

	// DisputeReasonPAIDBYOTHERMEANS captures enum value "PAID_BY_OTHER_MEANS"
	DisputeReasonPAIDBYOTHERMEANS DisputeReason = "PAID_BY_OTHER_MEANS"

	// DisputeReasonCUSTOMERREQUESTSCREDIT captures enum value "CUSTOMER_REQUESTS_CREDIT"
	DisputeReasonCUSTOMERREQUESTSCREDIT DisputeReason = "CUSTOMER_REQUESTS_CREDIT"

	// DisputeReasonEMVLIABILITYSHIFT captures enum value "EMV_LIABILITY_SHIFT"
	DisputeReasonEMVLIABILITYSHIFT DisputeReason = "EMV_LIABILITY_SHIFT"
)

func (DisputeReason) ContextValidate

func (m DisputeReason) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this dispute reason based on context it is used

func (DisputeReason) Validate

func (m DisputeReason) Validate(formats strfmt.Registry) error

Validate validates this dispute reason

type DisputeState

type DisputeState string

DisputeState The list of possible dispute states.

swagger:model DisputeState

const (

	// DisputeStateUNKNOWNSTATE captures enum value "UNKNOWN_STATE"
	DisputeStateUNKNOWNSTATE DisputeState = "UNKNOWN_STATE"

	// DisputeStateINQUIRYEVIDENCEREQUIRED captures enum value "INQUIRY_EVIDENCE_REQUIRED"
	DisputeStateINQUIRYEVIDENCEREQUIRED DisputeState = "INQUIRY_EVIDENCE_REQUIRED"

	// DisputeStateINQUIRYPROCESSING captures enum value "INQUIRY_PROCESSING"
	DisputeStateINQUIRYPROCESSING DisputeState = "INQUIRY_PROCESSING"

	// DisputeStateINQUIRYCLOSED captures enum value "INQUIRY_CLOSED"
	DisputeStateINQUIRYCLOSED DisputeState = "INQUIRY_CLOSED"

	// DisputeStateEVIDENCEREQUIRED captures enum value "EVIDENCE_REQUIRED"
	DisputeStateEVIDENCEREQUIRED DisputeState = "EVIDENCE_REQUIRED"

	// DisputeStatePROCESSING captures enum value "PROCESSING"
	DisputeStatePROCESSING DisputeState = "PROCESSING"

	// DisputeStateWON captures enum value "WON"
	DisputeStateWON DisputeState = "WON"

	// DisputeStateLOST captures enum value "LOST"
	DisputeStateLOST DisputeState = "LOST"

	// DisputeStateACCEPTED captures enum value "ACCEPTED"
	DisputeStateACCEPTED DisputeState = "ACCEPTED"

	// DisputeStateWAITINGTHIRDPARTY captures enum value "WAITING_THIRD_PARTY"
	DisputeStateWAITINGTHIRDPARTY DisputeState = "WAITING_THIRD_PARTY"
)

func (DisputeState) ContextValidate

func (m DisputeState) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this dispute state based on context it is used

func (DisputeState) Validate

func (m DisputeState) Validate(formats strfmt.Registry) error

Validate validates this dispute state

type DisputedPayment

type DisputedPayment struct {

	// Square-generated unique ID of the payment being disputed.
	// Max Length: 192
	// Min Length: 1
	PaymentID string `json:"payment_id,omitempty"`
}

DisputedPayment The payment the cardholder disputed.

swagger:model DisputedPayment

func (*DisputedPayment) ContextValidate

func (m *DisputedPayment) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this disputed payment based on context it is used

func (*DisputedPayment) MarshalBinary

func (m *DisputedPayment) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DisputedPayment) UnmarshalBinary

func (m *DisputedPayment) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DisputedPayment) Validate

func (m *DisputedPayment) Validate(formats strfmt.Registry) error

Validate validates this disputed payment

type EcomVisibility

type EcomVisibility string

EcomVisibility Determines item visibility in Ecom (Online Store) and Online Checkout.

swagger:model EcomVisibility

const (

	// EcomVisibilityUNINDEXED captures enum value "UNINDEXED"
	EcomVisibilityUNINDEXED EcomVisibility = "UNINDEXED"

	// EcomVisibilityUNAVAILABLE captures enum value "UNAVAILABLE"
	EcomVisibilityUNAVAILABLE EcomVisibility = "UNAVAILABLE"

	// EcomVisibilityHIDDEN captures enum value "HIDDEN"
	EcomVisibilityHIDDEN EcomVisibility = "HIDDEN"

	// EcomVisibilityVISIBLE captures enum value "VISIBLE"
	EcomVisibilityVISIBLE EcomVisibility = "VISIBLE"
)

func (EcomVisibility) ContextValidate

func (m EcomVisibility) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this ecom visibility based on context it is used

func (EcomVisibility) Validate

func (m EcomVisibility) Validate(formats strfmt.Registry) error

Validate validates this ecom visibility

type Employee

type Employee struct {

	// A read-only timestamp in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// The employee's email address
	Email string `json:"email,omitempty"`

	// The employee's first name.
	FirstName string `json:"first_name,omitempty"`

	// UUID for this object.
	ID string `json:"id,omitempty"`

	// Whether this employee is the owner of the merchant. Each merchant
	// has one owner employee, and that employee has full authority over
	// the account.
	IsOwner bool `json:"is_owner,omitempty"`

	// The employee's last name.
	LastName string `json:"last_name,omitempty"`

	// A list of location IDs where this employee has access to.
	LocationIds []string `json:"location_ids"`

	// The employee's phone number in E.164 format, i.e. "+12125554250"
	PhoneNumber string `json:"phone_number,omitempty"`

	// Specifies the status of the employees being fetched.
	// See [EmployeeStatus](#type-employeestatus) for possible values
	Status string `json:"status,omitempty"`

	// A read-only timestamp in RFC 3339 format.
	UpdatedAt string `json:"updated_at,omitempty"`
}

Employee An employee object that is used by the external API.

swagger:model Employee

func (*Employee) ContextValidate

func (m *Employee) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this employee based on context it is used

func (*Employee) MarshalBinary

func (m *Employee) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Employee) UnmarshalBinary

func (m *Employee) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Employee) Validate

func (m *Employee) Validate(formats strfmt.Registry) error

Validate validates this employee

type EmployeeStatus

type EmployeeStatus string

EmployeeStatus The status of the Employee being retrieved.

swagger:model EmployeeStatus

const (

	// EmployeeStatusACTIVE captures enum value "ACTIVE"
	EmployeeStatusACTIVE EmployeeStatus = "ACTIVE"

	// EmployeeStatusINACTIVE captures enum value "INACTIVE"
	EmployeeStatusINACTIVE EmployeeStatus = "INACTIVE"
)

func (EmployeeStatus) ContextValidate

func (m EmployeeStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this employee status based on context it is used

func (EmployeeStatus) Validate

func (m EmployeeStatus) Validate(formats strfmt.Registry) error

Validate validates this employee status

type EmployeeWage

type EmployeeWage struct {

	// The `Employee` that this wage is assigned to.
	EmployeeID string `json:"employee_id,omitempty"`

	// Can be a custom-set hourly wage or the calculated effective hourly
	// wage based on annual wage and hours worked per week.
	HourlyRate *Money `json:"hourly_rate,omitempty"`

	// UUID for this object.
	ID string `json:"id,omitempty"`

	// The job title that this wage relates to.
	Title string `json:"title,omitempty"`
}

EmployeeWage The hourly wage rate that an employee will earn on a `Shift` for doing the job specified by the `title` property of this object. Deprecated at verison 2020-08-26. Use `TeamMemberWage` instead.

swagger:model EmployeeWage

func (*EmployeeWage) ContextValidate

func (m *EmployeeWage) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this employee wage based on the context it is used

func (*EmployeeWage) MarshalBinary

func (m *EmployeeWage) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*EmployeeWage) UnmarshalBinary

func (m *EmployeeWage) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*EmployeeWage) Validate

func (m *EmployeeWage) Validate(formats strfmt.Registry) error

Validate validates this employee wage

type Error

type Error struct {

	// The high-level category for the error.
	// See [ErrorCategory](#type-errorcategory) for possible values
	// Required: true
	Category *string `json:"category"`

	// The specific code of the error.
	// See [ErrorCode](#type-errorcode) for possible values
	// Required: true
	Code *string `json:"code"`

	// A human-readable description of the error for debugging purposes.
	Detail string `json:"detail,omitempty"`

	// The name of the field provided in the original request (if any) that
	// the error pertains to.
	Field string `json:"field,omitempty"`
}

Error Represents an error encountered during a request to the Connect API.

See [Handling errors](#handlingerrors) for more information.

swagger:model Error

func (*Error) ContextValidate

func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this error based on context it is used

func (*Error) MarshalBinary

func (m *Error) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Error) UnmarshalBinary

func (m *Error) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Error) Validate

func (m *Error) Validate(formats strfmt.Registry) error

Validate validates this error

type ErrorCategory

type ErrorCategory string

ErrorCategory Indicates which high-level category of error has occurred during a request to the Connect API.

swagger:model ErrorCategory

const (

	// ErrorCategoryAPIERROR captures enum value "API_ERROR"
	ErrorCategoryAPIERROR ErrorCategory = "API_ERROR"

	// ErrorCategoryAUTHENTICATIONERROR captures enum value "AUTHENTICATION_ERROR"
	ErrorCategoryAUTHENTICATIONERROR ErrorCategory = "AUTHENTICATION_ERROR"

	// ErrorCategoryINVALIDREQUESTERROR captures enum value "INVALID_REQUEST_ERROR"
	ErrorCategoryINVALIDREQUESTERROR ErrorCategory = "INVALID_REQUEST_ERROR"

	// ErrorCategoryRATELIMITERROR captures enum value "RATE_LIMIT_ERROR"
	ErrorCategoryRATELIMITERROR ErrorCategory = "RATE_LIMIT_ERROR"

	// ErrorCategoryPAYMENTMETHODERROR captures enum value "PAYMENT_METHOD_ERROR"
	ErrorCategoryPAYMENTMETHODERROR ErrorCategory = "PAYMENT_METHOD_ERROR"

	// ErrorCategoryREFUNDERROR captures enum value "REFUND_ERROR"
	ErrorCategoryREFUNDERROR ErrorCategory = "REFUND_ERROR"
)

func (ErrorCategory) ContextValidate

func (m ErrorCategory) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this error category based on context it is used

func (ErrorCategory) Validate

func (m ErrorCategory) Validate(formats strfmt.Registry) error

Validate validates this error category

type ErrorCode

type ErrorCode string

ErrorCode Indicates the specific error that occurred during a request to a Square API.

swagger:model ErrorCode

const (

	// ErrorCodeINTERNALSERVERERROR captures enum value "INTERNAL_SERVER_ERROR"
	ErrorCodeINTERNALSERVERERROR ErrorCode = "INTERNAL_SERVER_ERROR"

	// ErrorCodeUNAUTHORIZED captures enum value "UNAUTHORIZED"
	ErrorCodeUNAUTHORIZED ErrorCode = "UNAUTHORIZED"

	// ErrorCodeACCESSTOKENEXPIRED captures enum value "ACCESS_TOKEN_EXPIRED"
	ErrorCodeACCESSTOKENEXPIRED ErrorCode = "ACCESS_TOKEN_EXPIRED"

	// ErrorCodeACCESSTOKENREVOKED captures enum value "ACCESS_TOKEN_REVOKED"
	ErrorCodeACCESSTOKENREVOKED ErrorCode = "ACCESS_TOKEN_REVOKED"

	// ErrorCodeCLIENTDISABLED captures enum value "CLIENT_DISABLED"
	ErrorCodeCLIENTDISABLED ErrorCode = "CLIENT_DISABLED"

	// ErrorCodeFORBIDDEN captures enum value "FORBIDDEN"
	ErrorCodeFORBIDDEN ErrorCode = "FORBIDDEN"

	// ErrorCodeINSUFFICIENTSCOPES captures enum value "INSUFFICIENT_SCOPES"
	ErrorCodeINSUFFICIENTSCOPES ErrorCode = "INSUFFICIENT_SCOPES"

	// ErrorCodeAPPLICATIONDISABLED captures enum value "APPLICATION_DISABLED"
	ErrorCodeAPPLICATIONDISABLED ErrorCode = "APPLICATION_DISABLED"

	// ErrorCodeV1APPLICATION captures enum value "V1_APPLICATION"
	ErrorCodeV1APPLICATION ErrorCode = "V1_APPLICATION"

	// ErrorCodeV1ACCESSTOKEN captures enum value "V1_ACCESS_TOKEN"
	ErrorCodeV1ACCESSTOKEN ErrorCode = "V1_ACCESS_TOKEN"

	// ErrorCodeCARDPROCESSINGNOTENABLED captures enum value "CARD_PROCESSING_NOT_ENABLED"
	ErrorCodeCARDPROCESSINGNOTENABLED ErrorCode = "CARD_PROCESSING_NOT_ENABLED"

	// ErrorCodeBADREQUEST captures enum value "BAD_REQUEST"
	ErrorCodeBADREQUEST ErrorCode = "BAD_REQUEST"

	// ErrorCodeMISSINGREQUIREDPARAMETER captures enum value "MISSING_REQUIRED_PARAMETER"
	ErrorCodeMISSINGREQUIREDPARAMETER ErrorCode = "MISSING_REQUIRED_PARAMETER"

	// ErrorCodeINCORRECTTYPE captures enum value "INCORRECT_TYPE"
	ErrorCodeINCORRECTTYPE ErrorCode = "INCORRECT_TYPE"

	// ErrorCodeINVALIDTIME captures enum value "INVALID_TIME"
	ErrorCodeINVALIDTIME ErrorCode = "INVALID_TIME"

	// ErrorCodeINVALIDTIMERANGE captures enum value "INVALID_TIME_RANGE"
	ErrorCodeINVALIDTIMERANGE ErrorCode = "INVALID_TIME_RANGE"

	// ErrorCodeINVALIDVALUE captures enum value "INVALID_VALUE"
	ErrorCodeINVALIDVALUE ErrorCode = "INVALID_VALUE"

	// ErrorCodeINVALIDCURSOR captures enum value "INVALID_CURSOR"
	ErrorCodeINVALIDCURSOR ErrorCode = "INVALID_CURSOR"

	// ErrorCodeUNKNOWNQUERYPARAMETER captures enum value "UNKNOWN_QUERY_PARAMETER"
	ErrorCodeUNKNOWNQUERYPARAMETER ErrorCode = "UNKNOWN_QUERY_PARAMETER"

	// ErrorCodeCONFLICTINGPARAMETERS captures enum value "CONFLICTING_PARAMETERS"
	ErrorCodeCONFLICTINGPARAMETERS ErrorCode = "CONFLICTING_PARAMETERS"

	// ErrorCodeEXPECTEDJSONBODY captures enum value "EXPECTED_JSON_BODY"
	ErrorCodeEXPECTEDJSONBODY ErrorCode = "EXPECTED_JSON_BODY"

	// ErrorCodeINVALIDSORTORDER captures enum value "INVALID_SORT_ORDER"
	ErrorCodeINVALIDSORTORDER ErrorCode = "INVALID_SORT_ORDER"

	// ErrorCodeVALUEREGEXMISMATCH captures enum value "VALUE_REGEX_MISMATCH"
	ErrorCodeVALUEREGEXMISMATCH ErrorCode = "VALUE_REGEX_MISMATCH"

	// ErrorCodeVALUETOOSHORT captures enum value "VALUE_TOO_SHORT"
	ErrorCodeVALUETOOSHORT ErrorCode = "VALUE_TOO_SHORT"

	// ErrorCodeVALUETOOLONG captures enum value "VALUE_TOO_LONG"
	ErrorCodeVALUETOOLONG ErrorCode = "VALUE_TOO_LONG"

	// ErrorCodeVALUETOOLOW captures enum value "VALUE_TOO_LOW"
	ErrorCodeVALUETOOLOW ErrorCode = "VALUE_TOO_LOW"

	// ErrorCodeVALUETOOHIGH captures enum value "VALUE_TOO_HIGH"
	ErrorCodeVALUETOOHIGH ErrorCode = "VALUE_TOO_HIGH"

	// ErrorCodeVALUEEMPTY captures enum value "VALUE_EMPTY"
	ErrorCodeVALUEEMPTY ErrorCode = "VALUE_EMPTY"

	// ErrorCodeARRAYLENGTHTOOLONG captures enum value "ARRAY_LENGTH_TOO_LONG"
	ErrorCodeARRAYLENGTHTOOLONG ErrorCode = "ARRAY_LENGTH_TOO_LONG"

	// ErrorCodeARRAYLENGTHTOOSHORT captures enum value "ARRAY_LENGTH_TOO_SHORT"
	ErrorCodeARRAYLENGTHTOOSHORT ErrorCode = "ARRAY_LENGTH_TOO_SHORT"

	// ErrorCodeARRAYEMPTY captures enum value "ARRAY_EMPTY"
	ErrorCodeARRAYEMPTY ErrorCode = "ARRAY_EMPTY"

	// ErrorCodeEXPECTEDBOOLEAN captures enum value "EXPECTED_BOOLEAN"
	ErrorCodeEXPECTEDBOOLEAN ErrorCode = "EXPECTED_BOOLEAN"

	// ErrorCodeEXPECTEDINTEGER captures enum value "EXPECTED_INTEGER"
	ErrorCodeEXPECTEDINTEGER ErrorCode = "EXPECTED_INTEGER"

	// ErrorCodeEXPECTEDFLOAT captures enum value "EXPECTED_FLOAT"
	ErrorCodeEXPECTEDFLOAT ErrorCode = "EXPECTED_FLOAT"

	// ErrorCodeEXPECTEDSTRING captures enum value "EXPECTED_STRING"
	ErrorCodeEXPECTEDSTRING ErrorCode = "EXPECTED_STRING"

	// ErrorCodeEXPECTEDOBJECT captures enum value "EXPECTED_OBJECT"
	ErrorCodeEXPECTEDOBJECT ErrorCode = "EXPECTED_OBJECT"

	// ErrorCodeEXPECTEDARRAY captures enum value "EXPECTED_ARRAY"
	ErrorCodeEXPECTEDARRAY ErrorCode = "EXPECTED_ARRAY"

	// ErrorCodeEXPECTEDMAP captures enum value "EXPECTED_MAP"
	ErrorCodeEXPECTEDMAP ErrorCode = "EXPECTED_MAP"

	// ErrorCodeEXPECTEDBASE64ENCODEDBYTEARRAY captures enum value "EXPECTED_BASE64_ENCODED_BYTE_ARRAY"
	ErrorCodeEXPECTEDBASE64ENCODEDBYTEARRAY ErrorCode = "EXPECTED_BASE64_ENCODED_BYTE_ARRAY"

	// ErrorCodeINVALIDARRAYVALUE captures enum value "INVALID_ARRAY_VALUE"
	ErrorCodeINVALIDARRAYVALUE ErrorCode = "INVALID_ARRAY_VALUE"

	// ErrorCodeINVALIDENUMVALUE captures enum value "INVALID_ENUM_VALUE"
	ErrorCodeINVALIDENUMVALUE ErrorCode = "INVALID_ENUM_VALUE"

	// ErrorCodeINVALIDCONTENTTYPE captures enum value "INVALID_CONTENT_TYPE"
	ErrorCodeINVALIDCONTENTTYPE ErrorCode = "INVALID_CONTENT_TYPE"

	// ErrorCodeINVALIDFORMVALUE captures enum value "INVALID_FORM_VALUE"
	ErrorCodeINVALIDFORMVALUE ErrorCode = "INVALID_FORM_VALUE"

	// ErrorCodeCUSTOMERNOTFOUND captures enum value "CUSTOMER_NOT_FOUND"
	ErrorCodeCUSTOMERNOTFOUND ErrorCode = "CUSTOMER_NOT_FOUND"

	// ErrorCodeONEINSTRUMENTEXPECTED captures enum value "ONE_INSTRUMENT_EXPECTED"
	ErrorCodeONEINSTRUMENTEXPECTED ErrorCode = "ONE_INSTRUMENT_EXPECTED"

	// ErrorCodeNOFIELDSSET captures enum value "NO_FIELDS_SET"
	ErrorCodeNOFIELDSSET ErrorCode = "NO_FIELDS_SET"

	// ErrorCodeTOOMANYMAPENTRIES captures enum value "TOO_MANY_MAP_ENTRIES"
	ErrorCodeTOOMANYMAPENTRIES ErrorCode = "TOO_MANY_MAP_ENTRIES"

	// ErrorCodeMAPKEYLENGTHTOOSHORT captures enum value "MAP_KEY_LENGTH_TOO_SHORT"
	ErrorCodeMAPKEYLENGTHTOOSHORT ErrorCode = "MAP_KEY_LENGTH_TOO_SHORT"

	// ErrorCodeMAPKEYLENGTHTOOLONG captures enum value "MAP_KEY_LENGTH_TOO_LONG"
	ErrorCodeMAPKEYLENGTHTOOLONG ErrorCode = "MAP_KEY_LENGTH_TOO_LONG"

	// ErrorCodeCARDEXPIRED captures enum value "CARD_EXPIRED"
	ErrorCodeCARDEXPIRED ErrorCode = "CARD_EXPIRED"

	// ErrorCodeINVALIDEXPIRATION captures enum value "INVALID_EXPIRATION"
	ErrorCodeINVALIDEXPIRATION ErrorCode = "INVALID_EXPIRATION"

	// ErrorCodeINVALIDEXPIRATIONYEAR captures enum value "INVALID_EXPIRATION_YEAR"
	ErrorCodeINVALIDEXPIRATIONYEAR ErrorCode = "INVALID_EXPIRATION_YEAR"

	// ErrorCodeINVALIDEXPIRATIONDATE captures enum value "INVALID_EXPIRATION_DATE"
	ErrorCodeINVALIDEXPIRATIONDATE ErrorCode = "INVALID_EXPIRATION_DATE"

	// ErrorCodeUNSUPPORTEDCARDBRAND captures enum value "UNSUPPORTED_CARD_BRAND"
	ErrorCodeUNSUPPORTEDCARDBRAND ErrorCode = "UNSUPPORTED_CARD_BRAND"

	// ErrorCodeUNSUPPORTEDENTRYMETHOD captures enum value "UNSUPPORTED_ENTRY_METHOD"
	ErrorCodeUNSUPPORTEDENTRYMETHOD ErrorCode = "UNSUPPORTED_ENTRY_METHOD"

	// ErrorCodeINVALIDENCRYPTEDCARD captures enum value "INVALID_ENCRYPTED_CARD"
	ErrorCodeINVALIDENCRYPTEDCARD ErrorCode = "INVALID_ENCRYPTED_CARD"

	// ErrorCodeINVALIDCARD captures enum value "INVALID_CARD"
	ErrorCodeINVALIDCARD ErrorCode = "INVALID_CARD"

	// ErrorCodeGENERICDECLINE captures enum value "GENERIC_DECLINE"
	ErrorCodeGENERICDECLINE ErrorCode = "GENERIC_DECLINE"

	// ErrorCodeCVVFAILURE captures enum value "CVV_FAILURE"
	ErrorCodeCVVFAILURE ErrorCode = "CVV_FAILURE"

	// ErrorCodeADDRESSVERIFICATIONFAILURE captures enum value "ADDRESS_VERIFICATION_FAILURE"
	ErrorCodeADDRESSVERIFICATIONFAILURE ErrorCode = "ADDRESS_VERIFICATION_FAILURE"

	// ErrorCodeINVALIDACCOUNT captures enum value "INVALID_ACCOUNT"
	ErrorCodeINVALIDACCOUNT ErrorCode = "INVALID_ACCOUNT"

	// ErrorCodeCURRENCYMISMATCH captures enum value "CURRENCY_MISMATCH"
	ErrorCodeCURRENCYMISMATCH ErrorCode = "CURRENCY_MISMATCH"

	// ErrorCodeINSUFFICIENTFUNDS captures enum value "INSUFFICIENT_FUNDS"
	ErrorCodeINSUFFICIENTFUNDS ErrorCode = "INSUFFICIENT_FUNDS"

	// ErrorCodeINSUFFICIENTPERMISSIONS captures enum value "INSUFFICIENT_PERMISSIONS"
	ErrorCodeINSUFFICIENTPERMISSIONS ErrorCode = "INSUFFICIENT_PERMISSIONS"

	// ErrorCodeCARDHOLDERINSUFFICIENTPERMISSIONS captures enum value "CARDHOLDER_INSUFFICIENT_PERMISSIONS"
	ErrorCodeCARDHOLDERINSUFFICIENTPERMISSIONS ErrorCode = "CARDHOLDER_INSUFFICIENT_PERMISSIONS"

	// ErrorCodeINVALIDLOCATION captures enum value "INVALID_LOCATION"
	ErrorCodeINVALIDLOCATION ErrorCode = "INVALID_LOCATION"

	// ErrorCodeTRANSACTIONLIMIT captures enum value "TRANSACTION_LIMIT"
	ErrorCodeTRANSACTIONLIMIT ErrorCode = "TRANSACTION_LIMIT"

	// ErrorCodeVOICEFAILURE captures enum value "VOICE_FAILURE"
	ErrorCodeVOICEFAILURE ErrorCode = "VOICE_FAILURE"

	// ErrorCodePANFAILURE captures enum value "PAN_FAILURE"
	ErrorCodePANFAILURE ErrorCode = "PAN_FAILURE"

	// ErrorCodeEXPIRATIONFAILURE captures enum value "EXPIRATION_FAILURE"
	ErrorCodeEXPIRATIONFAILURE ErrorCode = "EXPIRATION_FAILURE"

	// ErrorCodeCARDNOTSUPPORTED captures enum value "CARD_NOT_SUPPORTED"
	ErrorCodeCARDNOTSUPPORTED ErrorCode = "CARD_NOT_SUPPORTED"

	// ErrorCodeINVALIDPIN captures enum value "INVALID_PIN"
	ErrorCodeINVALIDPIN ErrorCode = "INVALID_PIN"

	// ErrorCodeINVALIDPOSTALCODE captures enum value "INVALID_POSTAL_CODE"
	ErrorCodeINVALIDPOSTALCODE ErrorCode = "INVALID_POSTAL_CODE"

	// ErrorCodeINVALIDFEES captures enum value "INVALID_FEES"
	ErrorCodeINVALIDFEES ErrorCode = "INVALID_FEES"

	// ErrorCodeMANUALLYENTEREDPAYMENTNOTSUPPORTED captures enum value "MANUALLY_ENTERED_PAYMENT_NOT_SUPPORTED"
	ErrorCodeMANUALLYENTEREDPAYMENTNOTSUPPORTED ErrorCode = "MANUALLY_ENTERED_PAYMENT_NOT_SUPPORTED"

	// ErrorCodePAYMENTLIMITEXCEEDED captures enum value "PAYMENT_LIMIT_EXCEEDED"
	ErrorCodePAYMENTLIMITEXCEEDED ErrorCode = "PAYMENT_LIMIT_EXCEEDED"

	// ErrorCodeGIFTCARDAVAILABLEAMOUNT captures enum value "GIFT_CARD_AVAILABLE_AMOUNT"
	ErrorCodeGIFTCARDAVAILABLEAMOUNT ErrorCode = "GIFT_CARD_AVAILABLE_AMOUNT"

	// ErrorCodeDELAYEDTRANSACTIONEXPIRED captures enum value "DELAYED_TRANSACTION_EXPIRED"
	ErrorCodeDELAYEDTRANSACTIONEXPIRED ErrorCode = "DELAYED_TRANSACTION_EXPIRED"

	// ErrorCodeDELAYEDTRANSACTIONCANCELED captures enum value "DELAYED_TRANSACTION_CANCELED"
	ErrorCodeDELAYEDTRANSACTIONCANCELED ErrorCode = "DELAYED_TRANSACTION_CANCELED"

	// ErrorCodeDELAYEDTRANSACTIONCAPTURED captures enum value "DELAYED_TRANSACTION_CAPTURED"
	ErrorCodeDELAYEDTRANSACTIONCAPTURED ErrorCode = "DELAYED_TRANSACTION_CAPTURED"

	// ErrorCodeDELAYEDTRANSACTIONFAILED captures enum value "DELAYED_TRANSACTION_FAILED"
	ErrorCodeDELAYEDTRANSACTIONFAILED ErrorCode = "DELAYED_TRANSACTION_FAILED"

	// ErrorCodeCARDTOKENEXPIRED captures enum value "CARD_TOKEN_EXPIRED"
	ErrorCodeCARDTOKENEXPIRED ErrorCode = "CARD_TOKEN_EXPIRED"

	// ErrorCodeCARDTOKENUSED captures enum value "CARD_TOKEN_USED"
	ErrorCodeCARDTOKENUSED ErrorCode = "CARD_TOKEN_USED"

	// ErrorCodeAMOUNTTOOHIGH captures enum value "AMOUNT_TOO_HIGH"
	ErrorCodeAMOUNTTOOHIGH ErrorCode = "AMOUNT_TOO_HIGH"

	// ErrorCodeUNSUPPORTEDINSTRUMENTTYPE captures enum value "UNSUPPORTED_INSTRUMENT_TYPE"
	ErrorCodeUNSUPPORTEDINSTRUMENTTYPE ErrorCode = "UNSUPPORTED_INSTRUMENT_TYPE"

	// ErrorCodeREFUNDAMOUNTINVALID captures enum value "REFUND_AMOUNT_INVALID"
	ErrorCodeREFUNDAMOUNTINVALID ErrorCode = "REFUND_AMOUNT_INVALID"

	// ErrorCodeREFUNDALREADYPENDING captures enum value "REFUND_ALREADY_PENDING"
	ErrorCodeREFUNDALREADYPENDING ErrorCode = "REFUND_ALREADY_PENDING"

	// ErrorCodePAYMENTNOTREFUNDABLE captures enum value "PAYMENT_NOT_REFUNDABLE"
	ErrorCodePAYMENTNOTREFUNDABLE ErrorCode = "PAYMENT_NOT_REFUNDABLE"

	// ErrorCodeREFUNDDECLINED captures enum value "REFUND_DECLINED"
	ErrorCodeREFUNDDECLINED ErrorCode = "REFUND_DECLINED"

	// ErrorCodeINVALIDCARDDATA captures enum value "INVALID_CARD_DATA"
	ErrorCodeINVALIDCARDDATA ErrorCode = "INVALID_CARD_DATA"

	// ErrorCodeSOURCEUSED captures enum value "SOURCE_USED"
	ErrorCodeSOURCEUSED ErrorCode = "SOURCE_USED"

	// ErrorCodeSOURCEEXPIRED captures enum value "SOURCE_EXPIRED"
	ErrorCodeSOURCEEXPIRED ErrorCode = "SOURCE_EXPIRED"

	// ErrorCodeUNSUPPORTEDLOYALTYREWARDTIER captures enum value "UNSUPPORTED_LOYALTY_REWARD_TIER"
	ErrorCodeUNSUPPORTEDLOYALTYREWARDTIER ErrorCode = "UNSUPPORTED_LOYALTY_REWARD_TIER"

	// ErrorCodeLOCATIONMISMATCH captures enum value "LOCATION_MISMATCH"
	ErrorCodeLOCATIONMISMATCH ErrorCode = "LOCATION_MISMATCH"

	// ErrorCodeIDEMPOTENCYKEYREUSED captures enum value "IDEMPOTENCY_KEY_REUSED"
	ErrorCodeIDEMPOTENCYKEYREUSED ErrorCode = "IDEMPOTENCY_KEY_REUSED"

	// ErrorCodeUNEXPECTEDVALUE captures enum value "UNEXPECTED_VALUE"
	ErrorCodeUNEXPECTEDVALUE ErrorCode = "UNEXPECTED_VALUE"

	// ErrorCodeSANDBOXNOTSUPPORTED captures enum value "SANDBOX_NOT_SUPPORTED"
	ErrorCodeSANDBOXNOTSUPPORTED ErrorCode = "SANDBOX_NOT_SUPPORTED"

	// ErrorCodeINVALIDEMAILADDRESS captures enum value "INVALID_EMAIL_ADDRESS"
	ErrorCodeINVALIDEMAILADDRESS ErrorCode = "INVALID_EMAIL_ADDRESS"

	// ErrorCodeINVALIDPHONENUMBER captures enum value "INVALID_PHONE_NUMBER"
	ErrorCodeINVALIDPHONENUMBER ErrorCode = "INVALID_PHONE_NUMBER"

	// ErrorCodeCHECKOUTEXPIRED captures enum value "CHECKOUT_EXPIRED"
	ErrorCodeCHECKOUTEXPIRED ErrorCode = "CHECKOUT_EXPIRED"

	// ErrorCodeBADCERTIFICATE captures enum value "BAD_CERTIFICATE"
	ErrorCodeBADCERTIFICATE ErrorCode = "BAD_CERTIFICATE"

	// ErrorCodeINVALIDSQUAREVERSIONFORMAT captures enum value "INVALID_SQUARE_VERSION_FORMAT"
	ErrorCodeINVALIDSQUAREVERSIONFORMAT ErrorCode = "INVALID_SQUARE_VERSION_FORMAT"

	// ErrorCodeAPIVERSIONINCOMPATIBLE captures enum value "API_VERSION_INCOMPATIBLE"
	ErrorCodeAPIVERSIONINCOMPATIBLE ErrorCode = "API_VERSION_INCOMPATIBLE"

	// ErrorCodeCARDDECLINED captures enum value "CARD_DECLINED"
	ErrorCodeCARDDECLINED ErrorCode = "CARD_DECLINED"

	// ErrorCodeVERIFYCVVFAILURE captures enum value "VERIFY_CVV_FAILURE"
	ErrorCodeVERIFYCVVFAILURE ErrorCode = "VERIFY_CVV_FAILURE"

	// ErrorCodeVERIFYAVSFAILURE captures enum value "VERIFY_AVS_FAILURE"
	ErrorCodeVERIFYAVSFAILURE ErrorCode = "VERIFY_AVS_FAILURE"

	// ErrorCodeCARDDECLINEDCALLISSUER captures enum value "CARD_DECLINED_CALL_ISSUER"
	ErrorCodeCARDDECLINEDCALLISSUER ErrorCode = "CARD_DECLINED_CALL_ISSUER"

	// ErrorCodeCARDDECLINEDVERIFICATIONREQUIRED captures enum value "CARD_DECLINED_VERIFICATION_REQUIRED"
	ErrorCodeCARDDECLINEDVERIFICATIONREQUIRED ErrorCode = "CARD_DECLINED_VERIFICATION_REQUIRED"

	// ErrorCodeBADEXPIRATION captures enum value "BAD_EXPIRATION"
	ErrorCodeBADEXPIRATION ErrorCode = "BAD_EXPIRATION"

	// ErrorCodeCHIPINSERTIONREQUIRED captures enum value "CHIP_INSERTION_REQUIRED"
	ErrorCodeCHIPINSERTIONREQUIRED ErrorCode = "CHIP_INSERTION_REQUIRED"

	// ErrorCodeALLOWABLEPINTRIESEXCEEDED captures enum value "ALLOWABLE_PIN_TRIES_EXCEEDED"
	ErrorCodeALLOWABLEPINTRIESEXCEEDED ErrorCode = "ALLOWABLE_PIN_TRIES_EXCEEDED"

	// ErrorCodeRESERVATIONDECLINED captures enum value "RESERVATION_DECLINED"
	ErrorCodeRESERVATIONDECLINED ErrorCode = "RESERVATION_DECLINED"

	// ErrorCodeNOTFOUND captures enum value "NOT_FOUND"
	ErrorCodeNOTFOUND ErrorCode = "NOT_FOUND"

	// ErrorCodeAPPLEPAYMENTPROCESSINGCERTIFICATEHASHNOTFOUND captures enum value "APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND"
	ErrorCodeAPPLEPAYMENTPROCESSINGCERTIFICATEHASHNOTFOUND ErrorCode = "APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND"

	// ErrorCodeMETHODNOTALLOWED captures enum value "METHOD_NOT_ALLOWED"
	ErrorCodeMETHODNOTALLOWED ErrorCode = "METHOD_NOT_ALLOWED"

	// ErrorCodeNOTACCEPTABLE captures enum value "NOT_ACCEPTABLE"
	ErrorCodeNOTACCEPTABLE ErrorCode = "NOT_ACCEPTABLE"

	// ErrorCodeREQUESTTIMEOUT captures enum value "REQUEST_TIMEOUT"
	ErrorCodeREQUESTTIMEOUT ErrorCode = "REQUEST_TIMEOUT"

	// ErrorCodeCONFLICT captures enum value "CONFLICT"
	ErrorCodeCONFLICT ErrorCode = "CONFLICT"

	// ErrorCodeGONE captures enum value "GONE"
	ErrorCodeGONE ErrorCode = "GONE"

	// ErrorCodeREQUESTENTITYTOOLARGE captures enum value "REQUEST_ENTITY_TOO_LARGE"
	ErrorCodeREQUESTENTITYTOOLARGE ErrorCode = "REQUEST_ENTITY_TOO_LARGE"

	// ErrorCodeUNSUPPORTEDMEDIATYPE captures enum value "UNSUPPORTED_MEDIA_TYPE"
	ErrorCodeUNSUPPORTEDMEDIATYPE ErrorCode = "UNSUPPORTED_MEDIA_TYPE"

	// ErrorCodeUNPROCESSABLEENTITY captures enum value "UNPROCESSABLE_ENTITY"
	ErrorCodeUNPROCESSABLEENTITY ErrorCode = "UNPROCESSABLE_ENTITY"

	// ErrorCodeRATELIMITED captures enum value "RATE_LIMITED"
	ErrorCodeRATELIMITED ErrorCode = "RATE_LIMITED"

	// ErrorCodeNOTIMPLEMENTED captures enum value "NOT_IMPLEMENTED"
	ErrorCodeNOTIMPLEMENTED ErrorCode = "NOT_IMPLEMENTED"

	// ErrorCodeBADGATEWAY captures enum value "BAD_GATEWAY"
	ErrorCodeBADGATEWAY ErrorCode = "BAD_GATEWAY"

	// ErrorCodeSERVICEUNAVAILABLE captures enum value "SERVICE_UNAVAILABLE"
	ErrorCodeSERVICEUNAVAILABLE ErrorCode = "SERVICE_UNAVAILABLE"

	// ErrorCodeTEMPORARYERROR captures enum value "TEMPORARY_ERROR"
	ErrorCodeTEMPORARYERROR ErrorCode = "TEMPORARY_ERROR"

	// ErrorCodeGATEWAYTIMEOUT captures enum value "GATEWAY_TIMEOUT"
	ErrorCodeGATEWAYTIMEOUT ErrorCode = "GATEWAY_TIMEOUT"
)

func (ErrorCode) ContextValidate

func (m ErrorCode) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this error code based on context it is used

func (ErrorCode) Validate

func (m ErrorCode) Validate(formats strfmt.Registry) error

Validate validates this error code

type ExcludeStrategy

type ExcludeStrategy string

ExcludeStrategy Indicates which products matched by a CatalogPricingRule will be excluded if the pricing rule uses an exclude set.

swagger:model ExcludeStrategy

const (

	// ExcludeStrategyLEASTEXPENSIVE captures enum value "LEAST_EXPENSIVE"
	ExcludeStrategyLEASTEXPENSIVE ExcludeStrategy = "LEAST_EXPENSIVE"

	// ExcludeStrategyMOSTEXPENSIVE captures enum value "MOST_EXPENSIVE"
	ExcludeStrategyMOSTEXPENSIVE ExcludeStrategy = "MOST_EXPENSIVE"
)

func (ExcludeStrategy) ContextValidate

func (m ExcludeStrategy) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this exclude strategy based on context it is used

func (ExcludeStrategy) Validate

func (m ExcludeStrategy) Validate(formats strfmt.Registry) error

Validate validates this exclude strategy

type FilterValue

type FilterValue struct {

	// A list of terms that must be present on the field of the resource.
	All []string `json:"all"`

	// A list of terms where at least one of them must be present on the
	// field of the resource.
	Any []string `json:"any"`

	// A list of terms that must not be present on the field the resource
	None []string `json:"none"`
}

FilterValue A filter to select resources based on an exact field value. For any given value, the value can only be in one property. Depending on the field, either all properties can be set or only a subset will be available.

Refer to the documentation of the field.

swagger:model FilterValue

func (*FilterValue) ContextValidate

func (m *FilterValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this filter value based on context it is used

func (*FilterValue) MarshalBinary

func (m *FilterValue) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*FilterValue) UnmarshalBinary

func (m *FilterValue) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*FilterValue) Validate

func (m *FilterValue) Validate(formats strfmt.Registry) error

Validate validates this filter value

type GetBankAccountByV1IDRequest

type GetBankAccountByV1IDRequest interface{}

GetBankAccountByV1IDRequest Request object for fetching a specific `BankAccount` by the object ID.

swagger:model GetBankAccountByV1IdRequest

type GetBankAccountByV1IDResponse

type GetBankAccountByV1IDResponse struct {

	// The requested `BankAccount` object.
	BankAccount *BankAccount `json:"bank_account,omitempty"`

	// Information on errors encountered during the request.
	Errors []*Error `json:"errors"`
}

GetBankAccountByV1IDResponse Response object returned by GetBankAccountByV1Id. Example: {"bank_account":{"account_number_suffix":"971","account_type":"CHECKING","bank_name":"Bank Name","country":"US","creditable":false,"currency":"USD","debitable":false,"holder_name":"Jane Doe","id":"w3yRgCGYQnwmdl0R3GB","location_id":"S8GWD5example","primary_bank_identification_number":"112200303","status":"VERIFICATION_IN_PROGRESS","version":5}}

swagger:model GetBankAccountByV1IdResponse

func (*GetBankAccountByV1IDResponse) ContextValidate

func (m *GetBankAccountByV1IDResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get bank account by v1 Id response based on the context it is used

func (*GetBankAccountByV1IDResponse) MarshalBinary

func (m *GetBankAccountByV1IDResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetBankAccountByV1IDResponse) UnmarshalBinary

func (m *GetBankAccountByV1IDResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetBankAccountByV1IDResponse) Validate

func (m *GetBankAccountByV1IDResponse) Validate(formats strfmt.Registry) error

Validate validates this get bank account by v1 Id response

type GetBankAccountRequest

type GetBankAccountRequest interface{}

GetBankAccountRequest Request object to fetch a specific `BankAccount` by the object ID.

swagger:model GetBankAccountRequest

type GetBankAccountResponse

type GetBankAccountResponse struct {

	// The requested `BankAccount` object.
	BankAccount *BankAccount `json:"bank_account,omitempty"`

	// Information on errors encountered during the request.
	Errors []*Error `json:"errors"`
}

GetBankAccountResponse Response object returned by `GetBankAccount`. Example: {"bank_account":{"account_number_suffix":"971","account_type":"CHECKING","bank_name":"Bank Name","country":"US","creditable":false,"currency":"USD","debitable":false,"holder_name":"Jane Doe","id":"w3yRgCGYQnwmdl0R3GB","location_id":"S8GWD5example","primary_bank_identification_number":"112200303","status":"VERIFICATION_IN_PROGRESS","version":5}}

swagger:model GetBankAccountResponse

func (*GetBankAccountResponse) ContextValidate

func (m *GetBankAccountResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get bank account response based on the context it is used

func (*GetBankAccountResponse) MarshalBinary

func (m *GetBankAccountResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetBankAccountResponse) UnmarshalBinary

func (m *GetBankAccountResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetBankAccountResponse) Validate

func (m *GetBankAccountResponse) Validate(formats strfmt.Registry) error

Validate validates this get bank account response

type GetBreakTypeRequest

type GetBreakTypeRequest interface{}

GetBreakTypeRequest A request to GET a `BreakType` by ID Example: {}

swagger:model GetBreakTypeRequest

type GetBreakTypeResponse

type GetBreakTypeResponse struct {

	// The response object.
	BreakType *BreakType `json:"break_type,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

GetBreakTypeResponse The response to a request to get a `BreakType`. Contains the requested `BreakType` objects. May contain a set of `Error` objects if the request resulted in errors. Example: {"break_type":{"break_name":"Lunch Break","created_at":"2019-02-21T17:50:00Z","expected_duration":"PT30M","id":"lA0mj_RSOprNPwMUXdYp","is_paid":true,"location_id":"059SB0E0WCNWS","updated_at":"2019-02-21T17:50:00Z","version":1}}

swagger:model GetBreakTypeResponse

func (*GetBreakTypeResponse) ContextValidate

func (m *GetBreakTypeResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get break type response based on the context it is used

func (*GetBreakTypeResponse) MarshalBinary

func (m *GetBreakTypeResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetBreakTypeResponse) UnmarshalBinary

func (m *GetBreakTypeResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetBreakTypeResponse) Validate

func (m *GetBreakTypeResponse) Validate(formats strfmt.Registry) error

Validate validates this get break type response

type GetDeviceCodeRequest

type GetDeviceCodeRequest interface{}

GetDeviceCodeRequest get device code request Example: {"request_body":{}}

swagger:model GetDeviceCodeRequest

type GetDeviceCodeResponse

type GetDeviceCodeResponse struct {

	// The queried DeviceCode.
	DeviceCode *DeviceCode `json:"device_code,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

GetDeviceCodeResponse get device code response Example: {"device_code":{"code":"EBCARJ","created_at":"2020-02-06T18:44:33.000Z","device_id":"907CS13101300122","id":"B3Z6NAMYQSMTM","location_id":"B5E4484SHHNYH","name":"Counter 1","pair_by":"2020-02-06T18:49:33.000Z","product_type":"TERMINAL_API","status":"PAIRED","status_changed_at":"2020-02-06T18:47:28.000Z"}}

swagger:model GetDeviceCodeResponse

func (*GetDeviceCodeResponse) ContextValidate

func (m *GetDeviceCodeResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get device code response based on the context it is used

func (*GetDeviceCodeResponse) MarshalBinary

func (m *GetDeviceCodeResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetDeviceCodeResponse) UnmarshalBinary

func (m *GetDeviceCodeResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetDeviceCodeResponse) Validate

func (m *GetDeviceCodeResponse) Validate(formats strfmt.Registry) error

Validate validates this get device code response

type GetEmployeeWageRequest

type GetEmployeeWageRequest interface{}

GetEmployeeWageRequest A request to get an `EmployeeWage` Example: {}

swagger:model GetEmployeeWageRequest

type GetEmployeeWageResponse

type GetEmployeeWageResponse struct {

	// The requested `EmployeeWage` object.
	EmployeeWage *EmployeeWage `json:"employee_wage,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

GetEmployeeWageResponse A response to a request to get an `EmployeeWage`. Contains the requested `EmployeeWage` objects. May contain a set of `Error` objects if the request resulted in errors. Example: {"employee_wage":{"employee_id":"33fJchumvVdJwxV0H6L9","hourly_rate":{"amount":2000,"currency":"USD"},"id":"pXS3qCv7BERPnEGedM4S8mhm","title":"Manager"}}

swagger:model GetEmployeeWageResponse

func (*GetEmployeeWageResponse) ContextValidate

func (m *GetEmployeeWageResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get employee wage response based on the context it is used

func (*GetEmployeeWageResponse) MarshalBinary

func (m *GetEmployeeWageResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetEmployeeWageResponse) UnmarshalBinary

func (m *GetEmployeeWageResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetEmployeeWageResponse) Validate

func (m *GetEmployeeWageResponse) Validate(formats strfmt.Registry) error

Validate validates this get employee wage response

type GetInvoiceRequest

type GetInvoiceRequest interface{}

GetInvoiceRequest Describes a `GetInvoice` request.

swagger:model GetInvoiceRequest

type GetInvoiceResponse

type GetInvoiceResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The invoice requested.
	Invoice *Invoice `json:"invoice,omitempty"`
}

GetInvoiceResponse Describes a `GetInvoice` response. Example: {"invoice":{"created_at":"2020-06-18T17:45:13Z","custom_fields":[{"label":"Event Reference Number","placement":"ABOVE_LINE_ITEMS","value":"Ref. #1234"},{"label":"Terms of Service","placement":"BELOW_LINE_ITEMS","value":"The terms of service are..."}],"delivery_method":"EMAIL","description":"We appreciate your business!","id":"gt2zv1z6mnUm1V7KMxxf3w","invoice_number":"inv-100","location_id":"ES0RJRZYEC39A","order_id":"CAISENgvlJ6jLWAzERDzjyHVybY","payment_requests":[{"automatic_payment_source":"NONE","computed_amount_money":{"amount":10000,"currency":"USD"},"due_date":"2030-01-24","reminders":[{"message":"Your invoice is due tomorrow","relative_scheduled_days":-1,"status":"PENDING","uid":"beebd363-e47f-4075-8785-c235aaa7df11"}],"request_type":"BALANCE","tipping_enabled":true,"total_completed_amount_money":{"amount":0,"currency":"USD"},"uid":"2da7964f-f3d2-4f43-81e8-5aa220bf3355"}],"primary_recipient":{"customer_id":"JDKYHBWT1D4F8MFH63DBMEN8Y4","email_address":"Amelia.Earhart@example.com","family_name":"Earhart","given_name":"Amelia","phone_number":"1-212-555-4240"},"scheduled_at":"2030-01-13T10:00:00Z","status":"DRAFT","timezone":"America/Los_Angeles","title":"Event Planning Services","updated_at":"2020-06-18T17:45:13Z","version":0}}

swagger:model GetInvoiceResponse

func (*GetInvoiceResponse) ContextValidate

func (m *GetInvoiceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get invoice response based on the context it is used

func (*GetInvoiceResponse) MarshalBinary

func (m *GetInvoiceResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetInvoiceResponse) UnmarshalBinary

func (m *GetInvoiceResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetInvoiceResponse) Validate

func (m *GetInvoiceResponse) Validate(formats strfmt.Registry) error

Validate validates this get invoice response

type GetPaymentRefundRequest

type GetPaymentRefundRequest interface{}

GetPaymentRefundRequest Retrieves a specific `Refund` using the `refund_id`. Example: {"request_body":{}}

swagger:model GetPaymentRefundRequest

type GetPaymentRefundResponse

type GetPaymentRefundResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The requested `PaymentRefund`.
	Refund *PaymentRefund `json:"refund,omitempty"`
}

GetPaymentRefundResponse Defines the fields that are included in the response body of a request to the [GetRefund](#endpoint-refunds-getpaymentrefund) endpoint.

Note: If there are errors processing the request, the refund field might not be present or it might be present in a FAILED state. Example: {"refund":{"amount_money":{"amount":1000,"currency":"USD"},"created_at":"2019-07-06T18:01:22.123Z","id":"O2QAAhTYs7rUfzlxT38GMO7LvaB_q7JwCHtxmgXrh8fAhV468WQ44VxDtL7CU4yVRlsbXmI","location_id":"XK3DBG77NJBFX","order_id":"2duiyoqbfeXY0DBi15GEyk5Epa4F","payment_id":"O2QAAhTYs7rUfzlxT38GMO7LvaB","processing_fee":[{"amount_money":{"amount":-59,"currency":"USD"},"effective_at":"2019-07-06T20:01:12.000Z","type":"INITIAL"}],"status":"COMPLETED","updated_at":"2019-07-06T18:06:03.874Z"}}

swagger:model GetPaymentRefundResponse

func (*GetPaymentRefundResponse) ContextValidate

func (m *GetPaymentRefundResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get payment refund response based on the context it is used

func (*GetPaymentRefundResponse) MarshalBinary

func (m *GetPaymentRefundResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetPaymentRefundResponse) UnmarshalBinary

func (m *GetPaymentRefundResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetPaymentRefundResponse) Validate

func (m *GetPaymentRefundResponse) Validate(formats strfmt.Registry) error

Validate validates this get payment refund response

type GetPaymentRequest

type GetPaymentRequest interface{}

GetPaymentRequest Retrieve details for a specific payment. Example: {"request_body":{}}

swagger:model GetPaymentRequest

type GetPaymentResponse

type GetPaymentResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The requested `Payment`.
	Payment *Payment `json:"payment,omitempty"`
}

GetPaymentResponse Defines the fields that are included in the response body of a request to the [GetPayment](#endpoint-payments-getpayment) endpoint. Example: {"payment":{"amount_money":{"amount":200,"currency":"USD"},"app_fee_money":{"amount":10,"currency":"USD"},"card_details":{"auth_result_code":"nsAyY2","avs_status":"AVS_ACCEPTED","card":{"bin":"411111","card_brand":"VISA","card_type":"DEBIT","exp_month":7,"exp_year":2026,"fingerprint":"sq-1-TpmjbNBMFdibiIjpQI5LiRgNUBC7u1689i0TgHjnlyHEWYB7tnn-K4QbW4ttvtaqXw","last_4":"1111","prepaid_type":"PREPAID"},"card_payment_timeline":{"authorized_at":"2019-07-10T13:23:49.234Z","captured_at":"2019-07-10T13:23:49.446Z"},"cvv_status":"CVV_ACCEPTED","entry_method":"ON_FILE","statement_description":"SQ *MY MERCHANT","status":"CAPTURED"},"created_at":"2019-07-10T13:23:49.154Z","customer_id":"RDX9Z4XTIZR7MRZJUXNY9HUK6I","id":"GQTFp1ZlXdpoW4o6eGiZhbjosiDFf","location_id":"XTI0H92143A39","note":"Brief description","order_id":"m2Hr8Hk8A3CTyQQ1k4ynExg92tO3","processing_fee":[{"amount_money":{"amount":36,"currency":"USD"},"effective_at":"2019-07-10T15:23:49.000Z","type":"INITIAL"}],"receipt_number":"GQTF","receipt_url":"https://squareup.com/receipt/preview/GQTFp1ZlXdpoW4o6eGiZhbjosiDFf","reference_id":"123456","source_type":"CARD","status":"COMPLETED","total_money":{"amount":200,"currency":"USD"},"updated_at":"2019-07-10T13:23:49.446Z"}}

swagger:model GetPaymentResponse

func (*GetPaymentResponse) ContextValidate

func (m *GetPaymentResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get payment response based on the context it is used

func (*GetPaymentResponse) MarshalBinary

func (m *GetPaymentResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetPaymentResponse) UnmarshalBinary

func (m *GetPaymentResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetPaymentResponse) Validate

func (m *GetPaymentResponse) Validate(formats strfmt.Registry) error

Validate validates this get payment response

type GetShiftRequest

type GetShiftRequest interface{}

GetShiftRequest A request to get a `Shift` by ID Example: {}

swagger:model GetShiftRequest

type GetShiftResponse

type GetShiftResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The requested `Shift`.
	Shift *Shift `json:"shift,omitempty"`
}

GetShiftResponse A response to request to get a `Shift`. Contains the requested `Shift` object. May contain a set of `Error` objects if the request resulted in errors. Example: {"shift":{"breaks":[{"break_type_id":"92EPDRQKJ5088","end_at":"2019-02-23T20:00:00-05:00","expected_duration":"PT1H","id":"M9BBKEPQAQD2T","is_paid":true,"name":"Lunch Break","start_at":"2019-02-23T19:00:00-05:00"}],"created_at":"2019-02-27T00:12:12Z","employee_id":"D71KRMQof6cXGUW0aAv7","end_at":"2019-02-23T21:00:00-05:00","id":"T35HMQSN89SV4","location_id":"PAA1RJZZKXBFG","start_at":"2019-02-23T18:00:00-05:00","status":"CLOSED","team_member_id":"D71KRMQof6cXGUW0aAv7","timezone":"America/New_York","updated_at":"2019-02-27T00:12:12Z","version":1,"wage":{"hourly_rate":{"amount":1457,"currency":"USD"},"title":"Cashier"}}}

swagger:model GetShiftResponse

func (*GetShiftResponse) ContextValidate

func (m *GetShiftResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get shift response based on the context it is used

func (*GetShiftResponse) MarshalBinary

func (m *GetShiftResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetShiftResponse) UnmarshalBinary

func (m *GetShiftResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetShiftResponse) Validate

func (m *GetShiftResponse) Validate(formats strfmt.Registry) error

Validate validates this get shift response

type GetTeamMemberWageRequest

type GetTeamMemberWageRequest interface{}

GetTeamMemberWageRequest A request to get an `TeamMemberWage` Example: {}

swagger:model GetTeamMemberWageRequest

type GetTeamMemberWageResponse

type GetTeamMemberWageResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The requested `TeamMemberWage` object.
	TeamMemberWage *TeamMemberWage `json:"team_member_wage,omitempty"`
}

GetTeamMemberWageResponse A response to a request to get a `TeamMemberWage`. Contains the requested `TeamMemberWage` objects. May contain a set of `Error` objects if the request resulted in errors. Example: {"team_member_wage":{"hourly_rate":{"amount":2000,"currency":"USD"},"id":"pXS3qCv7BERPnEGedM4S8mhm","team_member_id":"33fJchumvVdJwxV0H6L9","title":"Manager"}}

swagger:model GetTeamMemberWageResponse

func (*GetTeamMemberWageResponse) ContextValidate

func (m *GetTeamMemberWageResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get team member wage response based on the context it is used

func (*GetTeamMemberWageResponse) MarshalBinary

func (m *GetTeamMemberWageResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetTeamMemberWageResponse) UnmarshalBinary

func (m *GetTeamMemberWageResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetTeamMemberWageResponse) Validate

func (m *GetTeamMemberWageResponse) Validate(formats strfmt.Registry) error

Validate validates this get team member wage response

type GetTerminalCheckoutRequest

type GetTerminalCheckoutRequest interface{}

GetTerminalCheckoutRequest get terminal checkout request Example: {"request_body":{}}

swagger:model GetTerminalCheckoutRequest

type GetTerminalCheckoutResponse

type GetTerminalCheckoutResponse struct {

	// The requested `TerminalCheckout`
	Checkout *TerminalCheckout `json:"checkout,omitempty"`

	// Information on errors encountered during the request.
	Errors []*Error `json:"errors"`
}

GetTerminalCheckoutResponse get terminal checkout response Example: {"checkout":{"amount_money":{"amount":2610,"currency":"USD"},"app_id":"APP_ID","created_at":"2020-04-06T16:39:32.545Z","deadline_duration":"PT10M","device_options":{"device_id":"dbb5d83a-7838-11ea-bc55-0242ac130003","skip_receipt_screen":false,"tip_settings":{"allow_tipping":false}},"id":"08YceKh7B3ZqO","note":"A brief note","reference_id":"id11572","status":"IN_PROGRESS","updated_at":"2020-04-06T16:39:323.001Z"}}

swagger:model GetTerminalCheckoutResponse

func (*GetTerminalCheckoutResponse) ContextValidate

func (m *GetTerminalCheckoutResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get terminal checkout response based on the context it is used

func (*GetTerminalCheckoutResponse) MarshalBinary

func (m *GetTerminalCheckoutResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetTerminalCheckoutResponse) UnmarshalBinary

func (m *GetTerminalCheckoutResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetTerminalCheckoutResponse) Validate

func (m *GetTerminalCheckoutResponse) Validate(formats strfmt.Registry) error

Validate validates this get terminal checkout response

type GetTerminalRefundRequest

type GetTerminalRefundRequest interface{}

GetTerminalRefundRequest get terminal refund request Example: {"request_body":{}}

swagger:model GetTerminalRefundRequest

type GetTerminalRefundResponse

type GetTerminalRefundResponse struct {

	// Information on errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The requested `Refund`
	Refund *TerminalRefund `json:"refund,omitempty"`
}

GetTerminalRefundResponse get terminal refund response Example: {"refund":{"amount_money":{"amount":111,"currency":"CAD"},"app_id":"sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ","card":{"bin":"411111","card_brand":"INTERAC","card_type":"CREDIT","exp_month":1,"exp_year":2022,"fingerprint":"sq-1-B1fP9MNNmZgVVaPKRND6oDKYbz25S2cTvg9Mzwg3RMTK1zT1PiGRT-AE3nTA8vSmmw","last_4":"1111"},"created_at":"2020-09-29T15:21:46.771Z","deadline_duration":"PT5M","device_id":"f72dfb8e-4d65-4e56-aade-ec3fb8d33291","id":"009DP5HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY","location_id":"76C9W6K8CNNQ5","order_id":"kcuKDKreRaI4gF4TjmEgZjHk8Z7YY","payment_id":"5O5OvgkcNUhl7JBuINflcjKqUzXZY","reason":"Returning item","refund_id":"5O5OvgkcNUhl7JBuINflcjKqUzXZY_43Q4iGp7sNeATiWrUruA1EYeMRUXaddXXlDDJ1EQLvb","status":"COMPLETED","updated_at":"2020-09-29T15:21:48.675Z"}}

swagger:model GetTerminalRefundResponse

func (*GetTerminalRefundResponse) ContextValidate

func (m *GetTerminalRefundResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get terminal refund response based on the context it is used

func (*GetTerminalRefundResponse) MarshalBinary

func (m *GetTerminalRefundResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetTerminalRefundResponse) UnmarshalBinary

func (m *GetTerminalRefundResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetTerminalRefundResponse) Validate

func (m *GetTerminalRefundResponse) Validate(formats strfmt.Registry) error

Validate validates this get terminal refund response

type InlineTypes

type InlineTypes string

InlineTypes Object types to inline under their respective parent object in certain connect v2 responses

swagger:model InlineTypes

const (

	// InlineTypesINLINENONE captures enum value "INLINE_NONE"
	InlineTypesINLINENONE InlineTypes = "INLINE_NONE"

	// InlineTypesINLINEVARIATIONS captures enum value "INLINE_VARIATIONS"
	InlineTypesINLINEVARIATIONS InlineTypes = "INLINE_VARIATIONS"

	// InlineTypesINLINEALL captures enum value "INLINE_ALL"
	InlineTypesINLINEALL InlineTypes = "INLINE_ALL"
)

func (InlineTypes) ContextValidate

func (m InlineTypes) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this inline types based on context it is used

func (InlineTypes) Validate

func (m InlineTypes) Validate(formats strfmt.Registry) error

Validate validates this inline types

type InventoryAdjustment

type InventoryAdjustment struct {

	// The Square generated ID of the
	// `CatalogObject` being tracked.
	// Max Length: 100
	CatalogObjectID string `json:"catalog_object_id,omitempty"`

	// The `CatalogObjectType` of the
	// `CatalogObject` being tracked. Tracking is only
	// supported for the `ITEM_VARIATION` type.
	// Max Length: 14
	CatalogObjectType string `json:"catalog_object_type,omitempty"`

	// A read-only timestamp in RFC 3339 format that indicates when Square
	// received the adjustment.
	// Max Length: 34
	CreatedAt string `json:"created_at,omitempty"`

	// The Square ID of the `Employee` responsible for the
	// inventory adjustment.
	// Max Length: 100
	EmployeeID string `json:"employee_id,omitempty"`

	// The `InventoryState` of the related quantity
	// of items before the adjustment.
	// See [InventoryState](#type-inventorystate) for possible values
	FromState string `json:"from_state,omitempty"`

	// The read-only Square ID of the Square goods receipt that caused the
	// adjustment. Only relevant for state transitions from the Square for Retail
	// app.
	// Max Length: 100
	GoodsReceiptID string `json:"goods_receipt_id,omitempty"`

	// A unique ID generated by Square for the
	// `InventoryAdjustment`.
	// Max Length: 100
	ID string `json:"id,omitempty"`

	// The Square ID of the `Location` where the related
	// quantity of items are being tracked.
	// Max Length: 100
	LocationID string `json:"location_id,omitempty"`

	// A client-generated timestamp in RFC 3339 format that indicates when
	// the adjustment took place. For write actions, the `occurred_at`
	// timestamp cannot be older than 24 hours or in the future relative to the
	// time of the request.
	// Max Length: 34
	OccurredAt string `json:"occurred_at,omitempty"`

	// The read-only Square ID of the purchase order that caused the
	// adjustment. Only relevant for state transitions from the Square for Retail
	// app.
	// Max Length: 100
	PurchaseOrderID string `json:"purchase_order_id,omitempty"`

	// The number of items affected by the adjustment as a decimal string.
	// Can support up to 5 digits after the decimal point.
	// Max Length: 26
	Quantity string `json:"quantity,omitempty"`

	// An optional ID provided by the application to tie the
	// `InventoryAdjustment` to an external
	// system.
	// Max Length: 255
	ReferenceID string `json:"reference_id,omitempty"`

	// The read-only Square ID of the [Refund][#type-refund] that
	// caused the adjustment. Only relevant for refund-related state
	// transitions.
	// Max Length: 255
	RefundID string `json:"refund_id,omitempty"`

	// Read-only information about the application that caused the
	// inventory adjustment.
	Source *SourceApplication `json:"source,omitempty"`

	// The `InventoryState` of the related quantity
	// of items after the adjustment.
	// See [InventoryState](#type-inventorystate) for possible values
	ToState string `json:"to_state,omitempty"`

	// The read-only total price paid for goods associated with the
	// adjustment. Present if and only if `to_state` is `SOLD`. Always
	// non-negative.
	TotalPriceMoney *Money `json:"total_price_money,omitempty"`

	// The read-only Square ID of the [Transaction][#type-transaction] that
	// caused the adjustment. Only relevant for payment-related state
	// transitions.
	// Max Length: 255
	TransactionID string `json:"transaction_id,omitempty"`
}

InventoryAdjustment Represents a change in state or quantity of product inventory at a particular time and location.

swagger:model InventoryAdjustment

func (*InventoryAdjustment) ContextValidate

func (m *InventoryAdjustment) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this inventory adjustment based on the context it is used

func (*InventoryAdjustment) MarshalBinary

func (m *InventoryAdjustment) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*InventoryAdjustment) UnmarshalBinary

func (m *InventoryAdjustment) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*InventoryAdjustment) Validate

func (m *InventoryAdjustment) Validate(formats strfmt.Registry) error

Validate validates this inventory adjustment

type InventoryAlertType

type InventoryAlertType string

InventoryAlertType Indicates whether Square should alert the merchant when the inventory quantity of a CatalogItemVariation is low.

swagger:model InventoryAlertType

const (

	// InventoryAlertTypeNONE captures enum value "NONE"
	InventoryAlertTypeNONE InventoryAlertType = "NONE"

	// InventoryAlertTypeLOWQUANTITY captures enum value "LOW_QUANTITY"
	InventoryAlertTypeLOWQUANTITY InventoryAlertType = "LOW_QUANTITY"
)

func (InventoryAlertType) ContextValidate

func (m InventoryAlertType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this inventory alert type based on context it is used

func (InventoryAlertType) Validate

func (m InventoryAlertType) Validate(formats strfmt.Registry) error

Validate validates this inventory alert type

type InventoryChange

type InventoryChange struct {

	// Contains details about the inventory adjustment when `type` is
	// `ADJUSTMENT` and unset for all other types.
	Adjustment *InventoryAdjustment `json:"adjustment,omitempty"`

	// Contains details about the physical count when `type` is
	// `PHYSICAL_COUNT` and unset for all other types.
	PhysicalCount *InventoryPhysicalCount `json:"physical_count,omitempty"`

	// Contains details about the inventory transfer when `type` is
	// `TRANSFER` and unset for all other types.
	//
	// _Note:_ An `InventoryTransfer` object is read-only and can only be present in a
	// `RetrieveInventoryChangesResponse` and `BatchRetrieveInventoryChangesResponse` object.
	Transfer *InventoryTransfer `json:"transfer,omitempty"`

	// Indicates how the inventory change was applied. See
	// `InventoryChangeType` for all possible values.
	// See [InventoryChangeType](#type-inventorychangetype) for possible values
	Type string `json:"type,omitempty"`
}

InventoryChange Represents a single physical count, inventory, adjustment, or transfer that is part of the history of inventory changes for a particular `CatalogObject`.

swagger:model InventoryChange

func (*InventoryChange) ContextValidate

func (m *InventoryChange) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this inventory change based on the context it is used

func (*InventoryChange) MarshalBinary

func (m *InventoryChange) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*InventoryChange) UnmarshalBinary

func (m *InventoryChange) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*InventoryChange) Validate

func (m *InventoryChange) Validate(formats strfmt.Registry) error

Validate validates this inventory change

type InventoryChangeType

type InventoryChangeType string

InventoryChangeType Indicates how the inventory change was applied to a tracked quantity of items.

swagger:model InventoryChangeType

const (

	// InventoryChangeTypePHYSICALCOUNT captures enum value "PHYSICAL_COUNT"
	InventoryChangeTypePHYSICALCOUNT InventoryChangeType = "PHYSICAL_COUNT"

	// InventoryChangeTypeADJUSTMENT captures enum value "ADJUSTMENT"
	InventoryChangeTypeADJUSTMENT InventoryChangeType = "ADJUSTMENT"

	// InventoryChangeTypeTRANSFER captures enum value "TRANSFER"
	InventoryChangeTypeTRANSFER InventoryChangeType = "TRANSFER"
)

func (InventoryChangeType) ContextValidate

func (m InventoryChangeType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this inventory change type based on context it is used

func (InventoryChangeType) Validate

func (m InventoryChangeType) Validate(formats strfmt.Registry) error

Validate validates this inventory change type

type InventoryCount

type InventoryCount struct {

	// A read-only timestamp in RFC 3339 format that indicates when Square
	// received the most recent physical count or adjustment that had an affect
	// on the estimated count.
	// Max Length: 34
	CalculatedAt string `json:"calculated_at,omitempty"`

	// The Square generated ID of the
	// `CatalogObject` being tracked.
	// Max Length: 100
	CatalogObjectID string `json:"catalog_object_id,omitempty"`

	// The `CatalogObjectType` of the
	// `CatalogObject` being tracked. Tracking is only
	// supported for the `ITEM_VARIATION` type.
	// Max Length: 14
	CatalogObjectType string `json:"catalog_object_type,omitempty"`

	// The Square ID of the `Location` where the related
	// quantity of items are being tracked.
	// Max Length: 100
	LocationID string `json:"location_id,omitempty"`

	// The number of items affected by the estimated count as a decimal string.
	// Can support up to 5 digits after the decimal point.
	// Max Length: 26
	Quantity string `json:"quantity,omitempty"`

	// The current `InventoryState` for the related
	// quantity of items.
	// See [InventoryState](#type-inventorystate) for possible values
	State string `json:"state,omitempty"`
}

InventoryCount Represents Square's estimated quantity of items in a particular state at a particular location based on the known history of physical counts and inventory adjustments.

swagger:model InventoryCount

func (*InventoryCount) ContextValidate

func (m *InventoryCount) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this inventory count based on context it is used

func (*InventoryCount) MarshalBinary

func (m *InventoryCount) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*InventoryCount) UnmarshalBinary

func (m *InventoryCount) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*InventoryCount) Validate

func (m *InventoryCount) Validate(formats strfmt.Registry) error

Validate validates this inventory count

type InventoryPhysicalCount

type InventoryPhysicalCount struct {

	// The Square generated ID of the
	// `CatalogObject` being tracked.
	// Max Length: 100
	CatalogObjectID string `json:"catalog_object_id,omitempty"`

	// The `CatalogObjectType` of the
	// `CatalogObject` being tracked. Tracking is only
	// supported for the `ITEM_VARIATION` type.
	// Max Length: 14
	CatalogObjectType string `json:"catalog_object_type,omitempty"`

	// A read-only timestamp in RFC 3339 format that indicates when Square
	// received the physical count.
	// Max Length: 34
	CreatedAt string `json:"created_at,omitempty"`

	// The Square ID of the `Employee` responsible for the
	// physical count.
	// Max Length: 100
	EmployeeID string `json:"employee_id,omitempty"`

	// A unique ID generated by Square for the
	// `InventoryPhysicalCount`.
	// Max Length: 100
	ID string `json:"id,omitempty"`

	// The Square ID of the `Location` where the related
	// quantity of items are being tracked.
	// Max Length: 100
	LocationID string `json:"location_id,omitempty"`

	// A client-generated timestamp in RFC 3339 format that indicates when
	// the physical count took place. For write actions, the `occurred_at`
	// timestamp cannot be older than 24 hours or in the future relative to the
	// time of the request.
	// Max Length: 34
	OccurredAt string `json:"occurred_at,omitempty"`

	// The number of items affected by the physical count as a decimal string.
	// Can support up to 5 digits after the decimal point.
	// Max Length: 26
	Quantity string `json:"quantity,omitempty"`

	// An optional ID provided by the application to tie the
	// `InventoryPhysicalCount` to an external
	// system.
	// Max Length: 255
	ReferenceID string `json:"reference_id,omitempty"`

	// Read-only information about the application that submitted the
	// physical count.
	Source *SourceApplication `json:"source,omitempty"`

	// The current `InventoryState` for the related
	// quantity of items.
	// See [InventoryState](#type-inventorystate) for possible values
	State string `json:"state,omitempty"`
}

InventoryPhysicalCount Represents the quantity of an item variation that is physically present at a specific location, verified by a seller or a seller's employee. For example, a physical count might come from an employee counting the item variations on hand or from syncing with an external system.

swagger:model InventoryPhysicalCount

func (*InventoryPhysicalCount) ContextValidate

func (m *InventoryPhysicalCount) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this inventory physical count based on the context it is used

func (*InventoryPhysicalCount) MarshalBinary

func (m *InventoryPhysicalCount) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*InventoryPhysicalCount) UnmarshalBinary

func (m *InventoryPhysicalCount) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*InventoryPhysicalCount) Validate

func (m *InventoryPhysicalCount) Validate(formats strfmt.Registry) error

Validate validates this inventory physical count

type InventoryState

type InventoryState string

InventoryState Indicates the state of a tracked item quantity in the lifecycle of goods.

swagger:model InventoryState

const (

	// InventoryStateCUSTOM captures enum value "CUSTOM"
	InventoryStateCUSTOM InventoryState = "CUSTOM"

	// InventoryStateINSTOCK captures enum value "IN_STOCK"
	InventoryStateINSTOCK InventoryState = "IN_STOCK"

	// InventoryStateSOLD captures enum value "SOLD"
	InventoryStateSOLD InventoryState = "SOLD"

	// InventoryStateRETURNEDBYCUSTOMER captures enum value "RETURNED_BY_CUSTOMER"
	InventoryStateRETURNEDBYCUSTOMER InventoryState = "RETURNED_BY_CUSTOMER"

	// InventoryStateRESERVEDFORSALE captures enum value "RESERVED_FOR_SALE"
	InventoryStateRESERVEDFORSALE InventoryState = "RESERVED_FOR_SALE"

	// InventoryStateSOLDONLINE captures enum value "SOLD_ONLINE"
	InventoryStateSOLDONLINE InventoryState = "SOLD_ONLINE"

	// InventoryStateORDEREDFROMVENDOR captures enum value "ORDERED_FROM_VENDOR"
	InventoryStateORDEREDFROMVENDOR InventoryState = "ORDERED_FROM_VENDOR"

	// InventoryStateRECEIVEDFROMVENDOR captures enum value "RECEIVED_FROM_VENDOR"
	InventoryStateRECEIVEDFROMVENDOR InventoryState = "RECEIVED_FROM_VENDOR"

	// InventoryStateINTRANSITTO captures enum value "IN_TRANSIT_TO"
	InventoryStateINTRANSITTO InventoryState = "IN_TRANSIT_TO"

	// InventoryStateNONE captures enum value "NONE"
	InventoryStateNONE InventoryState = "NONE"

	// InventoryStateWASTE captures enum value "WASTE"
	InventoryStateWASTE InventoryState = "WASTE"

	// InventoryStateUNLINKEDRETURN captures enum value "UNLINKED_RETURN"
	InventoryStateUNLINKEDRETURN InventoryState = "UNLINKED_RETURN"
)

func (InventoryState) ContextValidate

func (m InventoryState) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this inventory state based on context it is used

func (InventoryState) Validate

func (m InventoryState) Validate(formats strfmt.Registry) error

Validate validates this inventory state

type InventoryTransfer

type InventoryTransfer struct {

	// The Square generated ID of the
	// `CatalogObject` being tracked.
	// Max Length: 100
	CatalogObjectID string `json:"catalog_object_id,omitempty"`

	// The `CatalogObjectType` of the
	// `CatalogObject` being tracked.Tracking is only
	// supported for the `ITEM_VARIATION` type.
	// Max Length: 14
	CatalogObjectType string `json:"catalog_object_type,omitempty"`

	// A read-only timestamp in RFC 3339 format that indicates when Square
	// received the transfer request.
	// Max Length: 34
	CreatedAt string `json:"created_at,omitempty"`

	// The Square ID of the `Employee` responsible for the
	// inventory transfer.
	// Max Length: 100
	EmployeeID string `json:"employee_id,omitempty"`

	// The Square ID of the `Location` where the related
	// quantity of items were tracked before the transfer.
	// Max Length: 100
	FromLocationID string `json:"from_location_id,omitempty"`

	// A unique ID generated by Square for the
	// `InventoryTransfer`.
	// Max Length: 100
	ID string `json:"id,omitempty"`

	// A client-generated timestamp in RFC 3339 format that indicates when
	// the transfer took place. For write actions, the `occurred_at` timestamp
	// cannot be older than 24 hours or in the future relative to the time of the
	// request.
	// Max Length: 34
	OccurredAt string `json:"occurred_at,omitempty"`

	// The number of items affected by the transfer as a decimal string.
	// Can support up to 5 digits after the decimal point.
	// Max Length: 26
	Quantity string `json:"quantity,omitempty"`

	// An optional ID provided by the application to tie the
	// `InventoryTransfer` to an external system.
	// Max Length: 255
	ReferenceID string `json:"reference_id,omitempty"`

	// Read-only information about the application that initiated the
	// inventory transfer.
	Source *SourceApplication `json:"source,omitempty"`

	// The `InventoryState` for the quantity of
	// items being transferred.
	// See [InventoryState](#type-inventorystate) for possible values
	State string `json:"state,omitempty"`

	// The Square ID of the `Location` where the related
	// quantity of items were tracked after the transfer.
	// Max Length: 100
	ToLocationID string `json:"to_location_id,omitempty"`
}

InventoryTransfer Represents the transfer of a quantity of product inventory at a particular time from one location to another.

swagger:model InventoryTransfer

func (*InventoryTransfer) ContextValidate

func (m *InventoryTransfer) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this inventory transfer based on the context it is used

func (*InventoryTransfer) MarshalBinary

func (m *InventoryTransfer) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*InventoryTransfer) UnmarshalBinary

func (m *InventoryTransfer) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*InventoryTransfer) Validate

func (m *InventoryTransfer) Validate(formats strfmt.Registry) error

Validate validates this inventory transfer

type Invoice

type Invoice struct {

	// The timestamp when the invoice was created, in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// Additional seller-defined fields to render on the invoice. These fields are visible to sellers and buyers
	// on the Square-hosted invoice page and in emailed or PDF copies of invoices. For more information, see
	// [Custom fields](https://developer.squareup.com/docs/docs/invoices-api/overview#custom-fields).
	//
	// Max: 2 custom fields
	CustomFields []*InvoiceCustomField `json:"custom_fields"`

	// The delivery method that Square uses to send the invoice, reminders, and receipts to
	// the customer. After the invoice is published, Square processes the invoice based on the delivery
	// method and payment request settings, either immediately or at the `scheduled_at` date, if specified.
	// For example, Square might send the invoice or receipt for an automatic payment. For invoices with automatic payments, this field must be set to `EMAIL`.
	//
	// One of the following is required when creating an invoice:
	// - (Recommended) This `delivery_method` field. To configure an automatic payment, the `automatic_payment_source` field of the payment request is also required.
	// - The deprecated `request_method` field of the payment request. Note that `invoice` objects returned in responses do not include `request_method`.
	DeliveryMethod InvoiceDeliveryMethod `json:"delivery_method,omitempty"`

	// The description of the invoice. This is visible to the customer receiving the invoice.
	// Max Length: 65536
	// Min Length: 1
	Description string `json:"description,omitempty"`

	// The Square-assigned ID of the invoice.
	ID string `json:"id,omitempty"`

	// A user-friendly invoice number. The value is unique within a location.
	// If not provided when creating an invoice, Square assigns a value.
	// It increments from 1 and padded with zeros making it 7 characters long
	// for example, 0000001, 0000002.
	// Max Length: 191
	// Min Length: 1
	InvoiceNumber string `json:"invoice_number,omitempty"`

	// The ID of the location that this invoice is associated with.
	// This field is required when creating an invoice.
	// Max Length: 255
	// Min Length: 1
	LocationID string `json:"location_id,omitempty"`

	// The current amount due for the invoice. In addition to the
	// amount due on the next payment request, this also includes any overdue payment amounts.
	NextPaymentAmountMoney *Money `json:"next_payment_amount_money,omitempty"`

	// The ID of the `order` for which the invoice is created.
	//
	// This order must be in the `OPEN` state and must belong to the `location_id`
	// specified for this invoice. This field is required when creating an invoice.
	// Max Length: 255
	// Min Length: 1
	OrderID string `json:"order_id,omitempty"`

	// The payment schedule for the invoice, represented by one or more payment requests that
	// define payment settings, such as amount due and due date. You can specify a maximum of 13
	// payment requests, with up to 12 `INSTALLMENT` request types. For more information, see
	// [Payment requests](https://developer.squareup.com/docs/docs/invoices-api/overview#payment-requests).
	//
	// This field is required when creating an invoice. It must contain at least one payment request.
	PaymentRequests []*InvoicePaymentRequest `json:"payment_requests"`

	// The customer who gets the invoice. Square uses the contact information
	// to deliver the invoice. This field is required to publish an invoice.
	PrimaryRecipient *InvoiceRecipient `json:"primary_recipient,omitempty"`

	// The URL of the Square-hosted invoice page.
	// After you publish the invoice using the `PublishInvoice` endpoint, Square hosts the invoice
	// page and returns the page URL in the response.
	PublicURL string `json:"public_url,omitempty"`

	// The timestamp when the invoice is scheduled for processing, in RFC 3339 format.
	// After the invoice is published, Square processes the invoice on the specified date, according to the delivery method and payment request settings.
	//
	// If the field is not set, Square processes the invoice immediately after it is published.
	ScheduledAt string `json:"scheduled_at,omitempty"`

	// The status of the invoice.
	// See [InvoiceStatus](#type-invoicestatus) for possible values
	Status string `json:"status,omitempty"`

	// The time zone of the date values (for example, `due_date`) specified in the invoice.
	Timezone string `json:"timezone,omitempty"`

	// The title of the invoice.
	// Max Length: 255
	// Min Length: 1
	Title string `json:"title,omitempty"`

	// The timestamp when the invoice was last updated, in RFC 3339 format.
	UpdatedAt string `json:"updated_at,omitempty"`

	// The Square-assigned version number, which is incremented each time an update is committed to the invoice.
	Version int64 `json:"version,omitempty"`
}

Invoice Stores information about an invoice. You use the Invoices API to create and manage invoices. For more information, see [Manage Invoices Using the Invoices API](/docs/invoices-api/overview).

swagger:model Invoice

func (*Invoice) ContextValidate

func (m *Invoice) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this invoice based on the context it is used

func (*Invoice) MarshalBinary

func (m *Invoice) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Invoice) UnmarshalBinary

func (m *Invoice) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Invoice) Validate

func (m *Invoice) Validate(formats strfmt.Registry) error

Validate validates this invoice

type InvoiceAutomaticPaymentSource

type InvoiceAutomaticPaymentSource string

InvoiceAutomaticPaymentSource Indicates the automatic payment method for an `invoice payment request`.

swagger:model InvoiceAutomaticPaymentSource

const (

	// InvoiceAutomaticPaymentSourceNONE captures enum value "NONE"
	InvoiceAutomaticPaymentSourceNONE InvoiceAutomaticPaymentSource = "NONE"

	// InvoiceAutomaticPaymentSourceCARDONFILE captures enum value "CARD_ON_FILE"
	InvoiceAutomaticPaymentSourceCARDONFILE InvoiceAutomaticPaymentSource = "CARD_ON_FILE"

	// InvoiceAutomaticPaymentSourceBANKONFILE captures enum value "BANK_ON_FILE"
	InvoiceAutomaticPaymentSourceBANKONFILE InvoiceAutomaticPaymentSource = "BANK_ON_FILE"
)

func (InvoiceAutomaticPaymentSource) ContextValidate

func (m InvoiceAutomaticPaymentSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this invoice automatic payment source based on context it is used

func (InvoiceAutomaticPaymentSource) Validate

func (m InvoiceAutomaticPaymentSource) Validate(formats strfmt.Registry) error

Validate validates this invoice automatic payment source

type InvoiceCustomField

type InvoiceCustomField struct {

	// The label or title of the custom field. This field is required for a custom field.
	// Max Length: 30
	Label string `json:"label,omitempty"`

	// The location of the custom field on the invoice. This field is required for a custom field.
	// See [InvoiceCustomFieldPlacement](#type-invoicecustomfieldplacement) for possible values
	Placement string `json:"placement,omitempty"`

	// The text of the custom field. If omitted, only the label is rendered.
	// Max Length: 2000
	Value string `json:"value,omitempty"`
}

InvoiceCustomField An additional seller-defined and customer-facing field to include on the invoice. For more information, see [Custom fields](/docs/invoices-api/overview#custom-fields).

swagger:model InvoiceCustomField

func (*InvoiceCustomField) ContextValidate

func (m *InvoiceCustomField) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this invoice custom field based on context it is used

func (*InvoiceCustomField) MarshalBinary

func (m *InvoiceCustomField) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*InvoiceCustomField) UnmarshalBinary

func (m *InvoiceCustomField) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*InvoiceCustomField) Validate

func (m *InvoiceCustomField) Validate(formats strfmt.Registry) error

Validate validates this invoice custom field

type InvoiceCustomFieldPlacement

type InvoiceCustomFieldPlacement string

InvoiceCustomFieldPlacement Indicates where to render a custom field on the Square-hosted invoice page and in emailed or PDF copies of the invoice.

swagger:model InvoiceCustomFieldPlacement

const (

	// InvoiceCustomFieldPlacementABOVELINEITEMS captures enum value "ABOVE_LINE_ITEMS"
	InvoiceCustomFieldPlacementABOVELINEITEMS InvoiceCustomFieldPlacement = "ABOVE_LINE_ITEMS"

	// InvoiceCustomFieldPlacementBELOWLINEITEMS captures enum value "BELOW_LINE_ITEMS"
	InvoiceCustomFieldPlacementBELOWLINEITEMS InvoiceCustomFieldPlacement = "BELOW_LINE_ITEMS"
)

func (InvoiceCustomFieldPlacement) ContextValidate

func (m InvoiceCustomFieldPlacement) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this invoice custom field placement based on context it is used

func (InvoiceCustomFieldPlacement) Validate

func (m InvoiceCustomFieldPlacement) Validate(formats strfmt.Registry) error

Validate validates this invoice custom field placement

type InvoiceDeliveryMethod

type InvoiceDeliveryMethod string

InvoiceDeliveryMethod Indicates how Square delivers the `invoice` to the customer.

swagger:model InvoiceDeliveryMethod

const (

	// InvoiceDeliveryMethodEMAIL captures enum value "EMAIL"
	InvoiceDeliveryMethodEMAIL InvoiceDeliveryMethod = "EMAIL"

	// InvoiceDeliveryMethodSHAREMANUALLY captures enum value "SHARE_MANUALLY"
	InvoiceDeliveryMethodSHAREMANUALLY InvoiceDeliveryMethod = "SHARE_MANUALLY"
)

func (InvoiceDeliveryMethod) ContextValidate

func (m InvoiceDeliveryMethod) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this invoice delivery method based on context it is used

func (InvoiceDeliveryMethod) Validate

func (m InvoiceDeliveryMethod) Validate(formats strfmt.Registry) error

Validate validates this invoice delivery method

type InvoiceFilter

type InvoiceFilter struct {

	// Limits the search to the specified customers, within the specified locations.
	// Specifying a customer is optional. In the current implementation,
	// a maximum of one customer can be specified.
	CustomerIds []string `json:"customer_ids"`

	// Limits the search to the specified locations. A location is required.
	// In the current implementation, only one location can be specified.
	// Required: true
	LocationIds []string `json:"location_ids"`
}

InvoiceFilter Describes query filters to apply.

swagger:model InvoiceFilter

func (*InvoiceFilter) ContextValidate

func (m *InvoiceFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this invoice filter based on context it is used

func (*InvoiceFilter) MarshalBinary

func (m *InvoiceFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*InvoiceFilter) UnmarshalBinary

func (m *InvoiceFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*InvoiceFilter) Validate

func (m *InvoiceFilter) Validate(formats strfmt.Registry) error

Validate validates this invoice filter

type InvoicePaymentReminder

type InvoicePaymentReminder struct {

	// The reminder message.
	// Max Length: 1000
	// Min Length: 1
	Message string `json:"message,omitempty"`

	// The number of days before (a negative number) or after (a positive number)
	// the payment request `due_date` when the reminder is sent. For example, -3 indicates that
	// the reminder should be sent 3 days before the payment request `due_date`.
	// Maximum: 32767
	// Minimum: -32767
	RelativeScheduledDays *int64 `json:"relative_scheduled_days,omitempty"`

	// If sent, the timestamp when the reminder was sent, in RFC 3339 format.
	SentAt string `json:"sent_at,omitempty"`

	// The status of the reminder.
	// See [InvoicePaymentReminderStatus](#type-invoicepaymentreminderstatus) for possible values
	Status string `json:"status,omitempty"`

	// A Square-assigned ID that uniquely identifies the reminder within the
	// `InvoicePaymentRequest`.
	UID string `json:"uid,omitempty"`
}

InvoicePaymentReminder Describes a payment request reminder (automatic notification) that Square sends to the customer. You configure a reminder relative to the payment request `due_date`.

swagger:model InvoicePaymentReminder

func (*InvoicePaymentReminder) ContextValidate

func (m *InvoicePaymentReminder) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this invoice payment reminder based on context it is used

func (*InvoicePaymentReminder) MarshalBinary

func (m *InvoicePaymentReminder) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*InvoicePaymentReminder) UnmarshalBinary

func (m *InvoicePaymentReminder) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*InvoicePaymentReminder) Validate

func (m *InvoicePaymentReminder) Validate(formats strfmt.Registry) error

Validate validates this invoice payment reminder

type InvoicePaymentReminderStatus

type InvoicePaymentReminderStatus string

InvoicePaymentReminderStatus The status of a payment request reminder.

swagger:model InvoicePaymentReminderStatus

const (

	// InvoicePaymentReminderStatusPENDING captures enum value "PENDING"
	InvoicePaymentReminderStatusPENDING InvoicePaymentReminderStatus = "PENDING"

	// InvoicePaymentReminderStatusNOTAPPLICABLE captures enum value "NOT_APPLICABLE"
	InvoicePaymentReminderStatusNOTAPPLICABLE InvoicePaymentReminderStatus = "NOT_APPLICABLE"

	// InvoicePaymentReminderStatusSENT captures enum value "SENT"
	InvoicePaymentReminderStatusSENT InvoicePaymentReminderStatus = "SENT"
)

func (InvoicePaymentReminderStatus) ContextValidate

func (m InvoicePaymentReminderStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this invoice payment reminder status based on context it is used

func (InvoicePaymentReminderStatus) Validate

func (m InvoicePaymentReminderStatus) Validate(formats strfmt.Registry) error

Validate validates this invoice payment reminder status

type InvoicePaymentRequest

type InvoicePaymentRequest struct {

	// The payment method for an automatic payment.
	//
	// The default value is `NONE`.
	// See [InvoiceAutomaticPaymentSource](#type-invoiceautomaticpaymentsource) for possible values
	AutomaticPaymentSource string `json:"automatic_payment_source,omitempty"`

	// The ID of the card on file to charge for the payment request. To get the customer’s card on file,
	// use the `customer_id` of the invoice recipient to call `RetrieveCustomer`
	// in the Customers API. Then, get the ID of the target card from the `cards` field in the response.
	// Max Length: 255
	// Min Length: 1
	CardID string `json:"card_id,omitempty"`

	// The amount of the payment request, computed using the order amount and information from the various payment request fields (`request_type`,
	// `fixed_amount_requested_money`, and `percentage_requested`).
	ComputedAmountMoney *Money `json:"computed_amount_money,omitempty"`

	// The due date (in the invoice location's time zone) for the payment request, in `YYYY-MM-DD` format.
	// After this date, the invoice becomes overdue. This field is required to create a payment request.
	DueDate string `json:"due_date,omitempty"`

	// If the payment request specifies `DEPOSIT` or `INSTALLMENT` as the
	// `request_type`,
	// this indicates the request amount.
	// You cannot specify this when `request_type` is `BALANCE` or when the
	// payment request includes the `percentage_requested` field.
	FixedAmountRequestedMoney *Money `json:"fixed_amount_requested_money,omitempty"`

	// Specifies the amount for the payment request in percentage:
	//
	// - When the payment `request_type` is `DEPOSIT`, it is the percentage of the order total amount.
	// - When the payment `request_type` is `INSTALLMENT`, it is the percentage of the order total less
	// the deposit, if requested. The sum of the `percentage_requested` in all installment
	// payment requests must be equal to 100.
	//
	// You cannot specify this when the payment `request_type` is `BALANCE` or when the
	// payment request specifies the `fixed_amount_requested_money` field.
	PercentageRequested string `json:"percentage_requested,omitempty"`

	// A list of one or more reminders to send for the payment request.
	Reminders []*InvoicePaymentReminder `json:"reminders"`

	// Indicates how Square processes the payment request. DEPRECATED at version 2021-01-21. Replaced by the `Invoice.delivery_method` and `InvoicePaymentRequest.automatic_payment_source` fields.
	//
	// One of the following is required when creating an invoice:
	// - (Recommended) The `delivery_method` field of the invoice. To configure an automatic payment, the `automatic_payment_source` field of the payment request is also required.
	// - This `request_method` field. Note that `invoice` objects returned in responses do not include `request_method`.
	// See [InvoiceRequestMethod](#type-invoicerequestmethod) for possible values
	RequestMethod string `json:"request_method,omitempty"`

	// Identifies the payment request type. This type defines how the payment request amount is determined. This field is required to create a payment request.
	// See [InvoiceRequestType](#type-invoicerequesttype) for possible values
	RequestType string `json:"request_type,omitempty"`

	// If the most recent payment was a cash payment
	// in a currency that rounds cash payments (such as, `CAD` or `AUD`) and the payment
	// is rounded from `computed_amount_money` in the payment request, then this
	// field specifies the rounding adjustment applied. This amount
	// might be negative.
	RoundingAdjustmentIncludedMoney *Money `json:"rounding_adjustment_included_money,omitempty"`

	// If set to true, the Square-hosted invoice page (the `public_url` field of the invoice)
	// provides a place for the customer to pay a tip.
	//
	// This field is allowed only on the final payment request
	// and the payment `request_type` must be `BALANCE` or `INSTALLMENT`.
	TippingEnabled bool `json:"tipping_enabled,omitempty"`

	// The amount of money already paid for the specific payment request.
	// This amount might include a rounding adjustment if the most recent invoice payment
	// was in cash in a currency that rounds cash payments (such as, `CAD` or `AUD`).
	TotalCompletedAmountMoney *Money `json:"total_completed_amount_money,omitempty"`

	// The Square-generated ID of the payment request in an `invoice`.
	// Max Length: 255
	// Min Length: 1
	UID string `json:"uid,omitempty"`
}

InvoicePaymentRequest Represents a payment request for an [invoice](#type-Invoice). Invoices can specify a maximum of 13 payment requests, with up to 12 `INSTALLMENT` request types.

For more information, see [Payment requests](/docs/invoices-api/overview#payment-requests).

swagger:model InvoicePaymentRequest

func (*InvoicePaymentRequest) ContextValidate

func (m *InvoicePaymentRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this invoice payment request based on the context it is used

func (*InvoicePaymentRequest) MarshalBinary

func (m *InvoicePaymentRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*InvoicePaymentRequest) UnmarshalBinary

func (m *InvoicePaymentRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*InvoicePaymentRequest) Validate

func (m *InvoicePaymentRequest) Validate(formats strfmt.Registry) error

Validate validates this invoice payment request

type InvoiceQuery

type InvoiceQuery struct {

	// Query filters to apply in  searching invoices.
	// For more information, see [Retrieve invoices](https://developer.squareup.com/docs/docs/invoices-api/overview#retrieve-invoices).
	// Required: true
	Filter *InvoiceFilter `json:"filter"`

	// Describes the sort order for the search result.
	Sort *InvoiceSort `json:"sort,omitempty"`
}

InvoiceQuery Describes query criteria for searching invoices.

swagger:model InvoiceQuery

func (*InvoiceQuery) ContextValidate

func (m *InvoiceQuery) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this invoice query based on the context it is used

func (*InvoiceQuery) MarshalBinary

func (m *InvoiceQuery) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*InvoiceQuery) UnmarshalBinary

func (m *InvoiceQuery) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*InvoiceQuery) Validate

func (m *InvoiceQuery) Validate(formats strfmt.Registry) error

Validate validates this invoice query

type InvoiceRecipient

type InvoiceRecipient struct {

	// The recipient's physical address.
	Address *Address `json:"address,omitempty"`

	// The name of the recipient's company.
	CompanyName string `json:"company_name,omitempty"`

	// The ID of the customer. This is the customer profile ID that
	// you provide when creating a draft invoice.
	// Max Length: 255
	// Min Length: 1
	CustomerID string `json:"customer_id,omitempty"`

	// The recipient's email address.
	EmailAddress string `json:"email_address,omitempty"`

	// The recipient's family (that is, last) name.
	FamilyName string `json:"family_name,omitempty"`

	// The recipient's given (that is, first) name.
	GivenName string `json:"given_name,omitempty"`

	// The recipient's phone number.
	PhoneNumber string `json:"phone_number,omitempty"`
}

InvoiceRecipient Provides customer data that Square uses to deliver an invoice.

swagger:model InvoiceRecipient

func (*InvoiceRecipient) ContextValidate

func (m *InvoiceRecipient) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this invoice recipient based on the context it is used

func (*InvoiceRecipient) MarshalBinary

func (m *InvoiceRecipient) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*InvoiceRecipient) UnmarshalBinary

func (m *InvoiceRecipient) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*InvoiceRecipient) Validate

func (m *InvoiceRecipient) Validate(formats strfmt.Registry) error

Validate validates this invoice recipient

type InvoiceRequestMethod

type InvoiceRequestMethod string

InvoiceRequestMethod Specifies the action for Square to take for processing the invoice. For example, email the invoice, charge a customer's card on file, or do nothing. DEPRECATED at version 2021-01-21. The corresponding `request_method` field is replaced by the `Invoice.delivery_method` and `InvoicePaymentRequest.automatic_payment_source` fields.

swagger:model InvoiceRequestMethod

const (

	// InvoiceRequestMethodEMAIL captures enum value "EMAIL"
	InvoiceRequestMethodEMAIL InvoiceRequestMethod = "EMAIL"

	// InvoiceRequestMethodCHARGECARDONFILE captures enum value "CHARGE_CARD_ON_FILE"
	InvoiceRequestMethodCHARGECARDONFILE InvoiceRequestMethod = "CHARGE_CARD_ON_FILE"

	// InvoiceRequestMethodSHAREMANUALLY captures enum value "SHARE_MANUALLY"
	InvoiceRequestMethodSHAREMANUALLY InvoiceRequestMethod = "SHARE_MANUALLY"

	// InvoiceRequestMethodCHARGEBANKONFILE captures enum value "CHARGE_BANK_ON_FILE"
	InvoiceRequestMethodCHARGEBANKONFILE InvoiceRequestMethod = "CHARGE_BANK_ON_FILE"
)

func (InvoiceRequestMethod) ContextValidate

func (m InvoiceRequestMethod) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this invoice request method based on context it is used

func (InvoiceRequestMethod) Validate

func (m InvoiceRequestMethod) Validate(formats strfmt.Registry) error

Validate validates this invoice request method

type InvoiceRequestType

type InvoiceRequestType string

InvoiceRequestType Indicates the type of the payment request. An invoice supports the following payment request combinations: - 1 balance - 1 deposit with 1 balance - 2 - 12 installments - 1 deposit with 2 - 12 installments

For more information, see [Payment requests](https://developer.squareup.com/docs/docs/invoices-api/overview#payment-requests).

swagger:model InvoiceRequestType

const (

	// InvoiceRequestTypeBALANCE captures enum value "BALANCE"
	InvoiceRequestTypeBALANCE InvoiceRequestType = "BALANCE"

	// InvoiceRequestTypeDEPOSIT captures enum value "DEPOSIT"
	InvoiceRequestTypeDEPOSIT InvoiceRequestType = "DEPOSIT"

	// InvoiceRequestTypeINSTALLMENT captures enum value "INSTALLMENT"
	InvoiceRequestTypeINSTALLMENT InvoiceRequestType = "INSTALLMENT"
)

func (InvoiceRequestType) ContextValidate

func (m InvoiceRequestType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this invoice request type based on context it is used

func (InvoiceRequestType) Validate

func (m InvoiceRequestType) Validate(formats strfmt.Registry) error

Validate validates this invoice request type

type InvoiceSort

type InvoiceSort struct {

	// The field to sort on.
	// See [InvoiceSortField](#type-invoicesortfield) for possible values
	// Required: true
	Field *string `json:"field"`

	// The order to use for sorting the results.
	// See [SortOrder](#type-sortorder) for possible values
	Order string `json:"order,omitempty"`
}

InvoiceSort Identifies the sort field and sort order.

swagger:model InvoiceSort

func (*InvoiceSort) ContextValidate

func (m *InvoiceSort) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this invoice sort based on context it is used

func (*InvoiceSort) MarshalBinary

func (m *InvoiceSort) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*InvoiceSort) UnmarshalBinary

func (m *InvoiceSort) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*InvoiceSort) Validate

func (m *InvoiceSort) Validate(formats strfmt.Registry) error

Validate validates this invoice sort

type InvoiceSortField

type InvoiceSortField string

InvoiceSortField Field to use for sorting.

swagger:model InvoiceSortField

const (

	// InvoiceSortFieldINVOICESORTDATE captures enum value "INVOICE_SORT_DATE"
	InvoiceSortFieldINVOICESORTDATE InvoiceSortField = "INVOICE_SORT_DATE"
)

func (InvoiceSortField) ContextValidate

func (m InvoiceSortField) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this invoice sort field based on context it is used

func (InvoiceSortField) Validate

func (m InvoiceSortField) Validate(formats strfmt.Registry) error

Validate validates this invoice sort field

type InvoiceStatus

type InvoiceStatus string

InvoiceStatus Indicates the status of an invoice.

swagger:model InvoiceStatus

const (

	// InvoiceStatusDRAFT captures enum value "DRAFT"
	InvoiceStatusDRAFT InvoiceStatus = "DRAFT"

	// InvoiceStatusUNPAID captures enum value "UNPAID"
	InvoiceStatusUNPAID InvoiceStatus = "UNPAID"

	// InvoiceStatusSCHEDULED captures enum value "SCHEDULED"
	InvoiceStatusSCHEDULED InvoiceStatus = "SCHEDULED"

	// InvoiceStatusPARTIALLYPAID captures enum value "PARTIALLY_PAID"
	InvoiceStatusPARTIALLYPAID InvoiceStatus = "PARTIALLY_PAID"

	// InvoiceStatusPAID captures enum value "PAID"
	InvoiceStatusPAID InvoiceStatus = "PAID"

	// InvoiceStatusPARTIALLYREFUNDED captures enum value "PARTIALLY_REFUNDED"
	InvoiceStatusPARTIALLYREFUNDED InvoiceStatus = "PARTIALLY_REFUNDED"

	// InvoiceStatusREFUNDED captures enum value "REFUNDED"
	InvoiceStatusREFUNDED InvoiceStatus = "REFUNDED"

	// InvoiceStatusCANCELED captures enum value "CANCELED"
	InvoiceStatusCANCELED InvoiceStatus = "CANCELED"

	// InvoiceStatusFAILED captures enum value "FAILED"
	InvoiceStatusFAILED InvoiceStatus = "FAILED"

	// InvoiceStatusPAYMENTPENDING captures enum value "PAYMENT_PENDING"
	InvoiceStatusPAYMENTPENDING InvoiceStatus = "PAYMENT_PENDING"
)

func (InvoiceStatus) ContextValidate

func (m InvoiceStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this invoice status based on context it is used

func (InvoiceStatus) Validate

func (m InvoiceStatus) Validate(formats strfmt.Registry) error

Validate validates this invoice status

type ItemVariationLocationOverrides

type ItemVariationLocationOverrides struct {

	// If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type`
	// is `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard.
	//
	// This value is always an integer.
	InventoryAlertThreshold int64 `json:"inventory_alert_threshold,omitempty"`

	// Indicates whether the `CatalogItemVariation` displays an alert when its inventory
	// quantity is less than or equal to its `inventory_alert_threshold`.
	// See [InventoryAlertType](#type-inventoryalerttype) for possible values
	InventoryAlertType string `json:"inventory_alert_type,omitempty"`

	// The ID of the `Location`.
	LocationID string `json:"location_id,omitempty"`

	// The price of the `CatalogItemVariation` at the given `Location`, or blank for variable pricing.
	PriceMoney *Money `json:"price_money,omitempty"`

	// The pricing type (fixed or variable) for the `CatalogItemVariation` at the given `Location`.
	// See [CatalogPricingType](#type-catalogpricingtype) for possible values
	PricingType string `json:"pricing_type,omitempty"`

	// If `true`, inventory tracking is active for the `CatalogItemVariation` at this `Location`.
	TrackInventory bool `json:"track_inventory,omitempty"`
}

ItemVariationLocationOverrides Price and inventory alerting overrides for a `CatalogItemVariation` at a specific `Location`.

swagger:model ItemVariationLocationOverrides

func (*ItemVariationLocationOverrides) ContextValidate

func (m *ItemVariationLocationOverrides) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this item variation location overrides based on the context it is used

func (*ItemVariationLocationOverrides) MarshalBinary

func (m *ItemVariationLocationOverrides) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ItemVariationLocationOverrides) UnmarshalBinary

func (m *ItemVariationLocationOverrides) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ItemVariationLocationOverrides) Validate

func (m *ItemVariationLocationOverrides) Validate(formats strfmt.Registry) error

Validate validates this item variation location overrides

type JobAssignment

type JobAssignment struct {

	// The total pay amount for a 12 month period on the job. Set if the job `PayType` is `SALARY`.
	AnnualRate *Money `json:"annual_rate,omitempty"`

	// The hourly pay rate of the job.
	HourlyRate *Money `json:"hourly_rate,omitempty"`

	// The title of the job.
	// Required: true
	// Min Length: 1
	JobTitle *string `json:"job_title"`

	// The current pay type for the job assignment used to
	// calculate the pay amount in a pay period.
	// See [JobAssignmentPayType](#type-jobassignmentpaytype) for possible values
	// Required: true
	PayType *string `json:"pay_type"`

	// The planned hours per week for the job. Set if the job `PayType` is `SALARY`.
	WeeklyHours int64 `json:"weekly_hours,omitempty"`
}

JobAssignment An object describing a job that a team member is assigned to.

swagger:model JobAssignment

func (*JobAssignment) ContextValidate

func (m *JobAssignment) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this job assignment based on the context it is used

func (*JobAssignment) MarshalBinary

func (m *JobAssignment) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*JobAssignment) UnmarshalBinary

func (m *JobAssignment) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*JobAssignment) Validate

func (m *JobAssignment) Validate(formats strfmt.Registry) error

Validate validates this job assignment

type JobAssignmentPayType

type JobAssignmentPayType string

JobAssignmentPayType Enumerates the possible pay types that a job can be assigned.

swagger:model JobAssignmentPayType

const (

	// JobAssignmentPayTypeNONE captures enum value "NONE"
	JobAssignmentPayTypeNONE JobAssignmentPayType = "NONE"

	// JobAssignmentPayTypeHOURLY captures enum value "HOURLY"
	JobAssignmentPayTypeHOURLY JobAssignmentPayType = "HOURLY"

	// JobAssignmentPayTypeSALARY captures enum value "SALARY"
	JobAssignmentPayTypeSALARY JobAssignmentPayType = "SALARY"
)

func (JobAssignmentPayType) ContextValidate

func (m JobAssignmentPayType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this job assignment pay type based on context it is used

func (JobAssignmentPayType) Validate

func (m JobAssignmentPayType) Validate(formats strfmt.Registry) error

Validate validates this job assignment pay type

type ListBankAccountsRequest

type ListBankAccountsRequest struct {

	// The pagination cursor returned by a previous call to this endpoint.
	// Use it in the next `ListBankAccounts` request to retrieve the next set
	// of results.
	//
	// See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information.
	Cursor string `json:"cursor,omitempty"`

	// Upper limit on the number of bank accounts to return in the response.
	// Currently, 1000 is the largest supported limit. You can specify a limit
	// of up to 1000 bank accounts. This is also the default limit.
	Limit int64 `json:"limit,omitempty"`

	// Location ID. You can specify this optional filter
	// to retrieve only the linked bank accounts belonging to a specific location.
	LocationID string `json:"location_id,omitempty"`
}

ListBankAccountsRequest Request object for fetching all `BankAccount` objects linked to a account.

swagger:model ListBankAccountsRequest

func (*ListBankAccountsRequest) ContextValidate

func (m *ListBankAccountsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list bank accounts request based on context it is used

func (*ListBankAccountsRequest) MarshalBinary

func (m *ListBankAccountsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListBankAccountsRequest) UnmarshalBinary

func (m *ListBankAccountsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListBankAccountsRequest) Validate

func (m *ListBankAccountsRequest) Validate(formats strfmt.Registry) error

Validate validates this list bank accounts request

type ListBankAccountsResponse

type ListBankAccountsResponse struct {

	// List of BankAccounts associated with this account.
	BankAccounts []*BankAccount `json:"bank_accounts"`

	// When a response is truncated, it includes a cursor that you can
	// use in a subsequent request to fetch next set of bank accounts.
	// If empty, this is the final response.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination).
	Cursor string `json:"cursor,omitempty"`

	// Information on errors encountered during the request.
	Errors []*Error `json:"errors"`
}

ListBankAccountsResponse Response object returned by ListBankAccounts. Example: {"bank_accounts":[{"account_number_suffix":"971","account_type":"CHECKING","bank_name":"Bank Name","country":"US","creditable":false,"currency":"USD","debitable":false,"holder_name":"Jane Doe","id":"ao6iaQ9vhDiaQD7n3GB","location_id":"S8GWD5example","primary_bank_identification_number":"112200303","status":"VERIFICATION_IN_PROGRESS","version":5},{"account_number_suffix":"972","account_type":"CHECKING","bank_name":"Bank Name","country":"US","creditable":false,"currency":"USD","debitable":false,"holder_name":"Jane Doe","id":"4x7WXuaxrkQkVlka3GB","location_id":"S8GWD5example","primary_bank_identification_number":"112200303","status":"VERIFICATION_IN_PROGRESS","version":5}]}

swagger:model ListBankAccountsResponse

func (*ListBankAccountsResponse) ContextValidate

func (m *ListBankAccountsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list bank accounts response based on the context it is used

func (*ListBankAccountsResponse) MarshalBinary

func (m *ListBankAccountsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListBankAccountsResponse) UnmarshalBinary

func (m *ListBankAccountsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListBankAccountsResponse) Validate

func (m *ListBankAccountsResponse) Validate(formats strfmt.Registry) error

Validate validates this list bank accounts response

type ListBreakTypesRequest

type ListBreakTypesRequest struct {

	// Pointer to the next page of Break Type results to fetch.
	Cursor string `json:"cursor,omitempty"`

	// Maximum number of Break Types to return per page. Can range between 1
	// and 200. The default is the maximum at 200.
	// Maximum: 200
	// Minimum: 1
	Limit int64 `json:"limit,omitempty"`

	// Filter Break Types returned to only those that are associated with the
	// specified location.
	LocationID string `json:"location_id,omitempty"`
}

ListBreakTypesRequest A request for a filtered set of `BreakType` objects Example: {"request_params":"?location_id=PAA1RJZZKXBFG\u0026limit=2\u0026cursor=s4R0Z6ecFTzTC4jz8sUDBQTudX3KE313OT9fCt3VUgsXM4sMgED"}

swagger:model ListBreakTypesRequest

func (*ListBreakTypesRequest) ContextValidate

func (m *ListBreakTypesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list break types request based on context it is used

func (*ListBreakTypesRequest) MarshalBinary

func (m *ListBreakTypesRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListBreakTypesRequest) UnmarshalBinary

func (m *ListBreakTypesRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListBreakTypesRequest) Validate

func (m *ListBreakTypesRequest) Validate(formats strfmt.Registry) error

Validate validates this list break types request

type ListBreakTypesResponse

type ListBreakTypesResponse struct {

	//  A page of `BreakType` results.
	BreakTypes []*BreakType `json:"break_types"`

	// Value supplied in the subsequent request to fetch the next next page
	// of Break Type results.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

ListBreakTypesResponse The response to a request for a set of `BreakTypes`. Contains the requested `BreakType` objects. May contain a set of `Error` objects if the request resulted in errors. Example: {"break_types":[{"break_name":"Coffee Break","created_at":"2019-01-22T20:47:37Z","expected_duration":"PT5M","id":"REGS1EQR1TPZ5","is_paid":false,"location_id":"PAA1RJZZKXBFG","updated_at":"2019-01-22T20:47:37Z","version":1},{"break_name":"Lunch Break","created_at":"2019-01-25T19:26:30Z","expected_duration":"PT1H","id":"92EPDRQKJ5088","is_paid":true,"location_id":"PAA1RJZZKXBFG","updated_at":"2019-01-25T19:26:30Z","version":3}],"cursor":"2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED"}

swagger:model ListBreakTypesResponse

func (*ListBreakTypesResponse) ContextValidate

func (m *ListBreakTypesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list break types response based on the context it is used

func (*ListBreakTypesResponse) MarshalBinary

func (m *ListBreakTypesResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListBreakTypesResponse) UnmarshalBinary

func (m *ListBreakTypesResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListBreakTypesResponse) Validate

func (m *ListBreakTypesResponse) Validate(formats strfmt.Registry) error

Validate validates this list break types response

type ListCashDrawerShiftEventsRequest

type ListCashDrawerShiftEventsRequest struct {

	// Opaque cursor for fetching the next page of results.
	Cursor string `json:"cursor,omitempty"`

	// Number of resources to be returned in a page of results (200 by
	// default, 1000 max).
	// Maximum: 1000
	Limit int64 `json:"limit,omitempty"`

	// The ID of the location to list cash drawer shifts for.
	// Required: true
	// Min Length: 1
	LocationID *string `json:"location_id"`
}

ListCashDrawerShiftEventsRequest list cash drawer shift events request Example: {"request_body":{}}

swagger:model ListCashDrawerShiftEventsRequest

func (*ListCashDrawerShiftEventsRequest) ContextValidate

func (m *ListCashDrawerShiftEventsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list cash drawer shift events request based on context it is used

func (*ListCashDrawerShiftEventsRequest) MarshalBinary

func (m *ListCashDrawerShiftEventsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListCashDrawerShiftEventsRequest) UnmarshalBinary

func (m *ListCashDrawerShiftEventsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListCashDrawerShiftEventsRequest) Validate

Validate validates this list cash drawer shift events request

type ListCashDrawerShiftEventsResponse

type ListCashDrawerShiftEventsResponse struct {

	// Opaque cursor for fetching the next page. Cursor is not present in
	// the last page of results.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// All of the events (payments, refunds, etc.) for a cash drawer during
	// the shift.
	Events []*CashDrawerShiftEvent `json:"events"`
}

ListCashDrawerShiftEventsResponse list cash drawer shift events response Example: {"events":[{"created_at":"2019-11-22T00:43:02.000Z","description":"","event_money":{"amount":100,"currency":"USD"},"event_type":"CASH_TENDER_PAYMENT","id":"9F07DB01-D85A-4B77-88C3-D5C64CEB5155"},{"created_at":"2019-11-22T00:43:12.000Z","description":"","event_money":{"amount":250,"currency":"USD"},"event_type":"CASH_TENDER_PAYMENT","id":"B2854CEA-A781-49B3-8F31-C64558231F48"},{"created_at":"2019-11-22T00:43:23.000Z","description":"","event_money":{"amount":250,"currency":"USD"},"event_type":"CASH_TENDER_CANCELLED_PAYMENT","id":"B5FB7F72-95CD-44A3-974D-26C41064D042"},{"created_at":"2019-11-22T00:43:46.000Z","description":"","event_money":{"amount":100,"currency":"USD"},"event_type":"CASH_TENDER_REFUND","id":"0B425480-8504-40B4-A867-37B23543931B"},{"created_at":"2019-11-22T00:44:18.000Z","description":"Transfer from another drawer","event_money":{"amount":10000,"currency":"USD"},"event_type":"PAID_IN","id":"8C66E60E-FDCF-4EEF-A98D-3B14B7ED5CBE"},{"created_at":"2019-11-22T00:44:29.000Z","description":"Transfer out to another drawer","event_money":{"amount":10000,"currency":"USD"},"event_type":"PAID_OUT","id":"D5ACA7FE-C64D-4ADA-8BC8-82118A2DAE4F"}]}

swagger:model ListCashDrawerShiftEventsResponse

func (*ListCashDrawerShiftEventsResponse) ContextValidate

func (m *ListCashDrawerShiftEventsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list cash drawer shift events response based on the context it is used

func (*ListCashDrawerShiftEventsResponse) MarshalBinary

func (m *ListCashDrawerShiftEventsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListCashDrawerShiftEventsResponse) UnmarshalBinary

func (m *ListCashDrawerShiftEventsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListCashDrawerShiftEventsResponse) Validate

Validate validates this list cash drawer shift events response

type ListCashDrawerShiftsRequest

type ListCashDrawerShiftsRequest struct {

	// The inclusive start time of the query on opened_at, in ISO 8601 format.
	BeginTime string `json:"begin_time,omitempty"`

	// Opaque cursor for fetching the next page of results.
	Cursor string `json:"cursor,omitempty"`

	// The exclusive end date of the query on opened_at, in ISO 8601 format.
	EndTime string `json:"end_time,omitempty"`

	// Number of cash drawer shift events in a page of results (200 by
	// default, 1000 max).
	// Maximum: 1000
	Limit int64 `json:"limit,omitempty"`

	// The ID of the location to query for a list of cash drawer shifts.
	// Required: true
	// Min Length: 1
	LocationID *string `json:"location_id"`

	// The order in which cash drawer shifts are listed in the response,
	// based on their opened_at field. Default value: ASC
	// See [SortOrder](#type-sortorder) for possible values
	SortOrder string `json:"sort_order,omitempty"`
}

ListCashDrawerShiftsRequest list cash drawer shifts request Example: {"request_body":{}}

swagger:model ListCashDrawerShiftsRequest

func (*ListCashDrawerShiftsRequest) ContextValidate

func (m *ListCashDrawerShiftsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list cash drawer shifts request based on context it is used

func (*ListCashDrawerShiftsRequest) MarshalBinary

func (m *ListCashDrawerShiftsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListCashDrawerShiftsRequest) UnmarshalBinary

func (m *ListCashDrawerShiftsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListCashDrawerShiftsRequest) Validate

func (m *ListCashDrawerShiftsRequest) Validate(formats strfmt.Registry) error

Validate validates this list cash drawer shifts request

type ListCashDrawerShiftsResponse

type ListCashDrawerShiftsResponse struct {

	// Opaque cursor for fetching the next page of results. Cursor is not
	// present in the last page of results.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// A collection of CashDrawerShiftSummary objects for shifts that match
	// the query.
	Items []*CashDrawerShiftSummary `json:"items"`
}

ListCashDrawerShiftsResponse list cash drawer shifts response Example: {"items":[{"closed_at":"2019-11-22T00:44:49.000Z","closed_cash_money":{"amount":9970,"currency":"USD"},"description":"Misplaced some change","ended_at":"2019-11-22T00:44:49.000Z","expected_cash_money":{"amount":10000,"currency":"USD"},"id":"DCC99978-09A6-4926-849F-300BE9C5793A","opened_at":"2019-11-22T00:42:54.000Z","opened_cash_money":{"amount":10000,"currency":"USD"},"state":"CLOSED"}]}

swagger:model ListCashDrawerShiftsResponse

func (*ListCashDrawerShiftsResponse) ContextValidate

func (m *ListCashDrawerShiftsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list cash drawer shifts response based on the context it is used

func (*ListCashDrawerShiftsResponse) MarshalBinary

func (m *ListCashDrawerShiftsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListCashDrawerShiftsResponse) UnmarshalBinary

func (m *ListCashDrawerShiftsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListCashDrawerShiftsResponse) Validate

func (m *ListCashDrawerShiftsResponse) Validate(formats strfmt.Registry) error

Validate validates this list cash drawer shifts response

type ListCatalogRequest

type ListCatalogRequest struct {

	// The specific version of the catalog objects to be included in the response.
	// This allows you to retrieve historical
	// versions of objects. The specified version value is matched against
	// the `CatalogObject`s' `version` attribute.
	CatalogVersion int64 `json:"catalog_version,omitempty"`

	// The pagination cursor returned in the previous response. Leave unset for an initial request.
	// See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`

	// An optional case-insensitive, comma-separated list of object types to retrieve, for example
	// `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`.
	//
	// The legal values are taken from the CatalogObjectType enum:
	// `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`,
	// `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`.
	Types string `json:"types,omitempty"`
}

ListCatalogRequest list catalog request Example: {"request_params":"?types=category,tax"}

swagger:model ListCatalogRequest

func (*ListCatalogRequest) ContextValidate

func (m *ListCatalogRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list catalog request based on context it is used

func (*ListCatalogRequest) MarshalBinary

func (m *ListCatalogRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListCatalogRequest) UnmarshalBinary

func (m *ListCatalogRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListCatalogRequest) Validate

func (m *ListCatalogRequest) Validate(formats strfmt.Registry) error

Validate validates this list catalog request

type ListCatalogResponse

type ListCatalogResponse struct {

	// The pagination cursor to be used in a subsequent request. If unset, this is the final response.
	// See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The CatalogObjects returned.
	Objects []*CatalogObject `json:"objects"`
}

ListCatalogResponse list catalog response Example: {"objects":[{"category_data":{"name":"Beverages"},"id":"5ZYQZZ2IECPVJ2IJ5KQPRDC3","is_deleted":false,"present_at_all_locations":true,"type":"CATEGORY","updated_at":"2017-02-21T14:50:26.495Z","version":1487688626495},{"id":"L5R47DGBZOOVKCAFIXC56AEN","is_deleted":false,"present_at_all_locations":true,"tax_data":{"calculation_phase":"TAX_SUBTOTAL_PHASE","enabled":true,"inclusion_type":"ADDITIVE","name":"Sales Tax","percentage":"5.0"},"type":"TAX","updated_at":"2017-02-21T14:50:26.495Z","version":1487688626495}]}

swagger:model ListCatalogResponse

func (*ListCatalogResponse) ContextValidate

func (m *ListCatalogResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list catalog response based on the context it is used

func (*ListCatalogResponse) MarshalBinary

func (m *ListCatalogResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListCatalogResponse) UnmarshalBinary

func (m *ListCatalogResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListCatalogResponse) Validate

func (m *ListCatalogResponse) Validate(formats strfmt.Registry) error

Validate validates this list catalog response

type ListCustomerGroupsRequest

type ListCustomerGroupsRequest struct {

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this to retrieve the next set of results for your original query.
	//
	// See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`
}

ListCustomerGroupsRequest Defines the query parameters that can be provided in a request to the [ListCustomerGroups](#endpoint-listcustomergroups) endpoint. Example: {"request_body":{}}

swagger:model ListCustomerGroupsRequest

func (*ListCustomerGroupsRequest) ContextValidate

func (m *ListCustomerGroupsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list customer groups request based on context it is used

func (*ListCustomerGroupsRequest) MarshalBinary

func (m *ListCustomerGroupsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListCustomerGroupsRequest) UnmarshalBinary

func (m *ListCustomerGroupsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListCustomerGroupsRequest) Validate

func (m *ListCustomerGroupsRequest) Validate(formats strfmt.Registry) error

Validate validates this list customer groups request

type ListCustomerGroupsResponse

type ListCustomerGroupsResponse struct {

	// A pagination cursor to retrieve the next set of results for your
	// original query to the endpoint. This value is present only if the request
	// succeeded and additional results are available.
	//
	// See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// A list of customer groups belonging to the current merchant.
	Groups []*CustomerGroup `json:"groups"`
}

ListCustomerGroupsResponse Defines the fields that are included in the response body of a request to the [ListCustomerGroups](#endpoint-listcustomergroups) endpoint.

One of `errors` or `groups` is present in a given response (never both). Example: {"groups":[{"created_at":"2020-04-13T21:54:57.863Z","id":"2TAT3CMH4Q0A9M87XJZED0WMR3","name":"Loyal Customers","updated_at":"2020-04-13T21:54:58Z"},{"created_at":"2020-04-13T21:55:18.795Z","id":"4XMEHESXJBNE9S9JAKZD2FGB14","name":"Super Loyal Customers","updated_at":"2020-04-13T21:55:19Z"}]}

swagger:model ListCustomerGroupsResponse

func (*ListCustomerGroupsResponse) ContextValidate

func (m *ListCustomerGroupsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list customer groups response based on the context it is used

func (*ListCustomerGroupsResponse) MarshalBinary

func (m *ListCustomerGroupsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListCustomerGroupsResponse) UnmarshalBinary

func (m *ListCustomerGroupsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListCustomerGroupsResponse) Validate

func (m *ListCustomerGroupsResponse) Validate(formats strfmt.Registry) error

Validate validates this list customer groups response

type ListCustomerSegmentsRequest

type ListCustomerSegmentsRequest struct {

	// A pagination cursor returned by previous calls to __ListCustomerSegments__.
	// Used to retrieve the next set of query results.
	//
	// See the [Pagination guide](https://developer.squareup.com/docs/docs/working-with-apis/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`
}

ListCustomerSegmentsRequest Defines the valid parameters for requests to __ListCustomerSegments__. Example: {"request_body":{}}

swagger:model ListCustomerSegmentsRequest

func (*ListCustomerSegmentsRequest) ContextValidate

func (m *ListCustomerSegmentsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list customer segments request based on context it is used

func (*ListCustomerSegmentsRequest) MarshalBinary

func (m *ListCustomerSegmentsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListCustomerSegmentsRequest) UnmarshalBinary

func (m *ListCustomerSegmentsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListCustomerSegmentsRequest) Validate

func (m *ListCustomerSegmentsRequest) Validate(formats strfmt.Registry) error

Validate validates this list customer segments request

type ListCustomerSegmentsResponse

type ListCustomerSegmentsResponse struct {

	// A pagination cursor to be used in subsequent calls to __ListCustomerSegments__
	// to retrieve the next set of query results. Only present only if the request succeeded and
	// additional results are available.
	//
	// See the [Pagination guide](https://developer.squareup.com/docs/docs/working-with-apis/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The list of customer segments belonging to the associated Square account.
	Segments []*CustomerSegment `json:"segments"`
}

ListCustomerSegmentsResponse Defines the fields included in the response body for requests to __ListCustomerSegments__.

One of `errors` or `segments` is present in a given response (never both). Example: {"segments":[{"created_at":"2020-01-09T19:33:24.469Z","id":"GMNXRZVEXNQDF.CHURN_RISK","name":"Lapsed","updated_at":"2020-04-13T21:47:04Z"},{"created_at":"2020-01-09T19:33:24.486Z","id":"GMNXRZVEXNQDF.LOYAL","name":"Regulars","updated_at":"2020-04-13T21:47:04Z"},{"created_at":"2020-01-09T19:33:21.813Z","id":"GMNXRZVEXNQDF.REACHABLE","name":"Reachable","updated_at":"2020-04-13T21:47:04Z"},{"created_at":"2020-01-09T19:33:25Z","id":"gv2:KF92J19VXN5FK30GX2E8HSGQ20","name":"Instant Profile","updated_at":"2020-04-13T23:01:03Z"}]}

swagger:model ListCustomerSegmentsResponse

func (*ListCustomerSegmentsResponse) ContextValidate

func (m *ListCustomerSegmentsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list customer segments response based on the context it is used

func (*ListCustomerSegmentsResponse) MarshalBinary

func (m *ListCustomerSegmentsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListCustomerSegmentsResponse) UnmarshalBinary

func (m *ListCustomerSegmentsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListCustomerSegmentsResponse) Validate

func (m *ListCustomerSegmentsResponse) Validate(formats strfmt.Registry) error

Validate validates this list customer segments response

type ListCustomersRequest

type ListCustomersRequest struct {

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this to retrieve the next set of results for your original query.
	//
	// See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`

	// Indicates how Customers should be sorted.
	//
	// Default: `DEFAULT`.
	// See [CustomerSortField](#type-customersortfield) for possible values
	SortField string `json:"sort_field,omitempty"`

	// Indicates whether Customers should be sorted in ascending (`ASC`) or
	// descending (`DESC`) order.
	//
	// Default: `ASC`.
	// See [SortOrder](#type-sortorder) for possible values
	SortOrder string `json:"sort_order,omitempty"`
}

ListCustomersRequest Defines the query parameters that can be provided in a request to the ListCustomers endpoint. Example: {}

swagger:model ListCustomersRequest

func (*ListCustomersRequest) ContextValidate

func (m *ListCustomersRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list customers request based on context it is used

func (*ListCustomersRequest) MarshalBinary

func (m *ListCustomersRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListCustomersRequest) UnmarshalBinary

func (m *ListCustomersRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListCustomersRequest) Validate

func (m *ListCustomersRequest) Validate(formats strfmt.Registry) error

Validate validates this list customers request

type ListCustomersResponse

type ListCustomersResponse struct {

	// A pagination cursor to retrieve the next set of results for the
	// original query. Only present if the request succeeded and additional results
	// are available.
	//
	// See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`

	// An array of `Customer` objects that match the provided query.
	Customers []*Customer `json:"customers"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

ListCustomersResponse Defines the fields that are included in the response body of a request to the ListCustomers endpoint.

One of `errors` or `customers` is present in a given response (never both). Example: {"customers":[{"address":{"address_line_1":"500 Electric Ave","address_line_2":"Suite 600","administrative_district_level_1":"NY","country":"US","locality":"New York","postal_code":"10003"},"created_at":"2016-03-23T20:21:54.859Z","email_address":"Amelia.Earhart@example.com","family_name":"Earhart","given_name":"Amelia","group_ids":["545AXB44B4XXWMVQ4W8SBT3HHF"],"groups":[{"id":"545AXB44B4XXWMVQ4W8SBT3HHF","name":"Aviation Enthusiasts"},{"id":"1KB9JE5EGJXCW.REACHABLE","name":"Reachable"}],"id":"JDKYHBWT1D4F8MFH63DBMEN8Y4","note":"a customer","phone_number":"1-212-555-4240","reference_id":"YOUR_REFERENCE_ID","segment_ids":["1KB9JE5EGJXCW.REACHABLE"],"updated_at":"2016-03-23T20:21:55Z"}]}

swagger:model ListCustomersResponse

func (*ListCustomersResponse) ContextValidate

func (m *ListCustomersResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list customers response based on the context it is used

func (*ListCustomersResponse) MarshalBinary

func (m *ListCustomersResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListCustomersResponse) UnmarshalBinary

func (m *ListCustomersResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListCustomersResponse) Validate

func (m *ListCustomersResponse) Validate(formats strfmt.Registry) error

Validate validates this list customers response

type ListDeviceCodesRequest

type ListDeviceCodesRequest struct {

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this to retrieve the next set of results for your original query.
	//
	// See [Paginating results](#paginatingresults) for more information.
	Cursor string `json:"cursor,omitempty"`

	// If specified, only returns DeviceCodes of the specified location.
	// Returns DeviceCodes of all locations if empty.
	LocationID string `json:"location_id,omitempty"`

	// If specified, only returns DeviceCodes targeting the specified product type.
	// Returns DeviceCodes of all product types if empty.
	// See [ProductType](#type-producttype) for possible values
	ProductType string `json:"product_type,omitempty"`

	// If specified, returns DeviceCodes with the specified statuses.
	// Returns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty.
	// See [DeviceCodeStatus](#type-devicecodestatus) for possible values
	Status []string `json:"status"`
}

ListDeviceCodesRequest list device codes request Example: {"request_body":{}}

swagger:model ListDeviceCodesRequest

func (*ListDeviceCodesRequest) ContextValidate

func (m *ListDeviceCodesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list device codes request based on context it is used

func (*ListDeviceCodesRequest) MarshalBinary

func (m *ListDeviceCodesRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListDeviceCodesRequest) UnmarshalBinary

func (m *ListDeviceCodesRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListDeviceCodesRequest) Validate

func (m *ListDeviceCodesRequest) Validate(formats strfmt.Registry) error

Validate validates this list device codes request

type ListDeviceCodesResponse

type ListDeviceCodesResponse struct {

	// A pagination cursor to retrieve the next set of results for your
	// original query to the endpoint. This value is present only if the request
	// succeeded and additional results are available.
	//
	// See [Paginating results](#paginatingresults) for more information.
	Cursor string `json:"cursor,omitempty"`

	// The queried DeviceCode.
	DeviceCodes []*DeviceCode `json:"device_codes"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

ListDeviceCodesResponse list device codes response Example: {"device_codes":[{"code":"EBCARJ","created_at":"2020-02-06T18:44:33.000Z","device_id":"907CS13101300122","id":"B3Z6NAMYQSMTM","location_id":"B5E4484SHHNYH","name":"Counter 1","pair_by":"2020-02-06T18:49:33.000Z","product_type":"TERMINAL_API","status":"PAIRED","status_changed_at":"2020-02-06T18:47:28.000Z"},{"code":"GVXNYN","created_at":"2020-02-07T19:55:04.000Z","id":"YKGMJMYK8H4PQ","location_id":"A6SYFRSV4WAFW","name":"Unused device code","pair_by":"2020-02-07T20:00:04.000Z","product_type":"TERMINAL_API","status":"UNPAIRED","status_changed_at":"2020-02-07T19:55:04.000Z"}]}

swagger:model ListDeviceCodesResponse

func (*ListDeviceCodesResponse) ContextValidate

func (m *ListDeviceCodesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list device codes response based on the context it is used

func (*ListDeviceCodesResponse) MarshalBinary

func (m *ListDeviceCodesResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListDeviceCodesResponse) UnmarshalBinary

func (m *ListDeviceCodesResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListDeviceCodesResponse) Validate

func (m *ListDeviceCodesResponse) Validate(formats strfmt.Registry) error

Validate validates this list device codes response

type ListDisputeEvidenceRequest

type ListDisputeEvidenceRequest interface{}

ListDisputeEvidenceRequest Defines the parameters for a `ListDisputeEvidence` request. Example: {"request_body":{}}

swagger:model ListDisputeEvidenceRequest

type ListDisputeEvidenceResponse

type ListDisputeEvidenceResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The list of evidence previously uploaded to the specified dispute.
	Evidence []*DisputeEvidence `json:"evidence"`
}

ListDisputeEvidenceResponse Defines the fields in a `ListDisputeEvidence` response.

swagger:model ListDisputeEvidenceResponse

func (*ListDisputeEvidenceResponse) ContextValidate

func (m *ListDisputeEvidenceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list dispute evidence response based on the context it is used

func (*ListDisputeEvidenceResponse) MarshalBinary

func (m *ListDisputeEvidenceResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListDisputeEvidenceResponse) UnmarshalBinary

func (m *ListDisputeEvidenceResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListDisputeEvidenceResponse) Validate

func (m *ListDisputeEvidenceResponse) Validate(formats strfmt.Registry) error

Validate validates this list dispute evidence response

type ListDisputesRequest

type ListDisputesRequest struct {

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this cursor to retrieve the next set of results for the original query.
	// For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination).
	Cursor string `json:"cursor,omitempty"`

	// The ID of the location for which to return a list of disputes. If not specified, the endpoint returns
	// all open disputes (the dispute status is not `INQUIRY_CLOSED`, `WON`, or `LOST`) associated with all locations.
	// Max Length: 40
	// Min Length: 1
	LocationID string `json:"location_id,omitempty"`

	// The dispute states to filter the result.
	// If not specified, the endpoint returns all open disputes (the dispute status is not `INQUIRY_CLOSED`, `WON`,
	// or `LOST`).
	// See [DisputeState](#type-disputestate) for possible values
	States []string `json:"states"`
}

ListDisputesRequest Defines the request parameters for the `ListDisputes` endpoint. Example: {"request_body":{}}

swagger:model ListDisputesRequest

func (*ListDisputesRequest) ContextValidate

func (m *ListDisputesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list disputes request based on context it is used

func (*ListDisputesRequest) MarshalBinary

func (m *ListDisputesRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListDisputesRequest) UnmarshalBinary

func (m *ListDisputesRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListDisputesRequest) Validate

func (m *ListDisputesRequest) Validate(formats strfmt.Registry) error

Validate validates this list disputes request

type ListDisputesResponse

type ListDisputesResponse struct {

	// The pagination cursor to be used in a subsequent request.
	// If unset, this is the final response. For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination).
	Cursor string `json:"cursor,omitempty"`

	// The list of disputes.
	Disputes []*Dispute `json:"disputes"`

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`
}

ListDisputesResponse Defines fields in a `ListDisputes` response. Example: {"cursor":"G1aSTRm48CLjJsg6Sg3hQN1b1OMaoVuG","disputes":[{"amount_money":{"amount":1000,"currency":"USD"},"brand_dispute_id":"100000809947","card_brand":"visa","created_at":"2018-10-12T02:20:25.577Z","dispute_id":"OnY1AZwhSi775rbNIK4gv","disputed_payments":[{"payment_id":"APgIq6RX2jM6DKDhMHiC6QEkuaB"}],"due_at":"2018-10-11T00:00:00.000Z","reason":"NO_KNOWLEDGE","state":"EVIDENCE_REQUIRED","updated_at":"2018-10-12T02:20:25.577Z"}]}

swagger:model ListDisputesResponse

func (*ListDisputesResponse) ContextValidate

func (m *ListDisputesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list disputes response based on the context it is used

func (*ListDisputesResponse) MarshalBinary

func (m *ListDisputesResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListDisputesResponse) UnmarshalBinary

func (m *ListDisputesResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListDisputesResponse) Validate

func (m *ListDisputesResponse) Validate(formats strfmt.Registry) error

Validate validates this list disputes response

type ListEmployeeWagesRequest

type ListEmployeeWagesRequest struct {

	// Pointer to the next page of Employee Wage results to fetch.
	Cursor string `json:"cursor,omitempty"`

	// Filter wages returned to only those that are associated with the specified employee.
	EmployeeID string `json:"employee_id,omitempty"`

	// Maximum number of Employee Wages to return per page. Can range between
	// 1 and 200. The default is the maximum at 200.
	// Maximum: 200
	// Minimum: 1
	Limit int64 `json:"limit,omitempty"`
}

ListEmployeeWagesRequest A request for a set of `EmployeeWage` objects Example: {"request_params":"?employee_id=33fJchumvVdJwxV0H6L9\u0026limit=4\u0026cursor=s4R0Z6ecFTzTC4jz8sUDBQTudX3KE313OT9fCt3VUgsXM4sMgED"}

swagger:model ListEmployeeWagesRequest

func (*ListEmployeeWagesRequest) ContextValidate

func (m *ListEmployeeWagesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list employee wages request based on context it is used

func (*ListEmployeeWagesRequest) MarshalBinary

func (m *ListEmployeeWagesRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListEmployeeWagesRequest) UnmarshalBinary

func (m *ListEmployeeWagesRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListEmployeeWagesRequest) Validate

func (m *ListEmployeeWagesRequest) Validate(formats strfmt.Registry) error

Validate validates this list employee wages request

type ListEmployeeWagesResponse

type ListEmployeeWagesResponse struct {

	// Value supplied in the subsequent request to fetch the next next page
	// of Employee Wage results.
	Cursor string `json:"cursor,omitempty"`

	// A page of Employee Wage results.
	EmployeeWages []*EmployeeWage `json:"employee_wages"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

ListEmployeeWagesResponse The response to a request for a set of `EmployeeWage` objects. Contains a set of `EmployeeWage`. Example: {"cursor":"2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED","employee_wages":[{"employee_id":"33fJchumvVdJwxV0H6L9","hourly_rate":{"amount":3250,"currency":"USD"},"id":"pXS3qCv7BERPnEGedM4S8mhm","title":"Manager"},{"employee_id":"33fJchumvVdJwxV0H6L9","hourly_rate":{"amount":2600,"currency":"USD"},"id":"rZduCkzYDUVL3ovh1sQgbue6","title":"Cook"},{"employee_id":"33fJchumvVdJwxV0H6L9","hourly_rate":{"amount":1600,"currency":"USD"},"id":"FxLbs5KpPUHa8wyt5ctjubDX","title":"Barista"},{"employee_id":"33fJchumvVdJwxV0H6L9","hourly_rate":{"amount":1700,"currency":"USD"},"id":"vD1wCgijMDR3cX5TPnu7VXto","title":"Cashier"}]}

swagger:model ListEmployeeWagesResponse

func (*ListEmployeeWagesResponse) ContextValidate

func (m *ListEmployeeWagesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list employee wages response based on the context it is used

func (*ListEmployeeWagesResponse) MarshalBinary

func (m *ListEmployeeWagesResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListEmployeeWagesResponse) UnmarshalBinary

func (m *ListEmployeeWagesResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListEmployeeWagesResponse) Validate

func (m *ListEmployeeWagesResponse) Validate(formats strfmt.Registry) error

Validate validates this list employee wages response

type ListEmployeesRequest

type ListEmployeesRequest struct {

	// The token required to retrieve the specified page of results.
	Cursor string `json:"cursor,omitempty"`

	// The number of employees to be returned on each page.
	Limit int64 `json:"limit,omitempty"`

	// location id
	LocationID string `json:"location_id,omitempty"`

	// Specifies the EmployeeStatus to filter the employee by.
	// See [EmployeeStatus](#type-employeestatus) for possible values
	Status string `json:"status,omitempty"`
}

ListEmployeesRequest list employees request

swagger:model ListEmployeesRequest

func (*ListEmployeesRequest) ContextValidate

func (m *ListEmployeesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list employees request based on context it is used

func (*ListEmployeesRequest) MarshalBinary

func (m *ListEmployeesRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListEmployeesRequest) UnmarshalBinary

func (m *ListEmployeesRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListEmployeesRequest) Validate

func (m *ListEmployeesRequest) Validate(formats strfmt.Registry) error

Validate validates this list employees request

type ListEmployeesResponse

type ListEmployeesResponse struct {

	// The token to be used to retrieve the next page of results.
	Cursor string `json:"cursor,omitempty"`

	// employees
	Employees []*Employee `json:"employees"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

ListEmployeesResponse list employees response

swagger:model ListEmployeesResponse

func (*ListEmployeesResponse) ContextValidate

func (m *ListEmployeesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list employees response based on the context it is used

func (*ListEmployeesResponse) MarshalBinary

func (m *ListEmployeesResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListEmployeesResponse) UnmarshalBinary

func (m *ListEmployeesResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListEmployeesResponse) Validate

func (m *ListEmployeesResponse) Validate(formats strfmt.Registry) error

Validate validates this list employees response

type ListInvoicesRequest

type ListInvoicesRequest struct {

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this cursor to retrieve the next set of results for your original query.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination).
	Cursor string `json:"cursor,omitempty"`

	// The maximum number of invoices to return (200 is the maximum `limit`).
	// If not provided, the server
	// uses a default limit of 100 invoices.
	Limit int64 `json:"limit,omitempty"`

	// The ID of the location for which to list invoices.
	// Required: true
	// Max Length: 255
	// Min Length: 1
	LocationID *string `json:"location_id"`
}

ListInvoicesRequest Describes a `ListInvoice` request.

swagger:model ListInvoicesRequest

func (*ListInvoicesRequest) ContextValidate

func (m *ListInvoicesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list invoices request based on context it is used

func (*ListInvoicesRequest) MarshalBinary

func (m *ListInvoicesRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListInvoicesRequest) UnmarshalBinary

func (m *ListInvoicesRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListInvoicesRequest) Validate

func (m *ListInvoicesRequest) Validate(formats strfmt.Registry) error

Validate validates this list invoices request

type ListInvoicesResponse

type ListInvoicesResponse struct {

	// When a response is truncated, it includes a cursor that you can use in a
	// subsequent request to fetch the next set of invoices. If empty, this is the final
	// response.
	// For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination).
	Cursor string `json:"cursor,omitempty"`

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The invoices retrieved.
	Invoices []*Invoice `json:"invoices"`
}

ListInvoicesResponse Describes a `ListInvoice` response. Example: {"cursor":"CURSOR","invoices":[{"invoice":{"created_at":"2020-06-18T17:45:13Z","custom_fields":[{"label":"Event Reference Number","placement":"ABOVE_LINE_ITEMS","value":"Ref. #1234"},{"label":"Terms of Service","placement":"BELOW_LINE_ITEMS","value":"The terms of service are..."}],"delivery_method":"EMAIL","description":"We appreciate your business!","id":"gt2zv1z6mnUm1V7KMxxf3w","invoice_number":"inv-100","location_id":"ES0RJRZYEC39A","order_id":"CAISENgvlJ6jLWAzERDzjyHVybY","payment_requests":[{"automatic_payment_source":"NONE","computed_amount_money":{"amount":10000,"currency":"USD"},"due_date":"2030-01-24","reminders":[{"message":"Your invoice is due tomorrow","relative_scheduled_days":-1,"status":"PENDING","uid":"beebd363-e47f-4075-8785-c235aaa7df11"}],"request_type":"BALANCE","tipping_enabled":true,"total_completed_amount_money":{"amount":0,"currency":"USD"},"uid":"2da7964f-f3d2-4f43-81e8-5aa220bf3355"}],"primary_recipient":{"customer_id":"JDKYHBWT1D4F8MFH63DBMEN8Y4","email_address":"Amelia.Earhart@example.com","family_name":"Earhart","given_name":"Amelia","phone_number":"1-212-555-4240"},"scheduled_at":"2030-01-13T10:00:00Z","status":"DRAFT","timezone":"America/Los_Angeles","title":"Event Planning Services","updated_at":"2020-06-18T17:45:13Z","version":0}}]}

swagger:model ListInvoicesResponse

func (*ListInvoicesResponse) ContextValidate

func (m *ListInvoicesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list invoices response based on the context it is used

func (*ListInvoicesResponse) MarshalBinary

func (m *ListInvoicesResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListInvoicesResponse) UnmarshalBinary

func (m *ListInvoicesResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListInvoicesResponse) Validate

func (m *ListInvoicesResponse) Validate(formats strfmt.Registry) error

Validate validates this list invoices response

type ListLocationsRequest

type ListLocationsRequest interface{}

ListLocationsRequest Defines the fields that are included in requests to the __ListLocations__ endpoint. Example: {}

swagger:model ListLocationsRequest

type ListLocationsResponse

type ListLocationsResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The business locations.
	Locations []*Location `json:"locations"`
}

ListLocationsResponse Defines the fields that are included in the response body of a request to the __ListLocations__ endpoint.

One of `errors` or `locations` is present in a given response (never both). Example: {"locations":[{"address":{"address_line_1":"123 Main St","administrative_district_level_1":"CA","country":"US","locality":"San Francisco","postal_code":"94114"},"business_name":"Pumbaa's business name","capabilities":["CREDIT_CARD_PROCESSING"],"country":"US","created_at":"2016-09-19T17:33:12Z","currency":"USD","id":"18YC4JDH91E1H","language_code":"en-US","merchant_id":"3MYCJG5GVYQ8Q","name":"your location name","phone_number":"+1 650-354-7217","status":"ACTIVE","timezone":"America/Los_Angeles"}]}

swagger:model ListLocationsResponse

func (*ListLocationsResponse) ContextValidate

func (m *ListLocationsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list locations response based on the context it is used

func (*ListLocationsResponse) MarshalBinary

func (m *ListLocationsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListLocationsResponse) UnmarshalBinary

func (m *ListLocationsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListLocationsResponse) Validate

func (m *ListLocationsResponse) Validate(formats strfmt.Registry) error

Validate validates this list locations response

type ListLoyaltyProgramsRequest

type ListLoyaltyProgramsRequest interface{}

ListLoyaltyProgramsRequest A request to list `LoyaltyProgram`. Example: {"request_body":{}}

swagger:model ListLoyaltyProgramsRequest

type ListLoyaltyProgramsResponse

type ListLoyaltyProgramsResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// A list of `LoyaltyProgram` for the merchant.
	Programs []*LoyaltyProgram `json:"programs"`
}

ListLoyaltyProgramsResponse A response that contains all loyalty programs. Example: {"programs":[{"accrual_rules":[{"accrual_type":"SPEND","points":1,"spend_amount_money":{"amount":100}}],"created_at":"2020-04-20T16:55:11Z","id":"d619f755-2d17-41f3-990d-c04ecedd64dd","location_ids":["P034NEENMD09F"],"reward_tiers":[{"created_at":"2020-04-20T16:55:11Z","definition":{"discount_type":"FIXED_PERCENTAGE","percentage_discount":"10","scope":"ORDER"},"id":"e1b39225-9da5-43d1-a5db-782cdd8ad94f","name":"10% off entire sale","points":10,"pricing_rule_reference":{"catalog_version":"1605486402527","object_id":"74C4JSHESNLTB2A7ITO5HO6F"}}],"status":"ACTIVE","terminology":{"one":"Point","other":"Points"},"updated_at":"2020-05-01T02:00:02Z"}]}

swagger:model ListLoyaltyProgramsResponse

func (*ListLoyaltyProgramsResponse) ContextValidate

func (m *ListLoyaltyProgramsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list loyalty programs response based on the context it is used

func (*ListLoyaltyProgramsResponse) MarshalBinary

func (m *ListLoyaltyProgramsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListLoyaltyProgramsResponse) UnmarshalBinary

func (m *ListLoyaltyProgramsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListLoyaltyProgramsResponse) Validate

func (m *ListLoyaltyProgramsResponse) Validate(formats strfmt.Registry) error

Validate validates this list loyalty programs response

type ListMerchantsRequest

type ListMerchantsRequest struct {

	// The cursor generated by the previous response.
	Cursor int64 `json:"cursor,omitempty"`
}

ListMerchantsRequest Request object for the [ListMerchant](#endpoint-listmerchant) endpoint.

swagger:model ListMerchantsRequest

func (*ListMerchantsRequest) ContextValidate

func (m *ListMerchantsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list merchants request based on context it is used

func (*ListMerchantsRequest) MarshalBinary

func (m *ListMerchantsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListMerchantsRequest) UnmarshalBinary

func (m *ListMerchantsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListMerchantsRequest) Validate

func (m *ListMerchantsRequest) Validate(formats strfmt.Registry) error

Validate validates this list merchants request

type ListMerchantsResponse

type ListMerchantsResponse struct {

	// If the  response is truncated, the cursor to use in next  request to fetch next set of objects.
	Cursor int64 `json:"cursor,omitempty"`

	// Information on errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The requested `Merchant` entities.
	Merchant []*Merchant `json:"merchant"`
}

ListMerchantsResponse The response object returned by the [ListMerchant](#endpoint-listmerchant) endpoint. Example: {"merchant":[{"business_name":"Apple A Day","country":"US","currency":"USD","id":"DM7VKY8Q63GNP","language_code":"en-US","main_location_id":"9A65CGC72ZQG1","status":"ACTIVE"}]}

swagger:model ListMerchantsResponse

func (*ListMerchantsResponse) ContextValidate

func (m *ListMerchantsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list merchants response based on the context it is used

func (*ListMerchantsResponse) MarshalBinary

func (m *ListMerchantsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListMerchantsResponse) UnmarshalBinary

func (m *ListMerchantsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListMerchantsResponse) Validate

func (m *ListMerchantsResponse) Validate(formats strfmt.Registry) error

Validate validates this list merchants response

type ListPaymentRefundsRequest

type ListPaymentRefundsRequest struct {

	// The timestamp for the beginning of the requested reporting period, in RFC 3339 format.
	//
	// Default: The current time minus one year.
	BeginTime string `json:"begin_time,omitempty"`

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this cursor to retrieve the next set of results for the original query.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination).
	Cursor string `json:"cursor,omitempty"`

	// The timestamp for the end of the requested reporting period, in RFC 3339 format.
	//
	// Default: The current time.
	EndTime string `json:"end_time,omitempty"`

	// The maximum number of results to be returned in a single page.
	//
	// It is possible to receive fewer results than the specified limit on a given page.
	//
	// If the supplied value is greater than 100, no more than 100 results are returned.
	//
	// Default: 100
	Limit int64 `json:"limit,omitempty"`

	// Limit results to the location supplied. By default, results are returned
	// for all locations associated with the seller.
	LocationID string `json:"location_id,omitempty"`

	// The order in which results are listed:
	// - `ASC` - Oldest to newest.
	// - `DESC` - Newest to oldest (default).
	SortOrder string `json:"sort_order,omitempty"`

	// If provided, only refunds with the given source type are returned.
	// - `CARD` - List refunds only for payments where `CARD` was specified as the payment
	// source.
	//
	// Default: If omitted, refunds are returned regardless of the source type.
	SourceType string `json:"source_type,omitempty"`

	// If provided, only refunds with the given status are returned.
	// For a list of refund status values, see `PaymentRefund`.
	//
	// Default: If omitted, refunds are returned regardless of their status.
	Status string `json:"status,omitempty"`
}

ListPaymentRefundsRequest Retrieves a list of refunds for the account making the request.

The maximum results per page is 100. Example: {"request_body":{}}

swagger:model ListPaymentRefundsRequest

func (*ListPaymentRefundsRequest) ContextValidate

func (m *ListPaymentRefundsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list payment refunds request based on context it is used

func (*ListPaymentRefundsRequest) MarshalBinary

func (m *ListPaymentRefundsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListPaymentRefundsRequest) UnmarshalBinary

func (m *ListPaymentRefundsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListPaymentRefundsRequest) Validate

func (m *ListPaymentRefundsRequest) Validate(formats strfmt.Registry) error

Validate validates this list payment refunds request

type ListPaymentRefundsResponse

type ListPaymentRefundsResponse struct {

	// The pagination cursor to be used in a subsequent request. If empty,
	// this is the final response.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination).
	Cursor string `json:"cursor,omitempty"`

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The list of requested refunds.
	Refunds []*PaymentRefund `json:"refunds"`
}

ListPaymentRefundsResponse Defines the fields that are included in the response body of a request to the [ListPaymentRefunds](#endpoint-refunds-listpaymentrefunds) endpoint.

Either `errors` or `refunds` is present in a given response (never both). Example: {"cursor":"5evquW1YswHoT4EoyUhzMmTsCnsSXBU9U0WJ4FU4623nrMQcocH0RGU6Up1YkwfiMcF59ood58EBTEGgzMTGHQJpocic7ExOL0NtrTXCeWcv0UJIJNk8eXb","refunds":[{"amount_money":{"amount":1000,"currency":"USD"},"created_at":"2019-07-06T18:01:22.335Z","id":"O2QAAhTYs7rUfzlxT38GMO7LvaB_q7JwCHtxmgXrh8fAhV468WQ44VxDtL7CU4yVRlsbXmI","location_id":"XK3DBG77NJBFX","order_id":"2duiyoqbfeXY0DBi15GEyk5Epa4F","payment_id":"O2QAAhTYs7rUfzlxT38GMO7LvaB","processing_fee":[{"amount_money":{"amount":-59,"currency":"USD"},"effective_at":"2019-07-06T20:01:12.000Z","type":"INITIAL"}],"status":"COMPLETED","updated_at":"2019-07-06T18:06:04.653Z"},{"amount_money":{"amount":1000,"currency":"USD"},"created_at":"2019-07-06T17:01:54.232Z","id":"8TDIQvFw8PeDIxhSfd5yyX7GuaB_13px5Vrz01qzzuoGzmjsZIxDjfHhbkm2XppBUX1dW7I","location_id":"XK3DBG77NJBFX","order_id":"w6EXfEwS03oTQsnZTCqfE6f67e4F","payment_id":"8TDIQvFw8PeDIxhSfd5yyX7GuaB","processing_fee":[{"amount_money":{"amount":-59,"currency":"USD"},"effective_at":"2019-07-06T19:01:45.000Z","type":"INITIAL"}],"status":"COMPLETED","updated_at":"2019-07-06T17:21:04.684Z"}]}

swagger:model ListPaymentRefundsResponse

func (*ListPaymentRefundsResponse) ContextValidate

func (m *ListPaymentRefundsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list payment refunds response based on the context it is used

func (*ListPaymentRefundsResponse) MarshalBinary

func (m *ListPaymentRefundsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListPaymentRefundsResponse) UnmarshalBinary

func (m *ListPaymentRefundsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListPaymentRefundsResponse) Validate

func (m *ListPaymentRefundsResponse) Validate(formats strfmt.Registry) error

Validate validates this list payment refunds response

type ListPaymentsRequest

type ListPaymentsRequest struct {

	// The timestamp for the beginning of the reporting period, in RFC 3339 format.
	// Inclusive. Default: The current time minus one year.
	BeginTime string `json:"begin_time,omitempty"`

	// The brand of the payment card (for example, VISA).
	CardBrand string `json:"card_brand,omitempty"`

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this cursor to retrieve the next set of results for the original query.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination).
	Cursor string `json:"cursor,omitempty"`

	// The timestamp for the end of the reporting period, in RFC 3339 format.
	//
	// Default: The current time.
	EndTime string `json:"end_time,omitempty"`

	// The last four digits of a payment card.
	Last4 string `json:"last_4,omitempty"`

	// The maximum number of results to be returned in a single page.
	// It is possible to receive fewer results than the specified limit on a given page.
	//
	// The default value of 100 is also the maximum allowed value. If the provided value is
	// greater than 100, it is ignored and the default value is used instead.
	//
	// Default: `100`
	Limit int64 `json:"limit,omitempty"`

	// Limit results to the location supplied. By default, results are returned
	// for the default (main) location associated with the seller.
	LocationID string `json:"location_id,omitempty"`

	// The order in which results are listed:
	// - `ASC` - Oldest to newest.
	// - `DESC` - Newest to oldest (default).
	SortOrder string `json:"sort_order,omitempty"`

	// The exact amount in the `total_money` for a payment.
	// Minimum: 0
	Total *int64 `json:"total,omitempty"`
}

ListPaymentsRequest Retrieves a list of payments taken by the account making the request.

The maximum results per page is 100. Example: {"request_body":{}}

swagger:model ListPaymentsRequest

func (*ListPaymentsRequest) ContextValidate

func (m *ListPaymentsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list payments request based on context it is used

func (*ListPaymentsRequest) MarshalBinary

func (m *ListPaymentsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListPaymentsRequest) UnmarshalBinary

func (m *ListPaymentsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListPaymentsRequest) Validate

func (m *ListPaymentsRequest) Validate(formats strfmt.Registry) error

Validate validates this list payments request

type ListPaymentsResponse

type ListPaymentsResponse struct {

	// The pagination cursor to be used in a subsequent request. If empty,
	// this is the final response.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination).
	Cursor string `json:"cursor,omitempty"`

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The requested list of payments.
	Payments []*Payment `json:"payments"`
}

ListPaymentsResponse Defines the fields that are included in the response body of a request to the [ListPayments](#endpoint-payments-listpayments) endpoint. Example: {"cursor":"2TTnuq0yRYDdBRSFF2XuFkgO1Bclt4ZHNI7YrFNeyZ6rL1WZXkdnLn10H8fBIwFKdKW1Af6ifRa","payments":[{"amount_money":{"amount":1000,"currency":"USD"},"card_details":{"auth_result_code":"NQbV3A","avs_status":"AVS_ACCEPTED","card":{"card_brand":"VISA","exp_month":2,"exp_year":2022,"fingerprint":"sq-1-lHpUJIUyqOPQmH89b6GuQEljmc-mZmu4kSTaMlkLDkJI7NVjAl4Zirn2sk3OeyVKVA","last_4":"1111"},"card_payment_timeline":{"authorized_at":"2019-07-09T14:36:13.798Z"},"cvv_status":"CVV_ACCEPTED","entry_method":"KEYED","status":"AUTHORIZED"},"created_at":"2019-07-09T14:36:13.745Z","id":"ifrBnAil7rRfDtd27cdf9g9WO8paB","location_id":"QLIJX16Q3UZ0A","order_id":"MvfIilKnIYKBium4rauH67wFzRxv","source_type":"CARD","status":"APPROVED","total_money":{"amount":1000,"currency":"USD"},"updated_at":"2019-07-09T14:36:13.883Z"},{"amount_money":{"amount":1000,"currency":"USD"},"card_details":{"auth_result_code":"vPIr0K","avs_status":"AVS_ACCEPTED","card":{"card_brand":"VISA","exp_month":7,"exp_year":2026,"fingerprint":"sq-1-TpmjbNBMFdibiIjpQI5LiRgNUBC7u1689i0TgHjnlyHEWYB7tnn-K4QbW4ttvtaqXw","last_4":"2796"},"card_payment_timeline":{"authorized_at":"2019-07-08T01:00:51.617Z","captured_at":"2019-07-08T01:13:58.508Z"},"cvv_status":"CVV_ACCEPTED","entry_method":"ON_FILE","status":"CAPTURED"},"created_at":"2019-07-08T01:00:51.607Z","customer_id":"RDX9Z4XTIZR7MRZJUXNY9HUK6I","id":"GQTFp1ZlXdpoW4o6eGiZhbjosiDFf","location_id":"XTI0H92143A39","order_id":"m2Hr8Hk8A3CTyQQ1k4ynExg92tO3","processing_fee":[{"amount_money":{"amount":59,"currency":"USD"},"effective_at":"2019-07-08T03:00:53.000Z","type":"INITIAL"}],"source_type":"CARD","status":"COMPLETED","total_money":{"amount":1000,"currency":"USD"},"updated_at":"2019-07-08T01:13:58.508Z"}]}

swagger:model ListPaymentsResponse

func (*ListPaymentsResponse) ContextValidate

func (m *ListPaymentsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list payments response based on the context it is used

func (*ListPaymentsResponse) MarshalBinary

func (m *ListPaymentsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListPaymentsResponse) UnmarshalBinary

func (m *ListPaymentsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListPaymentsResponse) Validate

func (m *ListPaymentsResponse) Validate(formats strfmt.Registry) error

Validate validates this list payments response

type ListRefundsRequest

type ListRefundsRequest struct {

	// The beginning of the requested reporting period, in RFC 3339 format.
	//
	// See [Date ranges](#dateranges) for details on date inclusivity/exclusivity.
	//
	// Default value: The current time minus one year.
	BeginTime string `json:"begin_time,omitempty"`

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this to retrieve the next set of results for your original query.
	//
	// See [Paginating results](#paginatingresults) for more information.
	Cursor string `json:"cursor,omitempty"`

	// The end of the requested reporting period, in RFC 3339 format.
	//
	// See [Date ranges](#dateranges) for details on date inclusivity/exclusivity.
	//
	// Default value: The current time.
	EndTime string `json:"end_time,omitempty"`

	// The order in which results are listed in the response (`ASC` for
	// oldest first, `DESC` for newest first).
	//
	// Default value: `DESC`
	// See [SortOrder](#type-sortorder) for possible values
	SortOrder string `json:"sort_order,omitempty"`
}

ListRefundsRequest Defines the query parameters that can be included in a request to the [ListRefunds](#endpoint-listrefunds) endpoint.

Deprecated - recommend using [SearchOrders](#endpoint-orders-searchorders) Example: {"request_params":"?begin_time=2016-01-15T00:00:00Z\u0026end_time=2016-01-31T00:00:00Z"}

swagger:model ListRefundsRequest

func (*ListRefundsRequest) ContextValidate

func (m *ListRefundsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list refunds request based on context it is used

func (*ListRefundsRequest) MarshalBinary

func (m *ListRefundsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListRefundsRequest) UnmarshalBinary

func (m *ListRefundsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListRefundsRequest) Validate

func (m *ListRefundsRequest) Validate(formats strfmt.Registry) error

Validate validates this list refunds request

type ListRefundsResponse

type ListRefundsResponse struct {

	// A pagination cursor for retrieving the next set of results,
	// if any remain. Provide this value as the `cursor` parameter in a subsequent
	// request to this endpoint.
	//
	// See [Paginating results](#paginatingresults) for more information.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// An array of refunds that match your query.
	Refunds []*Refund `json:"refunds"`
}

ListRefundsResponse Defines the fields that are included in the response body of a request to the [ListRefunds](#endpoint-listrefunds) endpoint.

One of `errors` or `refunds` is present in a given response (never both). Example: {"refunds":[{"additional_recipients":[{"amount_money":{"amount":10,"currency":"USD"},"description":"Application fees","location_id":"057P5VYJ4A5X1"}],"amount_money":{"amount":100,"currency":"USD"},"created_at":"2016-01-20T00:28:18Z","id":"b27436d1-7f8e-5610-45c6-417ef71434b4-SW","location_id":"18YC4JDH91E1H","reason":"some reason","status":"APPROVED","tender_id":"MtZRYYdDrYNQbOvV7nbuBvMF","transaction_id":"KnL67ZIwXCPtzOrqj0HrkxMF"}]}

swagger:model ListRefundsResponse

func (*ListRefundsResponse) ContextValidate

func (m *ListRefundsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list refunds response based on the context it is used

func (*ListRefundsResponse) MarshalBinary

func (m *ListRefundsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListRefundsResponse) UnmarshalBinary

func (m *ListRefundsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListRefundsResponse) Validate

func (m *ListRefundsResponse) Validate(formats strfmt.Registry) error

Validate validates this list refunds response

type ListSubscriptionEventsRequest

type ListSubscriptionEventsRequest struct {

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this to retrieve the next set of results for the original query.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination).
	Cursor string `json:"cursor,omitempty"`

	// The upper limit on the number of subscription events to return
	// in the response.
	//
	// Default: `200`
	// Minimum: 1
	Limit int64 `json:"limit,omitempty"`
}

ListSubscriptionEventsRequest Defines parameters in a [ListSubscriptionEvents](#endpoint-subscriptions-listsubscriptionevents) endpoint request.

swagger:model ListSubscriptionEventsRequest

func (*ListSubscriptionEventsRequest) ContextValidate

func (m *ListSubscriptionEventsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list subscription events request based on context it is used

func (*ListSubscriptionEventsRequest) MarshalBinary

func (m *ListSubscriptionEventsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListSubscriptionEventsRequest) UnmarshalBinary

func (m *ListSubscriptionEventsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListSubscriptionEventsRequest) Validate

func (m *ListSubscriptionEventsRequest) Validate(formats strfmt.Registry) error

Validate validates this list subscription events request

type ListSubscriptionEventsResponse

type ListSubscriptionEventsResponse struct {

	// When a response is truncated, it includes a cursor that you can
	// use in a subsequent request to fetch the next set of events.
	// If empty, this is the final response.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination).
	Cursor string `json:"cursor,omitempty"`

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The `SubscriptionEvents` retrieved.
	SubscriptionEvents []*SubscriptionEvent `json:"subscription_events"`
}

ListSubscriptionEventsResponse Defines the fields that are included in the response from the [ListSubscriptionEvents](#endpoint-subscriptions-listsubscriptionevents) endpoint. Example: {"subscription_events":[{"effective_date":"2020-04-24","id":"06809161-3867-4598-8269-8aea5be4f9de","plan_id":"6JHXF3B2CW3YKHDV4XEM674H","subscription_event_type":"START_SUBSCRIPTION"},{"effective_date":"2020-05-06","id":"a0c08083-5db0-4800-85c7-d398de4fbb6e","plan_id":"6JHXF3B2CW3YKHDV4XEM674H","subscription_event_type":"STOP_SUBSCRIPTION"}]}

swagger:model ListSubscriptionEventsResponse

func (*ListSubscriptionEventsResponse) ContextValidate

func (m *ListSubscriptionEventsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list subscription events response based on the context it is used

func (*ListSubscriptionEventsResponse) MarshalBinary

func (m *ListSubscriptionEventsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListSubscriptionEventsResponse) UnmarshalBinary

func (m *ListSubscriptionEventsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListSubscriptionEventsResponse) Validate

func (m *ListSubscriptionEventsResponse) Validate(formats strfmt.Registry) error

Validate validates this list subscription events response

type ListTeamMemberBookingProfilesRequest

type ListTeamMemberBookingProfilesRequest struct {

	// Indicates whether to include only bookable team members in the returned result (`true`) or not (`false`).
	BookableOnly bool `json:"bookable_only,omitempty"`

	// The cursor for paginating through the results.
	Cursor string `json:"cursor,omitempty"`

	// The maximum number of results to return.
	Limit int64 `json:"limit,omitempty"`

	// Indicates whether to include only team members enabled at the given location in the returned result.
	LocationID string `json:"location_id,omitempty"`
}

ListTeamMemberBookingProfilesRequest list team member booking profiles request

swagger:model ListTeamMemberBookingProfilesRequest

func (*ListTeamMemberBookingProfilesRequest) ContextValidate

func (m *ListTeamMemberBookingProfilesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list team member booking profiles request based on context it is used

func (*ListTeamMemberBookingProfilesRequest) MarshalBinary

func (m *ListTeamMemberBookingProfilesRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListTeamMemberBookingProfilesRequest) UnmarshalBinary

func (m *ListTeamMemberBookingProfilesRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListTeamMemberBookingProfilesRequest) Validate

Validate validates this list team member booking profiles request

type ListTeamMemberBookingProfilesResponse

type ListTeamMemberBookingProfilesResponse struct {

	// The cursor for paginating through the results.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The list of team member booking profiles.
	TeamMemberBookingProfiles []*TeamMemberBookingProfile `json:"team_member_booking_profiles"`
}

ListTeamMemberBookingProfilesResponse list team member booking profiles response Example: {"errors":[],"team_member_booking_profiles":[{"display_name":"Sandbox Seller","is_bookable":true,"team_member_id":"TMXUrsBWWcHTt79t"},{"display_name":"Sandbox Staff","is_bookable":true,"team_member_id":"TMaJcbiRqPIGZuS9"}]}

swagger:model ListTeamMemberBookingProfilesResponse

func (*ListTeamMemberBookingProfilesResponse) ContextValidate

func (m *ListTeamMemberBookingProfilesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list team member booking profiles response based on the context it is used

func (*ListTeamMemberBookingProfilesResponse) MarshalBinary

func (m *ListTeamMemberBookingProfilesResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListTeamMemberBookingProfilesResponse) UnmarshalBinary

func (m *ListTeamMemberBookingProfilesResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListTeamMemberBookingProfilesResponse) Validate

Validate validates this list team member booking profiles response

type ListTeamMemberWagesRequest

type ListTeamMemberWagesRequest struct {

	// Pointer to the next page of Employee Wage results to fetch.
	Cursor string `json:"cursor,omitempty"`

	// Maximum number of Team Member Wages to return per page. Can range between
	// 1 and 200. The default is the maximum at 200.
	// Maximum: 200
	// Minimum: 1
	Limit int64 `json:"limit,omitempty"`

	// Filter wages returned to only those that are associated with the
	// specified team member.
	TeamMemberID string `json:"team_member_id,omitempty"`
}

ListTeamMemberWagesRequest A request for a set of `TeamMemberWage` objects Example: {"request_params":"?team_member_id=33fJchumvVdJwxV0H6L9\u0026limit=4\u0026cursor=s4R0Z6ecFTzTC4jz8sUDBQTudX3KE313OT9fCt3VUgsXM4sMgED"}

swagger:model ListTeamMemberWagesRequest

func (*ListTeamMemberWagesRequest) ContextValidate

func (m *ListTeamMemberWagesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list team member wages request based on context it is used

func (*ListTeamMemberWagesRequest) MarshalBinary

func (m *ListTeamMemberWagesRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListTeamMemberWagesRequest) UnmarshalBinary

func (m *ListTeamMemberWagesRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListTeamMemberWagesRequest) Validate

func (m *ListTeamMemberWagesRequest) Validate(formats strfmt.Registry) error

Validate validates this list team member wages request

type ListTeamMemberWagesResponse

type ListTeamMemberWagesResponse struct {

	// Value supplied in the subsequent request to fetch the next next page
	// of Team Member Wage results.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// A page of Team Member Wage results.
	TeamMemberWages []*TeamMemberWage `json:"team_member_wages"`
}

ListTeamMemberWagesResponse The response to a request for a set of `TeamMemberWage` objects. Contains a set of `TeamMemberWage`. Example: {"cursor":"2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED","team_member_wages":[{"hourly_rate":{"amount":3250,"currency":"USD"},"id":"pXS3qCv7BERPnEGedM4S8mhm","team_member_id":"33fJchumvVdJwxV0H6L9","title":"Manager"},{"hourly_rate":{"amount":2600,"currency":"USD"},"id":"rZduCkzYDUVL3ovh1sQgbue6","team_member_id":"33fJchumvVdJwxV0H6L9","title":"Cook"},{"hourly_rate":{"amount":1600,"currency":"USD"},"id":"FxLbs5KpPUHa8wyt5ctjubDX","team_member_id":"33fJchumvVdJwxV0H6L9","title":"Barista"},{"hourly_rate":{"amount":1700,"currency":"USD"},"id":"vD1wCgijMDR3cX5TPnu7VXto","team_member_id":"33fJchumvVdJwxV0H6L9","title":"Cashier"}]}

swagger:model ListTeamMemberWagesResponse

func (*ListTeamMemberWagesResponse) ContextValidate

func (m *ListTeamMemberWagesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list team member wages response based on the context it is used

func (*ListTeamMemberWagesResponse) MarshalBinary

func (m *ListTeamMemberWagesResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListTeamMemberWagesResponse) UnmarshalBinary

func (m *ListTeamMemberWagesResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListTeamMemberWagesResponse) Validate

func (m *ListTeamMemberWagesResponse) Validate(formats strfmt.Registry) error

Validate validates this list team member wages response

type ListTransactionsRequest

type ListTransactionsRequest struct {

	// The beginning of the requested reporting period, in RFC 3339 format.
	//
	// See [Date ranges](#dateranges) for details on date inclusivity/exclusivity.
	//
	// Default value: The current time minus one year.
	BeginTime string `json:"begin_time,omitempty"`

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this to retrieve the next set of results for your original query.
	//
	// See [Paginating results](#paginatingresults) for more information.
	Cursor string `json:"cursor,omitempty"`

	// The end of the requested reporting period, in RFC 3339 format.
	//
	// See [Date ranges](#dateranges) for details on date inclusivity/exclusivity.
	//
	// Default value: The current time.
	EndTime string `json:"end_time,omitempty"`

	// The order in which results are listed in the response (`ASC` for
	// oldest first, `DESC` for newest first).
	//
	// Default value: `DESC`
	// See [SortOrder](#type-sortorder) for possible values
	SortOrder string `json:"sort_order,omitempty"`
}

ListTransactionsRequest Defines the query parameters that can be included in a request to the [ListTransactions](#endpoint-listtransactions) endpoint.

Deprecated - recommend using [SearchOrders](#endpoint-orders-searchorders) Example: {"request_params":"?begin_time=2016-01-15T00:00:00Z\u0026end_time=2016-01-31T00:00:00Z"}

swagger:model ListTransactionsRequest

func (*ListTransactionsRequest) ContextValidate

func (m *ListTransactionsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list transactions request based on context it is used

func (*ListTransactionsRequest) MarshalBinary

func (m *ListTransactionsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListTransactionsRequest) UnmarshalBinary

func (m *ListTransactionsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListTransactionsRequest) Validate

func (m *ListTransactionsRequest) Validate(formats strfmt.Registry) error

Validate validates this list transactions request

type ListTransactionsResponse

type ListTransactionsResponse struct {

	// A pagination cursor for retrieving the next set of results,
	// if any remain. Provide this value as the `cursor` parameter in a subsequent
	// request to this endpoint.
	//
	// See [Paginating results](#paginatingresults) for more information.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// An array of transactions that match your query.
	Transactions []*Transaction `json:"transactions"`
}

ListTransactionsResponse Defines the fields that are included in the response body of a request to the [ListTransactions](#endpoint-listtransactions) endpoint.

One of `errors` or `transactions` is present in a given response (never both). Example: {"transactions":[{"created_at":"2016-01-20T22:57:56Z","id":"KnL67ZIwXCPtzOrqj0HrkxMF","location_id":"18YC4JDH91E1H","product":"EXTERNAL_API","reference_id":"some optional reference id","refunds":[{"additional_recipients":[{"amount_money":{"amount":100,"currency":"USD"},"description":"Application fees","location_id":"057P5VYJ4A5X1"}],"amount_money":{"amount":5000,"currency":"USD"},"created_at":"2016-01-20T22:59:20Z","id":"7a5RcVI0CxbOcJ2wMOkE","location_id":"18YC4JDH91E1H","processing_fee_money":{"amount":138,"currency":"USD"},"reason":"some reason why","status":"APPROVED","tender_id":"MtZRYYdDrYNQbOvV7nbuBvMF","transaction_id":"KnL67ZIwXCPtzOrqj0HrkxMF"}],"tenders":[{"additional_recipients":[{"amount_money":{"amount":20,"currency":"USD"},"description":"Application fees","location_id":"057P5VYJ4A5X1"}],"amount_money":{"amount":5000,"currency":"USD"},"card_details":{"card":{"card_brand":"VISA","last_4":"1111"},"entry_method":"KEYED","status":"CAPTURED"},"created_at":"2016-01-20T22:57:56Z","id":"MtZRYYdDrYNQbOvV7nbuBvMF","location_id":"18YC4JDH91E1H","note":"some optional note","processing_fee_money":{"amount":138,"currency":"USD"},"transaction_id":"KnL67ZIwXCPtzOrqj0HrkxMF","type":"CARD"}]}]}

swagger:model ListTransactionsResponse

func (*ListTransactionsResponse) ContextValidate

func (m *ListTransactionsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list transactions response based on the context it is used

func (*ListTransactionsResponse) MarshalBinary

func (m *ListTransactionsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListTransactionsResponse) UnmarshalBinary

func (m *ListTransactionsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListTransactionsResponse) Validate

func (m *ListTransactionsResponse) Validate(formats strfmt.Registry) error

Validate validates this list transactions response

type ListWorkweekConfigsRequest

type ListWorkweekConfigsRequest struct {

	// Pointer to the next page of Workweek Config results to fetch.
	Cursor string `json:"cursor,omitempty"`

	// Maximum number of Workweek Configs to return per page.
	Limit int64 `json:"limit,omitempty"`
}

ListWorkweekConfigsRequest A request for a set of `WorkweekConfig` objects Example: {"request_params":"?limit=1\u0026cursor=s4R0Z6ecFTzTC4jz8sUDBQTudX3KE313OT9fCt3VUgsXM4sMgED"}

swagger:model ListWorkweekConfigsRequest

func (*ListWorkweekConfigsRequest) ContextValidate

func (m *ListWorkweekConfigsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this list workweek configs request based on context it is used

func (*ListWorkweekConfigsRequest) MarshalBinary

func (m *ListWorkweekConfigsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListWorkweekConfigsRequest) UnmarshalBinary

func (m *ListWorkweekConfigsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListWorkweekConfigsRequest) Validate

func (m *ListWorkweekConfigsRequest) Validate(formats strfmt.Registry) error

Validate validates this list workweek configs request

type ListWorkweekConfigsResponse

type ListWorkweekConfigsResponse struct {

	// Value supplied in the subsequent request to fetch the next page of
	// Employee Wage results.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// A page of Employee Wage results.
	WorkweekConfigs []*WorkweekConfig `json:"workweek_configs"`
}

ListWorkweekConfigsResponse The response to a request for a set of `WorkweekConfig` objects. Contains the requested `WorkweekConfig` objects. May contain a set of `Error` objects if the request resulted in errors. Example: {"cursor":"2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED","workweek_configs":[{"created_at":"2016-02-04T00:58:24Z","id":"FY4VCAQN700GM","start_of_day_local_time":"10:00","start_of_week":"MON","updated_at":"2019-02-28T01:04:35Z","version":11}]}

swagger:model ListWorkweekConfigsResponse

func (*ListWorkweekConfigsResponse) ContextValidate

func (m *ListWorkweekConfigsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this list workweek configs response based on the context it is used

func (*ListWorkweekConfigsResponse) MarshalBinary

func (m *ListWorkweekConfigsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ListWorkweekConfigsResponse) UnmarshalBinary

func (m *ListWorkweekConfigsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ListWorkweekConfigsResponse) Validate

func (m *ListWorkweekConfigsResponse) Validate(formats strfmt.Registry) error

Validate validates this list workweek configs response

type Location

type Location struct {

	// The physical address of the location.
	Address *Address `json:"address,omitempty"`

	// The email of the location.
	// This email is visible to the customers of the location.
	// For example, the email appears on customer receipts.
	BusinessEmail string `json:"business_email,omitempty"`

	//
	// Represents the hours of operation for the location.
	BusinessHours *BusinessHours `json:"business_hours,omitempty"`

	// The business name of the location
	// This is the name visible to the customers of the location.
	// For example, this name appears on customer receipts.
	BusinessName string `json:"business_name,omitempty"`

	// The Square features that are enabled for the location.
	// See `LocationCapability` for possible values.
	// See [LocationCapability](#type-locationcapability) for possible values
	Capabilities []string `json:"capabilities"`

	// The physical coordinates (latitude and longitude) of the location.
	Coordinates *Coordinates `json:"coordinates,omitempty"`

	// The country of the location, in ISO 3166-1-alpha-2 format.
	//
	// See `Country` for possible values.
	// See [Country](#type-country) for possible values
	Country string `json:"country,omitempty"`

	// The time when the location was created, in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// The currency used for all transactions at this location,
	// in ISO 4217 format.
	// See `Currency` for possible values.
	// See [Currency](#type-currency) for possible values
	Currency string `json:"currency,omitempty"`

	// The description of the location.
	Description string `json:"description,omitempty"`

	// The Facebook profile URL of the location. The URL should begin with 'facebook.com/'.
	FacebookURL string `json:"facebook_url,omitempty"`

	// The URL of a full-format logo image for the location. The Seller must choose this logo in the
	// Seller dashboard (Receipts section) for the logo to appear on transactions (such as receipts, invoices)
	// that Square generates on behalf of the Seller. This image can have an aspect ratio of 2:1 or greater
	// and is recommended to be at least 1280x648 pixels.
	FullFormatLogoURL string `json:"full_format_logo_url,omitempty"`

	// The Square-issued ID of the location.
	ID string `json:"id,omitempty"`

	// The Instagram username of the location without the '&#64;' symbol.
	InstagramUsername string `json:"instagram_username,omitempty"`

	// The language associated with the location, in
	// [BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A).
	LanguageCode string `json:"language_code,omitempty"`

	// The URL of the logo image for the location. The Seller must choose this logo in the Seller
	// dashboard (Receipts section) for the logo to appear on transactions (such as receipts, invoices)
	// that Square generates on behalf of the Seller. This image should have an aspect ratio
	// close to 1:1 and is recommended to be at least 200x200 pixels.
	LogoURL string `json:"logo_url,omitempty"`

	// The merchant category code (MCC) of the location, as standardized by ISO 18245.
	// The MCC describes the kind of goods or services sold at the location.
	Mcc string `json:"mcc,omitempty"`

	// The ID of the merchant that owns the location.
	MerchantID string `json:"merchant_id,omitempty"`

	// The name of the location.
	// This information appears in the dashboard as the nickname.
	// A location name must be unique within a seller account.
	Name string `json:"name,omitempty"`

	// The phone number of the location in human readable format.
	PhoneNumber string `json:"phone_number,omitempty"`

	// The URL of the Point of Sale background image for the location.
	PosBackgroundURL string `json:"pos_background_url,omitempty"`

	// The status of the location, either active or inactive.
	// See [LocationStatus](#type-locationstatus) for possible values
	Status string `json:"status,omitempty"`

	// The [IANA Timezone](https://www.iana.org/time-zones) identifier for
	// the timezone of the location.
	Timezone string `json:"timezone,omitempty"`

	// The Twitter username of the location without the '&#64;' symbol.
	TwitterUsername string `json:"twitter_username,omitempty"`

	// The type of the location, either physical or mobile.
	// See [LocationType](#type-locationtype) for possible values
	Type string `json:"type,omitempty"`

	// The website URL of the location.
	WebsiteURL string `json:"website_url,omitempty"`
}

Location location

swagger:model Location

func (*Location) ContextValidate

func (m *Location) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this location based on the context it is used

func (*Location) MarshalBinary

func (m *Location) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Location) UnmarshalBinary

func (m *Location) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Location) Validate

func (m *Location) Validate(formats strfmt.Registry) error

Validate validates this location

type LocationCapability

type LocationCapability string

LocationCapability The capabilities a location may have.

swagger:model LocationCapability

const (

	// LocationCapabilityCREDITCARDPROCESSING captures enum value "CREDIT_CARD_PROCESSING"
	LocationCapabilityCREDITCARDPROCESSING LocationCapability = "CREDIT_CARD_PROCESSING"
)

func (LocationCapability) ContextValidate

func (m LocationCapability) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this location capability based on context it is used

func (LocationCapability) Validate

func (m LocationCapability) Validate(formats strfmt.Registry) error

Validate validates this location capability

type LocationStatus

type LocationStatus string

LocationStatus The status of the location, whether a location is active or inactive.

swagger:model LocationStatus

const (

	// LocationStatusACTIVE captures enum value "ACTIVE"
	LocationStatusACTIVE LocationStatus = "ACTIVE"

	// LocationStatusINACTIVE captures enum value "INACTIVE"
	LocationStatusINACTIVE LocationStatus = "INACTIVE"
)

func (LocationStatus) ContextValidate

func (m LocationStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this location status based on context it is used

func (LocationStatus) Validate

func (m LocationStatus) Validate(formats strfmt.Registry) error

Validate validates this location status

type LocationType

type LocationType string

LocationType A location's physical or mobile type.

swagger:model LocationType

const (

	// LocationTypePHYSICAL captures enum value "PHYSICAL"
	LocationTypePHYSICAL LocationType = "PHYSICAL"

	// LocationTypeMOBILE captures enum value "MOBILE"
	LocationTypeMOBILE LocationType = "MOBILE"
)

func (LocationType) ContextValidate

func (m LocationType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this location type based on context it is used

func (LocationType) Validate

func (m LocationType) Validate(formats strfmt.Registry) error

Validate validates this location type

type LoyaltyAccount

type LoyaltyAccount struct {

	// The available point balance in the loyalty account.
	//
	// Your application should be able to handle loyalty accounts that have a negative point balance (`balance` is less than 0). This might occur if a seller makes a manual adjustment or as a result of a refund or exchange.
	Balance int64 `json:"balance,omitempty"`

	// The timestamp when the loyalty account was created, in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// The Square-assigned ID of the `customer` that is associated with the account.
	CustomerID string `json:"customer_id,omitempty"`

	// The timestamp when enrollment occurred, in RFC 3339 format.
	EnrolledAt string `json:"enrolled_at,omitempty"`

	// The Square-assigned ID of the loyalty account.
	// Max Length: 36
	ID string `json:"id,omitempty"`

	// The total points accrued during the lifetime of the account.
	// Minimum: 0
	LifetimePoints *int64 `json:"lifetime_points,omitempty"`

	// The list of mappings that the account is associated with.
	// Currently, a buyer can only be mapped to a loyalty account using
	// a phone number. Therefore, the list can only have one mapping.
	// Required: true
	Mappings []*LoyaltyAccountMapping `json:"mappings"`

	// The Square-assigned ID of the `loyalty program` to which the account belongs.
	// Required: true
	// Max Length: 36
	// Min Length: 1
	ProgramID *string `json:"program_id"`

	// The timestamp when the loyalty account was last updated, in RFC 3339 format.
	UpdatedAt string `json:"updated_at,omitempty"`
}

LoyaltyAccount Describes a loyalty account. For more information, see [Loyalty Overview](/docs/loyalty/overview).

swagger:model LoyaltyAccount

func (*LoyaltyAccount) ContextValidate

func (m *LoyaltyAccount) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this loyalty account based on the context it is used

func (*LoyaltyAccount) MarshalBinary

func (m *LoyaltyAccount) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyAccount) UnmarshalBinary

func (m *LoyaltyAccount) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyAccount) Validate

func (m *LoyaltyAccount) Validate(formats strfmt.Registry) error

Validate validates this loyalty account

type LoyaltyAccountMapping

type LoyaltyAccountMapping struct {

	// The timestamp when the mapping was created, in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// The Square-assigned ID of the mapping.
	// Max Length: 36
	ID string `json:"id,omitempty"`

	// The type of mapping.
	// See [LoyaltyAccountMappingType](#type-loyaltyaccountmappingtype) for possible values
	// Required: true
	Type *string `json:"type"`

	// The phone number, in E.164 format. For example, "+14155551111".
	// Required: true
	// Min Length: 1
	Value *string `json:"value"`
}

LoyaltyAccountMapping Associates a loyalty account with the buyer's phone number. For more information, see [Loyalty Overview](/docs/loyalty/overview).

swagger:model LoyaltyAccountMapping

func (*LoyaltyAccountMapping) ContextValidate

func (m *LoyaltyAccountMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty account mapping based on context it is used

func (*LoyaltyAccountMapping) MarshalBinary

func (m *LoyaltyAccountMapping) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyAccountMapping) UnmarshalBinary

func (m *LoyaltyAccountMapping) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyAccountMapping) Validate

func (m *LoyaltyAccountMapping) Validate(formats strfmt.Registry) error

Validate validates this loyalty account mapping

type LoyaltyAccountMappingType

type LoyaltyAccountMappingType string

LoyaltyAccountMappingType The type of mapping.

swagger:model LoyaltyAccountMappingType

const (

	// LoyaltyAccountMappingTypePHONE captures enum value "PHONE"
	LoyaltyAccountMappingTypePHONE LoyaltyAccountMappingType = "PHONE"
)

func (LoyaltyAccountMappingType) ContextValidate

func (m LoyaltyAccountMappingType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty account mapping type based on context it is used

func (LoyaltyAccountMappingType) Validate

func (m LoyaltyAccountMappingType) Validate(formats strfmt.Registry) error

Validate validates this loyalty account mapping type

type LoyaltyEvent

type LoyaltyEvent struct {

	// Provides metadata when the event `type` is `ACCUMULATE_POINTS`.
	AccumulatePoints *LoyaltyEventAccumulatePoints `json:"accumulate_points,omitempty"`

	// Provides metadata when the event `type` is `ADJUST_POINTS`.
	AdjustPoints *LoyaltyEventAdjustPoints `json:"adjust_points,omitempty"`

	// Provides metadata when the event `type` is `CREATE_REWARD`.
	CreateReward *LoyaltyEventCreateReward `json:"create_reward,omitempty"`

	// The timestamp when the event was created, in RFC 3339 format.
	// Required: true
	// Min Length: 1
	CreatedAt *string `json:"created_at"`

	// Provides metadata when the event `type` is `DELETE_REWARD`.
	DeleteReward *LoyaltyEventDeleteReward `json:"delete_reward,omitempty"`

	// Provides metadata when the event `type` is `EXPIRE_POINTS`.
	ExpirePoints *LoyaltyEventExpirePoints `json:"expire_points,omitempty"`

	// The Square-assigned ID of the loyalty event.
	// Required: true
	// Min Length: 1
	ID *string `json:"id"`

	// The ID of the `location` where the event occurred.
	LocationID string `json:"location_id,omitempty"`

	// The ID of the `loyalty account` in which the event occurred.
	// Required: true
	// Max Length: 36
	// Min Length: 1
	LoyaltyAccountID *string `json:"loyalty_account_id"`

	// Provides metadata when the event `type` is `OTHER`.
	OtherEvent *LoyaltyEventOther `json:"other_event,omitempty"`

	// Provides metadata when the event `type` is `REDEEM_REWARD`.
	RedeemReward *LoyaltyEventRedeemReward `json:"redeem_reward,omitempty"`

	// Defines whether the event was generated by the Square Point of Sale.
	// See [LoyaltyEventSource](#type-loyaltyeventsource) for possible values
	// Required: true
	Source *string `json:"source"`

	// The type of the loyalty event.
	// See [LoyaltyEventType](#type-loyaltyeventtype) for possible values
	// Required: true
	Type *string `json:"type"`
}

LoyaltyEvent Provides information about a loyalty event. For more information, see [Loyalty events](/docs/loyalty-api/overview/#loyalty-events).

swagger:model LoyaltyEvent

func (*LoyaltyEvent) ContextValidate

func (m *LoyaltyEvent) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this loyalty event based on the context it is used

func (*LoyaltyEvent) MarshalBinary

func (m *LoyaltyEvent) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyEvent) UnmarshalBinary

func (m *LoyaltyEvent) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyEvent) Validate

func (m *LoyaltyEvent) Validate(formats strfmt.Registry) error

Validate validates this loyalty event

type LoyaltyEventAccumulatePoints

type LoyaltyEventAccumulatePoints struct {

	// The ID of the `loyalty program`.
	// Max Length: 36
	LoyaltyProgramID string `json:"loyalty_program_id,omitempty"`

	// The ID of the `order` for which the buyer accumulated the points.
	// This field is returned only if the Orders API is used to process orders.
	OrderID string `json:"order_id,omitempty"`

	// The number of points accumulated by the event.
	// Minimum: 1
	Points int64 `json:"points,omitempty"`
}

LoyaltyEventAccumulatePoints Provides metadata when the event `type` is `ACCUMULATE_POINTS`.

swagger:model LoyaltyEventAccumulatePoints

func (*LoyaltyEventAccumulatePoints) ContextValidate

func (m *LoyaltyEventAccumulatePoints) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty event accumulate points based on context it is used

func (*LoyaltyEventAccumulatePoints) MarshalBinary

func (m *LoyaltyEventAccumulatePoints) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyEventAccumulatePoints) UnmarshalBinary

func (m *LoyaltyEventAccumulatePoints) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyEventAccumulatePoints) Validate

func (m *LoyaltyEventAccumulatePoints) Validate(formats strfmt.Registry) error

Validate validates this loyalty event accumulate points

type LoyaltyEventAdjustPoints

type LoyaltyEventAdjustPoints struct {

	// The Square-assigned ID of the `loyalty program`.
	// Max Length: 36
	LoyaltyProgramID string `json:"loyalty_program_id,omitempty"`

	// The number of points added or removed.
	// Required: true
	Points *int64 `json:"points"`

	// The reason for the adjustment of points.
	Reason string `json:"reason,omitempty"`
}

LoyaltyEventAdjustPoints Provides metadata when the event `type` is `ADJUST_POINTS`.

swagger:model LoyaltyEventAdjustPoints

func (*LoyaltyEventAdjustPoints) ContextValidate

func (m *LoyaltyEventAdjustPoints) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty event adjust points based on context it is used

func (*LoyaltyEventAdjustPoints) MarshalBinary

func (m *LoyaltyEventAdjustPoints) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyEventAdjustPoints) UnmarshalBinary

func (m *LoyaltyEventAdjustPoints) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyEventAdjustPoints) Validate

func (m *LoyaltyEventAdjustPoints) Validate(formats strfmt.Registry) error

Validate validates this loyalty event adjust points

type LoyaltyEventCreateReward

type LoyaltyEventCreateReward struct {

	// The ID of the `loyalty program`.
	// Required: true
	// Max Length: 36
	// Min Length: 1
	LoyaltyProgramID *string `json:"loyalty_program_id"`

	// The loyalty points used to create the reward.
	// Required: true
	// Maximum: 0
	Points *int64 `json:"points"`

	// The Square-assigned ID of the created `loyalty reward`.
	// This field is returned only if the event source is `LOYALTY_API`.
	// Max Length: 36
	RewardID string `json:"reward_id,omitempty"`
}

LoyaltyEventCreateReward Provides metadata when the event `type` is `CREATE_REWARD`.

swagger:model LoyaltyEventCreateReward

func (*LoyaltyEventCreateReward) ContextValidate

func (m *LoyaltyEventCreateReward) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty event create reward based on context it is used

func (*LoyaltyEventCreateReward) MarshalBinary

func (m *LoyaltyEventCreateReward) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyEventCreateReward) UnmarshalBinary

func (m *LoyaltyEventCreateReward) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyEventCreateReward) Validate

func (m *LoyaltyEventCreateReward) Validate(formats strfmt.Registry) error

Validate validates this loyalty event create reward

type LoyaltyEventDateTimeFilter

type LoyaltyEventDateTimeFilter struct {

	// The `created_at` date time range used to filter the result.
	// Required: true
	CreatedAt *TimeRange `json:"created_at"`
}

LoyaltyEventDateTimeFilter Filter events by date time range.

swagger:model LoyaltyEventDateTimeFilter

func (*LoyaltyEventDateTimeFilter) ContextValidate

func (m *LoyaltyEventDateTimeFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this loyalty event date time filter based on the context it is used

func (*LoyaltyEventDateTimeFilter) MarshalBinary

func (m *LoyaltyEventDateTimeFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyEventDateTimeFilter) UnmarshalBinary

func (m *LoyaltyEventDateTimeFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyEventDateTimeFilter) Validate

func (m *LoyaltyEventDateTimeFilter) Validate(formats strfmt.Registry) error

Validate validates this loyalty event date time filter

type LoyaltyEventDeleteReward

type LoyaltyEventDeleteReward struct {

	// The ID of the `loyalty program`.
	// Required: true
	// Max Length: 36
	// Min Length: 1
	LoyaltyProgramID *string `json:"loyalty_program_id"`

	// The number of points returned to the loyalty account.
	// Required: true
	// Minimum: 0
	Points *int64 `json:"points"`

	// The ID of the deleted `loyalty reward`.
	// This field is returned only if the event source is `LOYALTY_API`.
	// Max Length: 36
	RewardID string `json:"reward_id,omitempty"`
}

LoyaltyEventDeleteReward Provides metadata when the event `type` is `DELETE_REWARD`.

swagger:model LoyaltyEventDeleteReward

func (*LoyaltyEventDeleteReward) ContextValidate

func (m *LoyaltyEventDeleteReward) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty event delete reward based on context it is used

func (*LoyaltyEventDeleteReward) MarshalBinary

func (m *LoyaltyEventDeleteReward) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyEventDeleteReward) UnmarshalBinary

func (m *LoyaltyEventDeleteReward) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyEventDeleteReward) Validate

func (m *LoyaltyEventDeleteReward) Validate(formats strfmt.Registry) error

Validate validates this loyalty event delete reward

type LoyaltyEventExpirePoints

type LoyaltyEventExpirePoints struct {

	// The Square-assigned ID of the `loyalty program`.
	// Required: true
	// Max Length: 36
	// Min Length: 1
	LoyaltyProgramID *string `json:"loyalty_program_id"`

	// The number of points expired.
	// Required: true
	// Maximum: 0
	Points *int64 `json:"points"`
}

LoyaltyEventExpirePoints Provides metadata when the event `type` is `EXPIRE_POINTS`.

swagger:model LoyaltyEventExpirePoints

func (*LoyaltyEventExpirePoints) ContextValidate

func (m *LoyaltyEventExpirePoints) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty event expire points based on context it is used

func (*LoyaltyEventExpirePoints) MarshalBinary

func (m *LoyaltyEventExpirePoints) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyEventExpirePoints) UnmarshalBinary

func (m *LoyaltyEventExpirePoints) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyEventExpirePoints) Validate

func (m *LoyaltyEventExpirePoints) Validate(formats strfmt.Registry) error

Validate validates this loyalty event expire points

type LoyaltyEventFilter

type LoyaltyEventFilter struct {

	// Filter events by date time range.
	// For each range, the start time is inclusive and the end time
	// is exclusive.
	DateTimeFilter *LoyaltyEventDateTimeFilter `json:"date_time_filter,omitempty"`

	// Filter events by location.
	LocationFilter *LoyaltyEventLocationFilter `json:"location_filter,omitempty"`

	// Filter events by loyalty account.
	LoyaltyAccountFilter *LoyaltyEventLoyaltyAccountFilter `json:"loyalty_account_filter,omitempty"`

	// Filter events by the order associated with the event.
	OrderFilter *LoyaltyEventOrderFilter `json:"order_filter,omitempty"`

	// Filter events by event type.
	TypeFilter *LoyaltyEventTypeFilter `json:"type_filter,omitempty"`
}

LoyaltyEventFilter The filtering criteria. If the request specifies multiple filters, the endpoint uses a logical AND to evaluate them.

swagger:model LoyaltyEventFilter

func (*LoyaltyEventFilter) ContextValidate

func (m *LoyaltyEventFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this loyalty event filter based on the context it is used

func (*LoyaltyEventFilter) MarshalBinary

func (m *LoyaltyEventFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyEventFilter) UnmarshalBinary

func (m *LoyaltyEventFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyEventFilter) Validate

func (m *LoyaltyEventFilter) Validate(formats strfmt.Registry) error

Validate validates this loyalty event filter

type LoyaltyEventLocationFilter

type LoyaltyEventLocationFilter struct {

	// The `location` IDs for loyalty events to query.
	// If multiple values are specified, the endpoint uses
	// a logical OR to combine them.
	// Required: true
	LocationIds []string `json:"location_ids"`
}

LoyaltyEventLocationFilter Filter events by location.

swagger:model LoyaltyEventLocationFilter

func (*LoyaltyEventLocationFilter) ContextValidate

func (m *LoyaltyEventLocationFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty event location filter based on context it is used

func (*LoyaltyEventLocationFilter) MarshalBinary

func (m *LoyaltyEventLocationFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyEventLocationFilter) UnmarshalBinary

func (m *LoyaltyEventLocationFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyEventLocationFilter) Validate

func (m *LoyaltyEventLocationFilter) Validate(formats strfmt.Registry) error

Validate validates this loyalty event location filter

type LoyaltyEventLoyaltyAccountFilter

type LoyaltyEventLoyaltyAccountFilter struct {

	// The ID of the `loyalty account` associated with loyalty events.
	// Required: true
	// Min Length: 1
	LoyaltyAccountID *string `json:"loyalty_account_id"`
}

LoyaltyEventLoyaltyAccountFilter Filter events by loyalty account.

swagger:model LoyaltyEventLoyaltyAccountFilter

func (*LoyaltyEventLoyaltyAccountFilter) ContextValidate

func (m *LoyaltyEventLoyaltyAccountFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty event loyalty account filter based on context it is used

func (*LoyaltyEventLoyaltyAccountFilter) MarshalBinary

func (m *LoyaltyEventLoyaltyAccountFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyEventLoyaltyAccountFilter) UnmarshalBinary

func (m *LoyaltyEventLoyaltyAccountFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyEventLoyaltyAccountFilter) Validate

Validate validates this loyalty event loyalty account filter

type LoyaltyEventOrderFilter

type LoyaltyEventOrderFilter struct {

	// The ID of the `order` associated with the event.
	// Required: true
	// Min Length: 1
	OrderID *string `json:"order_id"`
}

LoyaltyEventOrderFilter Filter events by the order associated with the event.

swagger:model LoyaltyEventOrderFilter

func (*LoyaltyEventOrderFilter) ContextValidate

func (m *LoyaltyEventOrderFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty event order filter based on context it is used

func (*LoyaltyEventOrderFilter) MarshalBinary

func (m *LoyaltyEventOrderFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyEventOrderFilter) UnmarshalBinary

func (m *LoyaltyEventOrderFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyEventOrderFilter) Validate

func (m *LoyaltyEventOrderFilter) Validate(formats strfmt.Registry) error

Validate validates this loyalty event order filter

type LoyaltyEventOther

type LoyaltyEventOther struct {

	// The Square-assigned ID of the `loyalty program`.
	// Required: true
	// Max Length: 36
	// Min Length: 1
	LoyaltyProgramID *string `json:"loyalty_program_id"`

	// The number of points added or removed.
	// Required: true
	Points *int64 `json:"points"`
}

LoyaltyEventOther Provides metadata when the event `type` is `OTHER`.

swagger:model LoyaltyEventOther

func (*LoyaltyEventOther) ContextValidate

func (m *LoyaltyEventOther) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty event other based on context it is used

func (*LoyaltyEventOther) MarshalBinary

func (m *LoyaltyEventOther) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyEventOther) UnmarshalBinary

func (m *LoyaltyEventOther) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyEventOther) Validate

func (m *LoyaltyEventOther) Validate(formats strfmt.Registry) error

Validate validates this loyalty event other

type LoyaltyEventQuery

type LoyaltyEventQuery struct {

	// The query filter criteria.
	Filter *LoyaltyEventFilter `json:"filter,omitempty"`
}

LoyaltyEventQuery Represents a query used to search for loyalty events.

swagger:model LoyaltyEventQuery

func (*LoyaltyEventQuery) ContextValidate

func (m *LoyaltyEventQuery) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this loyalty event query based on the context it is used

func (*LoyaltyEventQuery) MarshalBinary

func (m *LoyaltyEventQuery) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyEventQuery) UnmarshalBinary

func (m *LoyaltyEventQuery) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyEventQuery) Validate

func (m *LoyaltyEventQuery) Validate(formats strfmt.Registry) error

Validate validates this loyalty event query

type LoyaltyEventRedeemReward

type LoyaltyEventRedeemReward struct {

	// The ID of the `loyalty program`.
	// Required: true
	// Max Length: 36
	// Min Length: 1
	LoyaltyProgramID *string `json:"loyalty_program_id"`

	// The ID of the `order` that redeemed the reward.
	// This field is returned only if the Orders API is used to process orders.
	OrderID string `json:"order_id,omitempty"`

	// The ID of the redeemed `loyalty reward`.
	// This field is returned only if the event source is `LOYALTY_API`.
	// Max Length: 36
	RewardID string `json:"reward_id,omitempty"`
}

LoyaltyEventRedeemReward Provides metadata when the event `type` is `REDEEM_REWARD`.

swagger:model LoyaltyEventRedeemReward

func (*LoyaltyEventRedeemReward) ContextValidate

func (m *LoyaltyEventRedeemReward) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty event redeem reward based on context it is used

func (*LoyaltyEventRedeemReward) MarshalBinary

func (m *LoyaltyEventRedeemReward) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyEventRedeemReward) UnmarshalBinary

func (m *LoyaltyEventRedeemReward) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyEventRedeemReward) Validate

func (m *LoyaltyEventRedeemReward) Validate(formats strfmt.Registry) error

Validate validates this loyalty event redeem reward

type LoyaltyEventSource

type LoyaltyEventSource string

LoyaltyEventSource Defines whether the event was generated by the Square Point of Sale.

swagger:model LoyaltyEventSource

const (

	// LoyaltyEventSourceSQUARE captures enum value "SQUARE"
	LoyaltyEventSourceSQUARE LoyaltyEventSource = "SQUARE"

	// LoyaltyEventSourceLOYALTYAPI captures enum value "LOYALTY_API"
	LoyaltyEventSourceLOYALTYAPI LoyaltyEventSource = "LOYALTY_API"
)

func (LoyaltyEventSource) ContextValidate

func (m LoyaltyEventSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty event source based on context it is used

func (LoyaltyEventSource) Validate

func (m LoyaltyEventSource) Validate(formats strfmt.Registry) error

Validate validates this loyalty event source

type LoyaltyEventType

type LoyaltyEventType string

LoyaltyEventType The type of the loyalty event.

swagger:model LoyaltyEventType

const (

	// LoyaltyEventTypeACCUMULATEPOINTS captures enum value "ACCUMULATE_POINTS"
	LoyaltyEventTypeACCUMULATEPOINTS LoyaltyEventType = "ACCUMULATE_POINTS"

	// LoyaltyEventTypeCREATEREWARD captures enum value "CREATE_REWARD"
	LoyaltyEventTypeCREATEREWARD LoyaltyEventType = "CREATE_REWARD"

	// LoyaltyEventTypeREDEEMREWARD captures enum value "REDEEM_REWARD"
	LoyaltyEventTypeREDEEMREWARD LoyaltyEventType = "REDEEM_REWARD"

	// LoyaltyEventTypeDELETEREWARD captures enum value "DELETE_REWARD"
	LoyaltyEventTypeDELETEREWARD LoyaltyEventType = "DELETE_REWARD"

	// LoyaltyEventTypeADJUSTPOINTS captures enum value "ADJUST_POINTS"
	LoyaltyEventTypeADJUSTPOINTS LoyaltyEventType = "ADJUST_POINTS"

	// LoyaltyEventTypeEXPIREPOINTS captures enum value "EXPIRE_POINTS"
	LoyaltyEventTypeEXPIREPOINTS LoyaltyEventType = "EXPIRE_POINTS"

	// LoyaltyEventTypeOTHER captures enum value "OTHER"
	LoyaltyEventTypeOTHER LoyaltyEventType = "OTHER"
)

func (LoyaltyEventType) ContextValidate

func (m LoyaltyEventType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty event type based on context it is used

func (LoyaltyEventType) Validate

func (m LoyaltyEventType) Validate(formats strfmt.Registry) error

Validate validates this loyalty event type

type LoyaltyEventTypeFilter

type LoyaltyEventTypeFilter struct {

	// The loyalty event types used to filter the result.
	// If multiple values are specified, the endpoint uses a
	// logical OR to combine them.
	// See [LoyaltyEventType](#type-loyaltyeventtype) for possible values
	// Required: true
	Types []string `json:"types"`
}

LoyaltyEventTypeFilter Filter events by event type.

swagger:model LoyaltyEventTypeFilter

func (*LoyaltyEventTypeFilter) ContextValidate

func (m *LoyaltyEventTypeFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty event type filter based on context it is used

func (*LoyaltyEventTypeFilter) MarshalBinary

func (m *LoyaltyEventTypeFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyEventTypeFilter) UnmarshalBinary

func (m *LoyaltyEventTypeFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyEventTypeFilter) Validate

func (m *LoyaltyEventTypeFilter) Validate(formats strfmt.Registry) error

Validate validates this loyalty event type filter

type LoyaltyProgram

type LoyaltyProgram struct {

	// Defines how buyers can earn loyalty points.
	// Required: true
	AccrualRules []*LoyaltyProgramAccrualRule `json:"accrual_rules"`

	// The timestamp when the program was created, in RFC 3339 format.
	// Required: true
	// Min Length: 1
	CreatedAt *string `json:"created_at"`

	// If present, details for how points expire.
	ExpirationPolicy *LoyaltyProgramExpirationPolicy `json:"expiration_policy,omitempty"`

	// The Square-assigned ID of the loyalty program. Updates to
	// the loyalty program do not modify the identifier.
	// Required: true
	// Max Length: 36
	// Min Length: 1
	ID *string `json:"id"`

	// The `locations` at which the program is active.
	// Required: true
	LocationIds []string `json:"location_ids"`

	// The list of rewards for buyers, sorted by ascending points.
	// Required: true
	RewardTiers []*LoyaltyProgramRewardTier `json:"reward_tiers"`

	// Whether the program is currently active.
	// See [LoyaltyProgramStatus](#type-loyaltyprogramstatus) for possible values
	// Required: true
	Status *string `json:"status"`

	// A cosmetic name for the “points” currency.
	// Required: true
	Terminology *LoyaltyProgramTerminology `json:"terminology"`

	// The timestamp when the reward was last updated, in RFC 3339 format.
	// Required: true
	// Min Length: 1
	UpdatedAt *string `json:"updated_at"`
}

LoyaltyProgram loyalty program

swagger:model LoyaltyProgram

func (*LoyaltyProgram) ContextValidate

func (m *LoyaltyProgram) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this loyalty program based on the context it is used

func (*LoyaltyProgram) MarshalBinary

func (m *LoyaltyProgram) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyProgram) UnmarshalBinary

func (m *LoyaltyProgram) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyProgram) Validate

func (m *LoyaltyProgram) Validate(formats strfmt.Registry) error

Validate validates this loyalty program

type LoyaltyProgramAccrualRule

type LoyaltyProgramAccrualRule struct {

	// The type of the accrual rule that defines how buyers can earn points.
	// See [LoyaltyProgramAccrualRuleType](#type-loyaltyprogramaccrualruletype) for possible values
	// Required: true
	AccrualType *string `json:"accrual_type"`

	// The ID of the `catalog object` to purchase to earn the number of points defined by the
	// rule. This is either an item variation or a category, depending on the type. This is defined on
	// `ITEM_VARIATION` rules and `CATEGORY` rules.
	CatalogObjectID string `json:"catalog_object_id,omitempty"`

	// The number of points that
	// buyers earn based on the `accrual_type`.
	// Minimum: 1
	Points int64 `json:"points,omitempty"`

	// When the accrual rule is spend-based (`accrual_type` is `SPEND`),
	// this field indicates the amount that a buyer must spend
	// to earn the points. For example,
	// suppose the accrual rule is "earn 1 point for every $10 you spend".
	// Then, buyer earns a point for every $10 they spend. If
	// buyer spends $105, the buyer earns 10 points.
	SpendAmountMoney *Money `json:"spend_amount_money,omitempty"`

	// When the accrual rule is visit-based (`accrual_type` is `VISIT`),
	// this field indicates the minimum purchase required during the visit to
	// quality for the reward.
	VisitMinimumAmountMoney *Money `json:"visit_minimum_amount_money,omitempty"`
}

LoyaltyProgramAccrualRule Defines an accrual rule, which is how buyers can earn points.

swagger:model LoyaltyProgramAccrualRule

func (*LoyaltyProgramAccrualRule) ContextValidate

func (m *LoyaltyProgramAccrualRule) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this loyalty program accrual rule based on the context it is used

func (*LoyaltyProgramAccrualRule) MarshalBinary

func (m *LoyaltyProgramAccrualRule) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyProgramAccrualRule) UnmarshalBinary

func (m *LoyaltyProgramAccrualRule) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyProgramAccrualRule) Validate

func (m *LoyaltyProgramAccrualRule) Validate(formats strfmt.Registry) error

Validate validates this loyalty program accrual rule

type LoyaltyProgramAccrualRuleType

type LoyaltyProgramAccrualRuleType string

LoyaltyProgramAccrualRuleType The type of the accrual rule that defines how buyers can earn points.

swagger:model LoyaltyProgramAccrualRuleType

const (

	// LoyaltyProgramAccrualRuleTypeVISIT captures enum value "VISIT"
	LoyaltyProgramAccrualRuleTypeVISIT LoyaltyProgramAccrualRuleType = "VISIT"

	// LoyaltyProgramAccrualRuleTypeSPEND captures enum value "SPEND"
	LoyaltyProgramAccrualRuleTypeSPEND LoyaltyProgramAccrualRuleType = "SPEND"

	// LoyaltyProgramAccrualRuleTypeITEMVARIATION captures enum value "ITEM_VARIATION"
	LoyaltyProgramAccrualRuleTypeITEMVARIATION LoyaltyProgramAccrualRuleType = "ITEM_VARIATION"

	// LoyaltyProgramAccrualRuleTypeCATEGORY captures enum value "CATEGORY"
	LoyaltyProgramAccrualRuleTypeCATEGORY LoyaltyProgramAccrualRuleType = "CATEGORY"
)

func (LoyaltyProgramAccrualRuleType) ContextValidate

func (m LoyaltyProgramAccrualRuleType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty program accrual rule type based on context it is used

func (LoyaltyProgramAccrualRuleType) Validate

func (m LoyaltyProgramAccrualRuleType) Validate(formats strfmt.Registry) error

Validate validates this loyalty program accrual rule type

type LoyaltyProgramExpirationPolicy

type LoyaltyProgramExpirationPolicy struct {

	// The duration of time before points expire, in RFC 3339 format.
	// Required: true
	// Min Length: 1
	ExpirationDuration *string `json:"expiration_duration"`
}

LoyaltyProgramExpirationPolicy Describes when the loyalty program expires.

swagger:model LoyaltyProgramExpirationPolicy

func (*LoyaltyProgramExpirationPolicy) ContextValidate

func (m *LoyaltyProgramExpirationPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty program expiration policy based on context it is used

func (*LoyaltyProgramExpirationPolicy) MarshalBinary

func (m *LoyaltyProgramExpirationPolicy) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyProgramExpirationPolicy) UnmarshalBinary

func (m *LoyaltyProgramExpirationPolicy) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyProgramExpirationPolicy) Validate

func (m *LoyaltyProgramExpirationPolicy) Validate(formats strfmt.Registry) error

Validate validates this loyalty program expiration policy

type LoyaltyProgramRewardDefinition

type LoyaltyProgramRewardDefinition struct {

	// The list of catalog objects to which this reward can be applied. They are either all item-variation ids or category ids, depending on the `type` field.
	// DEPRECATED at version 2020-12-16. You can find this information in the `product_set_data.product_ids_any` field
	// of the `PRODUCT_SET` catalog object referenced by the pricing rule.
	CatalogObjectIds []string `json:"catalog_object_ids"`

	// The type of discount the reward tier offers. DEPRECATED at version 2020-12-16. You can find this information
	// in the `discount_data.discount_type` field of the `DISCOUNT` catalog object referenced by the pricing rule.
	// See [LoyaltyProgramRewardDefinitionType](#type-loyaltyprogramrewarddefinitiontype) for possible values
	// Required: true
	DiscountType *string `json:"discount_type"`

	// The amount of the discount. Present if `discount_type` is `FIXED_AMOUNT`. For example, $5 off.
	// DEPRECATED at version 2020-12-16. You can find this information in the `discount_data.amount_money` field of the
	// `DISCOUNT` catalog object referenced by the pricing rule.
	FixedDiscountMoney *Money `json:"fixed_discount_money,omitempty"`

	// When `discount_type` is `FIXED_PERCENTAGE`, the maximum discount amount that can be applied.
	// DEPRECATED at version 2020-12-16. You can find this information in the `discount_data.maximum_amount_money` field
	// of the `DISCOUNT` catalog object referenced by the the pricing rule.
	MaxDiscountMoney *Money `json:"max_discount_money,omitempty"`

	// The fixed percentage of the discount. Present if `discount_type` is `FIXED_PERCENTAGE`.
	// For example, a 7.25% off discount will be represented as "7.25". DEPRECATED at version 2020-12-16. You can find this
	// information in the `discount_data.percentage` field of the `DISCOUNT` catalog object referenced by the pricing rule.
	PercentageDiscount string `json:"percentage_discount,omitempty"`

	// Indicates the scope of the reward tier. DEPRECATED at version 2020-12-16. You can find this information in the
	// `discount_target_scope` field of the `PRICING_RULE` catalog object and the `product_set_data` field of the `PRODUCT_SET`
	// catalog object referenced by the pricing rule. For `ORDER` scopes, the target scope is `WHOLE_PURCHASE` and `all_products`
	// is true. For `ITEM_VARIATION` and `CATEGORY` scopes, the target scope is `LINE_ITEM` and `product_ids_any` is a list of
	// catalog object IDs of the given type.
	// See [LoyaltyProgramRewardDefinitionScope](#type-loyaltyprogramrewarddefinitionscope) for possible values
	// Required: true
	Scope *string `json:"scope"`
}

LoyaltyProgramRewardDefinition Provides details about the reward tier discount. DEPRECATED at version 2020-12-16. Discount details are now defined using a catalog pricing rule and other catalog objects. For more information, see [Get discount details for the reward](/docs/loyalty-api/overview#get-discount-details).

swagger:model LoyaltyProgramRewardDefinition

func (*LoyaltyProgramRewardDefinition) ContextValidate

func (m *LoyaltyProgramRewardDefinition) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this loyalty program reward definition based on the context it is used

func (*LoyaltyProgramRewardDefinition) MarshalBinary

func (m *LoyaltyProgramRewardDefinition) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyProgramRewardDefinition) UnmarshalBinary

func (m *LoyaltyProgramRewardDefinition) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyProgramRewardDefinition) Validate

func (m *LoyaltyProgramRewardDefinition) Validate(formats strfmt.Registry) error

Validate validates this loyalty program reward definition

type LoyaltyProgramRewardDefinitionScope

type LoyaltyProgramRewardDefinitionScope string

LoyaltyProgramRewardDefinitionScope Indicates the scope of the reward tier. DEPRECATED at version 2020-12-16. Discount details are now defined using a catalog pricing rule and other catalog objects. For more information, see [Get discount details for the reward](https://developer.squareup.com/docs/docs/loyalty-api/overview#get-discount-details).

swagger:model LoyaltyProgramRewardDefinitionScope

const (

	// LoyaltyProgramRewardDefinitionScopeORDER captures enum value "ORDER"
	LoyaltyProgramRewardDefinitionScopeORDER LoyaltyProgramRewardDefinitionScope = "ORDER"

	// LoyaltyProgramRewardDefinitionScopeITEMVARIATION captures enum value "ITEM_VARIATION"
	LoyaltyProgramRewardDefinitionScopeITEMVARIATION LoyaltyProgramRewardDefinitionScope = "ITEM_VARIATION"

	// LoyaltyProgramRewardDefinitionScopeCATEGORY captures enum value "CATEGORY"
	LoyaltyProgramRewardDefinitionScopeCATEGORY LoyaltyProgramRewardDefinitionScope = "CATEGORY"
)

func (LoyaltyProgramRewardDefinitionScope) ContextValidate

func (m LoyaltyProgramRewardDefinitionScope) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty program reward definition scope based on context it is used

func (LoyaltyProgramRewardDefinitionScope) Validate

Validate validates this loyalty program reward definition scope

type LoyaltyProgramRewardDefinitionType

type LoyaltyProgramRewardDefinitionType string

LoyaltyProgramRewardDefinitionType The type of discount the reward tier offers. DEPRECATED at version 2020-12-16. Discount details are now defined using a catalog pricing rule and other catalog objects. For more information, see [Get discount details for the reward](https://developer.squareup.com/docs/docs/loyalty-api/overview#get-discount-details).

swagger:model LoyaltyProgramRewardDefinitionType

const (

	// LoyaltyProgramRewardDefinitionTypeFIXEDAMOUNT captures enum value "FIXED_AMOUNT"
	LoyaltyProgramRewardDefinitionTypeFIXEDAMOUNT LoyaltyProgramRewardDefinitionType = "FIXED_AMOUNT"

	// LoyaltyProgramRewardDefinitionTypeFIXEDPERCENTAGE captures enum value "FIXED_PERCENTAGE"
	LoyaltyProgramRewardDefinitionTypeFIXEDPERCENTAGE LoyaltyProgramRewardDefinitionType = "FIXED_PERCENTAGE"
)

func (LoyaltyProgramRewardDefinitionType) ContextValidate

func (m LoyaltyProgramRewardDefinitionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty program reward definition type based on context it is used

func (LoyaltyProgramRewardDefinitionType) Validate

Validate validates this loyalty program reward definition type

type LoyaltyProgramRewardTier

type LoyaltyProgramRewardTier struct {

	// The timestamp when the reward tier was created, in RFC 3339 format.
	// Required: true
	CreatedAt *string `json:"created_at"`

	// Provides details about the reward tier definition.
	// DEPRECATED at version 2020-12-16. Replaced by the `pricing_rule_reference` field.
	// Required: true
	Definition *LoyaltyProgramRewardDefinition `json:"definition"`

	// The Square-assigned ID of the reward tier.
	// Required: true
	// Max Length: 36
	// Min Length: 1
	ID *string `json:"id"`

	// The name of the reward tier.
	// Required: true
	// Min Length: 1
	Name *string `json:"name"`

	// The points exchanged for the reward tier.
	// Required: true
	// Minimum: 1
	Points *int64 `json:"points"`

	// A reference to the specific version of a `PRICING_RULE` catalog object that contains information about the reward tier discount.
	//
	// Use `object_id` and `catalog_version` with the `RetrieveCatalogObject` endpoint
	// to get discount details. Make sure to set `include_related_objects` to true in the request to retrieve all catalog objects
	// that define the discount. For more information, see [Get discount details for the reward](https://developer.squareup.com/docs/docs/loyalty-api/overview#get-discount-details).
	PricingRuleReference *CatalogObjectReference `json:"pricing_rule_reference,omitempty"`
}

LoyaltyProgramRewardTier Describes a loyalty program reward tier.

swagger:model LoyaltyProgramRewardTier

func (*LoyaltyProgramRewardTier) ContextValidate

func (m *LoyaltyProgramRewardTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this loyalty program reward tier based on the context it is used

func (*LoyaltyProgramRewardTier) MarshalBinary

func (m *LoyaltyProgramRewardTier) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyProgramRewardTier) UnmarshalBinary

func (m *LoyaltyProgramRewardTier) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyProgramRewardTier) Validate

func (m *LoyaltyProgramRewardTier) Validate(formats strfmt.Registry) error

Validate validates this loyalty program reward tier

type LoyaltyProgramStatus

type LoyaltyProgramStatus string

LoyaltyProgramStatus Indicates whether the program is currently active.

swagger:model LoyaltyProgramStatus

const (

	// LoyaltyProgramStatusINACTIVE captures enum value "INACTIVE"
	LoyaltyProgramStatusINACTIVE LoyaltyProgramStatus = "INACTIVE"

	// LoyaltyProgramStatusACTIVE captures enum value "ACTIVE"
	LoyaltyProgramStatusACTIVE LoyaltyProgramStatus = "ACTIVE"
)

func (LoyaltyProgramStatus) ContextValidate

func (m LoyaltyProgramStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty program status based on context it is used

func (LoyaltyProgramStatus) Validate

func (m LoyaltyProgramStatus) Validate(formats strfmt.Registry) error

Validate validates this loyalty program status

type LoyaltyProgramTerminology

type LoyaltyProgramTerminology struct {

	// A singular unit for a point (for example, 1 point is called 1 star).
	// Required: true
	// Min Length: 1
	One *string `json:"one"`

	// A plural unit for point (for example, 10 points is called 10 stars).
	// Required: true
	// Min Length: 1
	Other *string `json:"other"`
}

LoyaltyProgramTerminology loyalty program terminology

swagger:model LoyaltyProgramTerminology

func (*LoyaltyProgramTerminology) ContextValidate

func (m *LoyaltyProgramTerminology) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty program terminology based on context it is used

func (*LoyaltyProgramTerminology) MarshalBinary

func (m *LoyaltyProgramTerminology) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyProgramTerminology) UnmarshalBinary

func (m *LoyaltyProgramTerminology) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyProgramTerminology) Validate

func (m *LoyaltyProgramTerminology) Validate(formats strfmt.Registry) error

Validate validates this loyalty program terminology

type LoyaltyReward

type LoyaltyReward struct {

	// The timestamp when the reward was created, in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// The Square-assigned ID of the loyalty reward.
	// Max Length: 36
	ID string `json:"id,omitempty"`

	// The Square-assigned ID of the `loyalty account` to which the reward belongs.
	// Required: true
	// Max Length: 36
	// Min Length: 1
	LoyaltyAccountID *string `json:"loyalty_account_id"`

	// The Square-assigned ID of the `order` to which the reward is attached.
	OrderID string `json:"order_id,omitempty"`

	// The number of loyalty points used for the reward.
	// Minimum: 1
	Points int64 `json:"points,omitempty"`

	// The timestamp when the reward was redeemed, in RFC 3339 format.
	RedeemedAt string `json:"redeemed_at,omitempty"`

	// The Square-assigned ID of the `reward tier` used to create the reward.
	// Required: true
	// Max Length: 36
	// Min Length: 1
	RewardTierID *string `json:"reward_tier_id"`

	// The status of a loyalty reward.
	// See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible values
	Status string `json:"status,omitempty"`

	// The timestamp when the reward was last updated, in RFC 3339 format.
	UpdatedAt string `json:"updated_at,omitempty"`
}

LoyaltyReward loyalty reward

swagger:model LoyaltyReward

func (*LoyaltyReward) ContextValidate

func (m *LoyaltyReward) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty reward based on context it is used

func (*LoyaltyReward) MarshalBinary

func (m *LoyaltyReward) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoyaltyReward) UnmarshalBinary

func (m *LoyaltyReward) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoyaltyReward) Validate

func (m *LoyaltyReward) Validate(formats strfmt.Registry) error

Validate validates this loyalty reward

type LoyaltyRewardStatus

type LoyaltyRewardStatus string

LoyaltyRewardStatus The status of the loyalty reward.

swagger:model LoyaltyRewardStatus

const (

	// LoyaltyRewardStatusISSUED captures enum value "ISSUED"
	LoyaltyRewardStatusISSUED LoyaltyRewardStatus = "ISSUED"

	// LoyaltyRewardStatusREDEEMED captures enum value "REDEEMED"
	LoyaltyRewardStatusREDEEMED LoyaltyRewardStatus = "REDEEMED"

	// LoyaltyRewardStatusDELETED captures enum value "DELETED"
	LoyaltyRewardStatusDELETED LoyaltyRewardStatus = "DELETED"
)

func (LoyaltyRewardStatus) ContextValidate

func (m LoyaltyRewardStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this loyalty reward status based on context it is used

func (LoyaltyRewardStatus) Validate

func (m LoyaltyRewardStatus) Validate(formats strfmt.Registry) error

Validate validates this loyalty reward status

type MeasurementUnit

type MeasurementUnit struct {

	// Represents a standard area unit.
	// See [MeasurementUnitArea](#type-measurementunitarea) for possible values
	AreaUnit string `json:"area_unit,omitempty"`

	// A custom unit of measurement defined by the seller using the Point of Sale
	// app or ad-hoc as an order line item.
	CustomUnit *MeasurementUnitCustom `json:"custom_unit,omitempty"`

	// Reserved for API integrations that lack the ability to specify a real measurement unit
	// See [MeasurementUnitGeneric](#type-measurementunitgeneric) for possible values
	GenericUnit string `json:"generic_unit,omitempty"`

	// Represents a standard length unit.
	// See [MeasurementUnitLength](#type-measurementunitlength) for possible values
	LengthUnit string `json:"length_unit,omitempty"`

	// Represents a standard unit of time.
	// See [MeasurementUnitTime](#type-measurementunittime) for possible values
	TimeUnit string `json:"time_unit,omitempty"`

	// Represents the type of the measurement unit.
	// See [MeasurementUnitUnitType](#type-measurementunitunittype) for possible values
	Type string `json:"type,omitempty"`

	// Represents a standard volume unit.
	// See [MeasurementUnitVolume](#type-measurementunitvolume) for possible values
	VolumeUnit string `json:"volume_unit,omitempty"`

	// Represents a standard unit of weight or mass.
	// See [MeasurementUnitWeight](#type-measurementunitweight) for possible values
	WeightUnit string `json:"weight_unit,omitempty"`
}

MeasurementUnit Represents a unit of measurement to use with a quantity, such as ounces or inches. Exactly one of the following fields are required: `custom_unit`, `area_unit`, `length_unit`, `volume_unit`, and `weight_unit`.

swagger:model MeasurementUnit

func (*MeasurementUnit) ContextValidate

func (m *MeasurementUnit) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this measurement unit based on the context it is used

func (*MeasurementUnit) MarshalBinary

func (m *MeasurementUnit) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*MeasurementUnit) UnmarshalBinary

func (m *MeasurementUnit) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*MeasurementUnit) Validate

func (m *MeasurementUnit) Validate(formats strfmt.Registry) error

Validate validates this measurement unit

type MeasurementUnitArea

type MeasurementUnitArea string

MeasurementUnitArea Unit of area used to measure a quantity.

swagger:model MeasurementUnitArea

const (

	// MeasurementUnitAreaIMPERIALACRE captures enum value "IMPERIAL_ACRE"
	MeasurementUnitAreaIMPERIALACRE MeasurementUnitArea = "IMPERIAL_ACRE"

	// MeasurementUnitAreaIMPERIALSQUAREINCH captures enum value "IMPERIAL_SQUARE_INCH"
	MeasurementUnitAreaIMPERIALSQUAREINCH MeasurementUnitArea = "IMPERIAL_SQUARE_INCH"

	// MeasurementUnitAreaIMPERIALSQUAREFOOT captures enum value "IMPERIAL_SQUARE_FOOT"
	MeasurementUnitAreaIMPERIALSQUAREFOOT MeasurementUnitArea = "IMPERIAL_SQUARE_FOOT"

	// MeasurementUnitAreaIMPERIALSQUAREYARD captures enum value "IMPERIAL_SQUARE_YARD"
	MeasurementUnitAreaIMPERIALSQUAREYARD MeasurementUnitArea = "IMPERIAL_SQUARE_YARD"

	// MeasurementUnitAreaIMPERIALSQUAREMILE captures enum value "IMPERIAL_SQUARE_MILE"
	MeasurementUnitAreaIMPERIALSQUAREMILE MeasurementUnitArea = "IMPERIAL_SQUARE_MILE"

	// MeasurementUnitAreaMETRICSQUARECENTIMETER captures enum value "METRIC_SQUARE_CENTIMETER"
	MeasurementUnitAreaMETRICSQUARECENTIMETER MeasurementUnitArea = "METRIC_SQUARE_CENTIMETER"

	// MeasurementUnitAreaMETRICSQUAREMETER captures enum value "METRIC_SQUARE_METER"
	MeasurementUnitAreaMETRICSQUAREMETER MeasurementUnitArea = "METRIC_SQUARE_METER"

	// MeasurementUnitAreaMETRICSQUAREKILOMETER captures enum value "METRIC_SQUARE_KILOMETER"
	MeasurementUnitAreaMETRICSQUAREKILOMETER MeasurementUnitArea = "METRIC_SQUARE_KILOMETER"
)

func (MeasurementUnitArea) ContextValidate

func (m MeasurementUnitArea) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this measurement unit area based on context it is used

func (MeasurementUnitArea) Validate

func (m MeasurementUnitArea) Validate(formats strfmt.Registry) error

Validate validates this measurement unit area

type MeasurementUnitCustom

type MeasurementUnitCustom struct {

	// The abbreviation of the custom unit, such as "bsh" (bushel). This appears
	// in the cart for the Point of Sale app, and in reports.
	// Required: true
	Abbreviation *string `json:"abbreviation"`

	// The name of the custom unit, for example "bushel".
	// Required: true
	Name *string `json:"name"`
}

MeasurementUnitCustom The information needed to define a custom unit, provided by the seller.

swagger:model MeasurementUnitCustom

func (*MeasurementUnitCustom) ContextValidate

func (m *MeasurementUnitCustom) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this measurement unit custom based on context it is used

func (*MeasurementUnitCustom) MarshalBinary

func (m *MeasurementUnitCustom) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*MeasurementUnitCustom) UnmarshalBinary

func (m *MeasurementUnitCustom) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*MeasurementUnitCustom) Validate

func (m *MeasurementUnitCustom) Validate(formats strfmt.Registry) error

Validate validates this measurement unit custom

type MeasurementUnitGeneric

type MeasurementUnitGeneric string

MeasurementUnitGeneric measurement unit generic

swagger:model MeasurementUnitGeneric

const (

	// MeasurementUnitGenericUNIT captures enum value "UNIT"
	MeasurementUnitGenericUNIT MeasurementUnitGeneric = "UNIT"
)

func (MeasurementUnitGeneric) ContextValidate

func (m MeasurementUnitGeneric) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this measurement unit generic based on context it is used

func (MeasurementUnitGeneric) Validate

func (m MeasurementUnitGeneric) Validate(formats strfmt.Registry) error

Validate validates this measurement unit generic

type MeasurementUnitLength

type MeasurementUnitLength string

MeasurementUnitLength The unit of length used to measure a quantity.

swagger:model MeasurementUnitLength

const (

	// MeasurementUnitLengthIMPERIALINCH captures enum value "IMPERIAL_INCH"
	MeasurementUnitLengthIMPERIALINCH MeasurementUnitLength = "IMPERIAL_INCH"

	// MeasurementUnitLengthIMPERIALFOOT captures enum value "IMPERIAL_FOOT"
	MeasurementUnitLengthIMPERIALFOOT MeasurementUnitLength = "IMPERIAL_FOOT"

	// MeasurementUnitLengthIMPERIALYARD captures enum value "IMPERIAL_YARD"
	MeasurementUnitLengthIMPERIALYARD MeasurementUnitLength = "IMPERIAL_YARD"

	// MeasurementUnitLengthIMPERIALMILE captures enum value "IMPERIAL_MILE"
	MeasurementUnitLengthIMPERIALMILE MeasurementUnitLength = "IMPERIAL_MILE"

	// MeasurementUnitLengthMETRICMILLIMETER captures enum value "METRIC_MILLIMETER"
	MeasurementUnitLengthMETRICMILLIMETER MeasurementUnitLength = "METRIC_MILLIMETER"

	// MeasurementUnitLengthMETRICCENTIMETER captures enum value "METRIC_CENTIMETER"
	MeasurementUnitLengthMETRICCENTIMETER MeasurementUnitLength = "METRIC_CENTIMETER"

	// MeasurementUnitLengthMETRICMETER captures enum value "METRIC_METER"
	MeasurementUnitLengthMETRICMETER MeasurementUnitLength = "METRIC_METER"

	// MeasurementUnitLengthMETRICKILOMETER captures enum value "METRIC_KILOMETER"
	MeasurementUnitLengthMETRICKILOMETER MeasurementUnitLength = "METRIC_KILOMETER"
)

func (MeasurementUnitLength) ContextValidate

func (m MeasurementUnitLength) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this measurement unit length based on context it is used

func (MeasurementUnitLength) Validate

func (m MeasurementUnitLength) Validate(formats strfmt.Registry) error

Validate validates this measurement unit length

type MeasurementUnitTime

type MeasurementUnitTime string

MeasurementUnitTime Unit of time used to measure a quantity (a duration).

swagger:model MeasurementUnitTime

const (

	// MeasurementUnitTimeGENERICMILLISECOND captures enum value "GENERIC_MILLISECOND"
	MeasurementUnitTimeGENERICMILLISECOND MeasurementUnitTime = "GENERIC_MILLISECOND"

	// MeasurementUnitTimeGENERICSECOND captures enum value "GENERIC_SECOND"
	MeasurementUnitTimeGENERICSECOND MeasurementUnitTime = "GENERIC_SECOND"

	// MeasurementUnitTimeGENERICMINUTE captures enum value "GENERIC_MINUTE"
	MeasurementUnitTimeGENERICMINUTE MeasurementUnitTime = "GENERIC_MINUTE"

	// MeasurementUnitTimeGENERICHOUR captures enum value "GENERIC_HOUR"
	MeasurementUnitTimeGENERICHOUR MeasurementUnitTime = "GENERIC_HOUR"

	// MeasurementUnitTimeGENERICDAY captures enum value "GENERIC_DAY"
	MeasurementUnitTimeGENERICDAY MeasurementUnitTime = "GENERIC_DAY"
)

func (MeasurementUnitTime) ContextValidate

func (m MeasurementUnitTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this measurement unit time based on context it is used

func (MeasurementUnitTime) Validate

func (m MeasurementUnitTime) Validate(formats strfmt.Registry) error

Validate validates this measurement unit time

type MeasurementUnitUnitType

type MeasurementUnitUnitType string

MeasurementUnitUnitType Describes the type of this unit and indicates which field contains the unit information. This is an ‘open’ enum.

swagger:model MeasurementUnitUnitType

const (

	// MeasurementUnitUnitTypeTYPECUSTOM captures enum value "TYPE_CUSTOM"
	MeasurementUnitUnitTypeTYPECUSTOM MeasurementUnitUnitType = "TYPE_CUSTOM"

	// MeasurementUnitUnitTypeTYPEAREA captures enum value "TYPE_AREA"
	MeasurementUnitUnitTypeTYPEAREA MeasurementUnitUnitType = "TYPE_AREA"

	// MeasurementUnitUnitTypeTYPELENGTH captures enum value "TYPE_LENGTH"
	MeasurementUnitUnitTypeTYPELENGTH MeasurementUnitUnitType = "TYPE_LENGTH"

	// MeasurementUnitUnitTypeTYPEVOLUME captures enum value "TYPE_VOLUME"
	MeasurementUnitUnitTypeTYPEVOLUME MeasurementUnitUnitType = "TYPE_VOLUME"

	// MeasurementUnitUnitTypeTYPEWEIGHT captures enum value "TYPE_WEIGHT"
	MeasurementUnitUnitTypeTYPEWEIGHT MeasurementUnitUnitType = "TYPE_WEIGHT"

	// MeasurementUnitUnitTypeTYPEGENERIC captures enum value "TYPE_GENERIC"
	MeasurementUnitUnitTypeTYPEGENERIC MeasurementUnitUnitType = "TYPE_GENERIC"
)

func (MeasurementUnitUnitType) ContextValidate

func (m MeasurementUnitUnitType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this measurement unit unit type based on context it is used

func (MeasurementUnitUnitType) Validate

func (m MeasurementUnitUnitType) Validate(formats strfmt.Registry) error

Validate validates this measurement unit unit type

type MeasurementUnitVolume

type MeasurementUnitVolume string

MeasurementUnitVolume The unit of volume used to measure a quantity.

swagger:model MeasurementUnitVolume

const (

	// MeasurementUnitVolumeGENERICFLUIDOUNCE captures enum value "GENERIC_FLUID_OUNCE"
	MeasurementUnitVolumeGENERICFLUIDOUNCE MeasurementUnitVolume = "GENERIC_FLUID_OUNCE"

	// MeasurementUnitVolumeGENERICSHOT captures enum value "GENERIC_SHOT"
	MeasurementUnitVolumeGENERICSHOT MeasurementUnitVolume = "GENERIC_SHOT"

	// MeasurementUnitVolumeGENERICCUP captures enum value "GENERIC_CUP"
	MeasurementUnitVolumeGENERICCUP MeasurementUnitVolume = "GENERIC_CUP"

	// MeasurementUnitVolumeGENERICPINT captures enum value "GENERIC_PINT"
	MeasurementUnitVolumeGENERICPINT MeasurementUnitVolume = "GENERIC_PINT"

	// MeasurementUnitVolumeGENERICQUART captures enum value "GENERIC_QUART"
	MeasurementUnitVolumeGENERICQUART MeasurementUnitVolume = "GENERIC_QUART"

	// MeasurementUnitVolumeGENERICGALLON captures enum value "GENERIC_GALLON"
	MeasurementUnitVolumeGENERICGALLON MeasurementUnitVolume = "GENERIC_GALLON"

	// MeasurementUnitVolumeIMPERIALCUBICINCH captures enum value "IMPERIAL_CUBIC_INCH"
	MeasurementUnitVolumeIMPERIALCUBICINCH MeasurementUnitVolume = "IMPERIAL_CUBIC_INCH"

	// MeasurementUnitVolumeIMPERIALCUBICFOOT captures enum value "IMPERIAL_CUBIC_FOOT"
	MeasurementUnitVolumeIMPERIALCUBICFOOT MeasurementUnitVolume = "IMPERIAL_CUBIC_FOOT"

	// MeasurementUnitVolumeIMPERIALCUBICYARD captures enum value "IMPERIAL_CUBIC_YARD"
	MeasurementUnitVolumeIMPERIALCUBICYARD MeasurementUnitVolume = "IMPERIAL_CUBIC_YARD"

	// MeasurementUnitVolumeMETRICMILLILITER captures enum value "METRIC_MILLILITER"
	MeasurementUnitVolumeMETRICMILLILITER MeasurementUnitVolume = "METRIC_MILLILITER"

	// MeasurementUnitVolumeMETRICLITER captures enum value "METRIC_LITER"
	MeasurementUnitVolumeMETRICLITER MeasurementUnitVolume = "METRIC_LITER"
)

func (MeasurementUnitVolume) ContextValidate

func (m MeasurementUnitVolume) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this measurement unit volume based on context it is used

func (MeasurementUnitVolume) Validate

func (m MeasurementUnitVolume) Validate(formats strfmt.Registry) error

Validate validates this measurement unit volume

type MeasurementUnitWeight

type MeasurementUnitWeight string

MeasurementUnitWeight Unit of weight used to measure a quantity.

swagger:model MeasurementUnitWeight

const (

	// MeasurementUnitWeightIMPERIALWEIGHTOUNCE captures enum value "IMPERIAL_WEIGHT_OUNCE"
	MeasurementUnitWeightIMPERIALWEIGHTOUNCE MeasurementUnitWeight = "IMPERIAL_WEIGHT_OUNCE"

	// MeasurementUnitWeightIMPERIALPOUND captures enum value "IMPERIAL_POUND"
	MeasurementUnitWeightIMPERIALPOUND MeasurementUnitWeight = "IMPERIAL_POUND"

	// MeasurementUnitWeightIMPERIALSTONE captures enum value "IMPERIAL_STONE"
	MeasurementUnitWeightIMPERIALSTONE MeasurementUnitWeight = "IMPERIAL_STONE"

	// MeasurementUnitWeightMETRICMILLIGRAM captures enum value "METRIC_MILLIGRAM"
	MeasurementUnitWeightMETRICMILLIGRAM MeasurementUnitWeight = "METRIC_MILLIGRAM"

	// MeasurementUnitWeightMETRICGRAM captures enum value "METRIC_GRAM"
	MeasurementUnitWeightMETRICGRAM MeasurementUnitWeight = "METRIC_GRAM"

	// MeasurementUnitWeightMETRICKILOGRAM captures enum value "METRIC_KILOGRAM"
	MeasurementUnitWeightMETRICKILOGRAM MeasurementUnitWeight = "METRIC_KILOGRAM"
)

func (MeasurementUnitWeight) ContextValidate

func (m MeasurementUnitWeight) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this measurement unit weight based on context it is used

func (MeasurementUnitWeight) Validate

func (m MeasurementUnitWeight) Validate(formats strfmt.Registry) error

Validate validates this measurement unit weight

type Merchant

type Merchant struct {

	// The business name of the merchant.
	BusinessName string `json:"business_name,omitempty"`

	// The country code associated with the merchant account, in ISO 3166 format.
	// See [Country](#type-country) for possible values
	// Required: true
	Country *string `json:"country"`

	// The currency associated with the merchant account, in ISO 4217 format.
	// See [Currency](#type-currency) for possible values
	Currency string `json:"currency,omitempty"`

	// The Square-issued ID of the merchant.
	ID string `json:"id,omitempty"`

	// The language code associated with the merchant account, in BCP 47 format.
	LanguageCode string `json:"language_code,omitempty"`

	// The ID of the main `Location` for this merchant.
	MainLocationID string `json:"main_location_id,omitempty"`

	// The merchant status, active or inactive.
	// See [MerchantStatus](#type-merchantstatus) for possible values
	Status string `json:"status,omitempty"`
}

Merchant Represents a Square seller.

swagger:model Merchant

func (*Merchant) ContextValidate

func (m *Merchant) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this merchant based on context it is used

func (*Merchant) MarshalBinary

func (m *Merchant) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Merchant) UnmarshalBinary

func (m *Merchant) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Merchant) Validate

func (m *Merchant) Validate(formats strfmt.Registry) error

Validate validates this merchant

type MerchantStatus

type MerchantStatus string

MerchantStatus merchant status

swagger:model MerchantStatus

const (

	// MerchantStatusACTIVE captures enum value "ACTIVE"
	MerchantStatusACTIVE MerchantStatus = "ACTIVE"

	// MerchantStatusINACTIVE captures enum value "INACTIVE"
	MerchantStatusINACTIVE MerchantStatus = "INACTIVE"
)

func (MerchantStatus) ContextValidate

func (m MerchantStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this merchant status based on context it is used

func (MerchantStatus) Validate

func (m MerchantStatus) Validate(formats strfmt.Registry) error

Validate validates this merchant status

type Money

type Money struct {

	// The amount of money, in the smallest denomination of the currency
	// indicated by `currency`. For example, when `currency` is `USD`, `amount` is
	// in cents. Monetary amounts can be positive or negative. See the specific
	// field description to determine the meaning of the sign in a particular case.
	Amount int64 `json:"amount,omitempty"`

	// The type of currency, in __ISO 4217 format__. For example, the currency
	// code for US dollars is `USD`.
	//
	// See `Currency` for possible values.
	// See [Currency](#type-currency) for possible values
	Currency string `json:"currency,omitempty"`
}

Money Represents an amount of money. `Money` fields can be signed or unsigned. Fields that do not explicitly define whether they are signed or unsigned are considered unsigned and can only hold positive amounts. For signed fields, the sign of the value indicates the purpose of the money transfer. See [Working with Monetary Amounts](/build-basics/working-with-monetary-amounts) for more information.

swagger:model Money

func (*Money) ContextValidate

func (m *Money) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this money based on context it is used

func (*Money) MarshalBinary

func (m *Money) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Money) UnmarshalBinary

func (m *Money) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Money) Validate

func (m *Money) Validate(formats strfmt.Registry) error

Validate validates this money

type ObtainTokenRequest

type ObtainTokenRequest struct {

	// The Square-issued ID of your application, available from the
	// [application dashboard](https://connect.squareup.com/apps).
	// Required: true
	ClientID *string `json:"client_id"`

	// The Square-issued application secret for your application, available
	// from the [application dashboard](https://connect.squareup.com/apps).
	// Required: true
	ClientSecret *string `json:"client_secret"`

	// The authorization code to exchange.
	// This is required if `grant_type` is set to `authorization_code`, to indicate that
	// the application wants to exchange an authorization code for an OAuth access token.
	Code string `json:"code,omitempty"`

	// Specifies the method to request an OAuth access token.
	// Valid values are: `authorization_code`, `refresh_token`, and `migration_token`
	// Required: true
	GrantType *string `json:"grant_type"`

	// Legacy OAuth access token obtained using a Connect API version prior
	// to 2019-03-13. This parameter is required if `grant_type` is set to
	// `migration_token` to indicate that the application wants to get a replacement
	// OAuth access token. The response also returns a refresh token.
	// For more information, see [Migrate to Using Refresh Tokens](https://developer.squareup.com/docs/authz/oauth/migration).
	MigrationToken string `json:"migration_token,omitempty"`

	// The redirect URL assigned in the [application dashboard](https://connect.squareup.com/apps).
	RedirectURI string `json:"redirect_uri,omitempty"`

	// A valid refresh token for generating a new OAuth access token.
	// A valid refresh token is required if `grant_type` is set to `refresh_token` ,
	// to indicate the application wants a replacement for an expired OAuth access token.
	RefreshToken string `json:"refresh_token,omitempty"`

	// __OPTIONAL__
	//
	// A JSON list of strings representing the permissions the application is requesting.
	// For example: "`["MERCHANT_PROFILE_READ","PAYMENTS_READ","BANK_ACCOUNTS_READ"]`"
	// The access token returned in the response is granted the permissions
	// that comprise the intersection between the requested list of permissions, and those
	// that belong to the provided refresh token.
	Scopes []string `json:"scopes"`

	// __OPTIONAL__
	//
	// A boolean indicating a request for a short-lived access token.
	// The short-lived access token returned in the response will expire in 24 hours.
	ShortLived bool `json:"short_lived,omitempty"`
}

ObtainTokenRequest obtain token request Example: {"request_body":{"client_id":"APPLICATION_ID","client_secret":"APPLICATION_SECRET","code":"CODE_FROM_AUTHORIZE","grant_type":"authorization_code"}}

swagger:model ObtainTokenRequest

func (*ObtainTokenRequest) ContextValidate

func (m *ObtainTokenRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this obtain token request based on context it is used

func (*ObtainTokenRequest) MarshalBinary

func (m *ObtainTokenRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ObtainTokenRequest) UnmarshalBinary

func (m *ObtainTokenRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ObtainTokenRequest) Validate

func (m *ObtainTokenRequest) Validate(formats strfmt.Registry) error

Validate validates this obtain token request

type ObtainTokenResponse

type ObtainTokenResponse struct {

	// A valid OAuth access token. OAuth access tokens are 64 bytes long.
	// Provide the access token in a header with every request to Connect API
	// endpoints. See [OAuth API: Walkthrough](https://developer.squareup.com/docs/oauth-api/walkthrough)
	// for more information.
	AccessToken string `json:"access_token,omitempty"`

	// The date when access_token expires, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format.
	ExpiresAt string `json:"expires_at,omitempty"`

	// Then OpenID token belonging to this this person. Only present if the
	// OPENID scope is included in the authorize request.
	IDToken string `json:"id_token,omitempty"`

	// The ID of the authorizing merchant's business.
	MerchantID string `json:"merchant_id,omitempty"`

	// __LEGACY FIELD__. The ID of the subscription plan the merchant signed
	// up for. Only present if the merchant signed up for a subscription during
	// authorization.
	PlanID string `json:"plan_id,omitempty"`

	// A refresh token. OAuth refresh tokens are 64 bytes long.
	// For more information, see [OAuth access token management](https://developer.squareup.com/docs/authz/oauth/how-it-works#oauth-access-token-management).
	RefreshToken string `json:"refresh_token,omitempty"`

	// A boolean indicating the access token is a short-lived access token.
	// The short-lived access token returned in the response will expire in 24 hours.
	ShortLived bool `json:"short_lived,omitempty"`

	// __LEGACY FIELD__. The ID of a subscription plan the merchant signed up
	// for. Only present if the merchant signed up for a subscription during authorization.
	SubscriptionID string `json:"subscription_id,omitempty"`

	// This value is always _bearer_.
	TokenType string `json:"token_type,omitempty"`
}

ObtainTokenResponse obtain token response Example: {"access_token":"ACCESS_TOKEN","expires_at":"2006-01-02T15:04:05Z","merchant_id":"MERCHANT_ID","refresh_token":"REFRESH_TOKEN","token_type":"bearer"}

swagger:model ObtainTokenResponse

func (*ObtainTokenResponse) ContextValidate

func (m *ObtainTokenResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this obtain token response based on context it is used

func (*ObtainTokenResponse) MarshalBinary

func (m *ObtainTokenResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ObtainTokenResponse) UnmarshalBinary

func (m *ObtainTokenResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ObtainTokenResponse) Validate

func (m *ObtainTokenResponse) Validate(formats strfmt.Registry) error

Validate validates this obtain token response

type OnboardAppointmentsRequest

type OnboardAppointmentsRequest interface{}

OnboardAppointmentsRequest onboard appointments request

swagger:model OnboardAppointmentsRequest

type OnboardAppointmentsResponse

type OnboardAppointmentsResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

OnboardAppointmentsResponse onboard appointments response

swagger:model OnboardAppointmentsResponse

func (*OnboardAppointmentsResponse) ContextValidate

func (m *OnboardAppointmentsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this onboard appointments response based on the context it is used

func (*OnboardAppointmentsResponse) MarshalBinary

func (m *OnboardAppointmentsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OnboardAppointmentsResponse) UnmarshalBinary

func (m *OnboardAppointmentsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OnboardAppointmentsResponse) Validate

func (m *OnboardAppointmentsResponse) Validate(formats strfmt.Registry) error

Validate validates this onboard appointments response

type Order

type Order struct {

	// Timestamp for when the order reached a terminal [state](#property-state). In RFC 3339 format, e.g., "2016-09-04T23:59:33.123Z".
	ClosedAt string `json:"closed_at,omitempty"`

	// Timestamp for when the order was created. In RFC 3339 format, e.g., "2016-09-04T23:59:33.123Z".
	CreatedAt string `json:"created_at,omitempty"`

	// The `Customer` ID of the customer associated with the order.
	// Max Length: 191
	CustomerID string `json:"customer_id,omitempty"`

	// The list of all discounts associated with the order.
	//
	// Discounts can be scoped to either `ORDER` or `LINE_ITEM`. For discounts scoped to `LINE_ITEM`,
	// an `OrderLineItemAppliedDiscount` must be added to each line item that the discount applies to.
	// For discounts with `ORDER` scope, the server will generate an `OrderLineItemAppliedDiscount`
	// for every line item.
	//
	// __IMPORTANT__: If `LINE_ITEM` scope is set on any discounts in this field, usage of the deprecated
	// `line_items.discounts` field will result in an error. Please use `line_items.applied_discounts`
	// instead.
	Discounts []*OrderLineItemDiscount `json:"discounts"`

	// Details on order fulfillment.
	//
	// Orders can only be created with at most one fulfillment. However, orders returned
	// by the API may contain multiple fulfillments.
	Fulfillments []*OrderFulfillment `json:"fulfillments"`

	// The order's unique ID.
	ID string `json:"id,omitempty"`

	// The line items included in the order.
	LineItems []*OrderLineItem `json:"line_items"`

	// The ID of the merchant location this order is associated with.
	// Required: true
	// Min Length: 1
	LocationID *string `json:"location_id"`

	// Application-defined data attached to this order. Metadata fields are intended
	// to store descriptive references or associations with an entity in another system or store brief
	// information about the object. Square does not process this field; it only stores and returns it
	// in relevant API calls. Do not use metadata to store any sensitive information (personally
	// identifiable information, card details, etc.).
	//
	// Keys written by applications must be 60 characters or less and must be in the character set
	// `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed
	// with a namespace, separated from the key with a ':' character.
	//
	// Values have a max length of 255 characters.
	//
	// An application may have up to 10 entries per metadata field.
	//
	// Entries written by applications are private and can only be read or modified by the same
	// application.
	//
	// See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information.
	Metadata map[string]string `json:"metadata,omitempty"`

	// Net money amounts (sale money - return money).
	NetAmounts *OrderMoneyAmounts `json:"net_amounts,omitempty"`

	// Pricing options for an order. The options affect how the order's price is calculated.
	// They can be used, for example, to apply automatic price adjustments that are based on pre-configured
	// [pricing rules](https://developer.squareup.com/docs/reference/square/objects/CatalogPricingRule).
	PricingOptions *OrderPricingOptions `json:"pricing_options,omitempty"`

	// A client specified identifier to associate an entity in another system
	// with this order.
	// Max Length: 40
	ReferenceID string `json:"reference_id,omitempty"`

	// The Refunds that are part of this Order.
	Refunds []*Refund `json:"refunds"`

	// Rollup of returned money amounts.
	ReturnAmounts *OrderMoneyAmounts `json:"return_amounts,omitempty"`

	// Collection of items from sale Orders being returned in this one. Normally part of an
	// Itemized Return or Exchange.  There will be exactly one `Return` object per sale Order being
	// referenced.
	Returns []*OrderReturn `json:"returns"`

	// A set-like list of rewards that have been added to the order.
	Rewards []*OrderReward `json:"rewards"`

	// A positive or negative rounding adjustment to the total of the order, commonly used to
	// apply Cash Rounding when the minimum unit of account is smaller than the lowest physical
	// denomination of currency.
	RoundingAdjustment *OrderRoundingAdjustment `json:"rounding_adjustment,omitempty"`

	// A list of service charges applied to the order.
	ServiceCharges []*OrderServiceCharge `json:"service_charges"`

	// The origination details of the order.
	Source *OrderSource `json:"source,omitempty"`

	// The current state of the order. `OPEN`,`COMPLETED`,`CANCELED`
	// See [OrderState](#type-orderstate) for possible values
	State string `json:"state,omitempty"`

	// The list of all taxes associated with the order.
	//
	// Taxes can be scoped to either `ORDER` or `LINE_ITEM`. For taxes with `LINE_ITEM` scope, an
	// `OrderLineItemAppliedTax` must be added to each line item that the tax applies to. For taxes
	// with `ORDER` scope, the server will generate an `OrderLineItemAppliedTax` for every line item.
	//
	// On reads, each tax in the list will include the total amount of that tax applied to the order.
	//
	// __IMPORTANT__: If `LINE_ITEM` scope is set on any taxes in this field, usage of the deprecated
	// `line_items.taxes` field will result in an error. Please use `line_items.applied_taxes`
	// instead.
	Taxes []*OrderLineItemTax `json:"taxes"`

	// The Tenders which were used to pay for the Order.
	Tenders []*Tender `json:"tenders"`

	// The total discount amount of money to collect for the order.
	TotalDiscountMoney *Money `json:"total_discount_money,omitempty"`

	// The total amount of money to collect for the order.
	TotalMoney *Money `json:"total_money,omitempty"`

	// The total amount of money collected in service charges for the order.
	//
	// Note: `total_service_charge_money` is the sum of `applied_money` fields for each individual
	// service charge. Therefore, `total_service_charge_money` will only include inclusive tax amounts,
	// not additive tax amounts.
	TotalServiceChargeMoney *Money `json:"total_service_charge_money,omitempty"`

	// The total tax amount of money to collect for the order.
	TotalTaxMoney *Money `json:"total_tax_money,omitempty"`

	// The total tip amount of money to collect for the order.
	TotalTipMoney *Money `json:"total_tip_money,omitempty"`

	// Timestamp for when the order was last updated. In RFC 3339 format, e.g., "2016-09-04T23:59:33.123Z".
	UpdatedAt string `json:"updated_at,omitempty"`

	// Version number which is incremented each time an update is committed to the order.
	// Orders that were not created through the API will not include a version and
	// thus cannot be updated.
	//
	// [Read more about working with versions](https://developer.squareup.com/docs/orders-api/manage-orders#update-orders).
	Version int64 `json:"version,omitempty"`
}

Order Contains all information related to a single order to process with Square, including line items that specify the products to purchase. Order objects also include information on any associated tenders, refunds, and returns.

All Connect V2 Transactions have all been converted to Orders including all associated itemization data.

swagger:model Order

func (*Order) ContextValidate

func (m *Order) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order based on the context it is used

func (*Order) MarshalBinary

func (m *Order) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Order) UnmarshalBinary

func (m *Order) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Order) Validate

func (m *Order) Validate(formats strfmt.Registry) error

Validate validates this order

type OrderCreated

type OrderCreated struct {

	// Timestamp for when the order was created in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// The ID of the merchant location this order is associated with.
	LocationID string `json:"location_id,omitempty"`

	// The order's unique ID.
	OrderID string `json:"order_id,omitempty"`

	// The state of the order.
	// See [OrderState](#type-orderstate) for possible values
	State string `json:"state,omitempty"`

	// Version number which is incremented each time an update is committed to the order.
	// Orders that were not created through the API will not include a version and
	// thus cannot be updated.
	//
	// [Read more about working with versions](https://developer.squareup.com/docs/docs/orders-api/manage-orders#update-orders)
	Version int64 `json:"version,omitempty"`
}

OrderCreated order created

swagger:model OrderCreated

func (*OrderCreated) ContextValidate

func (m *OrderCreated) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this order created based on context it is used

func (*OrderCreated) MarshalBinary

func (m *OrderCreated) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderCreated) UnmarshalBinary

func (m *OrderCreated) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderCreated) Validate

func (m *OrderCreated) Validate(formats strfmt.Registry) error

Validate validates this order created

type OrderCreatedObject

type OrderCreatedObject struct {

	// Information about the created order.
	OrderCreated *OrderCreated `json:"order_created,omitempty"`
}

OrderCreatedObject order created object

swagger:model OrderCreatedObject

func (*OrderCreatedObject) ContextValidate

func (m *OrderCreatedObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order created object based on the context it is used

func (*OrderCreatedObject) MarshalBinary

func (m *OrderCreatedObject) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderCreatedObject) UnmarshalBinary

func (m *OrderCreatedObject) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderCreatedObject) Validate

func (m *OrderCreatedObject) Validate(formats strfmt.Registry) error

Validate validates this order created object

type OrderEntry

type OrderEntry struct {

	// The location id the Order belongs to.
	LocationID string `json:"location_id,omitempty"`

	// The id of the Order
	OrderID string `json:"order_id,omitempty"`

	// Version number which is incremented each time an update is committed to the order.
	// Orders that were not created through the API will not include a version and
	// thus cannot be updated.
	//
	// [Read more about working with versions](https://developer.squareup.com/docs/orders-api/manage-orders#update-orders).
	Version int64 `json:"version,omitempty"`
}

OrderEntry A lightweight description of an Order(#type-order) that is returned when `returned_entries` is true on a [SearchOrderRequest](#type-searchorderrequest)

swagger:model OrderEntry

func (*OrderEntry) ContextValidate

func (m *OrderEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this order entry based on context it is used

func (*OrderEntry) MarshalBinary

func (m *OrderEntry) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderEntry) UnmarshalBinary

func (m *OrderEntry) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderEntry) Validate

func (m *OrderEntry) Validate(formats strfmt.Registry) error

Validate validates this order entry

type OrderFulfillment

type OrderFulfillment struct {

	// Application-defined data attached to this fulfillment. Metadata fields are intended
	// to store descriptive references or associations with an entity in another system or store brief
	// information about the object. Square does not process this field; it only stores and returns it
	// in relevant API calls. Do not use metadata to store any sensitive information (personally
	// identifiable information, card details, etc.).
	//
	// Keys written by applications must be 60 characters or less and must be in the character set
	// `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed
	// with a namespace, separated from the key with a ':' character.
	//
	// Values have a max length of 255 characters.
	//
	// An application may have up to 10 entries per metadata field.
	//
	// Entries written by applications are private and can only be read or modified by the same
	// application.
	//
	// See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information.
	Metadata map[string]string `json:"metadata,omitempty"`

	// Contains details for a pickup fulfillment. Required when fulfillment
	// type is `PICKUP`.
	PickupDetails *OrderFulfillmentPickupDetails `json:"pickup_details,omitempty"`

	// Contains details for a shipment fulfillment. Required when fulfillment type
	// is `SHIPMENT`.
	//
	// A shipment fulfillment's relationship to fulfillment `state`:
	// `PROPOSED`: A shipment is requested.
	// `RESERVED`: Fulfillment accepted. Shipment processing.
	// `PREPARED`: Shipment packaged. Shipping label created.
	// `COMPLETED`: Package has been shipped.
	// `CANCELED`: Shipment has been canceled.
	// `FAILED`: Shipment has failed.
	ShipmentDetails *OrderFulfillmentShipmentDetails `json:"shipment_details,omitempty"`

	// The state of the fulfillment.
	// See [OrderFulfillmentState](#type-orderfulfillmentstate) for possible values
	State string `json:"state,omitempty"`

	// The type of the fulfillment.
	// See [OrderFulfillmentType](#type-orderfulfillmenttype) for possible values
	Type string `json:"type,omitempty"`

	// Unique ID that identifies the fulfillment only within this order.
	// Max Length: 60
	UID string `json:"uid,omitempty"`
}

OrderFulfillment Contains details on how to fulfill this order.

swagger:model OrderFulfillment

func (*OrderFulfillment) ContextValidate

func (m *OrderFulfillment) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order fulfillment based on the context it is used

func (*OrderFulfillment) MarshalBinary

func (m *OrderFulfillment) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderFulfillment) UnmarshalBinary

func (m *OrderFulfillment) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderFulfillment) Validate

func (m *OrderFulfillment) Validate(formats strfmt.Registry) error

Validate validates this order fulfillment

type OrderFulfillmentPickupDetails

type OrderFulfillmentPickupDetails struct {

	// The [timestamp](#workingwithdates) indicating when the fulfillment
	// was accepted. In RFC3339 timestamp format,
	// e.g., "2016-09-04T23:59:33.123Z".
	AcceptedAt string `json:"accepted_at,omitempty"`

	// The duration of time after which an open and accepted pickup fulfillment
	// will automatically move to the `COMPLETED` state. Must be in RFC3339
	// duration format e.g., "P1W3D".
	//
	// If not set, this pickup fulfillment will remain accepted until it is canceled or completed.
	AutoCompleteDuration string `json:"auto_complete_duration,omitempty"`

	// A description of why the pickup was canceled. Max length: 100 characters.
	// Max Length: 100
	CancelReason string `json:"cancel_reason,omitempty"`

	// The [timestamp](#workingwithdates) in RFC3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z",
	// indicating when the fulfillment was canceled.
	CanceledAt string `json:"canceled_at,omitempty"`

	// Specific details for curbside pickup. Can only be populated if `is_curbside_pickup` is true.
	CurbsidePickupDetails *OrderFulfillmentPickupDetailsCurbsidePickupDetails `json:"curbside_pickup_details,omitempty"`

	// The [timestamp](#workingwithdates) indicating when the fulfillment expired.
	// In RFC3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z".
	ExpiredAt string `json:"expired_at,omitempty"`

	// The [timestamp](#workingwithdates) indicating when this fulfillment
	// will expire if it is not accepted. Must be in RFC 3339 format
	// e.g., "2016-09-04T23:59:33.123Z". Expiration time can only be set up to 7
	// days in the future. If `expires_at` is not set, this pickup fulfillment
	// will be automatically accepted when placed.
	ExpiresAt string `json:"expires_at,omitempty"`

	// If true, indicates this pickup order is for curbside pickup, not in-store pickup.
	IsCurbsidePickup bool `json:"is_curbside_pickup,omitempty"`

	// A note meant to provide additional instructions about the pickup
	// fulfillment displayed in the Square Point of Sale and set by the API.
	// Max Length: 500
	Note string `json:"note,omitempty"`

	// The [timestamp](#workingwithdates) indicating when the fulfillment
	// was picked up by the recipient. In RFC3339 timestamp format,
	// e.g., "2016-09-04T23:59:33.123Z".
	PickedUpAt string `json:"picked_up_at,omitempty"`

	// The [timestamp](#workingwithdates) that represents the start of the pickup window.
	// Must be in RFC3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z".
	// For fulfillments with the schedule type `ASAP`, this is automatically set
	// to the current time plus the expected duration to prepare the fulfillment.
	PickupAt string `json:"pickup_at,omitempty"`

	// The window of time in which the order should be picked up after the `pickup_at` timestamp.
	// Must be in RFC3339 duration format, e.g., "P1W3D". Can be used as an
	// informational guideline for merchants.
	PickupWindowDuration string `json:"pickup_window_duration,omitempty"`

	// The [timestamp](#workingwithdates) indicating when the fulfillment
	// was placed. Must be in RFC3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z".
	PlacedAt string `json:"placed_at,omitempty"`

	// The duration of time it takes to prepare this fulfillment.
	// Must be in RFC3339 duration format, e.g., "P1W3D".
	PrepTimeDuration string `json:"prep_time_duration,omitempty"`

	// The [timestamp](#workingwithdates) indicating when the fulfillment is
	// marked as ready for pickup. In RFC3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z".
	ReadyAt string `json:"ready_at,omitempty"`

	// Information on the person meant to pick up this fulfillment from a physical
	// location.
	Recipient *OrderFulfillmentRecipient `json:"recipient,omitempty"`

	// The [timestamp](#workingwithdates) indicating when the fulfillment
	// was rejected. In RFC3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z".
	RejectedAt string `json:"rejected_at,omitempty"`

	// The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`.
	// See [OrderFulfillmentPickupDetailsScheduleType](#type-orderfulfillmentpickupdetailsscheduletype) for possible values
	ScheduleType string `json:"schedule_type,omitempty"`
}

OrderFulfillmentPickupDetails Contains details necessary to fulfill a pickup order.

swagger:model OrderFulfillmentPickupDetails

func (*OrderFulfillmentPickupDetails) ContextValidate

func (m *OrderFulfillmentPickupDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order fulfillment pickup details based on the context it is used

func (*OrderFulfillmentPickupDetails) MarshalBinary

func (m *OrderFulfillmentPickupDetails) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderFulfillmentPickupDetails) UnmarshalBinary

func (m *OrderFulfillmentPickupDetails) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderFulfillmentPickupDetails) Validate

func (m *OrderFulfillmentPickupDetails) Validate(formats strfmt.Registry) error

Validate validates this order fulfillment pickup details

type OrderFulfillmentPickupDetailsCurbsidePickupDetails

type OrderFulfillmentPickupDetailsCurbsidePickupDetails struct {

	// The [timestamp](#workingwithdates) in RFC 3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z",
	// indicating when the buyer arrived and is waiting for pickup.
	BuyerArrivedAt string `json:"buyer_arrived_at,omitempty"`

	// Specific details for curbside pickup, such as parking number, vehicle model, etc.
	// Max Length: 250
	CurbsideDetails string `json:"curbside_details,omitempty"`
}

OrderFulfillmentPickupDetailsCurbsidePickupDetails Specific details for curbside pickup.

swagger:model OrderFulfillmentPickupDetailsCurbsidePickupDetails

func (*OrderFulfillmentPickupDetailsCurbsidePickupDetails) ContextValidate

ContextValidate validates this order fulfillment pickup details curbside pickup details based on context it is used

func (*OrderFulfillmentPickupDetailsCurbsidePickupDetails) MarshalBinary

MarshalBinary interface implementation

func (*OrderFulfillmentPickupDetailsCurbsidePickupDetails) UnmarshalBinary

UnmarshalBinary interface implementation

func (*OrderFulfillmentPickupDetailsCurbsidePickupDetails) Validate

Validate validates this order fulfillment pickup details curbside pickup details

type OrderFulfillmentPickupDetailsScheduleType

type OrderFulfillmentPickupDetailsScheduleType string

OrderFulfillmentPickupDetailsScheduleType The schedule type of the pickup fulfillment.

swagger:model OrderFulfillmentPickupDetailsScheduleType

const (

	// OrderFulfillmentPickupDetailsScheduleTypeSCHEDULED captures enum value "SCHEDULED"
	OrderFulfillmentPickupDetailsScheduleTypeSCHEDULED OrderFulfillmentPickupDetailsScheduleType = "SCHEDULED"

	// OrderFulfillmentPickupDetailsScheduleTypeASAP captures enum value "ASAP"
	OrderFulfillmentPickupDetailsScheduleTypeASAP OrderFulfillmentPickupDetailsScheduleType = "ASAP"
)

func (OrderFulfillmentPickupDetailsScheduleType) ContextValidate

ContextValidate validates this order fulfillment pickup details schedule type based on context it is used

func (OrderFulfillmentPickupDetailsScheduleType) Validate

Validate validates this order fulfillment pickup details schedule type

type OrderFulfillmentRecipient

type OrderFulfillmentRecipient struct {

	// The address of the fulfillment recipient.
	//
	// If provided, overrides the value pulled from the customer profile indicated by `customer_id`.
	Address *Address `json:"address,omitempty"`

	// The Customer ID of the customer associated with the fulfillment.
	//
	// If `customer_id` is provided, the fulfillment recipient's `display_name`,
	// `email_address`, and `phone_number` are automatically populated from the
	// targeted customer profile. If these fields are set in the request, the request
	// values will override the information from the customer profile. If the
	// targeted customer profile does not contain the necessary information and
	// these fields are left unset, the request will result in an error.
	// Max Length: 191
	CustomerID string `json:"customer_id,omitempty"`

	// The display name of the fulfillment recipient.
	//
	// If provided, overrides the value pulled from the customer profile indicated by `customer_id`.
	// Max Length: 255
	DisplayName string `json:"display_name,omitempty"`

	// The email address of the fulfillment recipient.
	//
	// If provided, overrides the value pulled from the customer profile indicated by `customer_id`.
	// Max Length: 255
	EmailAddress string `json:"email_address,omitempty"`

	// The phone number of the fulfillment recipient.
	//
	// If provided, overrides the value pulled from the customer profile indicated by `customer_id`.
	// Max Length: 17
	PhoneNumber string `json:"phone_number,omitempty"`
}

OrderFulfillmentRecipient Contains information on the recipient of a fulfillment.

swagger:model OrderFulfillmentRecipient

func (*OrderFulfillmentRecipient) ContextValidate

func (m *OrderFulfillmentRecipient) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order fulfillment recipient based on the context it is used

func (*OrderFulfillmentRecipient) MarshalBinary

func (m *OrderFulfillmentRecipient) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderFulfillmentRecipient) UnmarshalBinary

func (m *OrderFulfillmentRecipient) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderFulfillmentRecipient) Validate

func (m *OrderFulfillmentRecipient) Validate(formats strfmt.Registry) error

Validate validates this order fulfillment recipient

type OrderFulfillmentShipmentDetails

type OrderFulfillmentShipmentDetails struct {

	// A description of why the shipment was canceled.
	// Max Length: 100
	CancelReason string `json:"cancel_reason,omitempty"`

	// The [timestamp](#workingwithdates) indicating the shipment was canceled.
	// Must be in RFC 3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z".
	CanceledAt string `json:"canceled_at,omitempty"`

	// The shipping carrier being used to ship this fulfillment
	// e.g. UPS, FedEx, USPS, etc.
	// Max Length: 50
	Carrier string `json:"carrier,omitempty"`

	// The [timestamp](#workingwithdates) indicating when the shipment is
	// expected to be delivered to the shipping carrier. Must be in RFC 3339 timestamp
	// format, e.g., "2016-09-04T23:59:33.123Z".
	ExpectedShippedAt string `json:"expected_shipped_at,omitempty"`

	// The [timestamp](#workingwithdates) indicating when the shipment
	// failed to be completed. Must be in RFC 3339 timestamp format, e.g.,
	// "2016-09-04T23:59:33.123Z".
	FailedAt string `json:"failed_at,omitempty"`

	// A description of why the shipment failed to be completed.
	// Max Length: 100
	FailureReason string `json:"failure_reason,omitempty"`

	// The [timestamp](#workingwithdates) indicating when this fulfillment was
	// moved to the `RESERVED` state. Indicates that preparation of this shipment has begun.
	// Must be in RFC 3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z".
	InProgressAt string `json:"in_progress_at,omitempty"`

	// The [timestamp](#workingwithdates) indicating when this fulfillment
	// was moved to the `PREPARED` state. Indicates that the fulfillment is packaged.
	// Must be in RFC 3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z".
	PackagedAt string `json:"packaged_at,omitempty"`

	// The [timestamp](#workingwithdates) indicating when the shipment was
	// requested. Must be in RFC 3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z".
	PlacedAt string `json:"placed_at,omitempty"`

	// Information on the person meant to receive this shipment fulfillment.
	Recipient *OrderFulfillmentRecipient `json:"recipient,omitempty"`

	// The [timestamp](#workingwithdates) indicating when this fulfillment
	// was moved to the `COMPLETED`state. Indicates that the fulfillment has been given
	// to the shipping carrier. Must be in RFC 3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z".
	ShippedAt string `json:"shipped_at,omitempty"`

	// A note with additional information for the shipping carrier.
	// Max Length: 500
	ShippingNote string `json:"shipping_note,omitempty"`

	// A description of the type of shipping product purchased from the carrier.
	// e.g. First Class, Priority, Express
	// Max Length: 50
	ShippingType string `json:"shipping_type,omitempty"`

	// The reference number provided by the carrier to track the shipment's progress.
	// Max Length: 100
	TrackingNumber string `json:"tracking_number,omitempty"`

	// A link to the tracking webpage on the carrier's website.
	// Max Length: 2000
	TrackingURL string `json:"tracking_url,omitempty"`
}

OrderFulfillmentShipmentDetails Contains details necessary to fulfill a shipment order.

swagger:model OrderFulfillmentShipmentDetails

func (*OrderFulfillmentShipmentDetails) ContextValidate

func (m *OrderFulfillmentShipmentDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order fulfillment shipment details based on the context it is used

func (*OrderFulfillmentShipmentDetails) MarshalBinary

func (m *OrderFulfillmentShipmentDetails) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderFulfillmentShipmentDetails) UnmarshalBinary

func (m *OrderFulfillmentShipmentDetails) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderFulfillmentShipmentDetails) Validate

Validate validates this order fulfillment shipment details

type OrderFulfillmentState

type OrderFulfillmentState string

OrderFulfillmentState The current state of this fulfillment.

swagger:model OrderFulfillmentState

const (

	// OrderFulfillmentStatePROPOSED captures enum value "PROPOSED"
	OrderFulfillmentStatePROPOSED OrderFulfillmentState = "PROPOSED"

	// OrderFulfillmentStateRESERVED captures enum value "RESERVED"
	OrderFulfillmentStateRESERVED OrderFulfillmentState = "RESERVED"

	// OrderFulfillmentStatePREPARED captures enum value "PREPARED"
	OrderFulfillmentStatePREPARED OrderFulfillmentState = "PREPARED"

	// OrderFulfillmentStateCOMPLETED captures enum value "COMPLETED"
	OrderFulfillmentStateCOMPLETED OrderFulfillmentState = "COMPLETED"

	// OrderFulfillmentStateCANCELED captures enum value "CANCELED"
	OrderFulfillmentStateCANCELED OrderFulfillmentState = "CANCELED"

	// OrderFulfillmentStateFAILED captures enum value "FAILED"
	OrderFulfillmentStateFAILED OrderFulfillmentState = "FAILED"
)

func (OrderFulfillmentState) ContextValidate

func (m OrderFulfillmentState) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this order fulfillment state based on context it is used

func (OrderFulfillmentState) Validate

func (m OrderFulfillmentState) Validate(formats strfmt.Registry) error

Validate validates this order fulfillment state

type OrderFulfillmentType

type OrderFulfillmentType string

OrderFulfillmentType The type of fulfillment.

swagger:model OrderFulfillmentType

const (

	// OrderFulfillmentTypePICKUP captures enum value "PICKUP"
	OrderFulfillmentTypePICKUP OrderFulfillmentType = "PICKUP"

	// OrderFulfillmentTypeSHIPMENT captures enum value "SHIPMENT"
	OrderFulfillmentTypeSHIPMENT OrderFulfillmentType = "SHIPMENT"
)

func (OrderFulfillmentType) ContextValidate

func (m OrderFulfillmentType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this order fulfillment type based on context it is used

func (OrderFulfillmentType) Validate

func (m OrderFulfillmentType) Validate(formats strfmt.Registry) error

Validate validates this order fulfillment type

type OrderFulfillmentUpdated

type OrderFulfillmentUpdated struct {

	// Timestamp for when the order was created in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// The fulfillments that were updated with this version change.
	FulfillmentUpdate []*OrderFulfillmentUpdatedUpdate `json:"fulfillment_update"`

	// The ID of the merchant location this order is associated with.
	LocationID string `json:"location_id,omitempty"`

	// The order's unique ID.
	OrderID string `json:"order_id,omitempty"`

	// The state of the order.
	// See [OrderState](#type-orderstate) for possible values
	State string `json:"state,omitempty"`

	// Timestamp for when the order was last updated in RFC 3339 format.
	UpdatedAt string `json:"updated_at,omitempty"`

	// Version number which is incremented each time an update is committed to the order.
	// Orders that were not created through the API will not include a version and
	// thus cannot be updated.
	//
	// [Read more about working with versions](https://developer.squareup.com/docs/docs/orders-api/manage-orders#update-orders)
	Version int64 `json:"version,omitempty"`
}

OrderFulfillmentUpdated order fulfillment updated

swagger:model OrderFulfillmentUpdated

func (*OrderFulfillmentUpdated) ContextValidate

func (m *OrderFulfillmentUpdated) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order fulfillment updated based on the context it is used

func (*OrderFulfillmentUpdated) MarshalBinary

func (m *OrderFulfillmentUpdated) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderFulfillmentUpdated) UnmarshalBinary

func (m *OrderFulfillmentUpdated) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderFulfillmentUpdated) Validate

func (m *OrderFulfillmentUpdated) Validate(formats strfmt.Registry) error

Validate validates this order fulfillment updated

type OrderFulfillmentUpdatedObject

type OrderFulfillmentUpdatedObject struct {

	// Information about the updated order fulfillment.
	OrderFulfillmentUpdated *OrderFulfillmentUpdated `json:"order_fulfillment_updated,omitempty"`
}

OrderFulfillmentUpdatedObject order fulfillment updated object

swagger:model OrderFulfillmentUpdatedObject

func (*OrderFulfillmentUpdatedObject) ContextValidate

func (m *OrderFulfillmentUpdatedObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order fulfillment updated object based on the context it is used

func (*OrderFulfillmentUpdatedObject) MarshalBinary

func (m *OrderFulfillmentUpdatedObject) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderFulfillmentUpdatedObject) UnmarshalBinary

func (m *OrderFulfillmentUpdatedObject) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderFulfillmentUpdatedObject) Validate

func (m *OrderFulfillmentUpdatedObject) Validate(formats strfmt.Registry) error

Validate validates this order fulfillment updated object

type OrderFulfillmentUpdatedUpdate

type OrderFulfillmentUpdatedUpdate struct {

	// Unique ID that identifies the fulfillment only within this order.
	FulfillmentUID string `json:"fulfillment_uid,omitempty"`

	// The state of the fulfillment after the change. May be equal to old_state if a non-state
	// field was changed on the fulfillment (e.g. tracking number).
	// See [OrderFulfillmentState](#type-orderfulfillmentstate) for possible values
	NewState string `json:"new_state,omitempty"`

	// The state of the fulfillment before the change.
	// Will not be populated if the fulfillment is created with this new Order version.
	// See [OrderFulfillmentState](#type-orderfulfillmentstate) for possible values
	OldState string `json:"old_state,omitempty"`
}

OrderFulfillmentUpdatedUpdate Information about fulfillment updates.

swagger:model OrderFulfillmentUpdatedUpdate

func (*OrderFulfillmentUpdatedUpdate) ContextValidate

func (m *OrderFulfillmentUpdatedUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this order fulfillment updated update based on context it is used

func (*OrderFulfillmentUpdatedUpdate) MarshalBinary

func (m *OrderFulfillmentUpdatedUpdate) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderFulfillmentUpdatedUpdate) UnmarshalBinary

func (m *OrderFulfillmentUpdatedUpdate) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderFulfillmentUpdatedUpdate) Validate

func (m *OrderFulfillmentUpdatedUpdate) Validate(formats strfmt.Registry) error

Validate validates this order fulfillment updated update

type OrderLineItem

type OrderLineItem struct {

	// The list of references to discounts applied to this line item. Each
	// `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level
	// `OrderLineItemDiscounts` applied to the line item. On reads, the amount
	// applied is populated.
	//
	// An `OrderLineItemAppliedDiscount` will be automatically created on every line item for all
	// `ORDER` scoped discounts that are added to the order. `OrderLineItemAppliedDiscount` records
	// for `LINE_ITEM` scoped discounts must be added in requests for the discount to apply to any
	// line items.
	//
	// To change the amount of a discount, modify the referenced top-level discount.
	AppliedDiscounts []*OrderLineItemAppliedDiscount `json:"applied_discounts"`

	// The list of references to taxes applied to this line item. Each
	// `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a
	// top-level `OrderLineItemTax` applied to the line item. On reads, the
	// amount applied is populated.
	//
	// An `OrderLineItemAppliedTax` will be automatically created on every line
	// item for all `ORDER` scoped taxes added to the order. `OrderLineItemAppliedTax`
	// records for `LINE_ITEM` scoped taxes must be added in requests for the tax
	// to apply to any line items.
	//
	// To change the amount of a tax, modify the referenced top-level tax.
	AppliedTaxes []*OrderLineItemAppliedTax `json:"applied_taxes"`

	// The base price for a single unit of the line item.
	BasePriceMoney *Money `json:"base_price_money,omitempty"`

	// The `CatalogItemVariation` id applied to this line item.
	// Max Length: 192
	CatalogObjectID string `json:"catalog_object_id,omitempty"`

	// The amount of money made in gross sales for this line item.
	// Calculated as the sum of the variation's total price and each modifier's total price.
	GrossSalesMoney *Money `json:"gross_sales_money,omitempty"`

	// Application-defined data attached to this line item. Metadata fields are intended
	// to store descriptive references or associations with an entity in another system or store brief
	// information about the object. Square does not process this field; it only stores and returns it
	// in relevant API calls. Do not use metadata to store any sensitive information (personally
	// identifiable information, card details, etc.).
	//
	// Keys written by applications must be 60 characters or less and must be in the character set
	// `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed
	// with a namespace, separated from the key with a ':' character.
	//
	// Values have a max length of 255 characters.
	//
	// An application may have up to 10 entries per metadata field.
	//
	// Entries written by applications are private and can only be read or modified by the same
	// application.
	//
	// See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information.
	Metadata map[string]string `json:"metadata,omitempty"`

	// The `CatalogModifier`s applied to this line item.
	Modifiers []*OrderLineItemModifier `json:"modifiers"`

	// The name of the line item.
	// Max Length: 512
	Name string `json:"name,omitempty"`

	// The note of the line item.
	// Max Length: 2000
	Note string `json:"note,omitempty"`

	// Describes pricing adjustments that are blocked from manual and
	// automatic application to a line item. For more information, see
	// [Apply Taxes and Discounts](https://developer.squareup.com/docs/docs/orders-api/apply-taxes-and-discounts).
	PricingBlocklists *OrderLineItemPricingBlocklists `json:"pricing_blocklists,omitempty"`

	// The quantity purchased, formatted as a decimal number.
	// For example: `"3"`.
	//
	// Line items with a quantity of `"0"` will be automatically removed
	// upon paying for or otherwise completing the order.
	//
	// Line items with a `quantity_unit` can have non-integer quantities.
	// For example: `"1.70000"`.
	// Required: true
	// Max Length: 12
	// Min Length: 1
	Quantity *string `json:"quantity"`

	// The unit and precision that this line item's quantity is measured in.
	QuantityUnit *OrderQuantityUnit `json:"quantity_unit,omitempty"`

	// The total discount amount of money to collect for the line item.
	TotalDiscountMoney *Money `json:"total_discount_money,omitempty"`

	// The total amount of money to collect for this line item.
	TotalMoney *Money `json:"total_money,omitempty"`

	// The total tax amount of money to collect for the line item.
	TotalTaxMoney *Money `json:"total_tax_money,omitempty"`

	// Unique ID that identifies the line item only within this order.
	// Max Length: 60
	UID string `json:"uid,omitempty"`

	// The name of the variation applied to this line item.
	// Max Length: 255
	VariationName string `json:"variation_name,omitempty"`

	// The total price of all item variations sold in this line item.
	// Calculated as `base_price_money` multiplied by `quantity`.
	// Does not include modifiers.
	VariationTotalPriceMoney *Money `json:"variation_total_price_money,omitempty"`
}

OrderLineItem Represents a line item in an order. Each line item describes a different product to purchase, with its own quantity and price details.

swagger:model OrderLineItem

func (*OrderLineItem) ContextValidate

func (m *OrderLineItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order line item based on the context it is used

func (*OrderLineItem) MarshalBinary

func (m *OrderLineItem) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderLineItem) UnmarshalBinary

func (m *OrderLineItem) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderLineItem) Validate

func (m *OrderLineItem) Validate(formats strfmt.Registry) error

Validate validates this order line item

type OrderLineItemAppliedDiscount

type OrderLineItemAppliedDiscount struct {

	// The amount of money applied by the discount to the line item.
	AppliedMoney *Money `json:"applied_money,omitempty"`

	// The `uid` of the discount the applied discount represents. Must
	// reference a discount present in the `order.discounts` field.
	//
	// This field is immutable. To change which discounts apply to a line item,
	// you must delete the discount and re-add it as a new `OrderLineItemAppliedDiscount`.
	// Required: true
	// Max Length: 60
	// Min Length: 1
	DiscountUID *string `json:"discount_uid"`

	// Unique ID that identifies the applied discount only within this order.
	// Max Length: 60
	UID string `json:"uid,omitempty"`
}

OrderLineItemAppliedDiscount Represents an applied portion of a discount to a line item in an order.

Order scoped discounts will automatically have applied discounts present for each line item. Line item scoped discounts must have applied discounts added manually for any applicable line items. The corresponding applied money will automatically be computed based on participating line items.

swagger:model OrderLineItemAppliedDiscount

func (*OrderLineItemAppliedDiscount) ContextValidate

func (m *OrderLineItemAppliedDiscount) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order line item applied discount based on the context it is used

func (*OrderLineItemAppliedDiscount) MarshalBinary

func (m *OrderLineItemAppliedDiscount) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderLineItemAppliedDiscount) UnmarshalBinary

func (m *OrderLineItemAppliedDiscount) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderLineItemAppliedDiscount) Validate

func (m *OrderLineItemAppliedDiscount) Validate(formats strfmt.Registry) error

Validate validates this order line item applied discount

type OrderLineItemAppliedTax

type OrderLineItemAppliedTax struct {

	// The amount of money applied by the tax to the line item.
	AppliedMoney *Money `json:"applied_money,omitempty"`

	// The `uid` of the tax for which this applied tax represents.  Must reference
	// a tax present in the `order.taxes` field.
	//
	// This field is immutable. To change which taxes apply to a line item, delete and add new
	// `OrderLineItemAppliedTax`s.
	// Required: true
	// Max Length: 60
	// Min Length: 1
	TaxUID *string `json:"tax_uid"`

	// Unique ID that identifies the applied tax only within this order.
	// Max Length: 60
	UID string `json:"uid,omitempty"`
}

OrderLineItemAppliedTax Represents an applied portion of a tax to a line item in an order.

Order-scoped taxes automatically include the applied taxes in each line item. Line item taxes must be referenced from any applicable line items. The corresponding applied money is automatically computed, based on the set of participating line items.

swagger:model OrderLineItemAppliedTax

func (*OrderLineItemAppliedTax) ContextValidate

func (m *OrderLineItemAppliedTax) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order line item applied tax based on the context it is used

func (*OrderLineItemAppliedTax) MarshalBinary

func (m *OrderLineItemAppliedTax) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderLineItemAppliedTax) UnmarshalBinary

func (m *OrderLineItemAppliedTax) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderLineItemAppliedTax) Validate

func (m *OrderLineItemAppliedTax) Validate(formats strfmt.Registry) error

Validate validates this order line item applied tax

type OrderLineItemDiscount

type OrderLineItemDiscount struct {

	// The total declared monetary amount of the discount.
	//
	// `amount_money` is not set for percentage-based discounts.
	AmountMoney *Money `json:"amount_money,omitempty"`

	// The amount of discount actually applied to the line item.
	//
	// Represents the amount of money applied as a line item-scoped discount.
	// When an amount-based discount is scoped to the entire order, the value
	// of `applied_money` is different from `amount_money` because the total
	// amount of the discount is distributed across all line items.
	AppliedMoney *Money `json:"applied_money,omitempty"`

	// The catalog object id referencing `CatalogDiscount`.
	// Max Length: 192
	CatalogObjectID string `json:"catalog_object_id,omitempty"`

	// Application-defined data attached to this discount. Metadata fields are intended
	// to store descriptive references or associations with an entity in another system or store brief
	// information about the object. Square does not process this field; it only stores and returns it
	// in relevant API calls. Do not use metadata to store any sensitive information (personally
	// identifiable information, card details, etc.).
	//
	// Keys written by applications must be 60 characters or less and must be in the character set
	// `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed
	// with a namespace, separated from the key with a ':' character.
	//
	// Values have a max length of 255 characters.
	//
	// An application may have up to 10 entries per metadata field.
	//
	// Entries written by applications are private and can only be read or modified by the same
	// application.
	//
	// See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information.
	Metadata map[string]string `json:"metadata,omitempty"`

	// The discount's name.
	// Max Length: 255
	Name string `json:"name,omitempty"`

	// The percentage of the discount, as a string representation of a decimal number.
	// A value of `7.25` corresponds to a percentage of 7.25%.
	//
	// `percentage` is not set for amount-based discounts.
	// Max Length: 10
	Percentage string `json:"percentage,omitempty"`

	// The object identifier of a `pricing rule` to be applied automatically
	// to this discount. The specification and application of the discounts, to which a `pricing_rule_id` is
	// assigned, are completely controlled by the corresponding pricing rule.
	PricingRuleID string `json:"pricing_rule_id,omitempty"`

	// The reward identifiers corresponding to this discount. The application and
	// specification of discounts that have `reward_ids` are completely controlled by the backing
	// criteria corresponding to the reward tiers of the rewards that are added to the order
	// through the Loyalty API. To manually unapply discounts that are the result of added rewards,
	// the rewards must be removed from the order through the Loyalty API.
	RewardIds []string `json:"reward_ids"`

	// Indicates the level at which the discount applies. For `ORDER` scoped discounts,
	// Square generates references in `applied_discounts` on all order line items that do
	// not have them. For `LINE_ITEM` scoped discounts, the discount only applies to line items
	// with a discount reference in their `applied_discounts` field.
	//
	// This field is immutable. To change the scope of a discount you must delete
	// the discount and re-add it as a new discount.
	// See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values
	Scope string `json:"scope,omitempty"`

	// The type of the discount.
	//
	// Discounts that don't reference a catalog object ID must have a type of
	// `FIXED_PERCENTAGE` or `FIXED_AMOUNT`.
	// See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for possible values
	Type string `json:"type,omitempty"`

	// Unique ID that identifies the discount only within this order.
	// Max Length: 60
	UID string `json:"uid,omitempty"`
}

OrderLineItemDiscount Represents a discount that applies to one or more line items in an order.

Fixed-amount, order-scoped discounts are distributed across all non-zero line item totals. The amount distributed to each line item is relative to the amount contributed by the item to the order subtotal.

swagger:model OrderLineItemDiscount

func (*OrderLineItemDiscount) ContextValidate

func (m *OrderLineItemDiscount) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order line item discount based on the context it is used

func (*OrderLineItemDiscount) MarshalBinary

func (m *OrderLineItemDiscount) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderLineItemDiscount) UnmarshalBinary

func (m *OrderLineItemDiscount) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderLineItemDiscount) Validate

func (m *OrderLineItemDiscount) Validate(formats strfmt.Registry) error

Validate validates this order line item discount

type OrderLineItemDiscountScope

type OrderLineItemDiscountScope string

OrderLineItemDiscountScope Indicates whether this is a line item or order level discount.

swagger:model OrderLineItemDiscountScope

const (

	// OrderLineItemDiscountScopeOTHERDISCOUNTSCOPE captures enum value "OTHER_DISCOUNT_SCOPE"
	OrderLineItemDiscountScopeOTHERDISCOUNTSCOPE OrderLineItemDiscountScope = "OTHER_DISCOUNT_SCOPE"

	// OrderLineItemDiscountScopeLINEITEM captures enum value "LINE_ITEM"
	OrderLineItemDiscountScopeLINEITEM OrderLineItemDiscountScope = "LINE_ITEM"

	// OrderLineItemDiscountScopeORDER captures enum value "ORDER"
	OrderLineItemDiscountScopeORDER OrderLineItemDiscountScope = "ORDER"
)

func (OrderLineItemDiscountScope) ContextValidate

func (m OrderLineItemDiscountScope) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this order line item discount scope based on context it is used

func (OrderLineItemDiscountScope) Validate

func (m OrderLineItemDiscountScope) Validate(formats strfmt.Registry) error

Validate validates this order line item discount scope

type OrderLineItemDiscountType

type OrderLineItemDiscountType string

OrderLineItemDiscountType Indicates how the discount is applied to the associated line item or order.

swagger:model OrderLineItemDiscountType

const (

	// OrderLineItemDiscountTypeUNKNOWNDISCOUNT captures enum value "UNKNOWN_DISCOUNT"
	OrderLineItemDiscountTypeUNKNOWNDISCOUNT OrderLineItemDiscountType = "UNKNOWN_DISCOUNT"

	// OrderLineItemDiscountTypeFIXEDPERCENTAGE captures enum value "FIXED_PERCENTAGE"
	OrderLineItemDiscountTypeFIXEDPERCENTAGE OrderLineItemDiscountType = "FIXED_PERCENTAGE"

	// OrderLineItemDiscountTypeFIXEDAMOUNT captures enum value "FIXED_AMOUNT"
	OrderLineItemDiscountTypeFIXEDAMOUNT OrderLineItemDiscountType = "FIXED_AMOUNT"

	// OrderLineItemDiscountTypeVARIABLEPERCENTAGE captures enum value "VARIABLE_PERCENTAGE"
	OrderLineItemDiscountTypeVARIABLEPERCENTAGE OrderLineItemDiscountType = "VARIABLE_PERCENTAGE"

	// OrderLineItemDiscountTypeVARIABLEAMOUNT captures enum value "VARIABLE_AMOUNT"
	OrderLineItemDiscountTypeVARIABLEAMOUNT OrderLineItemDiscountType = "VARIABLE_AMOUNT"
)

func (OrderLineItemDiscountType) ContextValidate

func (m OrderLineItemDiscountType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this order line item discount type based on context it is used

func (OrderLineItemDiscountType) Validate

func (m OrderLineItemDiscountType) Validate(formats strfmt.Registry) error

Validate validates this order line item discount type

type OrderLineItemModifier

type OrderLineItemModifier struct {

	// The base price for the modifier.
	//
	// `base_price_money` is required for ad hoc modifiers.
	// If both `catalog_object_id` and `base_price_money` are set, `base_price_money` will override the predefined `CatalogModifier` price.
	BasePriceMoney *Money `json:"base_price_money,omitempty"`

	// The catalog object id referencing `CatalogModifier`.
	// Max Length: 192
	CatalogObjectID string `json:"catalog_object_id,omitempty"`

	// The name of the item modifier.
	// Max Length: 255
	Name string `json:"name,omitempty"`

	// The total price of the item modifier for its line item.
	// This is the modifier's `base_price_money` multiplied by the line item's quantity.
	TotalPriceMoney *Money `json:"total_price_money,omitempty"`

	// Unique ID that identifies the modifier only within this order.
	// Max Length: 60
	UID string `json:"uid,omitempty"`
}

OrderLineItemModifier A CatalogModifier(#type-catalogmodifier).

swagger:model OrderLineItemModifier

func (*OrderLineItemModifier) ContextValidate

func (m *OrderLineItemModifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order line item modifier based on the context it is used

func (*OrderLineItemModifier) MarshalBinary

func (m *OrderLineItemModifier) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderLineItemModifier) UnmarshalBinary

func (m *OrderLineItemModifier) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderLineItemModifier) Validate

func (m *OrderLineItemModifier) Validate(formats strfmt.Registry) error

Validate validates this order line item modifier

type OrderLineItemPricingBlocklists

type OrderLineItemPricingBlocklists struct {

	// A list of discounts blocked from applying to the line item.
	// Discounts can be blocked by the `discount_uid` (for ad-hoc discounts) or
	// the `discount_catalog_object_id` (for catalog discounts).
	BlockedDiscounts []*OrderLineItemPricingBlocklistsBlockedDiscount `json:"blocked_discounts"`

	// A list of taxes blocked from applying to the line item.
	// Taxes can be blocked by the `tax_uid` (for ad-hoc taxes) or
	// the `tax_catalog_object_id` (for catalog taxes).
	BlockedTaxes []*OrderLineItemPricingBlocklistsBlockedTax `json:"blocked_taxes"`
}

OrderLineItemPricingBlocklists Describes pricing adjustments that are blocked from manual and automatic application to a line item. For more information, see [Apply Taxes and Discounts](/docs/orders-api/apply-taxes-and-discounts).

swagger:model OrderLineItemPricingBlocklists

func (*OrderLineItemPricingBlocklists) ContextValidate

func (m *OrderLineItemPricingBlocklists) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order line item pricing blocklists based on the context it is used

func (*OrderLineItemPricingBlocklists) MarshalBinary

func (m *OrderLineItemPricingBlocklists) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderLineItemPricingBlocklists) UnmarshalBinary

func (m *OrderLineItemPricingBlocklists) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderLineItemPricingBlocklists) Validate

func (m *OrderLineItemPricingBlocklists) Validate(formats strfmt.Registry) error

Validate validates this order line item pricing blocklists

type OrderLineItemPricingBlocklistsBlockedDiscount

type OrderLineItemPricingBlocklistsBlockedDiscount struct {

	// The `catalog_object_id` of the discount that should be blocked.
	// Use this field to block catalog discounts. For ad-hoc discounts use the
	// `discount_uid` field.
	// Max Length: 192
	DiscountCatalogObjectID string `json:"discount_catalog_object_id,omitempty"`

	// The `uid` of the discount that should be blocked. Use this field to block
	// ad-hoc discounts. For catalog discounts use the `discount_catalog_object_id` field.
	// Max Length: 60
	DiscountUID string `json:"discount_uid,omitempty"`

	// Unique ID of the `BlockedDiscount` within the order.
	// Max Length: 60
	UID string `json:"uid,omitempty"`
}

OrderLineItemPricingBlocklistsBlockedDiscount A discount to block from applying to a line item. The discount must be identified by either `discount_uid` or `discount_catalog_object_id`, but not both.

swagger:model OrderLineItemPricingBlocklistsBlockedDiscount

func (*OrderLineItemPricingBlocklistsBlockedDiscount) ContextValidate

ContextValidate validates this order line item pricing blocklists blocked discount based on context it is used

func (*OrderLineItemPricingBlocklistsBlockedDiscount) MarshalBinary

MarshalBinary interface implementation

func (*OrderLineItemPricingBlocklistsBlockedDiscount) UnmarshalBinary

UnmarshalBinary interface implementation

func (*OrderLineItemPricingBlocklistsBlockedDiscount) Validate

Validate validates this order line item pricing blocklists blocked discount

type OrderLineItemPricingBlocklistsBlockedTax

type OrderLineItemPricingBlocklistsBlockedTax struct {

	// The `catalog_object_id` of the tax that should be blocked.
	// Use this field to block catalog taxes. For ad-hoc taxes use the
	// `tax_uid` field.
	// Max Length: 192
	TaxCatalogObjectID string `json:"tax_catalog_object_id,omitempty"`

	// The `uid` of the tax that should be blocked. Use this field to block
	// ad-hoc taxes. For catalog taxes use the `tax_catalog_object_id` field.
	// Max Length: 60
	TaxUID string `json:"tax_uid,omitempty"`

	// Unique ID of the `BlockedTax` within the order.
	// Max Length: 60
	UID string `json:"uid,omitempty"`
}

OrderLineItemPricingBlocklistsBlockedTax A tax to block from applying to a line item. The tax must be identified by either `tax_uid` or `tax_catalog_object_id`, but not both.

swagger:model OrderLineItemPricingBlocklistsBlockedTax

func (*OrderLineItemPricingBlocklistsBlockedTax) ContextValidate

ContextValidate validates this order line item pricing blocklists blocked tax based on context it is used

func (*OrderLineItemPricingBlocklistsBlockedTax) MarshalBinary

func (m *OrderLineItemPricingBlocklistsBlockedTax) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderLineItemPricingBlocklistsBlockedTax) UnmarshalBinary

func (m *OrderLineItemPricingBlocklistsBlockedTax) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderLineItemPricingBlocklistsBlockedTax) Validate

Validate validates this order line item pricing blocklists blocked tax

type OrderLineItemTax

type OrderLineItemTax struct {

	// The amount of the money applied by the tax in the order.
	AppliedMoney *Money `json:"applied_money,omitempty"`

	// Determines whether the tax was automatically applied to the order based on
	// the catalog configuration. For an example, see
	// [Automatically Apply Taxes to an Order](https://developer.squareup.com/docs/docs/orders-api/apply-taxes-and-discounts/auto-apply-taxes).
	AutoApplied bool `json:"auto_applied,omitempty"`

	// The catalog object id referencing `CatalogTax`.
	// Max Length: 192
	CatalogObjectID string `json:"catalog_object_id,omitempty"`

	// Application-defined data attached to this tax. Metadata fields are intended
	// to store descriptive references or associations with an entity in another system or store brief
	// information about the object. Square does not process this field; it only stores and returns it
	// in relevant API calls. Do not use metadata to store any sensitive information (personally
	// identifiable information, card details, etc.).
	//
	// Keys written by applications must be 60 characters or less and must be in the character set
	// `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed
	// with a namespace, separated from the key with a ':' character.
	//
	// Values have a max length of 255 characters.
	//
	// An application may have up to 10 entries per metadata field.
	//
	// Entries written by applications are private and can only be read or modified by the same
	// application.
	//
	// See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information.
	Metadata map[string]string `json:"metadata,omitempty"`

	// The tax's name.
	// Max Length: 255
	Name string `json:"name,omitempty"`

	// The percentage of the tax, as a string representation of a decimal
	// number. For example, a value of `"7.25"` corresponds to a percentage of
	// 7.25%.
	// Max Length: 10
	Percentage string `json:"percentage,omitempty"`

	// Indicates the level at which the tax applies. For `ORDER` scoped taxes,
	// Square generates references in `applied_taxes` on all order line items that do
	// not have them. For `LINE_ITEM` scoped taxes, the tax will only apply to line items
	// with references in their `applied_taxes` field.
	//
	// This field is immutable. To change the scope, you must delete the tax and
	// re-add it as a new tax.
	// See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values
	Scope string `json:"scope,omitempty"`

	// Indicates the calculation method used to apply the tax.
	// See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values
	Type string `json:"type,omitempty"`

	// Unique ID that identifies the tax only within this order.
	// Max Length: 60
	UID string `json:"uid,omitempty"`
}

OrderLineItemTax Represents a tax that applies to one or more line item in the order.

Fixed-amount, order-scoped taxes are distributed across all non-zero line item totals. The amount distributed to each line item is relative to the amount the item contributes to the order subtotal.

swagger:model OrderLineItemTax

func (*OrderLineItemTax) ContextValidate

func (m *OrderLineItemTax) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order line item tax based on the context it is used

func (*OrderLineItemTax) MarshalBinary

func (m *OrderLineItemTax) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderLineItemTax) UnmarshalBinary

func (m *OrderLineItemTax) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderLineItemTax) Validate

func (m *OrderLineItemTax) Validate(formats strfmt.Registry) error

Validate validates this order line item tax

type OrderLineItemTaxScope

type OrderLineItemTaxScope string

OrderLineItemTaxScope Indicates whether this is a line item or order level tax.

swagger:model OrderLineItemTaxScope

const (

	// OrderLineItemTaxScopeOTHERTAXSCOPE captures enum value "OTHER_TAX_SCOPE"
	OrderLineItemTaxScopeOTHERTAXSCOPE OrderLineItemTaxScope = "OTHER_TAX_SCOPE"

	// OrderLineItemTaxScopeLINEITEM captures enum value "LINE_ITEM"
	OrderLineItemTaxScopeLINEITEM OrderLineItemTaxScope = "LINE_ITEM"

	// OrderLineItemTaxScopeORDER captures enum value "ORDER"
	OrderLineItemTaxScopeORDER OrderLineItemTaxScope = "ORDER"
)

func (OrderLineItemTaxScope) ContextValidate

func (m OrderLineItemTaxScope) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this order line item tax scope based on context it is used

func (OrderLineItemTaxScope) Validate

func (m OrderLineItemTaxScope) Validate(formats strfmt.Registry) error

Validate validates this order line item tax scope

type OrderLineItemTaxType

type OrderLineItemTaxType string

OrderLineItemTaxType Indicates how the tax is applied to the associated line item or order.

swagger:model OrderLineItemTaxType

const (

	// OrderLineItemTaxTypeUNKNOWNTAX captures enum value "UNKNOWN_TAX"
	OrderLineItemTaxTypeUNKNOWNTAX OrderLineItemTaxType = "UNKNOWN_TAX"

	// OrderLineItemTaxTypeADDITIVE captures enum value "ADDITIVE"
	OrderLineItemTaxTypeADDITIVE OrderLineItemTaxType = "ADDITIVE"

	// OrderLineItemTaxTypeINCLUSIVE captures enum value "INCLUSIVE"
	OrderLineItemTaxTypeINCLUSIVE OrderLineItemTaxType = "INCLUSIVE"
)

func (OrderLineItemTaxType) ContextValidate

func (m OrderLineItemTaxType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this order line item tax type based on context it is used

func (OrderLineItemTaxType) Validate

func (m OrderLineItemTaxType) Validate(formats strfmt.Registry) error

Validate validates this order line item tax type

type OrderMoneyAmounts

type OrderMoneyAmounts struct {

	// Money associated with discounts.
	DiscountMoney *Money `json:"discount_money,omitempty"`

	// Money associated with service charges.
	ServiceChargeMoney *Money `json:"service_charge_money,omitempty"`

	// Money associated with taxes.
	TaxMoney *Money `json:"tax_money,omitempty"`

	// Money associated with tips.
	TipMoney *Money `json:"tip_money,omitempty"`

	// Total money.
	TotalMoney *Money `json:"total_money,omitempty"`
}

OrderMoneyAmounts A collection of various money amounts.

swagger:model OrderMoneyAmounts

func (*OrderMoneyAmounts) ContextValidate

func (m *OrderMoneyAmounts) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order money amounts based on the context it is used

func (*OrderMoneyAmounts) MarshalBinary

func (m *OrderMoneyAmounts) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderMoneyAmounts) UnmarshalBinary

func (m *OrderMoneyAmounts) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderMoneyAmounts) Validate

func (m *OrderMoneyAmounts) Validate(formats strfmt.Registry) error

Validate validates this order money amounts

type OrderPricingOptions

type OrderPricingOptions struct {

	// The option to determine whether pricing rule-based
	// discounts are automatically applied to an order.
	AutoApplyDiscounts bool `json:"auto_apply_discounts,omitempty"`

	// The option to determine whether rule-based taxes are automatically
	// applied to an order when the criteria of the corresponding rules are met.
	AutoApplyTaxes bool `json:"auto_apply_taxes,omitempty"`
}

OrderPricingOptions Pricing options for an order. The options affect how the order's price is calculated. They can be used, for example, to apply automatic price adjustments that are based on pre-configured [pricing rules](/reference/square/objects/CatalogPricingRule).

swagger:model OrderPricingOptions

func (*OrderPricingOptions) ContextValidate

func (m *OrderPricingOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this order pricing options based on context it is used

func (*OrderPricingOptions) MarshalBinary

func (m *OrderPricingOptions) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderPricingOptions) UnmarshalBinary

func (m *OrderPricingOptions) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderPricingOptions) Validate

func (m *OrderPricingOptions) Validate(formats strfmt.Registry) error

Validate validates this order pricing options

type OrderQuantityUnit

type OrderQuantityUnit struct {

	// A `MeasurementUnit` that represents the
	// unit of measure for the quantity.
	MeasurementUnit *MeasurementUnit `json:"measurement_unit,omitempty"`

	// For non-integer quantities, represents the number of digits after the decimal point that are
	// recorded for this quantity.
	//
	// For example, a precision of 1 allows quantities like `"1.0"` and `"1.1"`, but not `"1.01"`.
	//
	// Min: 0. Max: 5.
	Precision int64 `json:"precision,omitempty"`
}

OrderQuantityUnit Contains the measurement unit for a quantity and a precision which specifies the number of digits after the decimal point for decimal quantities.

swagger:model OrderQuantityUnit

func (*OrderQuantityUnit) ContextValidate

func (m *OrderQuantityUnit) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order quantity unit based on the context it is used

func (*OrderQuantityUnit) MarshalBinary

func (m *OrderQuantityUnit) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderQuantityUnit) UnmarshalBinary

func (m *OrderQuantityUnit) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderQuantityUnit) Validate

func (m *OrderQuantityUnit) Validate(formats strfmt.Registry) error

Validate validates this order quantity unit

type OrderReturn

type OrderReturn struct {

	// Aggregate monetary value being returned by this Return entry.
	ReturnAmounts *OrderMoneyAmounts `json:"return_amounts,omitempty"`

	// Collection of references to discounts being returned for an order, including the total
	// applied discount amount to be returned. The discounts must reference a top-level discount ID
	// from the source order.
	ReturnDiscounts []*OrderReturnDiscount `json:"return_discounts"`

	// Collection of line items which are being returned.
	ReturnLineItems []*OrderReturnLineItem `json:"return_line_items"`

	// Collection of service charges which are being returned.
	ReturnServiceCharges []*OrderReturnServiceCharge `json:"return_service_charges"`

	// Collection of references to taxes being returned for an order, including the total
	// applied tax amount to be returned. The taxes must reference a top-level tax ID from the source
	// order.
	ReturnTaxes []*OrderReturnTax `json:"return_taxes"`

	// A positive or negative rounding adjustment to the total value being returned. Commonly
	// used to apply Cash Rounding when the minimum unit of account is smaller than the lowest
	// physical denomination of currency.
	RoundingAdjustment *OrderRoundingAdjustment `json:"rounding_adjustment,omitempty"`

	// Order which contains the original sale of these returned line items. This will be unset
	// for unlinked returns.
	SourceOrderID string `json:"source_order_id,omitempty"`

	// Unique ID that identifies the return only within this order.
	// Max Length: 60
	UID string `json:"uid,omitempty"`
}

OrderReturn The set of line items, service charges, taxes, discounts, tips, etc. being returned in an Order.

swagger:model OrderReturn

func (*OrderReturn) ContextValidate

func (m *OrderReturn) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order return based on the context it is used

func (*OrderReturn) MarshalBinary

func (m *OrderReturn) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderReturn) UnmarshalBinary

func (m *OrderReturn) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderReturn) Validate

func (m *OrderReturn) Validate(formats strfmt.Registry) error

Validate validates this order return

type OrderReturnDiscount

type OrderReturnDiscount struct {

	// The total declared monetary amount of the discount.
	//
	// `amount_money` is not set for percentage-based discounts.
	AmountMoney *Money `json:"amount_money,omitempty"`

	// The amount of discount actually applied to this line item. When an amount-based
	// discount is at order-level, this value is different from `amount_money` because the discount
	// is distributed across the line items.
	AppliedMoney *Money `json:"applied_money,omitempty"`

	// The catalog object id referencing `CatalogDiscount`.
	// Max Length: 192
	CatalogObjectID string `json:"catalog_object_id,omitempty"`

	// The discount's name.
	// Max Length: 255
	Name string `json:"name,omitempty"`

	// The percentage of the tax, as a string representation of a decimal number.
	// A value of `7.25` corresponds to a percentage of 7.25%.
	//
	// `percentage` is not set for amount-based discounts.
	// Max Length: 10
	Percentage string `json:"percentage,omitempty"`

	// Indicates the level at which the `OrderReturnDiscount` applies. For `ORDER` scoped
	// discounts, the server will generate references in `applied_discounts` on all
	// `OrderReturnLineItem`s. For `LINE_ITEM` scoped discounts, the discount will only apply to
	// `OrderReturnLineItem`s with references in their `applied_discounts` field.
	// See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values
	Scope string `json:"scope,omitempty"`

	// `uid` of the Discount from the Order which contains the original application of this discount.
	// Max Length: 60
	SourceDiscountUID string `json:"source_discount_uid,omitempty"`

	// The type of the discount. If it is created by API, it would be either `FIXED_PERCENTAGE` or `FIXED_AMOUNT`.
	//
	// Discounts that don't reference a catalog object ID must have a type of
	// `FIXED_PERCENTAGE` or `FIXED_AMOUNT`.
	// See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for possible values
	Type string `json:"type,omitempty"`

	// Unique ID that identifies the return discount only within this order.
	// Max Length: 60
	UID string `json:"uid,omitempty"`
}

OrderReturnDiscount Represents a discount being returned that applies to one or more return line items in an order.

Fixed-amount, order-scoped discounts are distributed across all non-zero return line item totals. The amount distributed to each return line item is relative to that item’s contribution to the order subtotal.

swagger:model OrderReturnDiscount

func (*OrderReturnDiscount) ContextValidate

func (m *OrderReturnDiscount) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order return discount based on the context it is used

func (*OrderReturnDiscount) MarshalBinary

func (m *OrderReturnDiscount) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderReturnDiscount) UnmarshalBinary

func (m *OrderReturnDiscount) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderReturnDiscount) Validate

func (m *OrderReturnDiscount) Validate(formats strfmt.Registry) error

Validate validates this order return discount

type OrderReturnLineItem

type OrderReturnLineItem struct {

	// The list of references to `OrderReturnDiscount` entities applied to the returned line item. Each
	// `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level
	// `OrderReturnDiscount` applied to the returned line item. On reads, the amount
	// applied is populated.
	AppliedDiscounts []*OrderLineItemAppliedDiscount `json:"applied_discounts"`

	// The list of references to `OrderReturnTax` entities applied to the returned line item. Each
	// `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level
	// `OrderReturnTax` applied to the returned line item. On reads, the amount applied
	// is populated.
	AppliedTaxes []*OrderLineItemAppliedTax `json:"applied_taxes"`

	// The base price for a single unit of the line item.
	BasePriceMoney *Money `json:"base_price_money,omitempty"`

	// The `CatalogItemVariation` id applied to this returned line item.
	// Max Length: 192
	CatalogObjectID string `json:"catalog_object_id,omitempty"`

	// The gross return amount of money calculated as (item base price + modifiers price) * quantity.
	GrossReturnMoney *Money `json:"gross_return_money,omitempty"`

	// The name of the line item.
	// Max Length: 512
	Name string `json:"name,omitempty"`

	// The note of the returned line item.
	// Max Length: 2000
	Note string `json:"note,omitempty"`

	// The quantity returned, formatted as a decimal number.
	// For example: `"3"`.
	//
	// Line items with a `quantity_unit` can have non-integer quantities.
	// For example: `"1.70000"`.
	// Required: true
	// Max Length: 12
	// Min Length: 1
	Quantity *string `json:"quantity"`

	// The unit and precision that this return line item's quantity is measured in.
	QuantityUnit *OrderQuantityUnit `json:"quantity_unit,omitempty"`

	// The `CatalogModifier`s applied to this line item.
	ReturnModifiers []*OrderReturnLineItemModifier `json:"return_modifiers"`

	// `uid` of the LineItem in the original sale Order.
	// Max Length: 60
	SourceLineItemUID string `json:"source_line_item_uid,omitempty"`

	// The total discount amount of money to return for the line item.
	TotalDiscountMoney *Money `json:"total_discount_money,omitempty"`

	// The total amount of money to return for this line item.
	TotalMoney *Money `json:"total_money,omitempty"`

	// The total tax amount of money to return for the line item.
	TotalTaxMoney *Money `json:"total_tax_money,omitempty"`

	// Unique identifier for this return line item entry.
	// Max Length: 60
	UID string `json:"uid,omitempty"`

	// The name of the variation applied to this returned line item.
	// Max Length: 255
	VariationName string `json:"variation_name,omitempty"`

	// The total price of all item variations returned in this line item.
	// Calculated as `base_price_money` multiplied by `quantity`.
	// Does not include modifiers.
	VariationTotalPriceMoney *Money `json:"variation_total_price_money,omitempty"`
}

OrderReturnLineItem The line item being returned in an Order.

swagger:model OrderReturnLineItem

func (*OrderReturnLineItem) ContextValidate

func (m *OrderReturnLineItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order return line item based on the context it is used

func (*OrderReturnLineItem) MarshalBinary

func (m *OrderReturnLineItem) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderReturnLineItem) UnmarshalBinary

func (m *OrderReturnLineItem) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderReturnLineItem) Validate

func (m *OrderReturnLineItem) Validate(formats strfmt.Registry) error

Validate validates this order return line item

type OrderReturnLineItemModifier

type OrderReturnLineItemModifier struct {

	// The base price for the modifier.
	//
	// `base_price_money` is required for ad hoc modifiers.
	// If both `catalog_object_id` and `base_price_money` are set, `base_price_money` will override the predefined `CatalogModifier` price.
	BasePriceMoney *Money `json:"base_price_money,omitempty"`

	// The catalog object id referencing `CatalogModifier`.
	// Max Length: 192
	CatalogObjectID string `json:"catalog_object_id,omitempty"`

	// The name of the item modifier.
	// Max Length: 255
	Name string `json:"name,omitempty"`

	// `uid` of the Modifier from the LineItem from the Order which contains the
	// original sale of this line item modifier.
	// Max Length: 60
	SourceModifierUID string `json:"source_modifier_uid,omitempty"`

	// The total price of the item modifier for its line item.
	// This is the modifier's `base_price_money` multiplied by the line item's quantity.
	TotalPriceMoney *Money `json:"total_price_money,omitempty"`

	// Unique ID that identifies the return modifier only within this order.
	// Max Length: 60
	UID string `json:"uid,omitempty"`
}

OrderReturnLineItemModifier A line item modifier being returned.

swagger:model OrderReturnLineItemModifier

func (*OrderReturnLineItemModifier) ContextValidate

func (m *OrderReturnLineItemModifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order return line item modifier based on the context it is used

func (*OrderReturnLineItemModifier) MarshalBinary

func (m *OrderReturnLineItemModifier) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderReturnLineItemModifier) UnmarshalBinary

func (m *OrderReturnLineItemModifier) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderReturnLineItemModifier) Validate

func (m *OrderReturnLineItemModifier) Validate(formats strfmt.Registry) error

Validate validates this order return line item modifier

type OrderReturnServiceCharge

type OrderReturnServiceCharge struct {

	// The amount of a non-percentage based service charge.
	//
	// Exactly one of `percentage` or `amount_money` should be set.
	AmountMoney *Money `json:"amount_money,omitempty"`

	// The amount of money applied to the order by the service charge, including
	// any inclusive tax amounts, as calculated by Square.
	//
	// - For fixed-amount service charges, `applied_money` is equal to `amount_money`.
	// - For percentage-based service charges, `applied_money` is the money calculated using the percentage.
	AppliedMoney *Money `json:"applied_money,omitempty"`

	// The list of references to `OrderReturnTax` entities applied to the
	// `OrderReturnServiceCharge`. Each `OrderLineItemAppliedTax` has a `tax_uid`
	// that references the `uid` of a top-level `OrderReturnTax` that is being
	// applied to the `OrderReturnServiceCharge`. On reads, the amount applied is
	// populated.
	AppliedTaxes []*OrderLineItemAppliedTax `json:"applied_taxes"`

	// The calculation phase after which to apply the service charge.
	// See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values
	CalculationPhase string `json:"calculation_phase,omitempty"`

	// The catalog object ID of the associated `CatalogServiceCharge`.
	// Max Length: 192
	CatalogObjectID string `json:"catalog_object_id,omitempty"`

	// The name of the service charge.
	// Max Length: 255
	Name string `json:"name,omitempty"`

	// The percentage of the service charge, as a string representation of
	// a decimal number. For example, a value of `"7.25"` corresponds to a
	// percentage of 7.25%.
	//
	// Exactly one of `percentage` or `amount_money` should be set.
	// Max Length: 10
	Percentage string `json:"percentage,omitempty"`

	// `uid` of the Service Charge from the Order containing the original
	// charge of the service charge. `source_service_charge_uid` is `null` for
	// unlinked returns.
	// Max Length: 60
	SourceServiceChargeUID string `json:"source_service_charge_uid,omitempty"`

	// Indicates whether the surcharge can be taxed. Service charges
	// calculated in the `TOTAL_PHASE` cannot be marked as taxable.
	Taxable bool `json:"taxable,omitempty"`

	// The total amount of money to collect for the service charge.
	//
	// __NOTE__: if an inclusive tax is applied to the service charge, `total_money`
	// does not equal `applied_money` plus `total_tax_money` since the inclusive
	// tax amount will already be included in both `applied_money` and `total_tax_money`.
	TotalMoney *Money `json:"total_money,omitempty"`

	// The total amount of tax money to collect for the service charge.
	TotalTaxMoney *Money `json:"total_tax_money,omitempty"`

	// Unique ID that identifies the return service charge only within this order.
	// Max Length: 60
	UID string `json:"uid,omitempty"`
}

OrderReturnServiceCharge Represents the service charge applied to the original order.

swagger:model OrderReturnServiceCharge

func (*OrderReturnServiceCharge) ContextValidate

func (m *OrderReturnServiceCharge) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order return service charge based on the context it is used

func (*OrderReturnServiceCharge) MarshalBinary

func (m *OrderReturnServiceCharge) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderReturnServiceCharge) UnmarshalBinary

func (m *OrderReturnServiceCharge) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderReturnServiceCharge) Validate

func (m *OrderReturnServiceCharge) Validate(formats strfmt.Registry) error

Validate validates this order return service charge

type OrderReturnTax

type OrderReturnTax struct {

	// The amount of the money applied by the tax in an order.
	AppliedMoney *Money `json:"applied_money,omitempty"`

	// The catalog object id referencing `CatalogTax`.
	// Max Length: 192
	CatalogObjectID string `json:"catalog_object_id,omitempty"`

	// The tax's name.
	// Max Length: 255
	Name string `json:"name,omitempty"`

	// The percentage of the tax, as a string representation of a decimal number.
	// For example, a value of `"7.25"` corresponds to a percentage of 7.25%.
	// Max Length: 10
	Percentage string `json:"percentage,omitempty"`

	// Indicates the level at which the `OrderReturnTax` applies. For `ORDER` scoped
	// taxes, Square generates references in `applied_taxes` on all
	// `OrderReturnLineItem`s. For `LINE_ITEM` scoped taxes, the tax will only apply to
	// `OrderReturnLineItem`s with references in their `applied_discounts` field.
	// See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values
	Scope string `json:"scope,omitempty"`

	// `uid` of the Tax from the Order which contains the original charge of this tax.
	// Max Length: 60
	SourceTaxUID string `json:"source_tax_uid,omitempty"`

	// Indicates the calculation method used to apply the tax.
	// See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values
	Type string `json:"type,omitempty"`

	// Unique ID that identifies the return tax only within this order.
	// Max Length: 60
	UID string `json:"uid,omitempty"`
}

OrderReturnTax Represents a tax being returned that applies to one or more return line items in an order.

Fixed-amount, order-scoped taxes are distributed across all non-zero return line item totals. The amount distributed to each return line item is relative to that item’s contribution to the order subtotal.

swagger:model OrderReturnTax

func (*OrderReturnTax) ContextValidate

func (m *OrderReturnTax) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order return tax based on the context it is used

func (*OrderReturnTax) MarshalBinary

func (m *OrderReturnTax) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderReturnTax) UnmarshalBinary

func (m *OrderReturnTax) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderReturnTax) Validate

func (m *OrderReturnTax) Validate(formats strfmt.Registry) error

Validate validates this order return tax

type OrderReward

type OrderReward struct {

	// The identifier of the reward.
	// Required: true
	// Min Length: 1
	ID *string `json:"id"`

	// The identifier of the reward tier corresponding to this reward.
	// Required: true
	// Min Length: 1
	RewardTierID *string `json:"reward_tier_id"`
}

OrderReward Represents a reward that may be applied to an order if the necessary reward tier criteria are met. Rewards are created through the Loyalty API.

swagger:model OrderReward

func (*OrderReward) ContextValidate

func (m *OrderReward) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this order reward based on context it is used

func (*OrderReward) MarshalBinary

func (m *OrderReward) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderReward) UnmarshalBinary

func (m *OrderReward) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderReward) Validate

func (m *OrderReward) Validate(formats strfmt.Registry) error

Validate validates this order reward

type OrderRoundingAdjustment

type OrderRoundingAdjustment struct {

	// Actual rounding adjustment amount.
	AmountMoney *Money `json:"amount_money,omitempty"`

	// The name of the rounding adjustment from the original sale Order.
	Name string `json:"name,omitempty"`

	// Unique ID that identifies the rounding adjustment only within this order.
	// Max Length: 60
	UID string `json:"uid,omitempty"`
}

OrderRoundingAdjustment A rounding adjustment of the money being returned. Commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency.

swagger:model OrderRoundingAdjustment

func (*OrderRoundingAdjustment) ContextValidate

func (m *OrderRoundingAdjustment) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order rounding adjustment based on the context it is used

func (*OrderRoundingAdjustment) MarshalBinary

func (m *OrderRoundingAdjustment) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderRoundingAdjustment) UnmarshalBinary

func (m *OrderRoundingAdjustment) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderRoundingAdjustment) Validate

func (m *OrderRoundingAdjustment) Validate(formats strfmt.Registry) error

Validate validates this order rounding adjustment

type OrderServiceCharge

type OrderServiceCharge struct {

	// The amount of a non-percentage based service charge.
	//
	// Exactly one of `percentage` or `amount_money` should be set.
	AmountMoney *Money `json:"amount_money,omitempty"`

	// The amount of money applied to the order by the service charge,
	// including any inclusive tax amounts, as calculated by Square.
	//
	// - For fixed-amount service charges, `applied_money` is equal to `amount_money`.
	// - For percentage-based service charges, `applied_money` is the money
	// calculated using the percentage.
	AppliedMoney *Money `json:"applied_money,omitempty"`

	// The list of references to taxes applied to this service charge. Each
	// `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level
	// `OrderLineItemTax` that is being applied to this service charge. On reads, the amount applied
	// is populated.
	//
	// An `OrderLineItemAppliedTax` will be automatically created on every taxable service charge
	// for all `ORDER` scoped taxes that are added to the order. `OrderLineItemAppliedTax` records
	// for `LINE_ITEM` scoped taxes must be added in requests for the tax to apply to any taxable
	// service charge.  Taxable service charges have the `taxable` field set to true and calculated
	// in the `SUBTOTAL_PHASE`.
	//
	// To change the amount of a tax, modify the referenced top-level tax.
	AppliedTaxes []*OrderLineItemAppliedTax `json:"applied_taxes"`

	// The calculation phase at which to apply the service charge.
	// See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values
	CalculationPhase string `json:"calculation_phase,omitempty"`

	// The catalog object ID referencing the service charge `CatalogObject`.
	// Max Length: 192
	CatalogObjectID string `json:"catalog_object_id,omitempty"`

	// Application-defined data attached to this service charge. Metadata fields are intended
	// to store descriptive references or associations with an entity in another system or store brief
	// information about the object. Square does not process this field; it only stores and returns it
	// in relevant API calls. Do not use metadata to store any sensitive information (personally
	// identifiable information, card details, etc.).
	//
	// Keys written by applications must be 60 characters or less and must be in the character set
	// `[a-zA-Z0-9_-]`. Entries may also include metadata generated by Square. These keys are prefixed
	// with a namespace, separated from the key with a ':' character.
	//
	// Values have a max length of 255 characters.
	//
	// An application may have up to 10 entries per metadata field.
	//
	// Entries written by applications are private and can only be read or modified by the same
	// application.
	//
	// See [Metadata](https://developer.squareup.com/docs/build-basics/metadata) for more information.
	Metadata map[string]string `json:"metadata,omitempty"`

	// The name of the service charge.
	// Max Length: 255
	Name string `json:"name,omitempty"`

	// The service charge percentage as a string representation of a
	// decimal number. For example, `"7.25"` indicates a service charge of 7.25%.
	//
	// Exactly 1 of `percentage` or `amount_money` should be set.
	// Max Length: 10
	Percentage string `json:"percentage,omitempty"`

	// Indicates whether the service charge can be taxed. If set to `true`,
	// order-level taxes automatically apply to the service charge. Note that
	// service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable.
	Taxable bool `json:"taxable,omitempty"`

	// The total amount of money to collect for the service charge.
	//
	// __Note__: if an inclusive tax is applied to the service charge,
	// `total_money` __does not__ equal `applied_money` plus `total_tax_money`
	// since the inclusive tax amount will already be included in both
	// `applied_money` and `total_tax_money`.
	TotalMoney *Money `json:"total_money,omitempty"`

	// The total amount of tax money to collect for the service charge.
	TotalTaxMoney *Money `json:"total_tax_money,omitempty"`

	// Unique ID that identifies the service charge only within this order.
	// Max Length: 60
	UID string `json:"uid,omitempty"`
}

OrderServiceCharge Represents a service charge applied to an order.

swagger:model OrderServiceCharge

func (*OrderServiceCharge) ContextValidate

func (m *OrderServiceCharge) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order service charge based on the context it is used

func (*OrderServiceCharge) MarshalBinary

func (m *OrderServiceCharge) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderServiceCharge) UnmarshalBinary

func (m *OrderServiceCharge) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderServiceCharge) Validate

func (m *OrderServiceCharge) Validate(formats strfmt.Registry) error

Validate validates this order service charge

type OrderServiceChargeCalculationPhase

type OrderServiceChargeCalculationPhase string

OrderServiceChargeCalculationPhase Represents a phase in the process of calculating order totals. Service charges are applied __after__ the indicated phase.

[Read more about how order totals are calculated.](https://developer.squareup.com/docs/docs/orders-api/how-it-works#how-totals-are-calculated)

swagger:model OrderServiceChargeCalculationPhase

const (

	// OrderServiceChargeCalculationPhaseSUBTOTALPHASE captures enum value "SUBTOTAL_PHASE"
	OrderServiceChargeCalculationPhaseSUBTOTALPHASE OrderServiceChargeCalculationPhase = "SUBTOTAL_PHASE"

	// OrderServiceChargeCalculationPhaseTOTALPHASE captures enum value "TOTAL_PHASE"
	OrderServiceChargeCalculationPhaseTOTALPHASE OrderServiceChargeCalculationPhase = "TOTAL_PHASE"
)

func (OrderServiceChargeCalculationPhase) ContextValidate

func (m OrderServiceChargeCalculationPhase) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this order service charge calculation phase based on context it is used

func (OrderServiceChargeCalculationPhase) Validate

Validate validates this order service charge calculation phase

type OrderSource

type OrderSource struct {

	// The name used to identify the place (physical or digital) that an order originates.
	// If unset, the name defaults to the name of the application that created the order.
	Name string `json:"name,omitempty"`
}

OrderSource Represents the origination details of an order.

swagger:model OrderSource

func (*OrderSource) ContextValidate

func (m *OrderSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this order source based on context it is used

func (*OrderSource) MarshalBinary

func (m *OrderSource) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderSource) UnmarshalBinary

func (m *OrderSource) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderSource) Validate

func (m *OrderSource) Validate(formats strfmt.Registry) error

Validate validates this order source

type OrderState

type OrderState string

OrderState The state of the order.

swagger:model OrderState

const (

	// OrderStateOPEN captures enum value "OPEN"
	OrderStateOPEN OrderState = "OPEN"

	// OrderStateCOMPLETED captures enum value "COMPLETED"
	OrderStateCOMPLETED OrderState = "COMPLETED"

	// OrderStateCANCELED captures enum value "CANCELED"
	OrderStateCANCELED OrderState = "CANCELED"
)

func (OrderState) ContextValidate

func (m OrderState) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this order state based on context it is used

func (OrderState) Validate

func (m OrderState) Validate(formats strfmt.Registry) error

Validate validates this order state

type OrderUpdated

type OrderUpdated struct {

	// Timestamp for when the order was created in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// The ID of the merchant location this order is associated with.
	LocationID string `json:"location_id,omitempty"`

	// The order's unique ID.
	OrderID string `json:"order_id,omitempty"`

	// The state of the order.
	// See [OrderState](#type-orderstate) for possible values
	State string `json:"state,omitempty"`

	// Timestamp for when the order was last updated in RFC 3339 format.
	UpdatedAt string `json:"updated_at,omitempty"`

	// Version number which is incremented each time an update is committed to the order.
	// Orders that were not created through the API will not include a version and
	// thus cannot be updated.
	//
	// [Read more about working with versions](https://developer.squareup.com/docs/docs/orders-api/manage-orders#update-orders)
	Version int64 `json:"version,omitempty"`
}

OrderUpdated order updated

swagger:model OrderUpdated

func (*OrderUpdated) ContextValidate

func (m *OrderUpdated) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this order updated based on context it is used

func (*OrderUpdated) MarshalBinary

func (m *OrderUpdated) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderUpdated) UnmarshalBinary

func (m *OrderUpdated) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderUpdated) Validate

func (m *OrderUpdated) Validate(formats strfmt.Registry) error

Validate validates this order updated

type OrderUpdatedObject

type OrderUpdatedObject struct {

	// Information about the updated order.
	OrderUpdated *OrderUpdated `json:"order_updated,omitempty"`
}

OrderUpdatedObject order updated object

swagger:model OrderUpdatedObject

func (*OrderUpdatedObject) ContextValidate

func (m *OrderUpdatedObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order updated object based on the context it is used

func (*OrderUpdatedObject) MarshalBinary

func (m *OrderUpdatedObject) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderUpdatedObject) UnmarshalBinary

func (m *OrderUpdatedObject) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderUpdatedObject) Validate

func (m *OrderUpdatedObject) Validate(formats strfmt.Registry) error

Validate validates this order updated object

type PayOrderRequest

type PayOrderRequest struct {

	// A value you specify that uniquely identifies this request among requests you've sent. If
	// you're unsure whether a particular payment request was completed successfully, you can reattempt
	// it with the same idempotency key without worrying about duplicate payments.
	//
	// See [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency) for more information.
	// Required: true
	// Max Length: 192
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`

	// The version of the order being paid. If not supplied, the latest version will be paid.
	OrderVersion int64 `json:"order_version,omitempty"`

	// The IDs of the `payments` to collect.
	// The payment total must match the order total.
	PaymentIds []string `json:"payment_ids"`
}

PayOrderRequest Defines the fields that are included in requests to the [PayOrder](#endpoint-payorder) endpoint. Example: {"request_body":{"idempotency_key":"c043a359-7ad9-4136-82a9-c3f1d66dcbff","payment_ids":["EnZdNAlWCmfh6Mt5FMNST1o7taB","0LRiVlbXVwe8ozu4KbZxd12mvaB"]}}

swagger:model PayOrderRequest

func (*PayOrderRequest) ContextValidate

func (m *PayOrderRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this pay order request based on context it is used

func (*PayOrderRequest) MarshalBinary

func (m *PayOrderRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*PayOrderRequest) UnmarshalBinary

func (m *PayOrderRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*PayOrderRequest) Validate

func (m *PayOrderRequest) Validate(formats strfmt.Registry) error

Validate validates this pay order request

type PayOrderResponse

type PayOrderResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The paid, updated `order`.
	Order *Order `json:"order,omitempty"`
}

PayOrderResponse Defines the fields that are included in the response body of a request to the [PayOrder](#endpoint-payorder) endpoint. Example: {"order":{"closed_at":"2019-08-06T02:47:37.140Z","created_at":"2019-08-06T02:47:35.693Z","id":"lgwOlEityYPJtcuvKTVKT1pA986YY","line_items":[{"base_price_money":{"amount":500,"currency":"USD"},"gross_sales_money":{"amount":500,"currency":"USD"},"name":"Item 1","quantity":"1","total_discount_money":{"amount":0,"currency":"USD"},"total_money":{"amount":500,"currency":"USD"},"total_tax_money":{"amount":0,"currency":"USD"},"uid":"QW6kofLHJK7JEKMjlSVP5C"},{"base_price_money":{"amount":750,"currency":"USD"},"gross_sales_money":{"amount":1500,"currency":"USD"},"name":"Item 2","quantity":"2","total_discount_money":{"amount":0,"currency":"USD"},"total_money":{"amount":1500,"currency":"USD"},"total_tax_money":{"amount":0,"currency":"USD"},"uid":"zhw8MNfRGdFQMI2WE1UBJD"}],"location_id":"P3CCK6HSNDAS7","net_amounts":{"discount_money":{"amount":0,"currency":"USD"},"service_charge_money":{"amount":0,"currency":"USD"},"tax_money":{"amount":0,"currency":"USD"},"tip_money":{"amount":0,"currency":"USD"},"total_money":{"amount":2000,"currency":"USD"}},"source":{"name":"Source Name"},"state":"COMPLETED","tenders":[{"amount_money":{"amount":1000,"currency":"USD"},"card_details":{"card":{"card_brand":"VISA","exp_month":2,"exp_year":2022,"fingerprint":"sq-1-n_BL15KP87ClDa4-h2nXOI0fp5VnxNH6hfhzqhptTfAgxgLuGFcg6jIPngDz4IkkTQ","last_4":"1111"},"entry_method":"KEYED","status":"CAPTURED"},"created_at":"2019-08-06T02:47:36.293Z","id":"EnZdNAlWCmfh6Mt5FMNST1o7taB","location_id":"P3CCK6HSNDAS7","payment_id":"EnZdNAlWCmfh6Mt5FMNST1o7taB","transaction_id":"lgwOlEityYPJtcuvKTVKT1pA986YY","type":"CARD"},{"amount_money":{"amount":1000,"currency":"USD"},"card_details":{"card":{"card_brand":"VISA","exp_month":2,"exp_year":2022,"fingerprint":"sq-1-n_BL15KP87ClDa4-h2nXOI0fp5VnxNH6hfhzqhptTfAgxgLuGFcg6jIPngDz4IkkTQ","last_4":"1111"},"entry_method":"KEYED","status":"CAPTURED"},"created_at":"2019-08-06T02:47:36.809Z","id":"0LRiVlbXVwe8ozu4KbZxd12mvaB","location_id":"P3CCK6HSNDAS7","payment_id":"0LRiVlbXVwe8ozu4KbZxd12mvaB","transaction_id":"lgwOlEityYPJtcuvKTVKT1pA986YY","type":"CARD"}],"total_discount_money":{"amount":0,"currency":"USD"},"total_money":{"amount":2000,"currency":"USD"},"total_service_charge_money":{"amount":0,"currency":"USD"},"total_tax_money":{"amount":0,"currency":"USD"},"updated_at":"2019-08-06T02:47:37.140Z","version":4}}

swagger:model PayOrderResponse

func (*PayOrderResponse) ContextValidate

func (m *PayOrderResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this pay order response based on the context it is used

func (*PayOrderResponse) MarshalBinary

func (m *PayOrderResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*PayOrderResponse) UnmarshalBinary

func (m *PayOrderResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*PayOrderResponse) Validate

func (m *PayOrderResponse) Validate(formats strfmt.Registry) error

Validate validates this pay order response

type Payment

type Payment struct {

	// The amount processed for this payment, not including `tip_money`.
	//
	// The amount is specified in the smallest denomination of the applicable currency (for example,
	// US dollar amounts are specified in cents). For more information, see
	// [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).
	AmountMoney *Money `json:"amount_money,omitempty"`

	// The amount the developer is taking as a fee for facilitating the payment on behalf
	// of the seller. This amount is specified in the smallest denomination of the applicable currency
	// (for example, US dollar amounts are specified in cents). For more information,
	// see [Take Payments and Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees).
	//
	// The amount cannot be more than 90% of the `total_money` value.
	AppFeeMoney *Money `json:"app_fee_money,omitempty"`

	// The buyer's billing address.
	BillingAddress *Address `json:"billing_address,omitempty"`

	// The buyer's email address.
	// Max Length: 255
	BuyerEmailAddress string `json:"buyer_email_address,omitempty"`

	// Non-confidential details about the source. The details are only populated if the
	// `source_type` is `CARD`.
	CardDetails *CardPaymentDetails `json:"card_details,omitempty"`

	// The timestamp of when the payment was created, in RFC 3339 format.
	// Max Length: 32
	CreatedAt string `json:"created_at,omitempty"`

	// The `Customer` ID of the customer associated with the payment.
	// Max Length: 191
	CustomerID string `json:"customer_id,omitempty"`

	// The action to be applied to the payment when the `delay_duration` has elapsed. This field
	// is read-only.
	//
	// Current values include `CANCEL`.
	DelayAction string `json:"delay_action,omitempty"`

	// The duration of time after the payment's creation when Square automatically applies the
	// `delay_action` to the payment. This automatic `delay_action` applies only to payments that
	// do not reach a terminal state (COMPLETED, CANCELED, or FAILED) before the `delay_duration`
	// time period.
	//
	// This field is specified as a time duration, in RFC 3339 format.
	//
	// Notes:
	// This feature is only supported for card payments.
	//
	// Default:
	//
	// - Card-present payments: "PT36H" (36 hours) from the creation time.
	// - Card-not-present payments: "P7D" (7 days) from the creation time.
	DelayDuration string `json:"delay_duration,omitempty"`

	// The read-only timestamp of when the `delay_action` is automatically applied,
	// in RFC 3339 format.
	//
	// Note that this field is calculated by summing the payment's `delay_duration` and `created_at`
	// fields. The `created_at` field is generated by Square and might not exactly match the
	// time on your local machine.
	DelayedUntil string `json:"delayed_until,omitempty"`

	// An optional ID of the employee associated with taking the payment.
	// Max Length: 192
	EmployeeID string `json:"employee_id,omitempty"`

	// A unique ID for the payment.
	// Max Length: 192
	ID string `json:"id,omitempty"`

	// The ID of the location associated with the payment.
	// Max Length: 50
	LocationID string `json:"location_id,omitempty"`

	// An optional note to include when creating a payment.
	// Max Length: 500
	Note string `json:"note,omitempty"`

	// The ID of the order associated with the payment.
	// Max Length: 192
	OrderID string `json:"order_id,omitempty"`

	// The processing fees and fee adjustments assessed by Square for this payment.
	ProcessingFee []*ProcessingFee `json:"processing_fee"`

	// The payment's receipt number.
	// The field is missing if a payment is canceled.
	// Max Length: 4
	ReceiptNumber string `json:"receipt_number,omitempty"`

	// The URL for the payment's receipt.
	// The field is only populated for COMPLETED payments.
	// Max Length: 255
	ReceiptURL string `json:"receipt_url,omitempty"`

	// An optional ID that associates the payment with an entity in
	// another system.
	// Max Length: 40
	ReferenceID string `json:"reference_id,omitempty"`

	// A list of `refund_id`s identifying refunds for the payment.
	RefundIds []string `json:"refund_ids"`

	// The total amount of the payment refunded to date.
	//
	// This amount is specified in the smallest denomination of the applicable currency (for example,
	// US dollar amounts are specified in cents).
	RefundedMoney *Money `json:"refunded_money,omitempty"`

	// Provides information about the risk associated with the payment, as determined by Square.
	// This field is present for payments to sellers that have opted in to receive risk
	// evaluations.
	RiskEvaluation *RiskEvaluation `json:"risk_evaluation,omitempty"`

	// The buyer's shipping address.
	ShippingAddress *Address `json:"shipping_address,omitempty"`

	// The source type for this payment.
	//
	// Current values include `CARD`.
	// Max Length: 50
	SourceType string `json:"source_type,omitempty"`

	// Additional payment information that gets added to the customer's card statement
	// as part of the statement description.
	//
	// Note that the `statement_description_identifier` might get truncated on the statement description
	// to fit the required information including the Square identifier (SQ *) and the name of the
	// seller taking the payment.
	StatementDescriptionIdentifier string `json:"statement_description_identifier,omitempty"`

	// Indicates whether the payment is APPROVED, COMPLETED, CANCELED, or FAILED.
	// Max Length: 50
	Status string `json:"status,omitempty"`

	// The amount designated as a tip.
	//
	// This amount is specified in the smallest denomination of the applicable currency (for example,
	// US dollar amounts are specified in cents). For more information, see
	// [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).
	TipMoney *Money `json:"tip_money,omitempty"`

	// The total amount for the payment, including `amount_money` and `tip_money`.
	// This amount is specified in the smallest denomination of the applicable currency (for example,
	// US dollar amounts are specified in cents). For more information, see
	// [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).
	TotalMoney *Money `json:"total_money,omitempty"`

	// The timestamp of when the payment was last updated, in RFC 3339 format.
	// Max Length: 32
	UpdatedAt string `json:"updated_at,omitempty"`
}

Payment Represents a payment processed by the Square API.

swagger:model Payment

func (*Payment) ContextValidate

func (m *Payment) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this payment based on the context it is used

func (*Payment) MarshalBinary

func (m *Payment) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Payment) UnmarshalBinary

func (m *Payment) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Payment) Validate

func (m *Payment) Validate(formats strfmt.Registry) error

Validate validates this payment

type PaymentOptions

type PaymentOptions struct {

	// Indicates whether the Payment objects created from this `TerminalCheckout` will automatically be
	// `COMPLETED` or left in an `APPROVED` state for later modification.
	Autocomplete bool `json:"autocomplete,omitempty"`
}

PaymentOptions payment options

swagger:model PaymentOptions

func (*PaymentOptions) ContextValidate

func (m *PaymentOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this payment options based on context it is used

func (*PaymentOptions) MarshalBinary

func (m *PaymentOptions) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*PaymentOptions) UnmarshalBinary

func (m *PaymentOptions) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*PaymentOptions) Validate

func (m *PaymentOptions) Validate(formats strfmt.Registry) error

Validate validates this payment options

type PaymentRefund

type PaymentRefund struct {

	// The amount of money refunded. This amount is specified in the smallest denomination
	// of the applicable currency (for example, US dollar amounts are specified in cents).
	// Required: true
	AmountMoney *Money `json:"amount_money"`

	// The amount of money the application developer contributed to help cover the refunded amount.
	// This amount is specified in the smallest denomination of the applicable currency (for example,
	// US dollar amounts are specified in cents). For more information, see
	// [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).
	AppFeeMoney *Money `json:"app_fee_money,omitempty"`

	// The timestamp of when the refund was created, in RFC 3339 format.
	// Max Length: 32
	CreatedAt string `json:"created_at,omitempty"`

	// The unique ID for this refund, generated by Square.
	// Required: true
	// Max Length: 255
	// Min Length: 1
	ID *string `json:"id"`

	// The location ID associated with the payment this refund is attached to.
	// Max Length: 50
	LocationID string `json:"location_id,omitempty"`

	// The ID of the order associated with the refund.
	// Max Length: 192
	OrderID string `json:"order_id,omitempty"`

	// The ID of the payment associated with this refund.
	// Max Length: 192
	PaymentID string `json:"payment_id,omitempty"`

	// Processing fees and fee adjustments assessed by Square for this refund.
	ProcessingFee []*ProcessingFee `json:"processing_fee"`

	// The reason for the refund.
	// Max Length: 192
	Reason string `json:"reason,omitempty"`

	// The refund's status:
	// - `PENDING` - Awaiting approval.
	// - `COMPLETED` - Successfully completed.
	// - `REJECTED` - The refund was rejected.
	// - `FAILED` - An error occurred.
	// Max Length: 50
	Status string `json:"status,omitempty"`

	// The timestamp of when the refund was last updated, in RFC 3339 format.
	// Max Length: 32
	UpdatedAt string `json:"updated_at,omitempty"`
}

PaymentRefund Represents a refund of a payment made using Square. Contains information about the original payment and the amount of money refunded.

swagger:model PaymentRefund

func (*PaymentRefund) ContextValidate

func (m *PaymentRefund) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this payment refund based on the context it is used

func (*PaymentRefund) MarshalBinary

func (m *PaymentRefund) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*PaymentRefund) UnmarshalBinary

func (m *PaymentRefund) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*PaymentRefund) Validate

func (m *PaymentRefund) Validate(formats strfmt.Registry) error

Validate validates this payment refund

type ProcessingFee

type ProcessingFee struct {

	// The fee amount, which might be negative, that is assessed or adjusted by Square.
	//
	// Positive values represent funds being assessed, while negative values represent
	// funds being returned.
	AmountMoney *Money `json:"amount_money,omitempty"`

	// The timestamp of when the fee takes effect, in RFC 3339 format.
	EffectiveAt string `json:"effective_at,omitempty"`

	// The type of fee assessed or adjusted. The fee type can be `INITIAL` or `ADJUSTMENT`.
	Type string `json:"type,omitempty"`
}

ProcessingFee Represents the Square processing fee.

swagger:model ProcessingFee

func (*ProcessingFee) ContextValidate

func (m *ProcessingFee) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this processing fee based on the context it is used

func (*ProcessingFee) MarshalBinary

func (m *ProcessingFee) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ProcessingFee) UnmarshalBinary

func (m *ProcessingFee) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ProcessingFee) Validate

func (m *ProcessingFee) Validate(formats strfmt.Registry) error

Validate validates this processing fee

type Product

type Product string

Product Indicates the Square product used to generate an inventory change.

swagger:model Product

const (

	// ProductSQUAREPOS captures enum value "SQUARE_POS"
	ProductSQUAREPOS Product = "SQUARE_POS"

	// ProductEXTERNALAPI captures enum value "EXTERNAL_API"
	ProductEXTERNALAPI Product = "EXTERNAL_API"

	// ProductBILLING captures enum value "BILLING"
	ProductBILLING Product = "BILLING"

	// ProductAPPOINTMENTS captures enum value "APPOINTMENTS"
	ProductAPPOINTMENTS Product = "APPOINTMENTS"

	// ProductINVOICES captures enum value "INVOICES"
	ProductINVOICES Product = "INVOICES"

	// ProductONLINESTORE captures enum value "ONLINE_STORE"
	ProductONLINESTORE Product = "ONLINE_STORE"

	// ProductPAYROLL captures enum value "PAYROLL"
	ProductPAYROLL Product = "PAYROLL"

	// ProductDASHBOARD captures enum value "DASHBOARD"
	ProductDASHBOARD Product = "DASHBOARD"

	// ProductITEMLIBRARYIMPORT captures enum value "ITEM_LIBRARY_IMPORT"
	ProductITEMLIBRARYIMPORT Product = "ITEM_LIBRARY_IMPORT"

	// ProductOTHER captures enum value "OTHER"
	ProductOTHER Product = "OTHER"
)

func (Product) ContextValidate

func (m Product) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this product based on context it is used

func (Product) Validate

func (m Product) Validate(formats strfmt.Registry) error

Validate validates this product

type ProductType

type ProductType string

ProductType product type

swagger:model ProductType

const (

	// ProductTypeTERMINALAPI captures enum value "TERMINAL_API"
	ProductTypeTERMINALAPI ProductType = "TERMINAL_API"
)

func (ProductType) ContextValidate

func (m ProductType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this product type based on context it is used

func (ProductType) Validate

func (m ProductType) Validate(formats strfmt.Registry) error

Validate validates this product type

type PublishInvoiceRequest

type PublishInvoiceRequest struct {

	// A unique string that identifies the `PublishInvoice` request. If you do not
	// provide `idempotency_key` (or provide an empty string as the value), the endpoint
	// treats each request as independent.
	//
	// For more information, see [Idempotency](https://developer.squareup.com/docs/docs/working-with-apis/idempotency).
	// Max Length: 128
	IdempotencyKey string `json:"idempotency_key,omitempty"`

	// The version of the `Invoice` to publish.
	// This must match the current version of the invoice,
	// otherwise the request is rejected.
	// Required: true
	Version *int64 `json:"version"`
}

PublishInvoiceRequest Describes a `PublishInvoice` request. Example: {"request_body":{"idempotency_key":"32da42d0-1997-41b0-826b-f09464fc2c2e","version":1}}

swagger:model PublishInvoiceRequest

func (*PublishInvoiceRequest) ContextValidate

func (m *PublishInvoiceRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this publish invoice request based on context it is used

func (*PublishInvoiceRequest) MarshalBinary

func (m *PublishInvoiceRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*PublishInvoiceRequest) UnmarshalBinary

func (m *PublishInvoiceRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*PublishInvoiceRequest) Validate

func (m *PublishInvoiceRequest) Validate(formats strfmt.Registry) error

Validate validates this publish invoice request

type PublishInvoiceResponse

type PublishInvoiceResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The published invoice.
	Invoice *Invoice `json:"invoice,omitempty"`
}

PublishInvoiceResponse Describes a `PublishInvoice` response. Example: {"invoice":{"created_at":"2020-06-18T17:45:13Z","custom_fields":[{"label":"Event Reference Number","placement":"ABOVE_LINE_ITEMS","value":"Ref. #1234"},{"label":"Terms of Service","placement":"BELOW_LINE_ITEMS","value":"The terms of service are..."}],"delivery_method":"EMAIL","description":"We appreciate your business!","id":"gt2zv1z6mnUm1V7KMxxf3w","invoice_number":"inv-100","location_id":"ES0RJRZYEC39A","order_id":"CAISENgvlJ6jLWAzERDzjyHVybY","payment_requests":[{"automatic_payment_source":"NONE","computed_amount_money":{"amount":10000,"currency":"USD"},"due_date":"2030-01-24","reminders":[{"message":"Your invoice is due tomorrow","relative_scheduled_days":-1,"status":"PENDING","uid":"beebd363-e47f-4075-8785-c235aaa7df11"}],"request_type":"BALANCE","tipping_enabled":true,"total_completed_amount_money":{"amount":0,"currency":"USD"},"uid":"2da7964f-f3d2-4f43-81e8-5aa220bf3355"}],"primary_recipient":{"customer_id":"JDKYHBWT1D4F8MFH63DBMEN8Y4","email_address":"Amelia.Earhart@example.com","family_name":"Earhart","given_name":"Amelia","phone_number":"1-212-555-4240"},"scheduled_at":"2030-01-13T10:00:00Z","status":"SCHEDULED","timezone":"America/Los_Angeles","title":"Event Planning Services","updated_at":"2020-06-18T18:23:11Z","version":1}}

swagger:model PublishInvoiceResponse

func (*PublishInvoiceResponse) ContextValidate

func (m *PublishInvoiceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this publish invoice response based on the context it is used

func (*PublishInvoiceResponse) MarshalBinary

func (m *PublishInvoiceResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*PublishInvoiceResponse) UnmarshalBinary

func (m *PublishInvoiceResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*PublishInvoiceResponse) Validate

func (m *PublishInvoiceResponse) Validate(formats strfmt.Registry) error

Validate validates this publish invoice response

type Range

type Range struct {

	// The upper bound of the number range.
	Max string `json:"max,omitempty"`

	// The lower bound of the number range.
	Min string `json:"min,omitempty"`
}

Range The range of a number value between the specified lower and upper bounds.

swagger:model Range

func (*Range) ContextValidate

func (m *Range) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this range based on context it is used

func (*Range) MarshalBinary

func (m *Range) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Range) UnmarshalBinary

func (m *Range) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Range) Validate

func (m *Range) Validate(formats strfmt.Registry) error

Validate validates this range

type RedeemLoyaltyRewardRequest

type RedeemLoyaltyRewardRequest struct {

	// A unique string that identifies this `RedeemLoyaltyReward` request.
	// Keys can be any valid string, but must be unique for every request.
	// Required: true
	// Max Length: 128
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`

	// The ID of the `location` where the reward is redeemed.
	// Required: true
	// Min Length: 1
	LocationID *string `json:"location_id"`
}

RedeemLoyaltyRewardRequest A request to redeem a loyalty reward. Example: {"request_body":{"idempotency_key":"98adc7f7-6963-473b-b29c-f3c9cdd7d994","location_id":"P034NEENMD09F"},"request_params":"?reward_id=9f18ac21-233a-31c3-be77-b45840f5a810"}

swagger:model RedeemLoyaltyRewardRequest

func (*RedeemLoyaltyRewardRequest) ContextValidate

func (m *RedeemLoyaltyRewardRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this redeem loyalty reward request based on context it is used

func (*RedeemLoyaltyRewardRequest) MarshalBinary

func (m *RedeemLoyaltyRewardRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RedeemLoyaltyRewardRequest) UnmarshalBinary

func (m *RedeemLoyaltyRewardRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RedeemLoyaltyRewardRequest) Validate

func (m *RedeemLoyaltyRewardRequest) Validate(formats strfmt.Registry) error

Validate validates this redeem loyalty reward request

type RedeemLoyaltyRewardResponse

type RedeemLoyaltyRewardResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The `LoyaltyEvent` for redeeming the reward.
	Event *LoyaltyEvent `json:"event,omitempty"`
}

RedeemLoyaltyRewardResponse A response that includes the `LoyaltyEvent` published for redeeming the reward. Example: {"event":{"created_at":"2020-05-08T21:56:00Z","id":"67377a6e-dbdc-369d-aa16-2e7ed422e71f","location_id":"P034NEENMD09F","loyalty_account_id":"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd","redeem_reward":{"loyalty_program_id":"d619f755-2d17-41f3-990d-c04ecedd64dd","reward_id":"9f18ac21-233a-31c3-be77-b45840f5a810"},"source":"LOYALTY_API","type":"REDEEM_REWARD"}}

swagger:model RedeemLoyaltyRewardResponse

func (*RedeemLoyaltyRewardResponse) ContextValidate

func (m *RedeemLoyaltyRewardResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this redeem loyalty reward response based on the context it is used

func (*RedeemLoyaltyRewardResponse) MarshalBinary

func (m *RedeemLoyaltyRewardResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RedeemLoyaltyRewardResponse) UnmarshalBinary

func (m *RedeemLoyaltyRewardResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RedeemLoyaltyRewardResponse) Validate

func (m *RedeemLoyaltyRewardResponse) Validate(formats strfmt.Registry) error

Validate validates this redeem loyalty reward response

type Refund

type Refund struct {

	// Additional recipients (other than the merchant) receiving a portion of this refund.
	// For example, fees assessed on a refund of a purchase by a third party integration.
	AdditionalRecipients []*AdditionalRecipient `json:"additional_recipients"`

	// The amount of money refunded to the buyer.
	// Required: true
	AmountMoney *Money `json:"amount_money"`

	// The timestamp for when the refund was created, in RFC 3339 format.
	// Max Length: 32
	CreatedAt string `json:"created_at,omitempty"`

	// The refund's unique ID.
	// Required: true
	// Max Length: 255
	ID *string `json:"id"`

	// The ID of the refund's associated location.
	// Required: true
	// Max Length: 50
	LocationID *string `json:"location_id"`

	// The amount of Square processing fee money refunded to the *merchant*.
	ProcessingFeeMoney *Money `json:"processing_fee_money,omitempty"`

	// The reason for the refund being issued.
	// Required: true
	// Max Length: 192
	Reason *string `json:"reason"`

	// The current status of the refund (`PENDING`, `APPROVED`, `REJECTED`,
	// or `FAILED`).
	// See [RefundStatus](#type-refundstatus) for possible values
	// Required: true
	Status *string `json:"status"`

	// The ID of the refunded tender.
	// Required: true
	// Max Length: 192
	TenderID *string `json:"tender_id"`

	// The ID of the transaction that the refunded tender is part of.
	// Required: true
	// Max Length: 192
	TransactionID *string `json:"transaction_id"`
}

Refund Represents a refund processed for a Square transaction.

swagger:model Refund

func (*Refund) ContextValidate

func (m *Refund) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this refund based on the context it is used

func (*Refund) MarshalBinary

func (m *Refund) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Refund) UnmarshalBinary

func (m *Refund) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Refund) Validate

func (m *Refund) Validate(formats strfmt.Registry) error

Validate validates this refund

type RefundPaymentRequest

type RefundPaymentRequest struct {

	// The amount of money to refund.
	//
	// This amount cannot be more than the `total_money` value of the payment minus the total
	// amount of all previously completed refunds for this payment.
	//
	// This amount must be specified in the smallest denomination of the applicable currency
	// (for example, US dollar amounts are specified in cents). For more information, see
	// [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts).
	//
	// The currency code must match the currency associated with the business
	// that is charging the card.
	// Required: true
	AmountMoney *Money `json:"amount_money"`

	// The amount of money the developer contributes to help cover the refunded amount.
	// This amount is specified in the smallest denomination of the applicable currency (for example,
	// US dollar amounts are specified in cents).
	//
	// The value cannot be more than the `amount_money`.
	//
	// You can specify this parameter in a refund request only if the same parameter was also included
	// when taking the payment. This is part of the application fee scenario the API supports. For more
	// information, see [Take Payments and Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees).
	AppFeeMoney *Money `json:"app_fee_money,omitempty"`

	//  A unique string that identifies this `RefundPayment` request. The key can be any valid string
	// but must be unique for every `RefundPayment` request.
	//
	// For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).
	// Required: true
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`

	// The unique ID of the payment being refunded.
	// Required: true
	// Min Length: 1
	PaymentID *string `json:"payment_id"`

	// A description of the reason for the refund.
	// Max Length: 192
	Reason string `json:"reason,omitempty"`
}

RefundPaymentRequest Refunds a payment. Example: {"request_body":{"amount_money":{"amount":100,"currency":"USD"},"idempotency_key":"a7e36d40-d24b-11e8-b568-0800200c9a66","payment_id":"UNOE3kv2BZwqHlJ830RCt5YCuaB"}}

swagger:model RefundPaymentRequest

func (*RefundPaymentRequest) ContextValidate

func (m *RefundPaymentRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this refund payment request based on the context it is used

func (*RefundPaymentRequest) MarshalBinary

func (m *RefundPaymentRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RefundPaymentRequest) UnmarshalBinary

func (m *RefundPaymentRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RefundPaymentRequest) Validate

func (m *RefundPaymentRequest) Validate(formats strfmt.Registry) error

Validate validates this refund payment request

type RefundPaymentResponse

type RefundPaymentResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The successfully created `PaymentRefund`.
	Refund *PaymentRefund `json:"refund,omitempty"`
}

RefundPaymentResponse Defines the fields that are included in the response body of a request to the [RefundPayment](#endpoint-refunds-refundpayment) endpoint.

Note: If there are errors processing the request, the refund field might not be present or it might be present in a FAILED state. Example: {"refund":{"amount_money":{"amount":100,"currency":"USD"},"created_at":"2018-10-17T20:41:55.520Z","id":"UNOE3kv2BZwqHlJ830RCt5YCuaB_xVteEWVFkXDvKN1ddidfJWipt8p9whmElKT5mZtJ7wZ","payment_id":"UNOE3kv2BZwqHlJ830RCt5YCuaB","status":"PENDING","updated_at":"2018-10-17T20:41:55.520Z"}}

swagger:model RefundPaymentResponse

func (*RefundPaymentResponse) ContextValidate

func (m *RefundPaymentResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this refund payment response based on the context it is used

func (*RefundPaymentResponse) MarshalBinary

func (m *RefundPaymentResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RefundPaymentResponse) UnmarshalBinary

func (m *RefundPaymentResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RefundPaymentResponse) Validate

func (m *RefundPaymentResponse) Validate(formats strfmt.Registry) error

Validate validates this refund payment response

type RefundStatus

type RefundStatus string

RefundStatus Indicates a refund's current status.

swagger:model RefundStatus

const (

	// RefundStatusPENDING captures enum value "PENDING"
	RefundStatusPENDING RefundStatus = "PENDING"

	// RefundStatusAPPROVED captures enum value "APPROVED"
	RefundStatusAPPROVED RefundStatus = "APPROVED"

	// RefundStatusREJECTED captures enum value "REJECTED"
	RefundStatusREJECTED RefundStatus = "REJECTED"

	// RefundStatusFAILED captures enum value "FAILED"
	RefundStatusFAILED RefundStatus = "FAILED"
)

func (RefundStatus) ContextValidate

func (m RefundStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this refund status based on context it is used

func (RefundStatus) Validate

func (m RefundStatus) Validate(formats strfmt.Registry) error

Validate validates this refund status

type RegisterDomainRequest

type RegisterDomainRequest struct {

	// A domain name as described in RFC-1034 that will be registered with ApplePay
	// Required: true
	// Max Length: 255
	// Min Length: 1
	DomainName *string `json:"domain_name"`
}

RegisterDomainRequest Defines the parameters that can be included in the body of a request to the [RegisterDomain](#endpoint-registerdomain) endpoint. Example: {"request_body":{"domain_name":"example.com"}}

swagger:model RegisterDomainRequest

func (*RegisterDomainRequest) ContextValidate

func (m *RegisterDomainRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this register domain request based on context it is used

func (*RegisterDomainRequest) MarshalBinary

func (m *RegisterDomainRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RegisterDomainRequest) UnmarshalBinary

func (m *RegisterDomainRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RegisterDomainRequest) Validate

func (m *RegisterDomainRequest) Validate(formats strfmt.Registry) error

Validate validates this register domain request

type RegisterDomainResponse

type RegisterDomainResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// Status of the domain registration.
	//
	// See `RegisterDomainResponseStatus` for possible values.
	// See [RegisterDomainResponseStatus](#type-registerdomainresponsestatus) for possible values
	Status string `json:"status,omitempty"`
}

RegisterDomainResponse Defines the fields that are included in the response body of a request to the [RegisterDomain](#endpoint-registerdomain) endpoint.

Either `errors` or `status` will be present in a given response (never both). Example: {"status":"VERIFIED"}

swagger:model RegisterDomainResponse

func (*RegisterDomainResponse) ContextValidate

func (m *RegisterDomainResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this register domain response based on the context it is used

func (*RegisterDomainResponse) MarshalBinary

func (m *RegisterDomainResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RegisterDomainResponse) UnmarshalBinary

func (m *RegisterDomainResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RegisterDomainResponse) Validate

func (m *RegisterDomainResponse) Validate(formats strfmt.Registry) error

Validate validates this register domain response

type RegisterDomainResponseStatus

type RegisterDomainResponseStatus string

RegisterDomainResponseStatus The status of domain registration.

swagger:model RegisterDomainResponseStatus

const (

	// RegisterDomainResponseStatusPENDING captures enum value "PENDING"
	RegisterDomainResponseStatusPENDING RegisterDomainResponseStatus = "PENDING"

	// RegisterDomainResponseStatusVERIFIED captures enum value "VERIFIED"
	RegisterDomainResponseStatusVERIFIED RegisterDomainResponseStatus = "VERIFIED"
)

func (RegisterDomainResponseStatus) ContextValidate

func (m RegisterDomainResponseStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this register domain response status based on context it is used

func (RegisterDomainResponseStatus) Validate

func (m RegisterDomainResponseStatus) Validate(formats strfmt.Registry) error

Validate validates this register domain response status

type RemoveDisputeEvidenceRequest

type RemoveDisputeEvidenceRequest interface{}

RemoveDisputeEvidenceRequest Defines the parameters for a `RemoveDisputeEvidence` request. Example: {"request_body":{}}

swagger:model RemoveDisputeEvidenceRequest

type RemoveDisputeEvidenceResponse

type RemoveDisputeEvidenceResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`
}

RemoveDisputeEvidenceResponse Defines the fields in a `RemoveDisputeEvidence` response. Example: {}

swagger:model RemoveDisputeEvidenceResponse

func (*RemoveDisputeEvidenceResponse) ContextValidate

func (m *RemoveDisputeEvidenceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this remove dispute evidence response based on the context it is used

func (*RemoveDisputeEvidenceResponse) MarshalBinary

func (m *RemoveDisputeEvidenceResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RemoveDisputeEvidenceResponse) UnmarshalBinary

func (m *RemoveDisputeEvidenceResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RemoveDisputeEvidenceResponse) Validate

func (m *RemoveDisputeEvidenceResponse) Validate(formats strfmt.Registry) error

Validate validates this remove dispute evidence response

type RemoveGroupFromCustomerRequest

type RemoveGroupFromCustomerRequest interface{}

RemoveGroupFromCustomerRequest Defines the fields that are included in the request body of a request to the [RemoveGroupFromCustomer](#endpoint-removegroupfromcustomer) endpoint. Example: {"request_body":{}}

swagger:model RemoveGroupFromCustomerRequest

type RemoveGroupFromCustomerResponse

type RemoveGroupFromCustomerResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

RemoveGroupFromCustomerResponse Defines the fields that are included in the response body of a request to the [RemoveGroupFromCustomer](#endpoint-removegroupfromcustomer) endpoint. Example: {}

swagger:model RemoveGroupFromCustomerResponse

func (*RemoveGroupFromCustomerResponse) ContextValidate

func (m *RemoveGroupFromCustomerResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this remove group from customer response based on the context it is used

func (*RemoveGroupFromCustomerResponse) MarshalBinary

func (m *RemoveGroupFromCustomerResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RemoveGroupFromCustomerResponse) UnmarshalBinary

func (m *RemoveGroupFromCustomerResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RemoveGroupFromCustomerResponse) Validate

Validate validates this remove group from customer response

type RenewTokenRequest

type RenewTokenRequest struct {

	// The token you want to renew.
	AccessToken string `json:"access_token,omitempty"`
}

RenewTokenRequest renew token request Example: {"request_body":{"access_token":"ACCESS_TOKEN"}}

swagger:model RenewTokenRequest

func (*RenewTokenRequest) ContextValidate

func (m *RenewTokenRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this renew token request based on context it is used

func (*RenewTokenRequest) MarshalBinary

func (m *RenewTokenRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RenewTokenRequest) UnmarshalBinary

func (m *RenewTokenRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RenewTokenRequest) Validate

func (m *RenewTokenRequest) Validate(formats strfmt.Registry) error

Validate validates this renew token request

type RenewTokenResponse

type RenewTokenResponse struct {

	// The renewed access token.
	// This value might be different from the `access_token` you provided in your request.
	// You provide this token in a header with every request to Connect API endpoints.
	// See [Request and response headers](https://developer.squareup.com/docs/api/connect/v2/#requestandresponseheaders) for the format of this header.
	AccessToken string `json:"access_token,omitempty"`

	// The date when access_token expires, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format.
	ExpiresAt string `json:"expires_at,omitempty"`

	// The ID of the authorizing merchant's business.
	MerchantID string `json:"merchant_id,omitempty"`

	// __LEGACY FIELD__. The ID of the subscription plan the merchant signed
	// up for. Only present if the merchant signed up for a subscription during
	// authorization.
	PlanID string `json:"plan_id,omitempty"`

	// __LEGACY FIELD__. The ID of the merchant subscription associated with
	// the authorization. Only present if the merchant signed up for a subscription
	// during authorization..
	SubscriptionID string `json:"subscription_id,omitempty"`

	// This value is always _bearer_.
	TokenType string `json:"token_type,omitempty"`
}

RenewTokenResponse renew token response Example: {"access_token":"ACCESS_TOKEN","expires_at":"2006-01-02T15:04:05Z","merchant_id":"MERCHANT_ID","token_type":"bearer"}

swagger:model RenewTokenResponse

func (*RenewTokenResponse) ContextValidate

func (m *RenewTokenResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this renew token response based on context it is used

func (*RenewTokenResponse) MarshalBinary

func (m *RenewTokenResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RenewTokenResponse) UnmarshalBinary

func (m *RenewTokenResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RenewTokenResponse) Validate

func (m *RenewTokenResponse) Validate(formats strfmt.Registry) error

Validate validates this renew token response

type RetrieveBookingRequest

type RetrieveBookingRequest interface{}

RetrieveBookingRequest retrieve booking request

swagger:model RetrieveBookingRequest

type RetrieveBookingResponse

type RetrieveBookingResponse struct {

	// The booking that was requested.
	Booking *Booking `json:"booking,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

RetrieveBookingResponse retrieve booking response Example: {"booking":{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMXUrsBWWcHTt79t"}],"created_at":"2020-10-28T15:47:41Z","customer_id":"EX2QSVGTZN4K1E5QE1CBFNVQ8M","customer_note":"","id":"zkras0xv0xwswx","location_id":"LEQHH0YY8B42M","seller_note":"","start_at":"2020-11-26T13:00:00Z","status":"ACCEPTED","updated_at":"2020-10-28T15:49:25Z","version":1},"errors":[]}

swagger:model RetrieveBookingResponse

func (*RetrieveBookingResponse) ContextValidate

func (m *RetrieveBookingResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve booking response based on the context it is used

func (*RetrieveBookingResponse) MarshalBinary

func (m *RetrieveBookingResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveBookingResponse) UnmarshalBinary

func (m *RetrieveBookingResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveBookingResponse) Validate

func (m *RetrieveBookingResponse) Validate(formats strfmt.Registry) error

Validate validates this retrieve booking response

type RetrieveBusinessBookingProfileRequest

type RetrieveBusinessBookingProfileRequest interface{}

RetrieveBusinessBookingProfileRequest retrieve business booking profile request

swagger:model RetrieveBusinessBookingProfileRequest

type RetrieveBusinessBookingProfileResponse

type RetrieveBusinessBookingProfileResponse struct {

	// The seller's booking profile.
	BusinessBookingProfile *BusinessBookingProfile `json:"business_booking_profile,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

RetrieveBusinessBookingProfileResponse retrieve business booking profile response Example: {"business_booking_profile":{"allow_user_cancel":true,"booking_enabled":true,"booking_policy":"ACCEPT_ALL","business_appointment_settings":{"alignment_time":"HALF_HOURLY","any_team_member_booking_enabled":true,"cancellation_fee_money":{"currency":"USD"},"cancellation_policy":"CUSTOM_POLICY","location_types":["BUSINESS_LOCATION"],"max_booking_lead_time_seconds":31536000,"min_booking_lead_time_seconds":0,"multiple_service_booking_enabled":true,"skip_booking_flow_staff_selection":false},"created_at":"2020-09-10T21:40:38Z","customer_timezone_choice":"CUSTOMER_CHOICE","seller_id":"MLJQYZZRM0D3Y"},"errors":[]}

swagger:model RetrieveBusinessBookingProfileResponse

func (*RetrieveBusinessBookingProfileResponse) ContextValidate

ContextValidate validate this retrieve business booking profile response based on the context it is used

func (*RetrieveBusinessBookingProfileResponse) MarshalBinary

func (m *RetrieveBusinessBookingProfileResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveBusinessBookingProfileResponse) UnmarshalBinary

func (m *RetrieveBusinessBookingProfileResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveBusinessBookingProfileResponse) Validate

Validate validates this retrieve business booking profile response

type RetrieveCashDrawerShiftRequest

type RetrieveCashDrawerShiftRequest struct {

	// The ID of the location to retrieve cash drawer shifts from.
	// Required: true
	// Min Length: 1
	LocationID *string `json:"location_id"`
}

RetrieveCashDrawerShiftRequest retrieve cash drawer shift request Example: {"request_body":{}}

swagger:model RetrieveCashDrawerShiftRequest

func (*RetrieveCashDrawerShiftRequest) ContextValidate

func (m *RetrieveCashDrawerShiftRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this retrieve cash drawer shift request based on context it is used

func (*RetrieveCashDrawerShiftRequest) MarshalBinary

func (m *RetrieveCashDrawerShiftRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveCashDrawerShiftRequest) UnmarshalBinary

func (m *RetrieveCashDrawerShiftRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveCashDrawerShiftRequest) Validate

func (m *RetrieveCashDrawerShiftRequest) Validate(formats strfmt.Registry) error

Validate validates this retrieve cash drawer shift request

type RetrieveCashDrawerShiftResponse

type RetrieveCashDrawerShiftResponse struct {

	// The cash drawer shift queried for.
	CashDrawerShift *CashDrawerShift `json:"cash_drawer_shift,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

RetrieveCashDrawerShiftResponse retrieve cash drawer shift response Example: {"cash_drawer_shift":{"cash_paid_in_money":{"amount":10000,"currency":"USD"},"cash_paid_out_money":{"amount":-10000,"currency":"USD"},"cash_payment_money":{"amount":100,"currency":"USD"},"cash_refunds_money":{"amount":-100,"currency":"USD"},"closed_at":"2019-11-22T00:44:49.000Z","closed_cash_money":{"amount":9970,"currency":"USD"},"closing_employee_id":"","description":"Misplaced some change","device":{"name":"My iPad"},"ended_at":"2019-11-22T00:44:49.000Z","ending_employee_id":"","expected_cash_money":{"amount":10000,"currency":"USD"},"id":"DCC99978-09A6-4926-849F-300BE9C5793A","opened_at":"2019-11-22T00:42:54.000Z","opened_cash_money":{"amount":10000,"currency":"USD"},"opening_employee_id":"","state":"CLOSED"}}

swagger:model RetrieveCashDrawerShiftResponse

func (*RetrieveCashDrawerShiftResponse) ContextValidate

func (m *RetrieveCashDrawerShiftResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve cash drawer shift response based on the context it is used

func (*RetrieveCashDrawerShiftResponse) MarshalBinary

func (m *RetrieveCashDrawerShiftResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveCashDrawerShiftResponse) UnmarshalBinary

func (m *RetrieveCashDrawerShiftResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveCashDrawerShiftResponse) Validate

Validate validates this retrieve cash drawer shift response

type RetrieveCatalogObjectRequest

type RetrieveCatalogObjectRequest struct {

	// Requests objects as of a specific version of the catalog. This allows you to retrieve historical
	// versions of objects. The value to retrieve a specific version of an object can be found
	// in the version field of `CatalogObject`s.
	CatalogVersion int64 `json:"catalog_version,omitempty"`

	// If `true`, the response will include additional objects that are related to the
	// requested object, as follows:
	//
	// If the `object` field of the response contains a `CatalogItem`, its associated
	// `CatalogCategory`, `CatalogTax`, `CatalogImage` and `CatalogModifierList` objects will
	// be returned in the `related_objects` field of the response. If the `object` field of
	// the response contains a `CatalogItemVariation`, its parent `CatalogItem` will be returned
	// in the `related_objects` field of the response.
	//
	// Default value: `false`
	IncludeRelatedObjects bool `json:"include_related_objects,omitempty"`
}

RetrieveCatalogObjectRequest retrieve catalog object request Example: {"request_params":"?include_related_objects=true"}

swagger:model RetrieveCatalogObjectRequest

func (*RetrieveCatalogObjectRequest) ContextValidate

func (m *RetrieveCatalogObjectRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this retrieve catalog object request based on context it is used

func (*RetrieveCatalogObjectRequest) MarshalBinary

func (m *RetrieveCatalogObjectRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveCatalogObjectRequest) UnmarshalBinary

func (m *RetrieveCatalogObjectRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveCatalogObjectRequest) Validate

func (m *RetrieveCatalogObjectRequest) Validate(formats strfmt.Registry) error

Validate validates this retrieve catalog object request

type RetrieveCatalogObjectResponse

type RetrieveCatalogObjectResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The `CatalogObject`s returned.
	Object *CatalogObject `json:"object,omitempty"`

	// A list of `CatalogObject`s referenced by the object in the `object` field.
	RelatedObjects []*CatalogObject `json:"related_objects"`
}

RetrieveCatalogObjectResponse retrieve catalog object response Example: {"object":{"id":"W62UWFY35CWMYGVWK6TWJDNI","is_deleted":false,"item_data":{"category_id":"BJNQCF2FJ6S6UIDT65ABHLRX","description":"Hot Leaf Juice","name":"Tea","tax_ids":["HURXQOOAIC4IZSI2BEXQRYFY"],"variations":[{"id":"2TZFAOHWGG7PAK2QEXWYPZSP","is_deleted":false,"item_variation_data":{"item_id":"W62UWFY35CWMYGVWK6TWJDNI","name":"Mug","ordinal":0,"price_money":{"amount":150,"currency":"USD"},"pricing_type":"FIXED_PRICING"},"present_at_all_locations":true,"type":"ITEM_VARIATION","updated_at":"2016-11-16T22:25:24.878Z","version":1479335124878}]},"present_at_all_locations":true,"type":"ITEM","updated_at":"2016-11-16T22:25:24.878Z","version":1479335124878},"related_objects":[{"category_data":{"name":"Beverages"},"id":"BJNQCF2FJ6S6UIDT65ABHLRX","is_deleted":false,"present_at_all_locations":true,"type":"CATEGORY","updated_at":"2016-11-16T22:25:24.878Z","version":1479335124878},{"id":"HURXQOOAIC4IZSI2BEXQRYFY","is_deleted":false,"present_at_all_locations":true,"tax_data":{"calculation_phase":"TAX_SUBTOTAL_PHASE","enabled":true,"inclusion_type":"ADDITIVE","name":"Sales Tax","percentage":"5.0"},"type":"TAX","updated_at":"2016-11-16T22:25:24.878Z","version":1479335124878}]}

swagger:model RetrieveCatalogObjectResponse

func (*RetrieveCatalogObjectResponse) ContextValidate

func (m *RetrieveCatalogObjectResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve catalog object response based on the context it is used

func (*RetrieveCatalogObjectResponse) MarshalBinary

func (m *RetrieveCatalogObjectResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveCatalogObjectResponse) UnmarshalBinary

func (m *RetrieveCatalogObjectResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveCatalogObjectResponse) Validate

func (m *RetrieveCatalogObjectResponse) Validate(formats strfmt.Registry) error

Validate validates this retrieve catalog object response

type RetrieveCustomerGroupRequest

type RetrieveCustomerGroupRequest interface{}

RetrieveCustomerGroupRequest Defines the fields that can be provided in a request to the [RetrieveCustomerGroup](#endpoint-retrievecustomergroup) endpoint. Example: {"request_body":{}}

swagger:model RetrieveCustomerGroupRequest

type RetrieveCustomerGroupResponse

type RetrieveCustomerGroupResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The retrieved customer group.
	Group *CustomerGroup `json:"group,omitempty"`
}

RetrieveCustomerGroupResponse Defines the fields that are included in the response body of a request to the [RetrieveCustomerGroup](#endpoint-retrievecustomergroup) endpoint.

One of `errors` or `group` is present in a given response (never both). Example: {"group":{"created_at":"2020-04-13T21:54:57.863Z","id":"2TAT3CMH4Q0A9M87XJZED0WMR3","name":"Loyal Customers","updated_at":"2020-04-13T21:54:58Z"}}

swagger:model RetrieveCustomerGroupResponse

func (*RetrieveCustomerGroupResponse) ContextValidate

func (m *RetrieveCustomerGroupResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve customer group response based on the context it is used

func (*RetrieveCustomerGroupResponse) MarshalBinary

func (m *RetrieveCustomerGroupResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveCustomerGroupResponse) UnmarshalBinary

func (m *RetrieveCustomerGroupResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveCustomerGroupResponse) Validate

func (m *RetrieveCustomerGroupResponse) Validate(formats strfmt.Registry) error

Validate validates this retrieve customer group response

type RetrieveCustomerRequest

type RetrieveCustomerRequest interface{}

RetrieveCustomerRequest Defines the fields that are included in requests to the RetrieveCustomer endpoint. Example: {}

swagger:model RetrieveCustomerRequest

type RetrieveCustomerResponse

type RetrieveCustomerResponse struct {

	// The requested customer.
	Customer *Customer `json:"customer,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

RetrieveCustomerResponse Defines the fields that are included in the response body of a request to the RetrieveCustomer endpoint.

One of `errors` or `customer` is present in a given response (never both). Example: {"customer":{"address":{"address_line_1":"500 Electric Ave","address_line_2":"Suite 600","administrative_district_level_1":"NY","country":"US","locality":"New York","postal_code":"10003"},"created_at":"2016-03-23T20:21:54.859Z","email_address":"Amelia.Earhart@example.com","family_name":"Earhart","given_name":"Amelia","group_ids":["545AXB44B4XXWMVQ4W8SBT3HHF"],"groups":[{"id":"545AXB44B4XXWMVQ4W8SBT3HHF","name":"Aviation Enthusiasts"},{"id":"1KB9JE5EGJXCW.REACHABLE","name":"Reachable"}],"id":"JDKYHBWT1D4F8MFH63DBMEN8Y4","note":"a customer","phone_number":"1-212-555-4240","reference_id":"YOUR_REFERENCE_ID","segment_ids":["1KB9JE5EGJXCW.REACHABLE"],"updated_at":"2016-03-23T20:21:54.859Z"}}

swagger:model RetrieveCustomerResponse

func (*RetrieveCustomerResponse) ContextValidate

func (m *RetrieveCustomerResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve customer response based on the context it is used

func (*RetrieveCustomerResponse) MarshalBinary

func (m *RetrieveCustomerResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveCustomerResponse) UnmarshalBinary

func (m *RetrieveCustomerResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveCustomerResponse) Validate

func (m *RetrieveCustomerResponse) Validate(formats strfmt.Registry) error

Validate validates this retrieve customer response

type RetrieveCustomerSegmentRequest

type RetrieveCustomerSegmentRequest interface{}

RetrieveCustomerSegmentRequest Defines the valid parameters for requests to __RetrieveCustomerSegmentRequest__. Example: {"request_body":{}}

swagger:model RetrieveCustomerSegmentRequest

type RetrieveCustomerSegmentResponse

type RetrieveCustomerSegmentResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The retrieved customer segment.
	Segment *CustomerSegment `json:"segment,omitempty"`
}

RetrieveCustomerSegmentResponse Defines the fields included in the response body for requests to __RetrieveCustomerSegment__.

One of `errors` or `segment` is present in a given response (never both). Example: {"segment":{"created_at":"2020-01-09T19:33:24.469Z","id":"GMNXRZVEXNQDF.CHURN_RISK","name":"Lapsed","updated_at":"2020-04-13T23:01:13Z"}}

swagger:model RetrieveCustomerSegmentResponse

func (*RetrieveCustomerSegmentResponse) ContextValidate

func (m *RetrieveCustomerSegmentResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve customer segment response based on the context it is used

func (*RetrieveCustomerSegmentResponse) MarshalBinary

func (m *RetrieveCustomerSegmentResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveCustomerSegmentResponse) UnmarshalBinary

func (m *RetrieveCustomerSegmentResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveCustomerSegmentResponse) Validate

Validate validates this retrieve customer segment response

type RetrieveDisputeEvidenceRequest

type RetrieveDisputeEvidenceRequest interface{}

RetrieveDisputeEvidenceRequest Defines the parameters for a `RetrieveDisputeEvidence` request. Example: {"request_body":{}}

swagger:model RetrieveDisputeEvidenceRequest

type RetrieveDisputeEvidenceResponse

type RetrieveDisputeEvidenceResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// Metadata about the dispute evidence file.
	Evidence *DisputeEvidence `json:"evidence,omitempty"`
}

RetrieveDisputeEvidenceResponse Defines the fields in a `RetrieveDisputeEvidence` response. Example: {"evidence":{"dispute_id":"bVTprrwk0gygTLZ96VX1oB","evidence_file":{"filename":"evidence.tiff","filetype":"image/tiff"},"evidence_id":"TOomLInj6iWmP3N8qfCXrB","uploaded_at":"2018-10-18T16:01:10.000Z"}}

swagger:model RetrieveDisputeEvidenceResponse

func (*RetrieveDisputeEvidenceResponse) ContextValidate

func (m *RetrieveDisputeEvidenceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve dispute evidence response based on the context it is used

func (*RetrieveDisputeEvidenceResponse) MarshalBinary

func (m *RetrieveDisputeEvidenceResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveDisputeEvidenceResponse) UnmarshalBinary

func (m *RetrieveDisputeEvidenceResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveDisputeEvidenceResponse) Validate

Validate validates this retrieve dispute evidence response

type RetrieveDisputeRequest

type RetrieveDisputeRequest interface{}

RetrieveDisputeRequest Defines the request parameters for the `RetrieveDispute` endpoint. Example: {"request_body":{}}

swagger:model RetrieveDisputeRequest

type RetrieveDisputeResponse

type RetrieveDisputeResponse struct {

	// Details about the requested `Dispute`.
	Dispute *Dispute `json:"dispute,omitempty"`

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`
}

RetrieveDisputeResponse Defines fields in a `RetrieveDispute` response. Example: {"dispute":{"amount_money":{"amount":2000,"currency":"USD"},"brand_dispute_id":"100000282394","card_brand":"visa","created_at":"2018-10-18T15:59:13.613Z","dispute_id":"XDgyFu7yo1E2S5lQGGpYn","disputed_payments":[{"payment_id":"6Ee10wvqhfipStz297mtUhBXvaB"}],"due_at":"2018-11-01T00:00:00.000Z","reason":"NO_KNOWLEDGE","state":"LOST","updated_at":"2018-10-18T15:59:13.613Z"}}

swagger:model RetrieveDisputeResponse

func (*RetrieveDisputeResponse) ContextValidate

func (m *RetrieveDisputeResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve dispute response based on the context it is used

func (*RetrieveDisputeResponse) MarshalBinary

func (m *RetrieveDisputeResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveDisputeResponse) UnmarshalBinary

func (m *RetrieveDisputeResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveDisputeResponse) Validate

func (m *RetrieveDisputeResponse) Validate(formats strfmt.Registry) error

Validate validates this retrieve dispute response

type RetrieveEmployeeRequest

type RetrieveEmployeeRequest interface{}

RetrieveEmployeeRequest retrieve employee request

swagger:model RetrieveEmployeeRequest

type RetrieveEmployeeResponse

type RetrieveEmployeeResponse struct {

	// employee
	Employee *Employee `json:"employee,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

RetrieveEmployeeResponse retrieve employee response

swagger:model RetrieveEmployeeResponse

func (*RetrieveEmployeeResponse) ContextValidate

func (m *RetrieveEmployeeResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve employee response based on the context it is used

func (*RetrieveEmployeeResponse) MarshalBinary

func (m *RetrieveEmployeeResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveEmployeeResponse) UnmarshalBinary

func (m *RetrieveEmployeeResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveEmployeeResponse) Validate

func (m *RetrieveEmployeeResponse) Validate(formats strfmt.Registry) error

Validate validates this retrieve employee response

type RetrieveInventoryAdjustmentRequest

type RetrieveInventoryAdjustmentRequest interface{}

RetrieveInventoryAdjustmentRequest retrieve inventory adjustment request Example: {}

swagger:model RetrieveInventoryAdjustmentRequest

type RetrieveInventoryAdjustmentResponse

type RetrieveInventoryAdjustmentResponse struct {

	// The requested `InventoryAdjustment`.
	Adjustment *InventoryAdjustment `json:"adjustment,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

RetrieveInventoryAdjustmentResponse retrieve inventory adjustment response Example: {"adjustment":{"catalog_object_id":"W62UWFY35CWMYGVWK6TWJDNI","catalog_object_type":"ITEM_VARIATION","created_at":"2016-11-17T13:02:15.142Z","employee_id":"LRK57NSQ5X7PUD05","from_state":"IN_STOCK","id":"UDMOEO78BG6GYWA2XDRYX3KB","location_id":"C6W5YS5QM06F5","occurred_at":"2016-11-16T25:44:22.837Z","quantity":"7","reference_id":"4a366069-4096-47a2-99a5-0084ac879509","source":{"application_id":"416ff29c-86c4-4feb-b58c-9705f21f3ea0","name":"Square Point of Sale 4.37","product":"SQUARE_POS"},"to_state":"SOLD","total_price_money":{"amount":4550,"currency":"USD"}},"errors":[]}

swagger:model RetrieveInventoryAdjustmentResponse

func (*RetrieveInventoryAdjustmentResponse) ContextValidate

func (m *RetrieveInventoryAdjustmentResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve inventory adjustment response based on the context it is used

func (*RetrieveInventoryAdjustmentResponse) MarshalBinary

func (m *RetrieveInventoryAdjustmentResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveInventoryAdjustmentResponse) UnmarshalBinary

func (m *RetrieveInventoryAdjustmentResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveInventoryAdjustmentResponse) Validate

Validate validates this retrieve inventory adjustment response

type RetrieveInventoryChangesRequest

type RetrieveInventoryChangesRequest struct {

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this to retrieve the next set of results for the original query.
	//
	// See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information.
	Cursor string `json:"cursor,omitempty"`

	// The `Location` IDs to look up as a comma-separated
	// list. An empty list queries all locations.
	LocationIds string `json:"location_ids,omitempty"`
}

RetrieveInventoryChangesRequest retrieve inventory changes request Example: {"request_params":"?location_ids=\u0026cursor="}

swagger:model RetrieveInventoryChangesRequest

func (*RetrieveInventoryChangesRequest) ContextValidate

func (m *RetrieveInventoryChangesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this retrieve inventory changes request based on context it is used

func (*RetrieveInventoryChangesRequest) MarshalBinary

func (m *RetrieveInventoryChangesRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveInventoryChangesRequest) UnmarshalBinary

func (m *RetrieveInventoryChangesRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveInventoryChangesRequest) Validate

Validate validates this retrieve inventory changes request

type RetrieveInventoryChangesResponse

type RetrieveInventoryChangesResponse struct {

	// The set of inventory changes for the requested object and locations.
	Changes []*InventoryChange `json:"changes"`

	// The pagination cursor to be used in a subsequent request. If unset,
	// this is the final response.
	//
	// See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

RetrieveInventoryChangesResponse retrieve inventory changes response Example: {"changes":[{"adjustment":{"catalog_object_id":"W62UWFY35CWMYGVWK6TWJDNI","catalog_object_type":"ITEM_VARIATION","created_at":"2016-11-16T22:25:24.878Z","employee_id":"AV7YRCGI2H1J5NQ8E1XIZCNA","from_state":"IN_STOCK","id":"OJKJIUANKLMLQANZADNPLKAD","location_id":"C6W5YS5QM06F5","occurred_at":"2016-11-16T22:25:24.878Z","quantity":"3","reference_id":"d8207693-168f-4b44-a2fd-a7ff533ddd26","source":{"application_id":"416ff29c-86c4-4feb-b58c-9705f21f3ea0","name":"Square Point of Sale 4.37","product":"SQUARE_POS"},"to_state":"SOLD","total_price_money":{"amount":5000,"currency":"USD"},"transaction_id":"5APV6JYK1SNCZD11AND2RX1Z"},"type":"ADJUSTMENT"}],"errors":[]}

swagger:model RetrieveInventoryChangesResponse

func (*RetrieveInventoryChangesResponse) ContextValidate

func (m *RetrieveInventoryChangesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve inventory changes response based on the context it is used

func (*RetrieveInventoryChangesResponse) MarshalBinary

func (m *RetrieveInventoryChangesResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveInventoryChangesResponse) UnmarshalBinary

func (m *RetrieveInventoryChangesResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveInventoryChangesResponse) Validate

Validate validates this retrieve inventory changes response

type RetrieveInventoryCountRequest

type RetrieveInventoryCountRequest struct {

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this to retrieve the next set of results for the original query.
	//
	// See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information.
	Cursor string `json:"cursor,omitempty"`

	// The `Location` IDs to look up as a comma-separated
	// list. An empty list queries all locations.
	LocationIds string `json:"location_ids,omitempty"`
}

RetrieveInventoryCountRequest retrieve inventory count request Example: {"request_params":"?location_ids=C6W5YS5QM06F5\u0026cursor="}

swagger:model RetrieveInventoryCountRequest

func (*RetrieveInventoryCountRequest) ContextValidate

func (m *RetrieveInventoryCountRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this retrieve inventory count request based on context it is used

func (*RetrieveInventoryCountRequest) MarshalBinary

func (m *RetrieveInventoryCountRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveInventoryCountRequest) UnmarshalBinary

func (m *RetrieveInventoryCountRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveInventoryCountRequest) Validate

func (m *RetrieveInventoryCountRequest) Validate(formats strfmt.Registry) error

Validate validates this retrieve inventory count request

type RetrieveInventoryCountResponse

type RetrieveInventoryCountResponse struct {

	// The current calculated inventory counts for the requested object and
	// locations.
	Counts []*InventoryCount `json:"counts"`

	// The pagination cursor to be used in a subsequent request. If unset,
	// this is the final response.
	//
	// See the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

RetrieveInventoryCountResponse retrieve inventory count response Example: {"counts":[{"calculated_at":"2016-11-16T22:28:01.223Z","catalog_object_id":"W62UWFY35CWMYGVWK6TWJDNI","catalog_object_type":"ITEM_VARIATION","location_id":"C6W5YS5QM06F5","quantity":"22","state":"IN_STOCK"}],"errors":[]}

swagger:model RetrieveInventoryCountResponse

func (*RetrieveInventoryCountResponse) ContextValidate

func (m *RetrieveInventoryCountResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve inventory count response based on the context it is used

func (*RetrieveInventoryCountResponse) MarshalBinary

func (m *RetrieveInventoryCountResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveInventoryCountResponse) UnmarshalBinary

func (m *RetrieveInventoryCountResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveInventoryCountResponse) Validate

func (m *RetrieveInventoryCountResponse) Validate(formats strfmt.Registry) error

Validate validates this retrieve inventory count response

type RetrieveInventoryPhysicalCountRequest

type RetrieveInventoryPhysicalCountRequest interface{}

RetrieveInventoryPhysicalCountRequest retrieve inventory physical count request Example: {}

swagger:model RetrieveInventoryPhysicalCountRequest

type RetrieveInventoryPhysicalCountResponse

type RetrieveInventoryPhysicalCountResponse struct {

	// The requested `InventoryPhysicalCount`.
	Count *InventoryPhysicalCount `json:"count,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

RetrieveInventoryPhysicalCountResponse retrieve inventory physical count response Example: {"count":{"catalog_object_id":"W62UWFY35CWMYGVWK6TWJDNI","catalog_object_type":"ITEM_VARIATION","created_at":"2016-11-16T22:25:24.878Z","employee_id":"LRK57NSQ5X7PUD05","id":"ANZADNPLKADOJKJIUANKLMLQ","location_id":"C6W5YS5QM06F5","occurred_at":"2016-11-16T22:25:24.878Z","quantity":"15","reference_id":"f857ec37-f9a0-4458-8e23-5b5e0bea4e53","source":{"application_id":"416ff29c-86c4-4feb-b58c-9705f21f3ea0","name":"Square Point of Sale 4.37","product":"SQUARE_POS"},"state":"IN_STOCK"},"errors":[]}

swagger:model RetrieveInventoryPhysicalCountResponse

func (*RetrieveInventoryPhysicalCountResponse) ContextValidate

ContextValidate validate this retrieve inventory physical count response based on the context it is used

func (*RetrieveInventoryPhysicalCountResponse) MarshalBinary

func (m *RetrieveInventoryPhysicalCountResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveInventoryPhysicalCountResponse) UnmarshalBinary

func (m *RetrieveInventoryPhysicalCountResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveInventoryPhysicalCountResponse) Validate

Validate validates this retrieve inventory physical count response

type RetrieveLocationRequest

type RetrieveLocationRequest interface{}

RetrieveLocationRequest Defines the fields that are included in the request body for the __RetrieveLocation__ endpoint. Example: {}

swagger:model RetrieveLocationRequest

type RetrieveLocationResponse

type RetrieveLocationResponse struct {

	// Information on errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The requested location.
	Location *Location `json:"location,omitempty"`
}

RetrieveLocationResponse Defines the fields that the [RetrieveLocation](#endpoint-retrievelocation) endpoint returns in a response. Example: {"location":{"address":{"address_line_1":"123 Main St","administrative_district_level_1":"CA","country":"US","locality":"San Francisco","postal_code":"94114"},"business_name":"Jet Fuel Coffee","capabilities":["CREDIT_CARD_PROCESSING"],"country":"US","created_at":"2016-09-19T17:33:12Z","currency":"USD","id":"18YC4JDH91E1H","language_code":"en-US","merchant_id":"3MYCJG5GVYQ8Q","name":"Jet Fuel Coffee - Grant Park","phone_number":"+1 650-354-7217","status":"ACTIVE","timezone":"America/Los_Angeles"}}

swagger:model RetrieveLocationResponse

func (*RetrieveLocationResponse) ContextValidate

func (m *RetrieveLocationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve location response based on the context it is used

func (*RetrieveLocationResponse) MarshalBinary

func (m *RetrieveLocationResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveLocationResponse) UnmarshalBinary

func (m *RetrieveLocationResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveLocationResponse) Validate

func (m *RetrieveLocationResponse) Validate(formats strfmt.Registry) error

Validate validates this retrieve location response

type RetrieveLoyaltyAccountRequest

type RetrieveLoyaltyAccountRequest interface{}

RetrieveLoyaltyAccountRequest A request to retrieve a loyalty account. Example: {"request_params":"?account_id=79b807d2-d786-46a9-933b-918028d7a8c5"}

swagger:model RetrieveLoyaltyAccountRequest

type RetrieveLoyaltyAccountResponse

type RetrieveLoyaltyAccountResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The loyalty account.
	LoyaltyAccount *LoyaltyAccount `json:"loyalty_account,omitempty"`
}

RetrieveLoyaltyAccountResponse A response that includes the loyalty account. Example: {"loyalty_account":{"balance":10,"created_at":"2020-05-08T21:44:32Z","customer_id":"Q8002FAM9V1EZ0ADB2T5609X6NET1H0","id":"79b807d2-d786-46a9-933b-918028d7a8c5","lifetime_points":20,"mappings":[{"created_at":"2020-05-08T21:44:32Z","id":"66aaab3f-da99-49ed-8b19-b87f851c844f","type":"PHONE","value":"+14155551234"}],"program_id":"d619f755-2d17-41f3-990d-c04ecedd64dd","updated_at":"2020-05-08T21:44:32Z"}}

swagger:model RetrieveLoyaltyAccountResponse

func (*RetrieveLoyaltyAccountResponse) ContextValidate

func (m *RetrieveLoyaltyAccountResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve loyalty account response based on the context it is used

func (*RetrieveLoyaltyAccountResponse) MarshalBinary

func (m *RetrieveLoyaltyAccountResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveLoyaltyAccountResponse) UnmarshalBinary

func (m *RetrieveLoyaltyAccountResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveLoyaltyAccountResponse) Validate

func (m *RetrieveLoyaltyAccountResponse) Validate(formats strfmt.Registry) error

Validate validates this retrieve loyalty account response

type RetrieveLoyaltyRewardRequest

type RetrieveLoyaltyRewardRequest interface{}

RetrieveLoyaltyRewardRequest A request to retrieve a loyalty reward. Example: {"request_params":"?reward_id=9f18ac21-233a-31c3-be77-b45840f5a810"}

swagger:model RetrieveLoyaltyRewardRequest

type RetrieveLoyaltyRewardResponse

type RetrieveLoyaltyRewardResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The loyalty reward retrieved.
	Reward *LoyaltyReward `json:"reward,omitempty"`
}

RetrieveLoyaltyRewardResponse A response that includes the loyalty reward. Example: {"reward":{"created_at":"2020-05-08T21:55:42Z","id":"9f18ac21-233a-31c3-be77-b45840f5a810","loyalty_account_id":"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd","points":10,"redeemed_at":"2020-05-08T21:56:00Z","reward_tier_id":"e1b39225-9da5-43d1-a5db-782cdd8ad94f","status":"REDEEMED","updated_at":"2020-05-08T21:56:00Z"}}

swagger:model RetrieveLoyaltyRewardResponse

func (*RetrieveLoyaltyRewardResponse) ContextValidate

func (m *RetrieveLoyaltyRewardResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve loyalty reward response based on the context it is used

func (*RetrieveLoyaltyRewardResponse) MarshalBinary

func (m *RetrieveLoyaltyRewardResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveLoyaltyRewardResponse) UnmarshalBinary

func (m *RetrieveLoyaltyRewardResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveLoyaltyRewardResponse) Validate

func (m *RetrieveLoyaltyRewardResponse) Validate(formats strfmt.Registry) error

Validate validates this retrieve loyalty reward response

type RetrieveMerchantRequest

type RetrieveMerchantRequest interface{}

RetrieveMerchantRequest Request object for the [RetrieveMerchant](#endpoint-retrievemerchant) endpoint.

swagger:model RetrieveMerchantRequest

type RetrieveMerchantResponse

type RetrieveMerchantResponse struct {

	// Information on errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The requested `Merchant` object.
	Merchant *Merchant `json:"merchant,omitempty"`
}

RetrieveMerchantResponse The response object returned by the [RetrieveMerchant](#endpoint-retrieveMerchant) endpoint. Example: {"merchant":{"business_name":"Apple A Day","country":"US","currency":"USD","id":"DM7VKY8Q63GNP","language_code":"en-US","main_location_id":"9A65CGC72ZQG1","status":"ACTIVE"}}

swagger:model RetrieveMerchantResponse

func (*RetrieveMerchantResponse) ContextValidate

func (m *RetrieveMerchantResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve merchant response based on the context it is used

func (*RetrieveMerchantResponse) MarshalBinary

func (m *RetrieveMerchantResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveMerchantResponse) UnmarshalBinary

func (m *RetrieveMerchantResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveMerchantResponse) Validate

func (m *RetrieveMerchantResponse) Validate(formats strfmt.Registry) error

Validate validates this retrieve merchant response

type RetrieveObsMigrationProfileRequest

type RetrieveObsMigrationProfileRequest interface{}

RetrieveObsMigrationProfileRequest retrieve obs migration profile request

swagger:model RetrieveObsMigrationProfileRequest

type RetrieveObsMigrationProfileResponse

type RetrieveObsMigrationProfileResponse struct {

	// The text of the label of the CTA button beneath the banner.
	BannerCtaText string `json:"banner_cta_text,omitempty"`

	// The URL to link to when the CTA button is clicked.
	BannerCtaURL string `json:"banner_cta_url,omitempty"`

	// Indicates whether the seller has enabled the COVID banner (`true`) or not (`false`).
	BannerEnabled bool `json:"banner_enabled,omitempty"`

	// The text appearing on the COVID banner.
	BannerText string `json:"banner_text,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

RetrieveObsMigrationProfileResponse retrieve obs migration profile response

swagger:model RetrieveObsMigrationProfileResponse

func (*RetrieveObsMigrationProfileResponse) ContextValidate

func (m *RetrieveObsMigrationProfileResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve obs migration profile response based on the context it is used

func (*RetrieveObsMigrationProfileResponse) MarshalBinary

func (m *RetrieveObsMigrationProfileResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveObsMigrationProfileResponse) UnmarshalBinary

func (m *RetrieveObsMigrationProfileResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveObsMigrationProfileResponse) Validate

Validate validates this retrieve obs migration profile response

type RetrieveOrderRequest

type RetrieveOrderRequest interface{}

RetrieveOrderRequest retrieve order request Example: {"request_body":{}}

swagger:model RetrieveOrderRequest

type RetrieveOrderResponse

type RetrieveOrderResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The requested order.
	Order *Order `json:"order,omitempty"`
}

RetrieveOrderResponse retrieve order response Example: {"order":{"created_at":"2020-05-18T16:30:49.614Z","discounts":[{"applied_money":{"amount":550,"currency":"USD"},"name":"50% Off","percentage":"50","scope":"ORDER","type":"FIXED_PERCENTAGE","uid":"zGsRZP69aqSSR9lq9euSPB"}],"id":"CAISENgvlJ6jLWAzERDzjyHVybY","line_items":[{"applied_discounts":[{"applied_money":{"amount":250,"currency":"USD"},"discount_uid":"zGsRZP69aqSSR9lq9euSPB","uid":"9zr9S4dxvPAixvn0lpa1VC"}],"base_price_money":{"amount":500,"currency":"USD"},"gross_sales_money":{"amount":500,"currency":"USD"},"name":"Item 1","quantity":"1","total_discount_money":{"amount":250,"currency":"USD"},"total_money":{"amount":250,"currency":"USD"},"total_tax_money":{"amount":0,"currency":"USD"},"uid":"ULkg0tQTRK2bkU9fNv3IJD","variation_total_price_money":{"amount":500,"currency":"USD"}},{"applied_discounts":[{"applied_money":{"amount":300,"currency":"USD"},"discount_uid":"zGsRZP69aqSSR9lq9euSPB","uid":"qa8LwwZK82FgSEkQc2HYVC"}],"base_price_money":{"amount":300,"currency":"USD"},"gross_sales_money":{"amount":600,"currency":"USD"},"name":"Item 2","quantity":"2","total_discount_money":{"amount":300,"currency":"USD"},"total_money":{"amount":300,"currency":"USD"},"total_tax_money":{"amount":0,"currency":"USD"},"uid":"mumY8Nun4BC5aKe2yyx5a","variation_total_price_money":{"amount":600,"currency":"USD"}}],"location_id":"D7AVYMEAPJ3A3","net_amounts":{"discount_money":{"amount":550,"currency":"USD"},"service_charge_money":{"amount":0,"currency":"USD"},"tax_money":{"amount":0,"currency":"USD"},"tip_money":{"amount":0,"currency":"USD"},"total_money":{"amount":550,"currency":"USD"}},"state":"OPEN","total_discount_money":{"amount":550,"currency":"USD"},"total_money":{"amount":550,"currency":"USD"},"total_service_charge_money":{"amount":0,"currency":"USD"},"total_tax_money":{"amount":0,"currency":"USD"},"total_tip_money":{"amount":0,"currency":"USD"},"updated_at":"2020-05-18T16:30:49.614Z","version":1}}

swagger:model RetrieveOrderResponse

func (*RetrieveOrderResponse) ContextValidate

func (m *RetrieveOrderResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve order response based on the context it is used

func (*RetrieveOrderResponse) MarshalBinary

func (m *RetrieveOrderResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveOrderResponse) UnmarshalBinary

func (m *RetrieveOrderResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveOrderResponse) Validate

func (m *RetrieveOrderResponse) Validate(formats strfmt.Registry) error

Validate validates this retrieve order response

type RetrieveSubscriptionRequest

type RetrieveSubscriptionRequest interface{}

RetrieveSubscriptionRequest Defines parameters in a [RetrieveSubscription](#endpoint-subscriptions-retrievesubscription) endpoint request.

swagger:model RetrieveSubscriptionRequest

type RetrieveSubscriptionResponse

type RetrieveSubscriptionResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The subscription retrieved.
	Subscription *Subscription `json:"subscription,omitempty"`
}

RetrieveSubscriptionResponse Defines the fields that are included in the response from the [RetrieveSubscription](#endpoint-subscriptions-retrievesubscription) endpoint. Example: {"subscription":{"charged_through_date":"2020-06-11","created_at":"2020-08-03T21:53:10Z","customer_id":"CHFGVKYY8RSV93M5KCYTG4PN0G","id":"8151fc89-da15-4eb9-a685-1a70883cebfc","invoice_ids":["grebK0Q_l8H4fqoMMVvt-Q","rcX_i3sNmHTGKhI4W2mceA"],"location_id":"S8GWD5R9QB376","paid_until_date":"2020-06-11","plan_id":"6JHXF3B2CW3YKHDV4XEM674H","price_override_money":{"amount":1000,"currency":"USD"},"start_date":"2020-05-11","status":"ACTIVE","timezone":"America/Los_Angeles"}}

swagger:model RetrieveSubscriptionResponse

func (*RetrieveSubscriptionResponse) ContextValidate

func (m *RetrieveSubscriptionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve subscription response based on the context it is used

func (*RetrieveSubscriptionResponse) MarshalBinary

func (m *RetrieveSubscriptionResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveSubscriptionResponse) UnmarshalBinary

func (m *RetrieveSubscriptionResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveSubscriptionResponse) Validate

func (m *RetrieveSubscriptionResponse) Validate(formats strfmt.Registry) error

Validate validates this retrieve subscription response

type RetrieveTeamMemberBookingProfileRequest

type RetrieveTeamMemberBookingProfileRequest interface{}

RetrieveTeamMemberBookingProfileRequest retrieve team member booking profile request

swagger:model RetrieveTeamMemberBookingProfileRequest

type RetrieveTeamMemberBookingProfileResponse

type RetrieveTeamMemberBookingProfileResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The returned team member booking profile.
	TeamMemberBookingProfile *TeamMemberBookingProfile `json:"team_member_booking_profile,omitempty"`
}

RetrieveTeamMemberBookingProfileResponse retrieve team member booking profile response Example: {"errors":[],"team_member_booking_profile":{"display_name":"Sandbox Staff","is_bookable":true,"team_member_id":"TMaJcbiRqPIGZuS9"}}

swagger:model RetrieveTeamMemberBookingProfileResponse

func (*RetrieveTeamMemberBookingProfileResponse) ContextValidate

ContextValidate validate this retrieve team member booking profile response based on the context it is used

func (*RetrieveTeamMemberBookingProfileResponse) MarshalBinary

func (m *RetrieveTeamMemberBookingProfileResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveTeamMemberBookingProfileResponse) UnmarshalBinary

func (m *RetrieveTeamMemberBookingProfileResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveTeamMemberBookingProfileResponse) Validate

Validate validates this retrieve team member booking profile response

type RetrieveTeamMemberRequest

type RetrieveTeamMemberRequest interface{}

RetrieveTeamMemberRequest Represents a retrieve request for a `TeamMember` object. Example: {"request_body":{}}

swagger:model RetrieveTeamMemberRequest

type RetrieveTeamMemberResponse

type RetrieveTeamMemberResponse struct {

	// The errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The successfully retrieved `TeamMember` object.
	TeamMember *TeamMember `json:"team_member,omitempty"`
}

RetrieveTeamMemberResponse Represents a response from a retrieve request, containing a `TeamMember` object or error messages. Example: {"team_member":{"assigned_locations":{"assignment_type":"EXPLICIT_LOCATIONS","location_ids":["GA2Y9HSJ8KRYT","YSGH2WBKG94QZ"]},"created_at":"2020-06-11T22:55:45.867Z","email_address":"joe_doe@gmail.com","family_name":"Doe","given_name":"Joe","id":"1yJlHapkseYnNPETIU1B","is_owner":false,"phone_number":"+14159283333","reference_id":"reference_id_1","status":"ACTIVE","updated_at":"2020-06-11T22:55:45.867Z"}}

swagger:model RetrieveTeamMemberResponse

func (*RetrieveTeamMemberResponse) ContextValidate

func (m *RetrieveTeamMemberResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve team member response based on the context it is used

func (*RetrieveTeamMemberResponse) MarshalBinary

func (m *RetrieveTeamMemberResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveTeamMemberResponse) UnmarshalBinary

func (m *RetrieveTeamMemberResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveTeamMemberResponse) Validate

func (m *RetrieveTeamMemberResponse) Validate(formats strfmt.Registry) error

Validate validates this retrieve team member response

type RetrieveTransactionRequest

type RetrieveTransactionRequest interface{}

RetrieveTransactionRequest retrieve transaction request Example: {}

swagger:model RetrieveTransactionRequest

type RetrieveTransactionResponse

type RetrieveTransactionResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The requested transaction.
	Transaction *Transaction `json:"transaction,omitempty"`
}

RetrieveTransactionResponse Defines the fields that are included in the response body of a request to the [RetrieveTransaction](#endpont-retrievetransaction) endpoint.

One of `errors` or `transaction` is present in a given response (never both). Example: {"transaction":{"created_at":"2016-03-10T22:57:56Z","id":"KnL67ZIwXCPtzOrqj0HrkxMF","location_id":"18YC4JDH91E1H","product":"EXTERNAL_API","reference_id":"some optional reference id","tenders":[{"additional_recipients":[{"amount_money":{"amount":20,"currency":"USD"},"description":"Application fees","location_id":"057P5VYJ4A5X1"}],"amount_money":{"amount":5000,"currency":"USD"},"card_details":{"card":{"card_brand":"VISA","last_4":"1111"},"entry_method":"KEYED","status":"CAPTURED"},"created_at":"2016-03-10T22:57:56Z","id":"MtZRYYdDrYNQbOvV7nbuBvMF","location_id":"18YC4JDH91E1H","note":"some optional note","processing_fee_money":{"amount":138,"currency":"USD"},"transaction_id":"KnL67ZIwXCPtzOrqj0HrkxMF","type":"CARD"}]}}

swagger:model RetrieveTransactionResponse

func (*RetrieveTransactionResponse) ContextValidate

func (m *RetrieveTransactionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve transaction response based on the context it is used

func (*RetrieveTransactionResponse) MarshalBinary

func (m *RetrieveTransactionResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveTransactionResponse) UnmarshalBinary

func (m *RetrieveTransactionResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveTransactionResponse) Validate

func (m *RetrieveTransactionResponse) Validate(formats strfmt.Registry) error

Validate validates this retrieve transaction response

type RetrieveWageSettingRequest

type RetrieveWageSettingRequest interface{}

RetrieveWageSettingRequest Represents a retrieve request for the wage setting of a team member Example: {"request_body":{}}

swagger:model RetrieveWageSettingRequest

type RetrieveWageSettingResponse

type RetrieveWageSettingResponse struct {

	// The errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The successfully retrieved `WageSetting` object.
	WageSetting *WageSetting `json:"wage_setting,omitempty"`
}

RetrieveWageSettingResponse Represents a response from a retrieve request, containing the specified `WageSetting` object or error messages. Example: {"wage_setting":{"created_at":"2020-06-11T23:01:21+00:00","is_overtime_exempt":false,"job_assignments":[{"annual_rate":{"amount":4500000,"currency":"USD"},"hourly_rate":{"amount":2164,"currency":"USD"},"job_title":"Manager","pay_type":"SALARY","weekly_hours":40}],"team_member_id":"1yJlHapkseYnNPETIU1B","updated_at":"2020-06-11T23:01:21+00:00","version":1}}

swagger:model RetrieveWageSettingResponse

func (*RetrieveWageSettingResponse) ContextValidate

func (m *RetrieveWageSettingResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this retrieve wage setting response based on the context it is used

func (*RetrieveWageSettingResponse) MarshalBinary

func (m *RetrieveWageSettingResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RetrieveWageSettingResponse) UnmarshalBinary

func (m *RetrieveWageSettingResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RetrieveWageSettingResponse) Validate

func (m *RetrieveWageSettingResponse) Validate(formats strfmt.Registry) error

Validate validates this retrieve wage setting response

type RevokeTokenRequest

type RevokeTokenRequest struct {

	// The access token of the merchant whose token you want to revoke.
	// Do not provide a value for merchant_id if you provide this parameter.
	AccessToken string `json:"access_token,omitempty"`

	// The Square issued ID for your application, available from the
	// [application dashboard](https://connect.squareup.com/apps).
	ClientID string `json:"client_id,omitempty"`

	// The ID of the merchant whose token you want to revoke.
	// Do not provide a value for access_token if you provide this parameter.
	MerchantID string `json:"merchant_id,omitempty"`

	// If `true`, terminate the given single access token, but do not
	// terminate the entire authorization.
	// Default: `false`
	RevokeOnlyAccessToken bool `json:"revoke_only_access_token,omitempty"`
}

RevokeTokenRequest revoke token request Example: {"request_body":{"access_token":"ACCESS_TOKEN","client_id":"CLIENT_ID"}}

swagger:model RevokeTokenRequest

func (*RevokeTokenRequest) ContextValidate

func (m *RevokeTokenRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this revoke token request based on context it is used

func (*RevokeTokenRequest) MarshalBinary

func (m *RevokeTokenRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RevokeTokenRequest) UnmarshalBinary

func (m *RevokeTokenRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RevokeTokenRequest) Validate

func (m *RevokeTokenRequest) Validate(formats strfmt.Registry) error

Validate validates this revoke token request

type RevokeTokenResponse

type RevokeTokenResponse struct {

	// If the request is successful, this is true.
	Success bool `json:"success,omitempty"`
}

RevokeTokenResponse revoke token response Example: {"success":true}

swagger:model RevokeTokenResponse

func (*RevokeTokenResponse) ContextValidate

func (m *RevokeTokenResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this revoke token response based on context it is used

func (*RevokeTokenResponse) MarshalBinary

func (m *RevokeTokenResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RevokeTokenResponse) UnmarshalBinary

func (m *RevokeTokenResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RevokeTokenResponse) Validate

func (m *RevokeTokenResponse) Validate(formats strfmt.Registry) error

Validate validates this revoke token response

type RiskEvaluation

type RiskEvaluation struct {

	// The timestamp when payment risk was evaluated, in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// The risk level associated with the payment
	// See [RiskEvaluationRiskLevel](#type-riskevaluationrisklevel) for possible values
	RiskLevel string `json:"risk_level,omitempty"`
}

RiskEvaluation Represents fraud risk information for the associated payment.

When you take a payment through Square's Payments API (using the `CreatePayment` endpoint), Square evaluates it and assigns a risk level to the payment. Sellers can use this information to determine the course of action (for example, provide the goods/services or refund the payment).

swagger:model RiskEvaluation

func (*RiskEvaluation) ContextValidate

func (m *RiskEvaluation) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this risk evaluation based on context it is used

func (*RiskEvaluation) MarshalBinary

func (m *RiskEvaluation) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RiskEvaluation) UnmarshalBinary

func (m *RiskEvaluation) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RiskEvaluation) Validate

func (m *RiskEvaluation) Validate(formats strfmt.Registry) error

Validate validates this risk evaluation

type RiskEvaluationRiskLevel

type RiskEvaluationRiskLevel string

RiskEvaluationRiskLevel risk evaluation risk level

swagger:model RiskEvaluationRiskLevel

const (

	// RiskEvaluationRiskLevelPENDING captures enum value "PENDING"
	RiskEvaluationRiskLevelPENDING RiskEvaluationRiskLevel = "PENDING"

	// RiskEvaluationRiskLevelNORMAL captures enum value "NORMAL"
	RiskEvaluationRiskLevelNORMAL RiskEvaluationRiskLevel = "NORMAL"

	// RiskEvaluationRiskLevelMODERATE captures enum value "MODERATE"
	RiskEvaluationRiskLevelMODERATE RiskEvaluationRiskLevel = "MODERATE"

	// RiskEvaluationRiskLevelHIGH captures enum value "HIGH"
	RiskEvaluationRiskLevelHIGH RiskEvaluationRiskLevel = "HIGH"
)

func (RiskEvaluationRiskLevel) ContextValidate

func (m RiskEvaluationRiskLevel) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this risk evaluation risk level based on context it is used

func (RiskEvaluationRiskLevel) Validate

func (m RiskEvaluationRiskLevel) Validate(formats strfmt.Registry) error

Validate validates this risk evaluation risk level

type SearchAvailabilityFilter

type SearchAvailabilityFilter struct {

	// The query expression to search for availabilities for an existing booking by matching the specified `booking_id` value.
	// This is commonly used to reschedule an appointment.
	// If this expression is specified, the `location_id` and `segment_filters` expressions are not allowed.
	BookingID string `json:"booking_id,omitempty"`

	// The query expression to search for availabilities matching the specified seller location IDs.
	// This query expression is not applicable when `booking_id` is present.
	LocationID string `json:"location_id,omitempty"`

	// The list of segment filters to apply. A query with `n` segment filters returns availabilities with `n` segments per
	// availability. It is not applicable when `booking_id` is present.
	SegmentFilters []*SegmentFilter `json:"segment_filters"`

	// The query expression to search for availabilities matching the specified range of starting times.
	// The range must be at least 24 hours and at most 31 days in length.
	// Required: true
	StartAtRange *TimeRange `json:"start_at_range"`
}

SearchAvailabilityFilter A query filter to search for availabilities by.

swagger:model SearchAvailabilityFilter

func (*SearchAvailabilityFilter) ContextValidate

func (m *SearchAvailabilityFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search availability filter based on the context it is used

func (*SearchAvailabilityFilter) MarshalBinary

func (m *SearchAvailabilityFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchAvailabilityFilter) UnmarshalBinary

func (m *SearchAvailabilityFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchAvailabilityFilter) Validate

func (m *SearchAvailabilityFilter) Validate(formats strfmt.Registry) error

Validate validates this search availability filter

type SearchAvailabilityQuery

type SearchAvailabilityQuery struct {

	// The query filter to search for availabilities of existing bookings.
	// Required: true
	Filter *SearchAvailabilityFilter `json:"filter"`
}

SearchAvailabilityQuery Query conditions to search for availabilities of bookings.

swagger:model SearchAvailabilityQuery

func (*SearchAvailabilityQuery) ContextValidate

func (m *SearchAvailabilityQuery) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search availability query based on the context it is used

func (*SearchAvailabilityQuery) MarshalBinary

func (m *SearchAvailabilityQuery) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchAvailabilityQuery) UnmarshalBinary

func (m *SearchAvailabilityQuery) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchAvailabilityQuery) Validate

func (m *SearchAvailabilityQuery) Validate(formats strfmt.Registry) error

Validate validates this search availability query

type SearchAvailabilityRequest

type SearchAvailabilityRequest struct {

	// Query conditions used to filter results.
	// Required: true
	Query *SearchAvailabilityQuery `json:"query"`
}

SearchAvailabilityRequest search availability request Example: {"query":{"filter":{"location_id":"LEQHH0YY8B42M","segment_filters":[{"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","team_member_id_filter":{"any":["TMXUrsBWWcHTt79t","TMaJcbiRqPIGZuS9"]}}],"start_at_range":{"end_at":"2020-11-27T13:00:00Z","start_at":"2020-11-26T13:00:00Z"}}}}

swagger:model SearchAvailabilityRequest

func (*SearchAvailabilityRequest) ContextValidate

func (m *SearchAvailabilityRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search availability request based on the context it is used

func (*SearchAvailabilityRequest) MarshalBinary

func (m *SearchAvailabilityRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchAvailabilityRequest) UnmarshalBinary

func (m *SearchAvailabilityRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchAvailabilityRequest) Validate

func (m *SearchAvailabilityRequest) Validate(formats strfmt.Registry) error

Validate validates this search availability request

type SearchAvailabilityResponse

type SearchAvailabilityResponse struct {

	// List of slots available for booking.
	Availabilities []*Availability `json:"availabilities"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

SearchAvailabilityResponse search availability response Example: {"availabilities":[{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMXUrsBWWcHTt79t"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-26T13:00:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMXUrsBWWcHTt79t"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-26T13:30:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMaJcbiRqPIGZuS9"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-26T14:00:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMaJcbiRqPIGZuS9"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-26T14:30:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMaJcbiRqPIGZuS9"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-26T15:00:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMaJcbiRqPIGZuS9"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-26T15:30:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMaJcbiRqPIGZuS9"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-26T16:00:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMXUrsBWWcHTt79t"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-27T09:00:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMaJcbiRqPIGZuS9"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-27T09:30:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMXUrsBWWcHTt79t"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-27T10:00:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMXUrsBWWcHTt79t"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-27T10:30:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMXUrsBWWcHTt79t"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-27T11:00:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMaJcbiRqPIGZuS9"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-27T11:30:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMaJcbiRqPIGZuS9"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-27T12:00:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMaJcbiRqPIGZuS9"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-27T12:30:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMXUrsBWWcHTt79t"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-27T13:00:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMXUrsBWWcHTt79t"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-27T13:30:00Z"},{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMaJcbiRqPIGZuS9"}],"location_id":"LEQHH0YY8B42M","start_at":"2020-11-27T14:00:00Z"}],"errors":[]}

swagger:model SearchAvailabilityResponse

func (*SearchAvailabilityResponse) ContextValidate

func (m *SearchAvailabilityResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search availability response based on the context it is used

func (*SearchAvailabilityResponse) MarshalBinary

func (m *SearchAvailabilityResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchAvailabilityResponse) UnmarshalBinary

func (m *SearchAvailabilityResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchAvailabilityResponse) Validate

func (m *SearchAvailabilityResponse) Validate(formats strfmt.Registry) error

Validate validates this search availability response

type SearchCatalogItemsRequest

type SearchCatalogItemsRequest struct {

	// The category id query expression to return items containing the specified category IDs.
	CategoryIds []string `json:"category_ids"`

	// The pagination token, returned in the previous response, used to fetch the next batch of pending results.
	Cursor string `json:"cursor,omitempty"`

	// The customer-attribute filter to return items or item variations matching the specified
	// custom attribute expressions. A maximum number of 10 custom attribute expressions are supported in
	// a single call to the `SearchCatalogItems` endpoint.
	CustomAttributeFilters []*CustomAttributeFilter `json:"custom_attribute_filters"`

	// The enabled-location query expression to return items and item variations having specified enabled locations.
	EnabledLocationIds []string `json:"enabled_location_ids"`

	// The maximum number of results to return per page. The default value is 100.
	// Maximum: 100
	Limit int64 `json:"limit,omitempty"`

	// The product types query expression to return items or item variations having the specified product types.
	// See [CatalogItemProductType](#type-catalogitemproducttype) for possible values
	ProductTypes []string `json:"product_types"`

	// The order to sort the results by item names. The default sort order is ascending (`ASC`).
	// See [SortOrder](#type-sortorder) for possible values
	SortOrder string `json:"sort_order,omitempty"`

	// The stock-level query expression to return item variations with the specified stock levels.
	// See [SearchCatalogItemsRequestStockLevel](#type-searchcatalogitemsrequeststocklevel) for possible values
	StockLevels []string `json:"stock_levels"`

	// The text filter expression to return items or item variations containing specified text in
	// the `name`, `description`, or `abbreviation` attribute value of an item, or in
	// the `name`, `sku`, or `upc` attribute value of an item variation.
	TextFilter string `json:"text_filter,omitempty"`
}

SearchCatalogItemsRequest Defines the request body for the [SearchCatalogItems](#endpoint-Catalog-SearchCatalogItems) endpoint. Example: {"request_body":{"category_ids":["WINE_CATEGORY_ID"],"custom_attribute_filters":[{"bool_filter":true,"custom_attribute_definition_id":"VEGAN_DEFINITION_ID"},{"custom_attribute_definition_id":"BRAND_DEFINITION_ID","string_filter":"Dark Horse"},{"key":"VINTAGE","number_filter":{"max":2018,"min":2017}},{"custom_attribute_definition_id":"VARIETAL_DEFINITION_ID","selection_ids_filter":"MERLOT_SELECTION_ID"}],"enabled_location_ids":["ATL_LOCATION_ID"],"limit":100,"product_types":["REGULAR"],"sort_order":"ASC","stock_levels":["OUT","LOW"],"text_filter":"red"}}

swagger:model SearchCatalogItemsRequest

func (*SearchCatalogItemsRequest) ContextValidate

func (m *SearchCatalogItemsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search catalog items request based on the context it is used

func (*SearchCatalogItemsRequest) MarshalBinary

func (m *SearchCatalogItemsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchCatalogItemsRequest) UnmarshalBinary

func (m *SearchCatalogItemsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchCatalogItemsRequest) Validate

func (m *SearchCatalogItemsRequest) Validate(formats strfmt.Registry) error

Validate validates this search catalog items request

type SearchCatalogItemsRequestStockLevel

type SearchCatalogItemsRequestStockLevel string

SearchCatalogItemsRequestStockLevel Defines supported stock levels of the item inventory.

swagger:model SearchCatalogItemsRequestStockLevel

const (

	// SearchCatalogItemsRequestStockLevelOUT captures enum value "OUT"
	SearchCatalogItemsRequestStockLevelOUT SearchCatalogItemsRequestStockLevel = "OUT"

	// SearchCatalogItemsRequestStockLevelLOW captures enum value "LOW"
	SearchCatalogItemsRequestStockLevelLOW SearchCatalogItemsRequestStockLevel = "LOW"
)

func (SearchCatalogItemsRequestStockLevel) ContextValidate

func (m SearchCatalogItemsRequestStockLevel) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this search catalog items request stock level based on context it is used

func (SearchCatalogItemsRequestStockLevel) Validate

Validate validates this search catalog items request stock level

type SearchCatalogItemsResponse

type SearchCatalogItemsResponse struct {

	// Pagination token used in the next request to return more of the search result.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// Returned items matching the specified query expressions.
	Items []*CatalogObject `json:"items"`

	// Ids of returned item variations matching the specified query expression.
	MatchedVariationIds []string `json:"matched_variation_ids"`
}

SearchCatalogItemsResponse Defines the response body returned from the [SearchCatalogItems](#endpoint-Catalog-SearchCatalogItems) endpoint. Example: {"items":[{"custom_attribute_values":{"BRAND":{"custom_attribute_definition_id":"BRAND_DEFINITION_ID","key":"BRAND","name":"Brand","string_value":"Dark Horse","type":"STRING"},"VARIETAL":{"custom_attribute_definition_id":"VARIETAL_DEFINITION_ID","key":"VARIETAL","name":"Varietal","selection_uid_values":["MERLOT_SELECTION_ID",null],"type":"SELECTION"},"VINTAGE":{"custom_attribute_definition_id":"EI7IJQDUKYSHULREPIPH6HNU","key":"VINTAGE","name":"Vintage","number_value":2018,"type":"NUMBER"}},"id":"GPOKJPTV2KDLVKCADJ7I77EZ","is_deleted":false,"item_data":{"description":"A nice red wine","name":"Dark Horse Merlot 2018","product_type":"REGULAR","variations":[{"id":"VBJNPHCOKDFECR6VU25WRJUD","is_deleted":false,"item_variation_data":{"item_id":"GPOKJPTV2KDLVKCADJ7I77EZ","name":"750 mL","ordinal":0,"price_money":{"amount":1000,"currency":"USD"},"pricing_type":"FIXED_PRICING"},"present_at_all_locations":true,"type":"ITEM_VARIATION","updated_at":"2020-06-18T17:55:56.646Z","version":1592502956646}]},"present_at_all_locations":true,"type":"ITEM","updated_at":"2020-06-18T17:55:56.646Z","version":1592502956646}],"matched_variation_ids":["VBJNPHCOKDFECR6VU25WRJUD"]}

swagger:model SearchCatalogItemsResponse

func (*SearchCatalogItemsResponse) ContextValidate

func (m *SearchCatalogItemsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search catalog items response based on the context it is used

func (*SearchCatalogItemsResponse) MarshalBinary

func (m *SearchCatalogItemsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchCatalogItemsResponse) UnmarshalBinary

func (m *SearchCatalogItemsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchCatalogItemsResponse) Validate

func (m *SearchCatalogItemsResponse) Validate(formats strfmt.Registry) error

Validate validates this search catalog items response

type SearchCatalogObjectsRequest

type SearchCatalogObjectsRequest struct {

	// Return objects modified after this [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates), in RFC 3339
	// format, e.g., `2016-09-04T23:59:33.123Z`. The timestamp is exclusive - objects with a
	// timestamp equal to `begin_time` will not be included in the response.
	BeginTime string `json:"begin_time,omitempty"`

	// The pagination cursor returned in the previous response. Leave unset for an initial request.
	// See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`

	// If `true`, deleted objects will be included in the results. Deleted objects will have their
	// `is_deleted` field set to `true`.
	IncludeDeletedObjects bool `json:"include_deleted_objects,omitempty"`

	// If `true`, the response will include additional objects that are related to the
	// requested object, as follows:
	//
	// If a CatalogItem is returned in the object field of the response,
	// its associated CatalogCategory, CatalogTax objects,
	// CatalogImage objects and CatalogModifierList objects
	// will be included in the `related_objects` field of the response.
	//
	// If a CatalogItemVariation is returned in the object field of the
	// response, its parent CatalogItem will be included in the `related_objects` field of
	// the response.
	IncludeRelatedObjects bool `json:"include_related_objects,omitempty"`

	// A limit on the number of results to be returned in a single page. The limit is advisory -
	// the implementation may return more or fewer results. If the supplied limit is negative, zero, or
	// is higher than the maximum limit of 1,000, it will be ignored.
	Limit int64 `json:"limit,omitempty"`

	// The desired set of object types to appear in the search results.
	// See [CatalogObjectType](#type-catalogobjecttype) for possible values
	ObjectTypes []string `json:"object_types"`

	// A query to be used to filter or sort the results. If no query is specified, the entire catalog will be returned.
	Query *CatalogQuery `json:"query,omitempty"`
}

SearchCatalogObjectsRequest search catalog objects request Example: {"request_body":{"limit":100,"object_types":["ITEM"],"query":{"prefix_query":{"attribute_name":"name","attribute_prefix":"tea"}}}}

swagger:model SearchCatalogObjectsRequest

func (*SearchCatalogObjectsRequest) ContextValidate

func (m *SearchCatalogObjectsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search catalog objects request based on the context it is used

func (*SearchCatalogObjectsRequest) MarshalBinary

func (m *SearchCatalogObjectsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchCatalogObjectsRequest) UnmarshalBinary

func (m *SearchCatalogObjectsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchCatalogObjectsRequest) Validate

func (m *SearchCatalogObjectsRequest) Validate(formats strfmt.Registry) error

Validate validates this search catalog objects request

type SearchCatalogObjectsResponse

type SearchCatalogObjectsResponse struct {

	// The pagination cursor to be used in a subsequent request. If unset, this is the final response.
	// See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// When the associated product catalog was last updated. Will
	// match the value for `end_time` or `cursor` if either field is included in the `SearchCatalog` request.
	LatestTime string `json:"latest_time,omitempty"`

	// The CatalogObjects returned.
	Objects []*CatalogObject `json:"objects"`

	// A list of CatalogObjects referenced by the objects in the `objects` field.
	RelatedObjects []*CatalogObject `json:"related_objects"`
}

SearchCatalogObjectsResponse search catalog objects response Example: {"objects":[{"id":"X5DZ5NWWAQ44CKBLKIFQGOWK","is_deleted":false,"item_data":{"category_id":"E7CLE5RZZ744BHWVQQEAHI2C","description":"A delicious blend of black tea.","name":"Tea - Black","product_type":"REGULAR","tax_ids":["ZXITPM6RWHZ7GZ7EIP3YKECM"],"variations":[{"id":"5GSZPX6EU7MM75S57OONG3V5","is_deleted":false,"item_variation_data":{"item_id":"X5DZ5NWWAQ44CKBLKIFQGOWK","name":"Regular","ordinal":1,"price_money":{"amount":150,"currency":"USD"},"pricing_type":"FIXED_PRICING"},"present_at_all_locations":true,"type":"ITEM_VARIATION","updated_at":"2017-10-26T15:27:31.626Z","version":1509031651626},{"id":"XVLBN7DU6JTWHJTG5F265B43","is_deleted":false,"item_variation_data":{"item_id":"X5DZ5NWWAQ44CKBLKIFQGOWK","name":"Large","ordinal":2,"price_money":{"amount":225,"currency":"USD"},"pricing_type":"FIXED_PRICING"},"present_at_all_locations":true,"type":"ITEM_VARIATION","updated_at":"2017-10-26T15:27:31.626Z","version":1509031651626}],"visibility":"PRIVATE"},"present_at_all_locations":true,"type":"ITEM","updated_at":"2017-10-26T15:41:32.337Z","version":1509032492337},{"id":"NNNEM3LA656Q46NXLWCNI7S5","is_deleted":false,"item_data":{"category_id":"E7CLE5RZZ744BHWVQQEAHI2C","description":"Relaxing green herbal tea.","name":"Tea - Green","product_type":"REGULAR","tax_ids":["ZXITPM6RWHZ7GZ7EIP3YKECM"],"variations":[{"id":"FHYBVIA6NVBCSOVETA62WEA4","is_deleted":false,"item_variation_data":{"item_id":"NNNEM3LA656Q46NXLWCNI7S5","name":"Regular","ordinal":1,"price_money":{"amount":150,"currency":"USD"},"pricing_type":"FIXED_PRICING"},"present_at_all_locations":true,"type":"ITEM_VARIATION","updated_at":"2017-10-26T15:29:00.524Z","version":1509031740524}],"visibility":"PRIVATE"},"present_at_all_locations":true,"type":"ITEM","updated_at":"2017-10-26T15:41:23.232Z","version":1509032483232}]}

swagger:model SearchCatalogObjectsResponse

func (*SearchCatalogObjectsResponse) ContextValidate

func (m *SearchCatalogObjectsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search catalog objects response based on the context it is used

func (*SearchCatalogObjectsResponse) MarshalBinary

func (m *SearchCatalogObjectsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchCatalogObjectsResponse) UnmarshalBinary

func (m *SearchCatalogObjectsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchCatalogObjectsResponse) Validate

func (m *SearchCatalogObjectsResponse) Validate(formats strfmt.Registry) error

Validate validates this search catalog objects response

type SearchCustomersRequest

type SearchCustomersRequest struct {

	// Include the pagination cursor in subsequent calls to this endpoint to retrieve
	// the next set of results associated with the original query.
	//
	// See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`

	// A limit on the number of results to be returned in a single page.
	// The limit is advisory - the implementation may return more or fewer results.
	// If the supplied limit is negative, zero, or is higher than the maximum limit
	// of 100, it will be ignored.
	// Maximum: 100
	// Minimum: 1
	Limit int64 `json:"limit,omitempty"`

	// Query customers based on the given conditions and sort order.
	// Calling SearchCustomers without an explicit query parameter will return
	// all customers ordered alphabetically based on `given_name` and
	// `family_name`.
	Query *CustomerQuery `json:"query,omitempty"`
}

SearchCustomersRequest Defines the fields included in the request body for the SearchCustomers endpoint. Example: {"request_body":{"limit":2,"query":{"filter":{"created_at":{"end_at":"2018-02-01T00:00:00-00:00","start_at":"2018-01-01T00:00:00-00:00"},"creation_source":{"rule":"INCLUDE","values":["THIRD_PARTY"]},"email_address":{"fuzzy":"example.com"},"group_ids":{"all":["545AXB44B4XXWMVQ4W8SBT3HHF"]}},"sort":{"field":"CREATED_AT","order":"ASC"}}}}

swagger:model SearchCustomersRequest

func (*SearchCustomersRequest) ContextValidate

func (m *SearchCustomersRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search customers request based on the context it is used

func (*SearchCustomersRequest) MarshalBinary

func (m *SearchCustomersRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchCustomersRequest) UnmarshalBinary

func (m *SearchCustomersRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchCustomersRequest) Validate

func (m *SearchCustomersRequest) Validate(formats strfmt.Registry) error

Validate validates this search customers request

type SearchCustomersResponse

type SearchCustomersResponse struct {

	// A pagination cursor that can be used during subsequent calls
	// to SearchCustomers to retrieve the next set of results associated
	// with the original query. Pagination cursors are only present when
	// a request succeeds and additional results are available.
	//
	// See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`

	// An array of `Customer` objects that match a query.
	Customers []*Customer `json:"customers"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

SearchCustomersResponse Defines the fields that are included in the response body of a request to the SearchCustomers endpoint.

One of `errors` or `customers` is present in a given response (never both). Example: {"cursor":"9dpS093Uy12AzeE","customers":[{"address":{"address_line_1":"505 Electric Ave","address_line_2":"Suite 600","administrative_district_level_1":"NY","country":"US","locality":"New York","postal_code":"10003"},"created_at":"2018-01-23T20:21:54.859Z","creation_source":"THIRD_PARTY","email_address":"james.bond@example.com","family_name":"Bond","given_name":"James","group_ids":["545AXB44B4XXWMVQ4W8SBT3HHF"],"groups":[{"id":"545AXB44B4XXWMVQ4W8SBT3HHF","name":"Aviation Enthusiasts"},{"id":"1KB9JE5EGJXCW.REACHABLE","name":"Reachable"}],"id":"JDKYHBWT1D4F8MFH63DBMEN8Y4","phone_number":"1-212-555-4250","reference_id":"YOUR_REFERENCE_ID_2","segment_ids":["1KB9JE5EGJXCW.REACHABLE"],"updated_at":"2018-04-20T10:02:43.083Z"},{"address":{"address_line_1":"500 Electric Ave","address_line_2":"Suite 600","administrative_district_level_1":"NY","country":"US","locality":"New York","postal_code":"10003"},"created_at":"2018-01-30T14:10:54.859Z","creation_source":"THIRD_PARTY","email_address":"amelia.earhart@example.com","family_name":"Earhart","given_name":"Amelia","group_ids":["545AXB44B4XXWMVQ4W8SBT3HHF"],"groups":[{"id":"545AXB44B4XXWMVQ4W8SBT3HHF","name":"Aviation Enthusiasts"},{"id":"1KB9JE5EGJXCW.REACHABLE","name":"Reachable"}],"id":"JDKYHBWT1D4F8MFH63DBMEN8Y4","note":"a customer","phone_number":"1-212-555-4240","reference_id":"YOUR_REFERENCE_ID_1","segment_ids":["1KB9JE5EGJXCW.REACHABLE"],"updated_at":"2018-03-08T18:25:54.859Z"}]}

swagger:model SearchCustomersResponse

func (*SearchCustomersResponse) ContextValidate

func (m *SearchCustomersResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search customers response based on the context it is used

func (*SearchCustomersResponse) MarshalBinary

func (m *SearchCustomersResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchCustomersResponse) UnmarshalBinary

func (m *SearchCustomersResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchCustomersResponse) Validate

func (m *SearchCustomersResponse) Validate(formats strfmt.Registry) error

Validate validates this search customers response

type SearchInvoicesRequest

type SearchInvoicesRequest struct {

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this cursor to retrieve the next set of results for your original query.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination).
	Cursor string `json:"cursor,omitempty"`

	// The maximum number of invoices to return (200 is the maximum `limit`).
	// If not provided, the server
	// uses a default limit of 100 invoices.
	Limit int64 `json:"limit,omitempty"`

	// Describes the query criteria for searching invoices.
	// Required: true
	Query *InvoiceQuery `json:"query"`
}

SearchInvoicesRequest Describes a `SearchInvoices` request. Example: {"request_body":{"query":{"filter":{"customer_ids":["JDKYHBWT1D4F8MFH63DBMEN8Y4"],"location_ids":["ES0RJRZYEC39A"]},"limit":100,"sort":{"field":"INVOICE_SORT_DATE","order":"DESC"}}}}

swagger:model SearchInvoicesRequest

func (*SearchInvoicesRequest) ContextValidate

func (m *SearchInvoicesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search invoices request based on the context it is used

func (*SearchInvoicesRequest) MarshalBinary

func (m *SearchInvoicesRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchInvoicesRequest) UnmarshalBinary

func (m *SearchInvoicesRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchInvoicesRequest) Validate

func (m *SearchInvoicesRequest) Validate(formats strfmt.Registry) error

Validate validates this search invoices request

type SearchInvoicesResponse

type SearchInvoicesResponse struct {

	// When a response is truncated, it includes a cursor that you can use in a
	// subsequent request to fetch the next set of invoices. If empty, this is the final
	// response.
	// For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination).
	Cursor string `json:"cursor,omitempty"`

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The list of invoices returned by the search.
	Invoices []*Invoice `json:"invoices"`
}

SearchInvoicesResponse Describes a `SearchInvoices` response. Example: {"cursor":"CURSOR","invoices":[{"invoice":{"created_at":"2020-06-18T17:45:13Z","custom_fields":[{"label":"Event Reference Number","placement":"ABOVE_LINE_ITEMS","value":"Ref. #1234"},{"label":"Terms of Service","placement":"BELOW_LINE_ITEMS","value":"The terms of service are..."}],"delivery_method":"EMAIL","description":"We appreciate your business!","id":"gt2zv1z6mnUm1V7KMxxf3w","invoice_number":"inv-100","location_id":"ES0RJRZYEC39A","order_id":"CAISENgvlJ6jLWAzERDzjyHVybY","payment_requests":[{"automatic_payment_source":"NONE","computed_amount_money":{"amount":10000,"currency":"USD"},"due_date":"2030-01-24","reminders":[{"message":"Your invoice is due tomorrow","relative_scheduled_days":-1,"status":"PENDING","uid":"beebd363-e47f-4075-8785-c235aaa7df11"}],"request_type":"BALANCE","tipping_enabled":true,"total_completed_amount_money":{"amount":0,"currency":"USD"},"uid":"2da7964f-f3d2-4f43-81e8-5aa220bf3355"}],"primary_recipient":{"customer_id":"JDKYHBWT1D4F8MFH63DBMEN8Y4","email_address":"Amelia.Earhart@example.com","family_name":"Earhart","given_name":"Amelia","phone_number":"1-212-555-4240"},"scheduled_at":"2030-01-13T10:00:00Z","status":"DRAFT","timezone":"America/Los_Angeles","title":"Event Planning Services","updated_at":"2020-06-18T17:45:13Z","version":0}}]}

swagger:model SearchInvoicesResponse

func (*SearchInvoicesResponse) ContextValidate

func (m *SearchInvoicesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search invoices response based on the context it is used

func (*SearchInvoicesResponse) MarshalBinary

func (m *SearchInvoicesResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchInvoicesResponse) UnmarshalBinary

func (m *SearchInvoicesResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchInvoicesResponse) Validate

func (m *SearchInvoicesResponse) Validate(formats strfmt.Registry) error

Validate validates this search invoices response

type SearchLoyaltyAccountsRequest

type SearchLoyaltyAccountsRequest struct {

	// A pagination cursor returned by a previous call to
	// this endpoint. Provide this to retrieve the next set of
	// results for the original query.
	//
	// For more information,
	// see [Pagination](https://developer.squareup.com/docs/docs/basics/api101/pagination).
	Cursor string `json:"cursor,omitempty"`

	// The maximum number of results to include in the response.
	// Maximum: 30
	// Minimum: 1
	Limit int64 `json:"limit,omitempty"`

	// The search criteria for the request.
	Query *SearchLoyaltyAccountsRequestLoyaltyAccountQuery `json:"query,omitempty"`
}

SearchLoyaltyAccountsRequest A request to search for loyalty accounts. Example: {"request_body":{"limit":10,"query":{"mappings":[{"type":"PHONE","value":"+14155551234"}]}}}

swagger:model SearchLoyaltyAccountsRequest

func (*SearchLoyaltyAccountsRequest) ContextValidate

func (m *SearchLoyaltyAccountsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search loyalty accounts request based on the context it is used

func (*SearchLoyaltyAccountsRequest) MarshalBinary

func (m *SearchLoyaltyAccountsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchLoyaltyAccountsRequest) UnmarshalBinary

func (m *SearchLoyaltyAccountsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchLoyaltyAccountsRequest) Validate

func (m *SearchLoyaltyAccountsRequest) Validate(formats strfmt.Registry) error

Validate validates this search loyalty accounts request

type SearchLoyaltyAccountsRequestLoyaltyAccountQuery

type SearchLoyaltyAccountsRequestLoyaltyAccountQuery struct {

	// The set of customer IDs to use in the loyalty account search.
	//
	// This cannot be combined with `mappings`.
	//
	// Max: 30 customer IDs
	CustomerIds []string `json:"customer_ids"`

	// The set of mappings to use in the loyalty account search.
	//
	// This cannot be combined with `customer_ids`.
	//
	// Max: 30 mappings
	Mappings []*LoyaltyAccountMapping `json:"mappings"`
}

SearchLoyaltyAccountsRequestLoyaltyAccountQuery The search criteria for the loyalty accounts.

swagger:model SearchLoyaltyAccountsRequestLoyaltyAccountQuery

func (*SearchLoyaltyAccountsRequestLoyaltyAccountQuery) ContextValidate

ContextValidate validate this search loyalty accounts request loyalty account query based on the context it is used

func (*SearchLoyaltyAccountsRequestLoyaltyAccountQuery) MarshalBinary

MarshalBinary interface implementation

func (*SearchLoyaltyAccountsRequestLoyaltyAccountQuery) UnmarshalBinary

UnmarshalBinary interface implementation

func (*SearchLoyaltyAccountsRequestLoyaltyAccountQuery) Validate

Validate validates this search loyalty accounts request loyalty account query

type SearchLoyaltyAccountsResponse

type SearchLoyaltyAccountsResponse struct {

	// The pagination cursor to use in a subsequent
	// request. If empty, this is the final response.
	// For more information,
	// see [Pagination](https://developer.squareup.com/docs/docs/basics/api101/pagination).
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The loyalty accounts that met the search criteria,
	// in order of creation date.
	LoyaltyAccounts []*LoyaltyAccount `json:"loyalty_accounts"`
}

SearchLoyaltyAccountsResponse A response that includes loyalty accounts that satisfy the search criteria. Example: {"loyalty_accounts":[{"balance":10,"created_at":"2020-05-08T21:44:32Z","customer_id":"Q8002FAM9V1EZ0ADB2T5609X6NET1H0","id":"79b807d2-d786-46a9-933b-918028d7a8c5","lifetime_points":20,"mappings":[{"created_at":"2020-05-08T21:44:32Z","id":"66aaab3f-da99-49ed-8b19-b87f851c844f","type":"PHONE","value":"+14155551234"}],"program_id":"d619f755-2d17-41f3-990d-c04ecedd64dd","updated_at":"2020-05-08T21:44:32Z"}]}

swagger:model SearchLoyaltyAccountsResponse

func (*SearchLoyaltyAccountsResponse) ContextValidate

func (m *SearchLoyaltyAccountsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search loyalty accounts response based on the context it is used

func (*SearchLoyaltyAccountsResponse) MarshalBinary

func (m *SearchLoyaltyAccountsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchLoyaltyAccountsResponse) UnmarshalBinary

func (m *SearchLoyaltyAccountsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchLoyaltyAccountsResponse) Validate

func (m *SearchLoyaltyAccountsResponse) Validate(formats strfmt.Registry) error

Validate validates this search loyalty accounts response

type SearchLoyaltyEventsRequest

type SearchLoyaltyEventsRequest struct {

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this to retrieve the next set of results for your original query.
	// For more information, see [Pagination](https://developer.squareup.com/docs/docs/basics/api101/pagination).
	Cursor string `json:"cursor,omitempty"`

	// The maximum number of results to include in the response.
	// The last page might contain fewer events.
	// The default is 30 events.
	// Maximum: 30
	// Minimum: 1
	Limit int64 `json:"limit,omitempty"`

	// A set of one or more predefined query filters to apply when
	// searching for loyalty events. The endpoint performs a logical AND to
	// evaluate multiple filters and performs a logical OR on arrays
	// that specifies multiple field values.
	Query *LoyaltyEventQuery `json:"query,omitempty"`
}

SearchLoyaltyEventsRequest A request to search for loyalty events. Example: {"request_body":{"limit":30,"query":{"filter":{"order_filter":{"order_id":"PyATxhYLfsMqpVkcKJITPydgEYfZY"}}}}}

swagger:model SearchLoyaltyEventsRequest

func (*SearchLoyaltyEventsRequest) ContextValidate

func (m *SearchLoyaltyEventsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search loyalty events request based on the context it is used

func (*SearchLoyaltyEventsRequest) MarshalBinary

func (m *SearchLoyaltyEventsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchLoyaltyEventsRequest) UnmarshalBinary

func (m *SearchLoyaltyEventsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchLoyaltyEventsRequest) Validate

func (m *SearchLoyaltyEventsRequest) Validate(formats strfmt.Registry) error

Validate validates this search loyalty events request

type SearchLoyaltyEventsResponse

type SearchLoyaltyEventsResponse struct {

	// The pagination cursor to be used in a subsequent
	// request. If empty, this is the final response.
	// For more information,
	// see [Pagination](https://developer.squareup.com/docs/docs/basics/api101/pagination).
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The loyalty events that satisfy the search criteria.
	Events []*LoyaltyEvent `json:"events"`
}

SearchLoyaltyEventsResponse A response that contains loyalty events that satisfy the search criteria, in order by the `created_at` date. Example: {"events":[{"accumulate_points":{"loyalty_program_id":"d619f755-2d17-41f3-990d-c04ecedd64dd","order_id":"PyATxhYLfsMqpVkcKJITPydgEYfZY","points":5},"created_at":"2020-05-08T22:01:30Z","id":"c27c8465-806e-36f2-b4b3-71f5887b5ba8","location_id":"P034NEENMD09F","loyalty_account_id":"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd","source":"LOYALTY_API","type":"ACCUMULATE_POINTS"},{"created_at":"2020-05-08T22:01:15Z","id":"e4a5cbc3-a4d0-3779-98e9-e578885d9430","location_id":"P034NEENMD09F","loyalty_account_id":"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd","redeem_reward":{"loyalty_program_id":"d619f755-2d17-41f3-990d-c04ecedd64dd","order_id":"PyATxhYLfsMqpVkcKJITPydgEYfZY","reward_id":"d03f79f4-815f-3500-b851-cc1e68a457f9"},"source":"LOYALTY_API","type":"REDEEM_REWARD"},{"create_reward":{"loyalty_program_id":"d619f755-2d17-41f3-990d-c04ecedd64dd","points":-10,"reward_id":"d03f79f4-815f-3500-b851-cc1e68a457f9"},"created_at":"2020-05-08T22:00:44Z","id":"5e127479-0b03-3671-ab1e-15faea8b7188","loyalty_account_id":"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd","source":"LOYALTY_API","type":"CREATE_REWARD"}]}

swagger:model SearchLoyaltyEventsResponse

func (*SearchLoyaltyEventsResponse) ContextValidate

func (m *SearchLoyaltyEventsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search loyalty events response based on the context it is used

func (*SearchLoyaltyEventsResponse) MarshalBinary

func (m *SearchLoyaltyEventsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchLoyaltyEventsResponse) UnmarshalBinary

func (m *SearchLoyaltyEventsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchLoyaltyEventsResponse) Validate

func (m *SearchLoyaltyEventsResponse) Validate(formats strfmt.Registry) error

Validate validates this search loyalty events response

type SearchLoyaltyRewardsRequest

type SearchLoyaltyRewardsRequest struct {

	// A pagination cursor returned by a previous call to
	// this endpoint. Provide this to retrieve the next set of
	// results for the original query.
	// For more information,
	// see [Pagination](https://developer.squareup.com/docs/docs/basics/api101/pagination).
	Cursor string `json:"cursor,omitempty"`

	// The maximum number of results to return in the response.
	// Maximum: 30
	// Minimum: 1
	Limit int64 `json:"limit,omitempty"`

	// The search criteria for the request.
	// If empty, the endpoint retrieves all loyalty rewards in the loyalty program.
	Query *SearchLoyaltyRewardsRequestLoyaltyRewardQuery `json:"query,omitempty"`
}

SearchLoyaltyRewardsRequest A request to search for loyalty rewards. Example: {"request_body":{"limit":10,"query":{"loyalty_account_id":"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd"}}}

swagger:model SearchLoyaltyRewardsRequest

func (*SearchLoyaltyRewardsRequest) ContextValidate

func (m *SearchLoyaltyRewardsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search loyalty rewards request based on the context it is used

func (*SearchLoyaltyRewardsRequest) MarshalBinary

func (m *SearchLoyaltyRewardsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchLoyaltyRewardsRequest) UnmarshalBinary

func (m *SearchLoyaltyRewardsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchLoyaltyRewardsRequest) Validate

func (m *SearchLoyaltyRewardsRequest) Validate(formats strfmt.Registry) error

Validate validates this search loyalty rewards request

type SearchLoyaltyRewardsRequestLoyaltyRewardQuery

type SearchLoyaltyRewardsRequestLoyaltyRewardQuery struct {

	// The ID of the `loyalty account` to which the loyalty reward belongs.
	// Required: true
	LoyaltyAccountID *string `json:"loyalty_account_id"`

	// The status of the loyalty reward.
	// See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible values
	Status string `json:"status,omitempty"`
}

SearchLoyaltyRewardsRequestLoyaltyRewardQuery The set of search requirements.

swagger:model SearchLoyaltyRewardsRequestLoyaltyRewardQuery

func (*SearchLoyaltyRewardsRequestLoyaltyRewardQuery) ContextValidate

ContextValidate validates this search loyalty rewards request loyalty reward query based on context it is used

func (*SearchLoyaltyRewardsRequestLoyaltyRewardQuery) MarshalBinary

MarshalBinary interface implementation

func (*SearchLoyaltyRewardsRequestLoyaltyRewardQuery) UnmarshalBinary

UnmarshalBinary interface implementation

func (*SearchLoyaltyRewardsRequestLoyaltyRewardQuery) Validate

Validate validates this search loyalty rewards request loyalty reward query

type SearchLoyaltyRewardsResponse

type SearchLoyaltyRewardsResponse struct {

	// The pagination cursor to be used in a subsequent
	// request. If empty, this is the final response.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The loyalty rewards that satisfy the search criteria.
	// These are returned in descending order by `updated_at`.
	Rewards []*LoyaltyReward `json:"rewards"`
}

SearchLoyaltyRewardsResponse A response that includes the loyalty rewards satisfying the search criteria. Example: {"rewards":[{"created_at":"2020-05-08T22:00:44Z","id":"d03f79f4-815f-3500-b851-cc1e68a457f9","loyalty_account_id":"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd","order_id":"PyATxhYLfsMqpVkcKJITPydgEYfZY","points":10,"redeemed_at":"2020-05-08T22:01:17Z","reward_tier_id":"e1b39225-9da5-43d1-a5db-782cdd8ad94f","status":"REDEEMED","updated_at":"2020-05-08T22:01:17Z"},{"created_at":"2020-05-08T21:55:42Z","id":"9f18ac21-233a-31c3-be77-b45840f5a810","loyalty_account_id":"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd","points":10,"redeemed_at":"2020-05-08T21:56:00Z","reward_tier_id":"e1b39225-9da5-43d1-a5db-782cdd8ad94f","status":"REDEEMED","updated_at":"2020-05-08T21:56:00Z"},{"created_at":"2020-05-01T21:49:54Z","id":"a8f43ebe-2ad6-3001-bdd5-7d7c2da08943","loyalty_account_id":"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd","order_id":"5NB69ZNh3FbsOs1ox43bh1xrli6YY","points":10,"reward_tier_id":"e1b39225-9da5-43d1-a5db-782cdd8ad94f","status":"DELETED","updated_at":"2020-05-08T21:55:10Z"},{"created_at":"2020-05-01T20:20:37Z","id":"a051254c-f840-3b45-8cf1-50bcd38ff92a","loyalty_account_id":"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd","order_id":"LQQ16znvi2VIUKPVhUfJefzr1eEZY","points":10,"reward_tier_id":"e1b39225-9da5-43d1-a5db-782cdd8ad94f","status":"ISSUED","updated_at":"2020-05-01T20:20:40Z"}]}

swagger:model SearchLoyaltyRewardsResponse

func (*SearchLoyaltyRewardsResponse) ContextValidate

func (m *SearchLoyaltyRewardsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search loyalty rewards response based on the context it is used

func (*SearchLoyaltyRewardsResponse) MarshalBinary

func (m *SearchLoyaltyRewardsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchLoyaltyRewardsResponse) UnmarshalBinary

func (m *SearchLoyaltyRewardsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchLoyaltyRewardsResponse) Validate

func (m *SearchLoyaltyRewardsResponse) Validate(formats strfmt.Registry) error

Validate validates this search loyalty rewards response

type SearchOrdersCustomerFilter

type SearchOrdersCustomerFilter struct {

	// List of customer IDs to filter by.
	//
	// Max: 10 customer IDs.
	CustomerIds []string `json:"customer_ids"`
}

SearchOrdersCustomerFilter Filter based on Order `customer_id` and any Tender `customer_id` associated with the Order. Does not filter based on the [FulfillmentRecipient](#type-orderfulfillmentrecipient) `customer_id`.

swagger:model SearchOrdersCustomerFilter

func (*SearchOrdersCustomerFilter) ContextValidate

func (m *SearchOrdersCustomerFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this search orders customer filter based on context it is used

func (*SearchOrdersCustomerFilter) MarshalBinary

func (m *SearchOrdersCustomerFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchOrdersCustomerFilter) UnmarshalBinary

func (m *SearchOrdersCustomerFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchOrdersCustomerFilter) Validate

func (m *SearchOrdersCustomerFilter) Validate(formats strfmt.Registry) error

Validate validates this search orders customer filter

type SearchOrdersDateTimeFilter

type SearchOrdersDateTimeFilter struct {

	// Time range for filtering on the `closed_at` timestamp. If you use this
	// value, you must also set the `sort_field` in the OrdersSearchSort object to
	// `CLOSED_AT`.
	ClosedAt *TimeRange `json:"closed_at,omitempty"`

	// Time range for filtering on the `created_at` timestamp. If you use this
	// value, you must also set the `sort_field` in the OrdersSearchSort object to
	// `CREATED_AT`.
	CreatedAt *TimeRange `json:"created_at,omitempty"`

	// Time range for filtering on the `updated_at` timestamp. If you use this
	// value, you must also set the `sort_field` in the OrdersSearchSort object to
	// `UPDATED_AT`.
	UpdatedAt *TimeRange `json:"updated_at,omitempty"`
}

SearchOrdersDateTimeFilter Filter for `Order` objects based on whether their `CREATED_AT`, `CLOSED_AT` or `UPDATED_AT` timestamps fall within a specified time range. You can specify the time range and which timestamp to filter for. You can filter for only one time range at a time.

For each time range, the start time and end time are inclusive. If the end time is absent, it defaults to the time of the first request for the cursor.

__Important:__ If you use the DateTimeFilter in a SearchOrders query, you must also set the `sort_field` in [OrdersSort](#type-searchorderordersort) to the same field you filter for. For example, if you set the `CLOSED_AT` field in DateTimeFilter, you must also set the `sort_field` in SearchOrdersSort to `CLOSED_AT`. Otherwise, SearchOrders will throw an error. [Learn more about filtering orders by time range](/orders-api/manage-orders#important-note-on-filtering-orders-by-time-range).

swagger:model SearchOrdersDateTimeFilter

func (*SearchOrdersDateTimeFilter) ContextValidate

func (m *SearchOrdersDateTimeFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search orders date time filter based on the context it is used

func (*SearchOrdersDateTimeFilter) MarshalBinary

func (m *SearchOrdersDateTimeFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchOrdersDateTimeFilter) UnmarshalBinary

func (m *SearchOrdersDateTimeFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchOrdersDateTimeFilter) Validate

func (m *SearchOrdersDateTimeFilter) Validate(formats strfmt.Registry) error

Validate validates this search orders date time filter

type SearchOrdersFilter

type SearchOrdersFilter struct {

	// Filter by customers associated with the order.
	CustomerFilter *SearchOrdersCustomerFilter `json:"customer_filter,omitempty"`

	// Filter for results within a time range.
	//
	// __Important:__ If you filter for orders by time range, you must set SearchOrdersSort
	// to sort by the same field.
	// [Learn more about filtering orders by time range](https://developer.squareup.com/docs/orders-api/manage-orders#important-note-on-filtering-orders-by-time-range)
	DateTimeFilter *SearchOrdersDateTimeFilter `json:"date_time_filter,omitempty"`

	// Filter by fulfillment type or state.
	FulfillmentFilter *SearchOrdersFulfillmentFilter `json:"fulfillment_filter,omitempty"`

	// Filter by source of order.
	SourceFilter *SearchOrdersSourceFilter `json:"source_filter,omitempty"`

	// Filter by “OrderState“.
	StateFilter *SearchOrdersStateFilter `json:"state_filter,omitempty"`
}

SearchOrdersFilter Filtering criteria to use for a SearchOrders request. Multiple filters will be ANDed together.

swagger:model SearchOrdersFilter

func (*SearchOrdersFilter) ContextValidate

func (m *SearchOrdersFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search orders filter based on the context it is used

func (*SearchOrdersFilter) MarshalBinary

func (m *SearchOrdersFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchOrdersFilter) UnmarshalBinary

func (m *SearchOrdersFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchOrdersFilter) Validate

func (m *SearchOrdersFilter) Validate(formats strfmt.Registry) error

Validate validates this search orders filter

type SearchOrdersFulfillmentFilter

type SearchOrdersFulfillmentFilter struct {

	// List of `fulfillment states` to filter
	// for. Will return orders if any of its fulfillments match any of the
	// fulfillment states listed in this field.
	// See [OrderFulfillmentState](#type-orderfulfillmentstate) for possible values
	FulfillmentStates []string `json:"fulfillment_states"`

	// List of `fulfillment types` to filter
	// for. Will return orders if any of its fulfillments match any of the fulfillment types
	// listed in this field.
	// See [OrderFulfillmentType](#type-orderfulfillmenttype) for possible values
	FulfillmentTypes []string `json:"fulfillment_types"`
}

SearchOrdersFulfillmentFilter Filter based on [Order Fulfillment](#type-orderfulfillment) information.

swagger:model SearchOrdersFulfillmentFilter

func (*SearchOrdersFulfillmentFilter) ContextValidate

func (m *SearchOrdersFulfillmentFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this search orders fulfillment filter based on context it is used

func (*SearchOrdersFulfillmentFilter) MarshalBinary

func (m *SearchOrdersFulfillmentFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchOrdersFulfillmentFilter) UnmarshalBinary

func (m *SearchOrdersFulfillmentFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchOrdersFulfillmentFilter) Validate

func (m *SearchOrdersFulfillmentFilter) Validate(formats strfmt.Registry) error

Validate validates this search orders fulfillment filter

type SearchOrdersQuery

type SearchOrdersQuery struct {

	// Criteria to filter results by.
	Filter *SearchOrdersFilter `json:"filter,omitempty"`

	// Criteria to sort results by.
	Sort *SearchOrdersSort `json:"sort,omitempty"`
}

SearchOrdersQuery Contains query criteria for the search.

swagger:model SearchOrdersQuery

func (*SearchOrdersQuery) ContextValidate

func (m *SearchOrdersQuery) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search orders query based on the context it is used

func (*SearchOrdersQuery) MarshalBinary

func (m *SearchOrdersQuery) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchOrdersQuery) UnmarshalBinary

func (m *SearchOrdersQuery) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchOrdersQuery) Validate

func (m *SearchOrdersQuery) Validate(formats strfmt.Registry) error

Validate validates this search orders query

type SearchOrdersRequest

type SearchOrdersRequest struct {

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this to retrieve the next set of results for your original query.
	// See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`

	// Maximum number of results to be returned in a single page. It is
	// possible to receive fewer results than the specified limit on a given page.
	//
	// Default: `500`
	// Minimum: 1
	Limit int64 `json:"limit,omitempty"`

	// The location IDs for the orders to query. All locations must belong to
	// the same merchant.
	//
	// Min: 1 location IDs.
	//
	// Max: 10 location IDs.
	LocationIds []string `json:"location_ids"`

	// Query conditions used to filter or sort the results. Note that when
	// fetching additional pages using a cursor, the query must be equal to the
	// query used to fetch the first page of results.
	Query *SearchOrdersQuery `json:"query,omitempty"`

	// Boolean that controls the format of the search results. If `true`,
	// SearchOrders will return “OrderEntry“ objects. If `false`, SearchOrders
	// will return complete Order objects.
	//
	// Default: `false`.
	ReturnEntries bool `json:"return_entries,omitempty"`
}

SearchOrdersRequest The request does not have any required fields. When given no query criteria, SearchOrders will return all results for all of the merchant’s locations. When fetching additional pages using a `cursor`, the `query` must be equal to the `query` used to fetch the first page of results. Example: {"request_body":{"limit":3,"location_ids":["057P5VYJ4A5X1","18YC4JDH91E1H"],"query":{"filter":{"date_time_filter":{"closed_at":{"end_at":"2019-03-04T21:54:45+00:00","start_at":"2018-03-03T20:00:00+00:00"}},"state_filter":{"states":["COMPLETED"]}},"sort":{"sort_field":"CLOSED_AT","sort_order":"DESC"}},"return_entries":true}}

swagger:model SearchOrdersRequest

func (*SearchOrdersRequest) ContextValidate

func (m *SearchOrdersRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search orders request based on the context it is used

func (*SearchOrdersRequest) MarshalBinary

func (m *SearchOrdersRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchOrdersRequest) UnmarshalBinary

func (m *SearchOrdersRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchOrdersRequest) Validate

func (m *SearchOrdersRequest) Validate(formats strfmt.Registry) error

Validate validates this search orders request

type SearchOrdersResponse

type SearchOrdersResponse struct {

	// The pagination cursor to be used in a subsequent request. If unset,
	// this is the final response.
	// See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`

	// `Errors` encountered during the search.
	Errors []*Error `json:"errors"`

	// List of `OrderEntries` that fit the query
	// conditions. Populated only if `return_entries` was set to `true` in the request.
	OrderEntries []*OrderEntry `json:"order_entries"`

	// List of
	// `Order` objects that match query conditions. Populated only if
	// `return_entries` in the request is set to `false`.
	Orders []*Order `json:"orders"`
}

SearchOrdersResponse Only one of `order_entries` or `orders` fields will be set, depending on whether `return_entries` was set on the SearchOrdersRequest(#type-searchorderrequest). Example: {"cursor":"123","order_entries":[{"location_id":"057P5VYJ4A5X1","order_id":"CAISEM82RcpmcFBM0TfOyiHV3es","version":1},{"location_id":"18YC4JDH91E1H","order_id":"CAISENgvlJ6jLWAzERDzjyHVybY"},{"location_id":"057P5VYJ4A5X1","order_id":"CAISEM52YcpmcWAzERDOyiWS3ty"}]}

swagger:model SearchOrdersResponse

func (*SearchOrdersResponse) ContextValidate

func (m *SearchOrdersResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search orders response based on the context it is used

func (*SearchOrdersResponse) MarshalBinary

func (m *SearchOrdersResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchOrdersResponse) UnmarshalBinary

func (m *SearchOrdersResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchOrdersResponse) Validate

func (m *SearchOrdersResponse) Validate(formats strfmt.Registry) error

Validate validates this search orders response

type SearchOrdersSort

type SearchOrdersSort struct {

	// The field to sort by.
	//
	// __Important:__ When using a `DateTimeFilter`,
	// `sort_field` must match the timestamp field that the DateTimeFilter uses to
	// filter. For example, If you set your `sort_field` to `CLOSED_AT` and you use a
	// DateTimeFilter, your DateTimeFilter must filter for orders by their `CLOSED_AT` date.
	// If this field does not match the timestamp field in `DateTimeFilter`,
	// SearchOrders will return an error.
	//
	// Default: `CREATED_AT`.
	// See [SearchOrdersSortField](#type-searchorderssortfield) for possible values
	// Required: true
	SortField *string `json:"sort_field"`

	// The chronological order in which results are returned. Defaults to `DESC`.
	// See [SortOrder](#type-sortorder) for possible values
	SortOrder string `json:"sort_order,omitempty"`
}

SearchOrdersSort Sorting criteria for a SearchOrders request. Results can only be sorted by a timestamp field.

swagger:model SearchOrdersSort

func (*SearchOrdersSort) ContextValidate

func (m *SearchOrdersSort) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this search orders sort based on context it is used

func (*SearchOrdersSort) MarshalBinary

func (m *SearchOrdersSort) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchOrdersSort) UnmarshalBinary

func (m *SearchOrdersSort) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchOrdersSort) Validate

func (m *SearchOrdersSort) Validate(formats strfmt.Registry) error

Validate validates this search orders sort

type SearchOrdersSortField

type SearchOrdersSortField string

SearchOrdersSortField Specifies which timestamp to use to sort SearchOrder results.

swagger:model SearchOrdersSortField

const (

	// SearchOrdersSortFieldCREATEDAT captures enum value "CREATED_AT"
	SearchOrdersSortFieldCREATEDAT SearchOrdersSortField = "CREATED_AT"

	// SearchOrdersSortFieldUPDATEDAT captures enum value "UPDATED_AT"
	SearchOrdersSortFieldUPDATEDAT SearchOrdersSortField = "UPDATED_AT"

	// SearchOrdersSortFieldCLOSEDAT captures enum value "CLOSED_AT"
	SearchOrdersSortFieldCLOSEDAT SearchOrdersSortField = "CLOSED_AT"
)

func (SearchOrdersSortField) ContextValidate

func (m SearchOrdersSortField) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this search orders sort field based on context it is used

func (SearchOrdersSortField) Validate

func (m SearchOrdersSortField) Validate(formats strfmt.Registry) error

Validate validates this search orders sort field

type SearchOrdersSourceFilter

type SearchOrdersSourceFilter struct {

	// Filters by `Source` `name`. Will return any orders
	// with with a `source.name` that matches any of the listed source names.
	//
	// Max: 10 source names.
	SourceNames []string `json:"source_names"`
}

SearchOrdersSourceFilter Filter based on order `source` information.

swagger:model SearchOrdersSourceFilter

func (*SearchOrdersSourceFilter) ContextValidate

func (m *SearchOrdersSourceFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this search orders source filter based on context it is used

func (*SearchOrdersSourceFilter) MarshalBinary

func (m *SearchOrdersSourceFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchOrdersSourceFilter) UnmarshalBinary

func (m *SearchOrdersSourceFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchOrdersSourceFilter) Validate

func (m *SearchOrdersSourceFilter) Validate(formats strfmt.Registry) error

Validate validates this search orders source filter

type SearchOrdersStateFilter

type SearchOrdersStateFilter struct {

	// States to filter for.
	// See [OrderState](#type-orderstate) for possible values
	// Required: true
	States []string `json:"states"`
}

SearchOrdersStateFilter Filter by current Order `state`.

swagger:model SearchOrdersStateFilter

func (*SearchOrdersStateFilter) ContextValidate

func (m *SearchOrdersStateFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this search orders state filter based on context it is used

func (*SearchOrdersStateFilter) MarshalBinary

func (m *SearchOrdersStateFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchOrdersStateFilter) UnmarshalBinary

func (m *SearchOrdersStateFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchOrdersStateFilter) Validate

func (m *SearchOrdersStateFilter) Validate(formats strfmt.Registry) error

Validate validates this search orders state filter

type SearchShiftsRequest

type SearchShiftsRequest struct {

	// opaque cursor for fetching the next page.
	Cursor string `json:"cursor,omitempty"`

	// number of resources in a page (200 by default).
	// Maximum: 200
	// Minimum: 1
	Limit int64 `json:"limit,omitempty"`

	// Query filters.
	Query *ShiftQuery `json:"query,omitempty"`
}

SearchShiftsRequest A request for a filtered and sorted set of `Shift` objects. Example: {"request_body":{"limit":100,"query":{"filter":{"workday":{"date_range":{"end_date":"2019-02-03","start_date":"2019-01-20"},"default_timezone":"America/Los_Angeles","match_shifts_by":"START_AT"}}}}}

swagger:model SearchShiftsRequest

func (*SearchShiftsRequest) ContextValidate

func (m *SearchShiftsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search shifts request based on the context it is used

func (*SearchShiftsRequest) MarshalBinary

func (m *SearchShiftsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchShiftsRequest) UnmarshalBinary

func (m *SearchShiftsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchShiftsRequest) Validate

func (m *SearchShiftsRequest) Validate(formats strfmt.Registry) error

Validate validates this search shifts request

type SearchShiftsResponse

type SearchShiftsResponse struct {

	// Opaque cursor for fetching the next page.
	Cursor string `json:"cursor,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// Shifts
	Shifts []*Shift `json:"shifts"`
}

SearchShiftsResponse The response to a request for `Shift` objects. Contains the requested `Shift` objects. May contain a set of `Error` objects if the request resulted in errors. Example: {"shifts":[{"breaks":[{"break_type_id":"REGS1EQR1TPZ5","end_at":"2019-01-21T06:11:00-05:00","expected_duration":"PT10M","id":"SJW7X6AKEJQ65","is_paid":true,"name":"Tea Break","start_at":"2019-01-21T06:11:00-05:00"}],"created_at":"2019-01-24T01:12:03Z","employee_id":"ormj0jJJZ5OZIzxrZYJI","end_at":"2019-01-21T13:11:00-05:00","id":"X714F3HA6D1PT","location_id":"PAA1RJZZKXBFG","start_at":"2019-01-21T03:11:00-05:00","status":"CLOSED","team_member_id":"ormj0jJJZ5OZIzxrZYJI","timezone":"America/New_York","updated_at":"2019-02-07T22:21:08Z","version":6,"wage":{"hourly_rate":{"amount":1100,"currency":"USD"},"title":"Barista"}},{"breaks":[{"break_type_id":"WQX00VR99F53J","end_at":"2019-01-23T14:40:00-05:00","expected_duration":"PT10M","id":"BKS6VR7WR748A","is_paid":true,"name":"Tea Break","start_at":"2019-01-23T14:30:00-05:00"},{"break_type_id":"P6Q468ZFRN1AC","end_at":"2019-01-22T12:44:00-05:00","expected_duration":"PT15M","id":"BQFEZSHFZSC51","is_paid":false,"name":"Coffee Break","start_at":"2019-01-22T12:30:00-05:00"}],"created_at":"2019-01-23T23:32:45Z","employee_id":"33fJchumvVdJwxV0H6L9","end_at":"2019-01-22T13:02:00-05:00","id":"GDHYBZYWK0P2V","location_id":"PAA1RJZZKXBFG","start_at":"2019-01-22T12:02:00-05:00","status":"CLOSED","team_member_id":"33fJchumvVdJwxV0H6L9","timezone":"America/New_York","updated_at":"2019-01-24T00:56:25Z","version":16,"wage":{"hourly_rate":{"amount":1600,"currency":"USD"},"title":"Cook"}}]}

swagger:model SearchShiftsResponse

func (*SearchShiftsResponse) ContextValidate

func (m *SearchShiftsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search shifts response based on the context it is used

func (*SearchShiftsResponse) MarshalBinary

func (m *SearchShiftsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchShiftsResponse) UnmarshalBinary

func (m *SearchShiftsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchShiftsResponse) Validate

func (m *SearchShiftsResponse) Validate(formats strfmt.Registry) error

Validate validates this search shifts response

type SearchSubscriptionsFilter

type SearchSubscriptionsFilter struct {

	// A filter to select subscriptions based on the customer.
	CustomerIds []string `json:"customer_ids"`

	// A filter to select subscriptions based the location.
	LocationIds []string `json:"location_ids"`
}

SearchSubscriptionsFilter Represents a set of SearchSubscriptionsQuery filters used to limit the set of Subscriptions returned by SearchSubscriptions.

swagger:model SearchSubscriptionsFilter

func (*SearchSubscriptionsFilter) ContextValidate

func (m *SearchSubscriptionsFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this search subscriptions filter based on context it is used

func (*SearchSubscriptionsFilter) MarshalBinary

func (m *SearchSubscriptionsFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchSubscriptionsFilter) UnmarshalBinary

func (m *SearchSubscriptionsFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchSubscriptionsFilter) Validate

func (m *SearchSubscriptionsFilter) Validate(formats strfmt.Registry) error

Validate validates this search subscriptions filter

type SearchSubscriptionsQuery

type SearchSubscriptionsQuery struct {

	// A list of filtering criteria.
	Filter *SearchSubscriptionsFilter `json:"filter,omitempty"`
}

SearchSubscriptionsQuery Represents a query (including filtering criteria) used to search for subscriptions.

swagger:model SearchSubscriptionsQuery

func (*SearchSubscriptionsQuery) ContextValidate

func (m *SearchSubscriptionsQuery) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search subscriptions query based on the context it is used

func (*SearchSubscriptionsQuery) MarshalBinary

func (m *SearchSubscriptionsQuery) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchSubscriptionsQuery) UnmarshalBinary

func (m *SearchSubscriptionsQuery) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchSubscriptionsQuery) Validate

func (m *SearchSubscriptionsQuery) Validate(formats strfmt.Registry) error

Validate validates this search subscriptions query

type SearchSubscriptionsRequest

type SearchSubscriptionsRequest struct {

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this to retrieve the next set of results for the original query.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination).
	Cursor string `json:"cursor,omitempty"`

	// The upper limit on the number of subscriptions to return
	// in the response.
	//
	// Default: `200`
	// Minimum: 1
	Limit int64 `json:"limit,omitempty"`

	// Query subscriptions based on the given conditions and sort order.
	// Calling SearchSubscriptions without an explicit query parameter will return all subscriptions.
	Query *SearchSubscriptionsQuery `json:"query,omitempty"`
}

SearchSubscriptionsRequest Defines parameters in a [SearchSubscriptions](#endpoint-subscriptions-searchsubscriptions) endpoint request. Example: {"request_body":{"query":{"filter":{"customer_ids":["CHFGVKYY8RSV93M5KCYTG4PN0G"],"location_ids":["S8GWD5R9QB376"]}}}}

swagger:model SearchSubscriptionsRequest

func (*SearchSubscriptionsRequest) ContextValidate

func (m *SearchSubscriptionsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search subscriptions request based on the context it is used

func (*SearchSubscriptionsRequest) MarshalBinary

func (m *SearchSubscriptionsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchSubscriptionsRequest) UnmarshalBinary

func (m *SearchSubscriptionsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchSubscriptionsRequest) Validate

func (m *SearchSubscriptionsRequest) Validate(formats strfmt.Registry) error

Validate validates this search subscriptions request

type SearchSubscriptionsResponse

type SearchSubscriptionsResponse struct {

	// When a response is truncated, it includes a cursor that you can
	// use in a subsequent request to fetch the next set of subscriptions.
	// If empty, this is the final response.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination).
	Cursor string `json:"cursor,omitempty"`

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The search result.
	Subscriptions []*Subscription `json:"subscriptions"`
}

SearchSubscriptionsResponse Defines the fields that are included in the response from the [SearchSubscriptions](#endpoint-subscriptions-searchsubscriptions) endpoint. Example: {"subscriptions":[{"canceled_date":"2020-04-14","card_id":"ccof:mueUsvgajChmjEbp4GB","charged_through_date":"2020-05-14","created_at":"2020-08-03T21:53:10Z","customer_id":"CHFGVKYY8RSV93M5KCYTG4PN0G","id":"de86fc96-8664-474b-af1a-abbe59cacf0e","location_id":"S8GWD5R9QB376","paid_until_date":"2020-05-14","plan_id":"L3TJVDHVBEQEGQDEZL2JJM7R","start_date":"2020-04-14","status":"CANCELED","timezone":"UTC"},{"created_at":"2020-08-03T21:53:10Z","customer_id":"CHFGVKYY8RSV93M5KCYTG4PN0G","id":"56214fb2-cc85-47a1-93bc-44f3766bb56f","location_id":"S8GWD5R9QB376","plan_id":"6JHXF3B2CW3YKHDV4XEM674H","price_override_money":{"amount":100,"currency":"USD"},"start_date":"2020-08-01","status":"PENDING","tax_percentage":"5","timezone":"America/Los_Angeles","version":1594155459464},{"charged_through_date":"2020-06-11","created_at":"2020-08-03T21:53:10Z","customer_id":"CHFGVKYY8RSV93M5KCYTG4PN0G","id":"8151fc89-da15-4eb9-a685-1a70883cebfc","invoice_ids":["grebK0Q_l8H4fqoMMVvt-Q","rcX_i3sNmHTGKhI4W2mceA"],"location_id":"S8GWD5R9QB376","paid_until_date":"2020-06-11","plan_id":"6JHXF3B2CW3YKHDV4XEM674H","price_override_money":{"amount":1000,"currency":"USD"},"start_date":"2020-05-11","status":"ACTIVE","timezone":"America/Los_Angeles"}]}

swagger:model SearchSubscriptionsResponse

func (*SearchSubscriptionsResponse) ContextValidate

func (m *SearchSubscriptionsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search subscriptions response based on the context it is used

func (*SearchSubscriptionsResponse) MarshalBinary

func (m *SearchSubscriptionsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchSubscriptionsResponse) UnmarshalBinary

func (m *SearchSubscriptionsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchSubscriptionsResponse) Validate

func (m *SearchSubscriptionsResponse) Validate(formats strfmt.Registry) error

Validate validates this search subscriptions response

type SearchTeamMembersFilter

type SearchTeamMembersFilter struct {

	// When present, filter by team members assigned to the specified locations.
	// When empty, include team members assigned to any location.
	LocationIds []string `json:"location_ids"`

	// When present, filter by team members who match the given status.
	// When empty, include team members of all statuses.
	// See [TeamMemberStatus](#type-teammemberstatus) for possible values
	Status string `json:"status,omitempty"`
}

SearchTeamMembersFilter Represents a filter used in a search for `TeamMember` objects. `AND` logic is applied between the individual fields, and `OR` logic is applied within list-based fields. For example, setting this filter value, ``` filter = (locations_ids = ["A", "B"], status = ACTIVE) ``` returns only active team members assigned to either location "A" or "B".

swagger:model SearchTeamMembersFilter

func (*SearchTeamMembersFilter) ContextValidate

func (m *SearchTeamMembersFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this search team members filter based on context it is used

func (*SearchTeamMembersFilter) MarshalBinary

func (m *SearchTeamMembersFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchTeamMembersFilter) UnmarshalBinary

func (m *SearchTeamMembersFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchTeamMembersFilter) Validate

func (m *SearchTeamMembersFilter) Validate(formats strfmt.Registry) error

Validate validates this search team members filter

type SearchTeamMembersQuery

type SearchTeamMembersQuery struct {

	// The options to filter by.
	Filter *SearchTeamMembersFilter `json:"filter,omitempty"`
}

SearchTeamMembersQuery Represents the parameters in a search for `TeamMember` objects.

swagger:model SearchTeamMembersQuery

func (*SearchTeamMembersQuery) ContextValidate

func (m *SearchTeamMembersQuery) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search team members query based on the context it is used

func (*SearchTeamMembersQuery) MarshalBinary

func (m *SearchTeamMembersQuery) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchTeamMembersQuery) UnmarshalBinary

func (m *SearchTeamMembersQuery) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchTeamMembersQuery) Validate

func (m *SearchTeamMembersQuery) Validate(formats strfmt.Registry) error

Validate validates this search team members query

type SearchTeamMembersRequest

type SearchTeamMembersRequest struct {

	// The opaque cursor for fetching the next page. Read about
	// [pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) with Square APIs for more information.
	Cursor string `json:"cursor,omitempty"`

	// The maximum number of `TeamMember` objects in a page (25 by default).
	// Maximum: 25
	// Minimum: 1
	Limit int64 `json:"limit,omitempty"`

	// The query parameters.
	Query *SearchTeamMembersQuery `json:"query,omitempty"`
}

SearchTeamMembersRequest Represents a search request for a filtered list of `TeamMember` objects. Example: {"request_body":{"limit":10,"query":{"filter":{"location_ids":["0G5P3VGACMMQZ"],"status":"ACTIVE"}}}}

swagger:model SearchTeamMembersRequest

func (*SearchTeamMembersRequest) ContextValidate

func (m *SearchTeamMembersRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search team members request based on the context it is used

func (*SearchTeamMembersRequest) MarshalBinary

func (m *SearchTeamMembersRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchTeamMembersRequest) UnmarshalBinary

func (m *SearchTeamMembersRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchTeamMembersRequest) Validate

func (m *SearchTeamMembersRequest) Validate(formats strfmt.Registry) error

Validate validates this search team members request

type SearchTeamMembersResponse

type SearchTeamMembersResponse struct {

	// The opaque cursor for fetching the next page. Read about
	// [pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) with Square APIs for more information.
	Cursor string `json:"cursor,omitempty"`

	// The errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The filtered list of `TeamMember` objects.
	TeamMembers []*TeamMember `json:"team_members"`
}

SearchTeamMembersResponse Represents a response from a search request, containing a filtered list of `TeamMember` objects. Example: {"cursor":"N:9UglUjOXQ13-hMFypCft","team_members":[{"assigned_locations":{"assignment_type":"ALL_CURRENT_AND_FUTURE_LOCATIONS"},"created_at":"2019-07-10T17:26:48Z","email_address":"johnny_cash@squareup.com","family_name":"Cash","given_name":"Johnny","id":"-3oZQKPKVk6gUXU_V5Qa","is_owner":false,"reference_id":"12345678","status":"ACTIVE","updated_at":"2020-04-28T21:49:28.957Z"},{"assigned_locations":{"assignment_type":"ALL_CURRENT_AND_FUTURE_LOCATIONS"},"created_at":"2020-03-24T18:14:01.127Z","family_name":"Smith","given_name":"Lombard","id":"1AVJj0DjkzbmbJw5r4KK","is_owner":false,"phone_number":"+14155552671","reference_id":"abcded","status":"ACTIVE","updated_at":"2020-06-09T17:38:05.423Z"},{"assigned_locations":{"assignment_type":"ALL_CURRENT_AND_FUTURE_LOCATIONS"},"created_at":"2020-03-24T01:09:25.010Z","family_name":"Sway","given_name":"Monica","id":"2JCmiJol_KKFs9z2Evim","is_owner":false,"status":"ACTIVE","updated_at":"2020-03-24T01:09:25.010Z"},{"assigned_locations":{"assignment_type":"ALL_CURRENT_AND_FUTURE_LOCATIONS"},"created_at":"2020-03-24T01:09:23.464Z","family_name":"Ipsum","given_name":"Elton","id":"4uXcJQSLtbk3F0UQHFNQ","is_owner":false,"status":"ACTIVE","updated_at":"2020-03-24T01:09:23.464Z"},{"assigned_locations":{"assignment_type":"ALL_CURRENT_AND_FUTURE_LOCATIONS"},"created_at":"2020-03-24T01:09:23.074Z","family_name":"Lo","given_name":"Steven","id":"5CoUpyrw1YwGWcRd-eDL","is_owner":false,"status":"ACTIVE","updated_at":"2020-03-24T01:09:23.074Z"},{"assigned_locations":{"assignment_type":"ALL_CURRENT_AND_FUTURE_LOCATIONS"},"created_at":"2020-03-24T18:14:03.865Z","email_address":"patrick_steward@gmail.com","family_name":"Steward","given_name":"Patrick","id":"5MRPTTp8MMBLVSmzrGha","is_owner":false,"phone_number":"+14155552671","status":"ACTIVE","updated_at":"2020-03-24T18:14:03.865Z"},{"assigned_locations":{"assignment_type":"ALL_CURRENT_AND_FUTURE_LOCATIONS"},"created_at":"2020-03-24T01:09:25.180Z","family_name":"Manny","given_name":"Ivy","id":"7F5ZxsfRnkexhu1PTbfh","is_owner":false,"status":"ACTIVE","updated_at":"2020-03-24T01:09:25.180Z"},{"assigned_locations":{"assignment_type":"ALL_CURRENT_AND_FUTURE_LOCATIONS"},"created_at":"2020-03-24T18:14:02.797Z","email_address":"john_smith@gmail.com","family_name":"Smith","given_name":"John","id":"808X9HR72yKvVaigQXf4","is_owner":false,"phone_number":"+14155552671","status":"ACTIVE","updated_at":"2020-03-24T18:14:02.797Z"},{"assigned_locations":{"assignment_type":"ALL_CURRENT_AND_FUTURE_LOCATIONS"},"created_at":"2020-03-24T18:14:00.399Z","email_address":"r_wen@gmail.com","family_name":"Wen","given_name":"Robert","id":"9MVDVoY4hazkWKGo_OuZ","is_owner":false,"phone_number":"+14155552671","status":"ACTIVE","updated_at":"2020-03-24T18:14:00.399Z"},{"assigned_locations":{"assignment_type":"ALL_CURRENT_AND_FUTURE_LOCATIONS"},"created_at":"2020-03-24T18:14:00.445Z","email_address":"asimpson@gmail.com","family_name":"Simpson","given_name":"Ashley","id":"9UglUjOXQ13-hMFypCft","is_owner":false,"phone_number":"+14155552671","status":"ACTIVE","updated_at":"2020-03-24T18:14:00.445Z"}]}

swagger:model SearchTeamMembersResponse

func (*SearchTeamMembersResponse) ContextValidate

func (m *SearchTeamMembersResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search team members response based on the context it is used

func (*SearchTeamMembersResponse) MarshalBinary

func (m *SearchTeamMembersResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchTeamMembersResponse) UnmarshalBinary

func (m *SearchTeamMembersResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchTeamMembersResponse) Validate

func (m *SearchTeamMembersResponse) Validate(formats strfmt.Registry) error

Validate validates this search team members response

type SearchTerminalCheckoutsRequest

type SearchTerminalCheckoutsRequest struct {

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this to retrieve the next set of results for the original query.
	// See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`

	// Limit the number of results returned for a single request.
	// Maximum: 100
	// Minimum: 1
	Limit int64 `json:"limit,omitempty"`

	// Queries terminal checkouts based on given conditions and sort order.
	// Leaving this unset will return all checkouts with the default sort order.
	Query *TerminalCheckoutQuery `json:"query,omitempty"`
}

SearchTerminalCheckoutsRequest search terminal checkouts request Example: {"request_body":{"limit":2,"query":{"filter":{"status":"COMPLETED"}}}}

swagger:model SearchTerminalCheckoutsRequest

func (*SearchTerminalCheckoutsRequest) ContextValidate

func (m *SearchTerminalCheckoutsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search terminal checkouts request based on the context it is used

func (*SearchTerminalCheckoutsRequest) MarshalBinary

func (m *SearchTerminalCheckoutsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchTerminalCheckoutsRequest) UnmarshalBinary

func (m *SearchTerminalCheckoutsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchTerminalCheckoutsRequest) Validate

func (m *SearchTerminalCheckoutsRequest) Validate(formats strfmt.Registry) error

Validate validates this search terminal checkouts request

type SearchTerminalCheckoutsResponse

type SearchTerminalCheckoutsResponse struct {

	// The requested search result of `TerminalCheckout`s.
	Checkouts []*TerminalCheckout `json:"checkouts"`

	// The pagination cursor to be used in a subsequent request. If empty,
	// this is the final response.
	//
	// See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`

	// Information on errors encountered during the request.
	Errors []*Error `json:"errors"`
}

SearchTerminalCheckoutsResponse search terminal checkouts response Example: {"checkouts":[{"amount_money":{"amount":2610,"currency":"USD"},"app_id":"APP_ID","created_at":"2020-03-31T18:13:15.921Z","deadline_duration":"PT10M","device_options":{"device_id":"dbb5d83a-7838-11ea-bc55-0242ac130003","skip_receipt_screen":false,"tip_settings":{"allow_tipping":false}},"id":"tsQPvzwBpMqqO","note":"A brief note","payment_ids":["rXnhZzywrEk4vR6pw76fPZfgvaB"],"reference_id":"id14467","status":"COMPLETED","updated_at":"2020-03-31T18:13:52.725Z"},{"amount_money":{"amount":2610,"currency":"USD"},"app_id":"APP_ID","created_at":"2020-03-31T18:08:31.882Z","deadline_duration":"PT10M","device_options":{"device_id":"dbb5d83a-7838-11ea-bc55-0242ac130003","skip_receipt_screen":true,"tip_settings":{"allow_tipping":false}},"id":"XlOPTgcEhrbqO","note":"A brief note","payment_ids":["VYBF861PaoKPP7Pih0TlbZiNvaB"],"reference_id":"id41623","status":"COMPLETED","updated_at":"2020-03-31T18:08:41.635Z"}],"cursor":"RiTJqBoTuXlbLmmrPvEkX9iG7XnQ4W4RjGnH"}

swagger:model SearchTerminalCheckoutsResponse

func (*SearchTerminalCheckoutsResponse) ContextValidate

func (m *SearchTerminalCheckoutsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search terminal checkouts response based on the context it is used

func (*SearchTerminalCheckoutsResponse) MarshalBinary

func (m *SearchTerminalCheckoutsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchTerminalCheckoutsResponse) UnmarshalBinary

func (m *SearchTerminalCheckoutsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchTerminalCheckoutsResponse) Validate

Validate validates this search terminal checkouts response

type SearchTerminalRefundsRequest

type SearchTerminalRefundsRequest struct {

	// A pagination cursor returned by a previous call to this endpoint.
	// Provide this to retrieve the next set of results for the original query.
	Cursor string `json:"cursor,omitempty"`

	// Limit the number of results returned for a single request.
	// Maximum: 100
	// Minimum: 1
	Limit int64 `json:"limit,omitempty"`

	// Query the terminal refunds based on given conditions and sort order. Calling
	// `SearchTerminalRefunds` without an explicitly query parameter will return all available
	// refunds with the default sort order.
	Query *TerminalRefundQuery `json:"query,omitempty"`
}

SearchTerminalRefundsRequest search terminal refunds request Example: {"request_body":{"limit":1,"query":{"filter":{"status":"COMPLETED"}}}}

swagger:model SearchTerminalRefundsRequest

func (*SearchTerminalRefundsRequest) ContextValidate

func (m *SearchTerminalRefundsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search terminal refunds request based on the context it is used

func (*SearchTerminalRefundsRequest) MarshalBinary

func (m *SearchTerminalRefundsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchTerminalRefundsRequest) UnmarshalBinary

func (m *SearchTerminalRefundsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchTerminalRefundsRequest) Validate

func (m *SearchTerminalRefundsRequest) Validate(formats strfmt.Registry) error

Validate validates this search terminal refunds request

type SearchTerminalRefundsResponse

type SearchTerminalRefundsResponse struct {

	// The pagination cursor to be used in a subsequent request. If empty,
	// this is the final response.
	//
	// See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information.
	Cursor string `json:"cursor,omitempty"`

	// Information on errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The requested search result of `TerminalRefund`s.
	Refunds []*TerminalRefund `json:"refunds"`
}

SearchTerminalRefundsResponse search terminal refunds response Example: {"refunds":[{"amount_money":{"amount":111,"currency":"CAD"},"app_id":"sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ","card":{"bin":"411111","card_brand":"INTERAC","card_type":"CREDIT","exp_month":1,"exp_year":2022,"fingerprint":"sq-1-B1fP9MNNmZgVVaPKRND6oDKYbz25S2cTvg9Mzwg3RMTK1zT1PiGRT-AE3nTA8vSmmw","last_4":"1111"},"created_at":"2020-09-29T15:21:46.771Z","deadline_duration":"PT5M","device_id":"f72dfb8e-4d65-4e56-aade-ec3fb8d33291","id":"009DP5HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY","location_id":"76C9W6K8CNNQ5","order_id":"kcuKDKreRaI4gF4TjmEgZjHk8Z7YY","payment_id":"5O5OvgkcNUhl7JBuINflcjKqUzXZY","reason":"Returning item","refund_id":"5O5OvgkcNUhl7JBuINflcjKqUzXZY_43Q4iGp7sNeATiWrUruA1EYeMRUXaddXXlDDJ1EQLvb","status":"COMPLETED","updated_at":"2020-09-29T15:21:48.675Z"}]}

swagger:model SearchTerminalRefundsResponse

func (*SearchTerminalRefundsResponse) ContextValidate

func (m *SearchTerminalRefundsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this search terminal refunds response based on the context it is used

func (*SearchTerminalRefundsResponse) MarshalBinary

func (m *SearchTerminalRefundsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SearchTerminalRefundsResponse) UnmarshalBinary

func (m *SearchTerminalRefundsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SearchTerminalRefundsResponse) Validate

func (m *SearchTerminalRefundsResponse) Validate(formats strfmt.Registry) error

Validate validates this search terminal refunds response

type SegmentFilter

type SegmentFilter struct {

	// The ID of the `CatalogItemVariation` representing the service booked in this segment.
	// Required: true
	// Min Length: 1
	ServiceVariationID *string `json:"service_variation_id"`

	// A query expression specifying which team members satisfy the condition. Supported expressions are
	// - `ANY`: include team members whose IDs match any member of the specified list.
	// - `NONE`: exclude team members whose IDs match members of the specified list.
	//
	// The `ALL` expression is not supported in the Bookings API.
	// When no expression is specified, any service-providing team member is eligible to fulfill the Booking.
	TeamMemberIDFilter *FilterValue `json:"team_member_id_filter,omitempty"`
}

SegmentFilter A query filter to search for appointment segments by.

swagger:model SegmentFilter

func (*SegmentFilter) ContextValidate

func (m *SegmentFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this segment filter based on the context it is used

func (*SegmentFilter) MarshalBinary

func (m *SegmentFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SegmentFilter) UnmarshalBinary

func (m *SegmentFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SegmentFilter) Validate

func (m *SegmentFilter) Validate(formats strfmt.Registry) error

Validate validates this segment filter

type Shift

type Shift struct {

	// A list of any paid or unpaid breaks that were taken during this shift.
	Breaks []*Break `json:"breaks"`

	// A read-only timestamp in RFC 3339 format; presented in UTC.
	CreatedAt string `json:"created_at,omitempty"`

	// The ID of the employee this shift belongs to. DEPRECATED at version 2020-08-26. Use `team_member_id` instead
	EmployeeID string `json:"employee_id,omitempty"`

	// RFC 3339; shifted to timezone + offset. Precision up to the minute is
	// respected; seconds are truncated.
	EndAt string `json:"end_at,omitempty"`

	// UUID for this object
	// Max Length: 255
	ID string `json:"id,omitempty"`

	// The ID of the location this shift occurred at. Should be based on
	// where the employee clocked in.
	LocationID string `json:"location_id,omitempty"`

	// RFC 3339; shifted to location timezone + offset. Precision up to the
	// minute is respected; seconds are truncated.
	// Required: true
	// Min Length: 1
	StartAt *string `json:"start_at"`

	// Describes working state of the current `Shift`.
	// See [ShiftStatus](#type-shiftstatus) for possible values
	Status string `json:"status,omitempty"`

	// The ID of the team member this shift belongs to. Replaced `employee_id` at version "2020-08-26"
	TeamMemberID string `json:"team_member_id,omitempty"`

	// Read-only convenience value that is calculated from the location based
	// on `location_id`. Format: the IANA Timezone Database identifier for the
	// location timezone.
	Timezone string `json:"timezone,omitempty"`

	// A read-only timestamp in RFC 3339 format; presented in UTC.
	UpdatedAt string `json:"updated_at,omitempty"`

	// Used for resolving concurrency issues; request will fail if version
	// provided does not match server version at time of request. If not provided,
	// Square executes a blind write; potentially overwriting data from another
	// write.
	Version int64 `json:"version,omitempty"`

	// Job and pay related information. If wage is not set on create, will default to a wage
	// of zero money. If title is not set on create, will default to the name of the role the employee
	// is assigned to, if any.
	Wage *ShiftWage `json:"wage,omitempty"`
}

Shift A record of the hourly rate, start, and end times for a single work shift for an employee. May include a record of the start and end times for breaks taken during the shift.

swagger:model Shift

func (*Shift) ContextValidate

func (m *Shift) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this shift based on the context it is used

func (*Shift) MarshalBinary

func (m *Shift) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Shift) UnmarshalBinary

func (m *Shift) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Shift) Validate

func (m *Shift) Validate(formats strfmt.Registry) error

Validate validates this shift

type ShiftFilter

type ShiftFilter struct {

	// Fetch shifts for the specified employees. DEPRECATED at version 2020-08-26. Use `team_member_ids` instead
	EmployeeIds []string `json:"employee_ids"`

	// Fetch the `Shift`s that end in the time range - Inclusive.
	End *TimeRange `json:"end,omitempty"`

	// Fetch shifts for the specified location.
	// Required: true
	LocationIds []string `json:"location_ids"`

	// Fetch `Shift`s that start in the time range - Inclusive.
	Start *TimeRange `json:"start,omitempty"`

	// Fetch a `Shift` instance by `Shift.status`.
	// See [ShiftFilterStatus](#type-shiftfilterstatus) for possible values
	Status string `json:"status,omitempty"`

	// Fetch shifts for the specified team members. Replaced `employee_ids` at version "2020-08-26"
	// Required: true
	TeamMemberIds []string `json:"team_member_ids"`

	// Fetch the `Shift`s based on workday date range.
	Workday *ShiftWorkday `json:"workday,omitempty"`
}

ShiftFilter Defines a filter used in a search for `Shift` records. `AND` logic is used by Square's servers to apply each filter property specified.

swagger:model ShiftFilter

func (*ShiftFilter) ContextValidate

func (m *ShiftFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this shift filter based on the context it is used

func (*ShiftFilter) MarshalBinary

func (m *ShiftFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ShiftFilter) UnmarshalBinary

func (m *ShiftFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ShiftFilter) Validate

func (m *ShiftFilter) Validate(formats strfmt.Registry) error

Validate validates this shift filter

type ShiftFilterStatus

type ShiftFilterStatus string

ShiftFilterStatus Specifies the `status` of `Shift` records to be returned.

swagger:model ShiftFilterStatus

const (

	// ShiftFilterStatusOPEN captures enum value "OPEN"
	ShiftFilterStatusOPEN ShiftFilterStatus = "OPEN"

	// ShiftFilterStatusCLOSED captures enum value "CLOSED"
	ShiftFilterStatusCLOSED ShiftFilterStatus = "CLOSED"
)

func (ShiftFilterStatus) ContextValidate

func (m ShiftFilterStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this shift filter status based on context it is used

func (ShiftFilterStatus) Validate

func (m ShiftFilterStatus) Validate(formats strfmt.Registry) error

Validate validates this shift filter status

type ShiftQuery

type ShiftQuery struct {

	// Query filter options
	Filter *ShiftFilter `json:"filter,omitempty"`

	// Sort order details
	Sort *ShiftSort `json:"sort,omitempty"`
}

ShiftQuery The parameters of a `Shift` search query. Includes filter and sort options.

swagger:model ShiftQuery

func (*ShiftQuery) ContextValidate

func (m *ShiftQuery) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this shift query based on the context it is used

func (*ShiftQuery) MarshalBinary

func (m *ShiftQuery) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ShiftQuery) UnmarshalBinary

func (m *ShiftQuery) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ShiftQuery) Validate

func (m *ShiftQuery) Validate(formats strfmt.Registry) error

Validate validates this shift query

type ShiftSort

type ShiftSort struct {

	// The field to sort on.
	// See [ShiftSortField](#type-shiftsortfield) for possible values
	Field string `json:"field,omitempty"`

	// The order in which results are returned. Defaults to DESC.
	// See [SortOrder](#type-sortorder) for possible values
	Order string `json:"order,omitempty"`
}

ShiftSort Sets the sort order of search results.

swagger:model ShiftSort

func (*ShiftSort) ContextValidate

func (m *ShiftSort) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this shift sort based on context it is used

func (*ShiftSort) MarshalBinary

func (m *ShiftSort) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ShiftSort) UnmarshalBinary

func (m *ShiftSort) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ShiftSort) Validate

func (m *ShiftSort) Validate(formats strfmt.Registry) error

Validate validates this shift sort

type ShiftSortField

type ShiftSortField string

ShiftSortField Enumerates the `Shift` fields to sort on.

swagger:model ShiftSortField

const (

	// ShiftSortFieldSTARTAT captures enum value "START_AT"
	ShiftSortFieldSTARTAT ShiftSortField = "START_AT"

	// ShiftSortFieldENDAT captures enum value "END_AT"
	ShiftSortFieldENDAT ShiftSortField = "END_AT"

	// ShiftSortFieldCREATEDAT captures enum value "CREATED_AT"
	ShiftSortFieldCREATEDAT ShiftSortField = "CREATED_AT"

	// ShiftSortFieldUPDATEDAT captures enum value "UPDATED_AT"
	ShiftSortFieldUPDATEDAT ShiftSortField = "UPDATED_AT"
)

func (ShiftSortField) ContextValidate

func (m ShiftSortField) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this shift sort field based on context it is used

func (ShiftSortField) Validate

func (m ShiftSortField) Validate(formats strfmt.Registry) error

Validate validates this shift sort field

type ShiftStatus

type ShiftStatus string

ShiftStatus Enumerates the possible status of a `Shift`

swagger:model ShiftStatus

const (

	// ShiftStatusOPEN captures enum value "OPEN"
	ShiftStatusOPEN ShiftStatus = "OPEN"

	// ShiftStatusCLOSED captures enum value "CLOSED"
	ShiftStatusCLOSED ShiftStatus = "CLOSED"
)

func (ShiftStatus) ContextValidate

func (m ShiftStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this shift status based on context it is used

func (ShiftStatus) Validate

func (m ShiftStatus) Validate(formats strfmt.Registry) error

Validate validates this shift status

type ShiftWage

type ShiftWage struct {

	// Can be a custom-set hourly wage or the calculated effective hourly
	// wage based on annual wage and hours worked per week.
	HourlyRate *Money `json:"hourly_rate,omitempty"`

	// The name of the job performed during this shift. Square
	// labor-reporting UIs may group shifts together by title.
	Title string `json:"title,omitempty"`
}

ShiftWage The hourly wage rate used to compensate an employee for this shift.

swagger:model ShiftWage

func (*ShiftWage) ContextValidate

func (m *ShiftWage) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this shift wage based on the context it is used

func (*ShiftWage) MarshalBinary

func (m *ShiftWage) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ShiftWage) UnmarshalBinary

func (m *ShiftWage) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ShiftWage) Validate

func (m *ShiftWage) Validate(formats strfmt.Registry) error

Validate validates this shift wage

type ShiftWorkday

type ShiftWorkday struct {

	// Dates for fetching the shifts
	DateRange *DateRange `json:"date_range,omitempty"`

	// Location-specific timezones convert workdays to datetime filters.
	// Every location included in the query must have a timezone, or this field
	// must be provided as a fallback. Format: the IANA timezone database
	// identifier for the relevant timezone.
	DefaultTimezone string `json:"default_timezone,omitempty"`

	// The strategy on which the dates are applied.
	// See [ShiftWorkdayMatcher](#type-shiftworkdaymatcher) for possible values
	MatchShiftsBy string `json:"match_shifts_by,omitempty"`
}

ShiftWorkday A `Shift` search query filter parameter that sets a range of days that a `Shift` must start or end in before passing the filter condition.

swagger:model ShiftWorkday

func (*ShiftWorkday) ContextValidate

func (m *ShiftWorkday) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this shift workday based on the context it is used

func (*ShiftWorkday) MarshalBinary

func (m *ShiftWorkday) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ShiftWorkday) UnmarshalBinary

func (m *ShiftWorkday) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ShiftWorkday) Validate

func (m *ShiftWorkday) Validate(formats strfmt.Registry) error

Validate validates this shift workday

type ShiftWorkdayMatcher

type ShiftWorkdayMatcher string

ShiftWorkdayMatcher Defines the logic used to apply a workday filter.

swagger:model ShiftWorkdayMatcher

const (

	// ShiftWorkdayMatcherSTARTAT captures enum value "START_AT"
	ShiftWorkdayMatcherSTARTAT ShiftWorkdayMatcher = "START_AT"

	// ShiftWorkdayMatcherENDAT captures enum value "END_AT"
	ShiftWorkdayMatcherENDAT ShiftWorkdayMatcher = "END_AT"

	// ShiftWorkdayMatcherINTERSECTION captures enum value "INTERSECTION"
	ShiftWorkdayMatcherINTERSECTION ShiftWorkdayMatcher = "INTERSECTION"
)

func (ShiftWorkdayMatcher) ContextValidate

func (m ShiftWorkdayMatcher) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this shift workday matcher based on context it is used

func (ShiftWorkdayMatcher) Validate

func (m ShiftWorkdayMatcher) Validate(formats strfmt.Registry) error

Validate validates this shift workday matcher

type SortOrder

type SortOrder string

SortOrder The order (e.g., chronological or alphabetical) in which results from a request are returned.

swagger:model SortOrder

const (

	// SortOrderDESC captures enum value "DESC"
	SortOrderDESC SortOrder = "DESC"

	// SortOrderASC captures enum value "ASC"
	SortOrderASC SortOrder = "ASC"
)

func (SortOrder) ContextValidate

func (m SortOrder) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this sort order based on context it is used

func (SortOrder) Validate

func (m SortOrder) Validate(formats strfmt.Registry) error

Validate validates this sort order

type SourceApplication

type SourceApplication struct {

	// Read-only Square ID assigned to the application. Only used for
	// `Product` type `EXTERNAL_API`.
	ApplicationID string `json:"application_id,omitempty"`

	// Read-only display name assigned to the application
	// (e.g. `"Custom Application"`, `"Square POS 4.74 for Android"`).
	Name string `json:"name,omitempty"`

	// Read-only `Product` type for the application.
	// See [Product](#type-product) for possible values
	Product string `json:"product,omitempty"`
}

SourceApplication Provides information about the application used to generate a change.

swagger:model SourceApplication

func (*SourceApplication) ContextValidate

func (m *SourceApplication) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this source application based on context it is used

func (*SourceApplication) MarshalBinary

func (m *SourceApplication) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SourceApplication) UnmarshalBinary

func (m *SourceApplication) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SourceApplication) Validate

func (m *SourceApplication) Validate(formats strfmt.Registry) error

Validate validates this source application

type StandardUnitDescription

type StandardUnitDescription struct {

	// UI display abbreviation for the measurement unit. For example, 'lb'.
	Abbreviation string `json:"abbreviation,omitempty"`

	// UI display name of the measurement unit. For example, 'Pound'.
	Name string `json:"name,omitempty"`

	// Identifies the measurement unit being described.
	Unit *MeasurementUnit `json:"unit,omitempty"`
}

StandardUnitDescription Contains the name and abbreviation for standard measurement unit.

swagger:model StandardUnitDescription

func (*StandardUnitDescription) ContextValidate

func (m *StandardUnitDescription) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this standard unit description based on the context it is used

func (*StandardUnitDescription) MarshalBinary

func (m *StandardUnitDescription) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*StandardUnitDescription) UnmarshalBinary

func (m *StandardUnitDescription) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*StandardUnitDescription) Validate

func (m *StandardUnitDescription) Validate(formats strfmt.Registry) error

Validate validates this standard unit description

type StandardUnitDescriptionGroup

type StandardUnitDescriptionGroup struct {

	// IETF language tag.
	LanguageCode string `json:"language_code,omitempty"`

	// List of standard (non-custom) measurement units in this description group.
	StandardUnitDescriptions []*StandardUnitDescription `json:"standard_unit_descriptions"`
}

StandardUnitDescriptionGroup Group of standard measurement units.

swagger:model StandardUnitDescriptionGroup

func (*StandardUnitDescriptionGroup) ContextValidate

func (m *StandardUnitDescriptionGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this standard unit description group based on the context it is used

func (*StandardUnitDescriptionGroup) MarshalBinary

func (m *StandardUnitDescriptionGroup) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*StandardUnitDescriptionGroup) UnmarshalBinary

func (m *StandardUnitDescriptionGroup) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*StandardUnitDescriptionGroup) Validate

func (m *StandardUnitDescriptionGroup) Validate(formats strfmt.Registry) error

Validate validates this standard unit description group

type SubmitEvidenceRequest

type SubmitEvidenceRequest interface{}

SubmitEvidenceRequest Defines the parameters for a `SubmitEvidence` request. Example: {"request_body":{}}

swagger:model SubmitEvidenceRequest

type SubmitEvidenceResponse

type SubmitEvidenceResponse struct {

	// The `Dispute` for which evidence was submitted.
	Dispute *Dispute `json:"dispute,omitempty"`

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`
}

SubmitEvidenceResponse Defines the fields in a `SubmitEvidence` response. Example: {"dispute":{"amount_money":{"amount":2000,"currency":"USD"},"brand_dispute_id":"100000399240","card_brand":"visa","created_at":"2018-10-18T16:02:15.313Z","dispute_id":"EAZoK70gX3fyvibecLwIGB","disputed_payments":[{"payment_id":"2yeBUWJzllJTpmnSqtMRAL19taB"}],"due_at":"2018-11-01T00:00:00.000Z","evidence_ids":["CKWRhnZN0eMSUbh38BKmD"],"reason":"NO_KNOWLEDGE","state":"PROCESSING","updated_at":"2018-10-18T16:02:15.313Z"}}

swagger:model SubmitEvidenceResponse

func (*SubmitEvidenceResponse) ContextValidate

func (m *SubmitEvidenceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this submit evidence response based on the context it is used

func (*SubmitEvidenceResponse) MarshalBinary

func (m *SubmitEvidenceResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SubmitEvidenceResponse) UnmarshalBinary

func (m *SubmitEvidenceResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SubmitEvidenceResponse) Validate

func (m *SubmitEvidenceResponse) Validate(formats strfmt.Registry) error

Validate validates this submit evidence response

type Subscription

type Subscription struct {

	// The subscription cancellation date, in YYYY-MM-DD format (for
	// example, 2013-01-15). On this date, the subscription status changes
	// to `CANCELED` and the subscription billing stops.
	// If you don't set this field, the subscription plan dictates if and
	// when subscription ends.
	//
	// You cannot update this field, you can only clear it.
	CanceledDate string `json:"canceled_date,omitempty"`

	// The ID of the `customer](#type-customer) [card`
	// that is charged for the subscription.
	CardID string `json:"card_id,omitempty"`

	// The timestamp when the subscription was created, in RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`

	// The ID of the associated `customer` profile.
	CustomerID string `json:"customer_id,omitempty"`

	// The Square-assigned ID of the subscription.
	// Max Length: 255
	ID string `json:"id,omitempty"`

	// The IDs of the `invoices` created for the
	// subscription, listed in order when the invoices were created
	// (oldest invoices appear first).
	InvoiceIds []string `json:"invoice_ids"`

	// The ID of the location associated with the subscription.
	LocationID string `json:"location_id,omitempty"`

	// The date up to which the customer is invoiced for the
	// subscription, in YYYY-MM-DD format (for example, 2013-01-15).
	//
	// After the invoice is paid for a given billing period,
	// this date will be the last day of the billing period.
	// For example,
	// suppose for the month of May a customer gets an invoice
	// (or charged the card) on May 1. For the monthly billing scenario,
	// this date is then set to May 31.
	PaidUntilDate string `json:"paid_until_date,omitempty"`

	// The ID of the associated `subscription plan`.
	PlanID string `json:"plan_id,omitempty"`

	// A custom price to apply for the subscription. If specified,
	// it overrides the price configured by the subscription plan.
	PriceOverrideMoney *Money `json:"price_override_money,omitempty"`

	// The start date of the subscription, in YYYY-MM-DD format (for example,
	// 2013-01-15).
	StartDate string `json:"start_date,omitempty"`

	// The current status of the subscription.
	// See [SubscriptionStatus](#type-subscriptionstatus) for possible values
	Status string `json:"status,omitempty"`

	// The tax amount applied when billing the subscription. The
	// percentage is expressed in decimal form, using a `'.'` as the decimal
	// separator and without a `'%'` sign. For example, a value of `7.5`
	// corresponds to 7.5%.
	TaxPercentage string `json:"tax_percentage,omitempty"`

	// Timezone that will be used in date calculations for the subscription.
	// Defaults to the timezone of the location based on `location_id`.
	// Format: the IANA Timezone Database identifier for the location timezone (for example, `America/Los_Angeles`).
	Timezone string `json:"timezone,omitempty"`

	// The version of the object. When updating an object, the version
	// supplied must match the version in the database, otherwise the write will
	// be rejected as conflicting.
	Version int64 `json:"version,omitempty"`
}

Subscription Represents a customer subscription to a subscription plan. For an overview of the `Subscription` type, see [Subscription object](/docs/subscriptions-api/overview#subscription-object-overview).

swagger:model Subscription

func (*Subscription) ContextValidate

func (m *Subscription) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this subscription based on the context it is used

func (*Subscription) MarshalBinary

func (m *Subscription) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Subscription) UnmarshalBinary

func (m *Subscription) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Subscription) Validate

func (m *Subscription) Validate(formats strfmt.Registry) error

Validate validates this subscription

type SubscriptionCadence

type SubscriptionCadence string

SubscriptionCadence Determines the billing cadence of a `Subscription`

swagger:model SubscriptionCadence

const (

	// SubscriptionCadenceDAILY captures enum value "DAILY"
	SubscriptionCadenceDAILY SubscriptionCadence = "DAILY"

	// SubscriptionCadenceWEEKLY captures enum value "WEEKLY"
	SubscriptionCadenceWEEKLY SubscriptionCadence = "WEEKLY"

	// SubscriptionCadenceEVERYTWOWEEKS captures enum value "EVERY_TWO_WEEKS"
	SubscriptionCadenceEVERYTWOWEEKS SubscriptionCadence = "EVERY_TWO_WEEKS"

	// SubscriptionCadenceTHIRTYDAYS captures enum value "THIRTY_DAYS"
	SubscriptionCadenceTHIRTYDAYS SubscriptionCadence = "THIRTY_DAYS"

	// SubscriptionCadenceSIXTYDAYS captures enum value "SIXTY_DAYS"
	SubscriptionCadenceSIXTYDAYS SubscriptionCadence = "SIXTY_DAYS"

	// SubscriptionCadenceNINETYDAYS captures enum value "NINETY_DAYS"
	SubscriptionCadenceNINETYDAYS SubscriptionCadence = "NINETY_DAYS"

	// SubscriptionCadenceMONTHLY captures enum value "MONTHLY"
	SubscriptionCadenceMONTHLY SubscriptionCadence = "MONTHLY"

	// SubscriptionCadenceEVERYTWOMONTHS captures enum value "EVERY_TWO_MONTHS"
	SubscriptionCadenceEVERYTWOMONTHS SubscriptionCadence = "EVERY_TWO_MONTHS"

	// SubscriptionCadenceQUARTERLY captures enum value "QUARTERLY"
	SubscriptionCadenceQUARTERLY SubscriptionCadence = "QUARTERLY"

	// SubscriptionCadenceEVERYFOURMONTHS captures enum value "EVERY_FOUR_MONTHS"
	SubscriptionCadenceEVERYFOURMONTHS SubscriptionCadence = "EVERY_FOUR_MONTHS"

	// SubscriptionCadenceEVERYSIXMONTHS captures enum value "EVERY_SIX_MONTHS"
	SubscriptionCadenceEVERYSIXMONTHS SubscriptionCadence = "EVERY_SIX_MONTHS"

	// SubscriptionCadenceANNUAL captures enum value "ANNUAL"
	SubscriptionCadenceANNUAL SubscriptionCadence = "ANNUAL"

	// SubscriptionCadenceEVERYTWOYEARS captures enum value "EVERY_TWO_YEARS"
	SubscriptionCadenceEVERYTWOYEARS SubscriptionCadence = "EVERY_TWO_YEARS"
)

func (SubscriptionCadence) ContextValidate

func (m SubscriptionCadence) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this subscription cadence based on context it is used

func (SubscriptionCadence) Validate

func (m SubscriptionCadence) Validate(formats strfmt.Registry) error

Validate validates this subscription cadence

type SubscriptionEvent

type SubscriptionEvent struct {

	// The date, in YYYY-MM-DD format (for
	// example, 2013-01-15), when the subscription event went into effect.
	// Required: true
	EffectiveDate *string `json:"effective_date"`

	// The ID of the subscription event.
	// Required: true
	ID *string `json:"id"`

	// The ID of the subscription plan associated with the subscription.
	// Required: true
	PlanID *string `json:"plan_id"`

	// Type of the subscription event.
	// See [SubscriptionEventSubscriptionEventType](#type-subscriptioneventsubscriptioneventtype) for possible values
	// Required: true
	SubscriptionEventType *string `json:"subscription_event_type"`
}

SubscriptionEvent Describes changes to subscription and billing states.

swagger:model SubscriptionEvent

func (*SubscriptionEvent) ContextValidate

func (m *SubscriptionEvent) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this subscription event based on context it is used

func (*SubscriptionEvent) MarshalBinary

func (m *SubscriptionEvent) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SubscriptionEvent) UnmarshalBinary

func (m *SubscriptionEvent) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SubscriptionEvent) Validate

func (m *SubscriptionEvent) Validate(formats strfmt.Registry) error

Validate validates this subscription event

type SubscriptionEventSubscriptionEventType

type SubscriptionEventSubscriptionEventType string

SubscriptionEventSubscriptionEventType The possible subscription event types.

swagger:model SubscriptionEventSubscriptionEventType

const (

	// SubscriptionEventSubscriptionEventTypeSTARTSUBSCRIPTION captures enum value "START_SUBSCRIPTION"
	SubscriptionEventSubscriptionEventTypeSTARTSUBSCRIPTION SubscriptionEventSubscriptionEventType = "START_SUBSCRIPTION"

	// SubscriptionEventSubscriptionEventTypePLANCHANGE captures enum value "PLAN_CHANGE"
	SubscriptionEventSubscriptionEventTypePLANCHANGE SubscriptionEventSubscriptionEventType = "PLAN_CHANGE"

	// SubscriptionEventSubscriptionEventTypeSTOPSUBSCRIPTION captures enum value "STOP_SUBSCRIPTION"
	SubscriptionEventSubscriptionEventTypeSTOPSUBSCRIPTION SubscriptionEventSubscriptionEventType = "STOP_SUBSCRIPTION"
)

func (SubscriptionEventSubscriptionEventType) ContextValidate

ContextValidate validates this subscription event subscription event type based on context it is used

func (SubscriptionEventSubscriptionEventType) Validate

Validate validates this subscription event subscription event type

type SubscriptionPhase

type SubscriptionPhase struct {

	// The billing cadence of the phase. For example, weekly or monthly. This field cannot be changed after a `SubscriptionPhase` is created.
	// See [SubscriptionCadence](#type-subscriptioncadence) for possible values
	// Required: true
	Cadence *string `json:"cadence"`

	// The position this phase appears in the sequence of phases defined for the plan, indexed from 0. This field cannot be changed after a `SubscriptionPhase` is created.
	Ordinal int64 `json:"ordinal,omitempty"`

	// The number of `cadence`s the phase lasts. If not set, the phase never ends. Only the last phase can be indefinite. This field cannot be changed after a `SubscriptionPhase` is created.
	Periods int64 `json:"periods,omitempty"`

	// The amount to bill for each `cadence`.
	// Required: true
	RecurringPriceMoney *Money `json:"recurring_price_money"`

	// The Square-assigned ID of the subscription phase. This field cannot be changed after a `SubscriptionPhase` is created.
	UID string `json:"uid,omitempty"`
}

SubscriptionPhase Describes a phase in a subscription plan. For more information, see [Set Up and Manage a Subscription Plan](/docs/subscriptions-api/setup-plan).

swagger:model SubscriptionPhase

func (*SubscriptionPhase) ContextValidate

func (m *SubscriptionPhase) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this subscription phase based on the context it is used

func (*SubscriptionPhase) MarshalBinary

func (m *SubscriptionPhase) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SubscriptionPhase) UnmarshalBinary

func (m *SubscriptionPhase) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SubscriptionPhase) Validate

func (m *SubscriptionPhase) Validate(formats strfmt.Registry) error

Validate validates this subscription phase

type SubscriptionStatus

type SubscriptionStatus string

SubscriptionStatus Possible subscription status values.

swagger:model SubscriptionStatus

const (

	// SubscriptionStatusPENDING captures enum value "PENDING"
	SubscriptionStatusPENDING SubscriptionStatus = "PENDING"

	// SubscriptionStatusACTIVE captures enum value "ACTIVE"
	SubscriptionStatusACTIVE SubscriptionStatus = "ACTIVE"

	// SubscriptionStatusCANCELED captures enum value "CANCELED"
	SubscriptionStatusCANCELED SubscriptionStatus = "CANCELED"
)

func (SubscriptionStatus) ContextValidate

func (m SubscriptionStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this subscription status based on context it is used

func (SubscriptionStatus) Validate

func (m SubscriptionStatus) Validate(formats strfmt.Registry) error

Validate validates this subscription status

type TaxCalculationPhase

type TaxCalculationPhase string

TaxCalculationPhase When to calculate the taxes due on a cart.

swagger:model TaxCalculationPhase

const (

	// TaxCalculationPhaseTAXSUBTOTALPHASE captures enum value "TAX_SUBTOTAL_PHASE"
	TaxCalculationPhaseTAXSUBTOTALPHASE TaxCalculationPhase = "TAX_SUBTOTAL_PHASE"

	// TaxCalculationPhaseTAXTOTALPHASE captures enum value "TAX_TOTAL_PHASE"
	TaxCalculationPhaseTAXTOTALPHASE TaxCalculationPhase = "TAX_TOTAL_PHASE"
)

func (TaxCalculationPhase) ContextValidate

func (m TaxCalculationPhase) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this tax calculation phase based on context it is used

func (TaxCalculationPhase) Validate

func (m TaxCalculationPhase) Validate(formats strfmt.Registry) error

Validate validates this tax calculation phase

type TaxInclusionType

type TaxInclusionType string

TaxInclusionType Whether to the tax amount should be additional to or included in the CatalogItem price.

swagger:model TaxInclusionType

const (

	// TaxInclusionTypeADDITIVE captures enum value "ADDITIVE"
	TaxInclusionTypeADDITIVE TaxInclusionType = "ADDITIVE"

	// TaxInclusionTypeINCLUSIVE captures enum value "INCLUSIVE"
	TaxInclusionTypeINCLUSIVE TaxInclusionType = "INCLUSIVE"
)

func (TaxInclusionType) ContextValidate

func (m TaxInclusionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this tax inclusion type based on context it is used

func (TaxInclusionType) Validate

func (m TaxInclusionType) Validate(formats strfmt.Registry) error

Validate validates this tax inclusion type

type TeamMember

type TeamMember struct {

	// Describes the team member's assigned locations.
	AssignedLocations *TeamMemberAssignedLocations `json:"assigned_locations,omitempty"`

	// The timestamp in RFC 3339 format describing when the team member was created.
	// Ex: "2018-10-04T04:00:00-07:00" or "2019-02-05T12:00:00Z"
	CreatedAt string `json:"created_at,omitempty"`

	// The email address associated with the team member.
	EmailAddress string `json:"email_address,omitempty"`

	// The family (i.e., last) name associated with the team member.
	FamilyName string `json:"family_name,omitempty"`

	// The given (i.e., first) name associated with the team member.
	GivenName string `json:"given_name,omitempty"`

	// The unique ID for the team member.
	ID string `json:"id,omitempty"`

	// Whether the team member is the owner of the Square account.
	IsOwner bool `json:"is_owner,omitempty"`

	// The team member's phone number in E.164 format. Examples:
	// +14155552671 - the country code is 1 for US
	// +551155256325 - the country code is 55 for BR
	PhoneNumber string `json:"phone_number,omitempty"`

	// A second ID used to associate the team member with an entity in another system.
	ReferenceID string `json:"reference_id,omitempty"`

	// Describes the status of the team member.
	// See [TeamMemberStatus](#type-teammemberstatus) for possible values
	Status string `json:"status,omitempty"`

	// The timestamp in RFC 3339 format describing when the team member was last updated.
	// Ex: "2018-10-04T04:00:00-07:00" or "2019-02-05T12:00:00Z"
	UpdatedAt string `json:"updated_at,omitempty"`
}

TeamMember A record representing an individual team member for a business.

swagger:model TeamMember

func (*TeamMember) ContextValidate

func (m *TeamMember) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this team member based on the context it is used

func (*TeamMember) MarshalBinary

func (m *TeamMember) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TeamMember) UnmarshalBinary

func (m *TeamMember) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TeamMember) Validate

func (m *TeamMember) Validate(formats strfmt.Registry) error

Validate validates this team member

type TeamMemberAssignedLocations

type TeamMemberAssignedLocations struct {

	// The current assignment type of the team member.
	// See [TeamMemberAssignedLocationsAssignmentType](#type-teammemberassignedlocationsassignmenttype) for possible values
	AssignmentType string `json:"assignment_type,omitempty"`

	// The locations that the team member is assigned to.
	LocationIds []string `json:"location_ids"`
}

TeamMemberAssignedLocations An object that represents a team member's assignment to locations.

swagger:model TeamMemberAssignedLocations

func (*TeamMemberAssignedLocations) ContextValidate

func (m *TeamMemberAssignedLocations) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this team member assigned locations based on context it is used

func (*TeamMemberAssignedLocations) MarshalBinary

func (m *TeamMemberAssignedLocations) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TeamMemberAssignedLocations) UnmarshalBinary

func (m *TeamMemberAssignedLocations) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TeamMemberAssignedLocations) Validate

func (m *TeamMemberAssignedLocations) Validate(formats strfmt.Registry) error

Validate validates this team member assigned locations

type TeamMemberAssignedLocationsAssignmentType

type TeamMemberAssignedLocationsAssignmentType string

TeamMemberAssignedLocationsAssignmentType Enumerates the possible assignment types the team member can have

swagger:model TeamMemberAssignedLocationsAssignmentType

const (

	// TeamMemberAssignedLocationsAssignmentTypeALLCURRENTANDFUTURELOCATIONS captures enum value "ALL_CURRENT_AND_FUTURE_LOCATIONS"
	TeamMemberAssignedLocationsAssignmentTypeALLCURRENTANDFUTURELOCATIONS TeamMemberAssignedLocationsAssignmentType = "ALL_CURRENT_AND_FUTURE_LOCATIONS"

	// TeamMemberAssignedLocationsAssignmentTypeEXPLICITLOCATIONS captures enum value "EXPLICIT_LOCATIONS"
	TeamMemberAssignedLocationsAssignmentTypeEXPLICITLOCATIONS TeamMemberAssignedLocationsAssignmentType = "EXPLICIT_LOCATIONS"
)

func (TeamMemberAssignedLocationsAssignmentType) ContextValidate

ContextValidate validates this team member assigned locations assignment type based on context it is used

func (TeamMemberAssignedLocationsAssignmentType) Validate

Validate validates this team member assigned locations assignment type

type TeamMemberBookingProfile

type TeamMemberBookingProfile struct {

	// The description of the team member.
	Description string `json:"description,omitempty"`

	// The display name of the team member.
	DisplayName string `json:"display_name,omitempty"`

	// Indicates whether the team member can be booked through the Bookings API or the seller's online booking channel or site (`true) or not (`false`).
	IsBookable bool `json:"is_bookable,omitempty"`

	// The URL of the team member's image for the bookings profile.
	ProfileImageURL string `json:"profile_image_url,omitempty"`

	// The ID of the `TeamMember` object for the team member associated with the booking profile.
	TeamMemberID string `json:"team_member_id,omitempty"`
}

TeamMemberBookingProfile The booking profile of a seller's team member, including the team member's ID, display name, description and whether the team member can be booked as a service provider.

swagger:model TeamMemberBookingProfile

func (*TeamMemberBookingProfile) ContextValidate

func (m *TeamMemberBookingProfile) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this team member booking profile based on context it is used

func (*TeamMemberBookingProfile) MarshalBinary

func (m *TeamMemberBookingProfile) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TeamMemberBookingProfile) UnmarshalBinary

func (m *TeamMemberBookingProfile) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TeamMemberBookingProfile) Validate

func (m *TeamMemberBookingProfile) Validate(formats strfmt.Registry) error

Validate validates this team member booking profile

type TeamMemberStatus

type TeamMemberStatus string

TeamMemberStatus Enumerates the possible statuses the team member can have within a business.

swagger:model TeamMemberStatus

const (

	// TeamMemberStatusACTIVE captures enum value "ACTIVE"
	TeamMemberStatusACTIVE TeamMemberStatus = "ACTIVE"

	// TeamMemberStatusINACTIVE captures enum value "INACTIVE"
	TeamMemberStatusINACTIVE TeamMemberStatus = "INACTIVE"
)

func (TeamMemberStatus) ContextValidate

func (m TeamMemberStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this team member status based on context it is used

func (TeamMemberStatus) Validate

func (m TeamMemberStatus) Validate(formats strfmt.Registry) error

Validate validates this team member status

type TeamMemberWage

type TeamMemberWage struct {

	// Can be a custom-set hourly wage or the calculated effective hourly
	// wage based on annual wage and hours worked per week.
	HourlyRate *Money `json:"hourly_rate,omitempty"`

	// UUID for this object.
	ID string `json:"id,omitempty"`

	// The `Team Member` that this wage is assigned to.
	TeamMemberID string `json:"team_member_id,omitempty"`

	// The job title that this wage relates to.
	Title string `json:"title,omitempty"`
}

TeamMemberWage The hourly wage rate that a team member will earn on a `Shift` for doing the job specified by the `title` property of this object.

swagger:model TeamMemberWage

func (*TeamMemberWage) ContextValidate

func (m *TeamMemberWage) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this team member wage based on the context it is used

func (*TeamMemberWage) MarshalBinary

func (m *TeamMemberWage) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TeamMemberWage) UnmarshalBinary

func (m *TeamMemberWage) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TeamMemberWage) Validate

func (m *TeamMemberWage) Validate(formats strfmt.Registry) error

Validate validates this team member wage

type Tender

type Tender struct {

	// 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"`

	// The total amount of the tender, including `tip_money`. If the tender has a `payment_id`,
	// the `total_money` of the corresponding `Payment` will be equal to the
	// `amount_money` of the tender.
	AmountMoney *Money `json:"amount_money,omitempty"`

	// 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 timestamp for when the tender was created, in RFC 3339 format.
	// Max Length: 32
	CreatedAt string `json:"created_at,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.
	// Max Length: 191
	CustomerID string `json:"customer_id,omitempty"`

	// The tender's unique ID.
	// Max Length: 192
	ID string `json:"id,omitempty"`

	// The ID of the transaction's associated location.
	// Max Length: 50
	LocationID string `json:"location_id,omitempty"`

	// An optional note associated with the tender at the time of payment.
	// Max Length: 500
	Note string `json:"note,omitempty"`

	// The ID of the `Payment` that corresponds to this tender.
	// This value is only present for payments created with the v2 Payments API.
	// Max Length: 192
	PaymentID string `json:"payment_id,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"`

	// The tip's amount of the tender.
	TipMoney *Money `json:"tip_money,omitempty"`

	// The ID of the tender's associated transaction.
	// Max Length: 192
	TransactionID string `json:"transaction_id,omitempty"`

	// The type of tender, such as `CARD` or `CASH`.
	// See [TenderType](#type-tendertype) for possible values
	// Required: true
	Type *string `json:"type"`
}

Tender Represents a tender (i.e., a method of payment) used in a Square transaction.

swagger:model Tender

func (*Tender) ContextValidate

func (m *Tender) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this tender based on the context it is used

func (*Tender) MarshalBinary

func (m *Tender) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Tender) UnmarshalBinary

func (m *Tender) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Tender) Validate

func (m *Tender) Validate(formats strfmt.Registry) error

Validate validates this tender

type TenderCardDetails

type TenderCardDetails struct {

	// The credit card's non-confidential details.
	Card *Card `json:"card,omitempty"`

	// The method used to enter the card's details for the transaction.
	// See [TenderCardDetailsEntryMethod](#type-tendercarddetailsentrymethod) for possible values
	EntryMethod string `json:"entry_method,omitempty"`

	// The credit card payment's current state (such as `AUTHORIZED` or
	// `CAPTURED`). See `TenderCardDetailsStatus`
	// for possible values.
	// See [TenderCardDetailsStatus](#type-tendercarddetailsstatus) for possible values
	Status string `json:"status,omitempty"`
}

TenderCardDetails Represents additional details of a tender with `type` `CARD` or `SQUARE_GIFT_CARD`

swagger:model TenderCardDetails

func (*TenderCardDetails) ContextValidate

func (m *TenderCardDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this tender card details based on the context it is used

func (*TenderCardDetails) MarshalBinary

func (m *TenderCardDetails) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TenderCardDetails) UnmarshalBinary

func (m *TenderCardDetails) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TenderCardDetails) Validate

func (m *TenderCardDetails) Validate(formats strfmt.Registry) error

Validate validates this tender card details

type TenderCardDetailsEntryMethod

type TenderCardDetailsEntryMethod string

TenderCardDetailsEntryMethod Indicates the method used to enter the card's details.

swagger:model TenderCardDetailsEntryMethod

const (

	// TenderCardDetailsEntryMethodSWIPED captures enum value "SWIPED"
	TenderCardDetailsEntryMethodSWIPED TenderCardDetailsEntryMethod = "SWIPED"

	// TenderCardDetailsEntryMethodKEYED captures enum value "KEYED"
	TenderCardDetailsEntryMethodKEYED TenderCardDetailsEntryMethod = "KEYED"

	// TenderCardDetailsEntryMethodEMV captures enum value "EMV"
	TenderCardDetailsEntryMethodEMV TenderCardDetailsEntryMethod = "EMV"

	// TenderCardDetailsEntryMethodONFILE captures enum value "ON_FILE"
	TenderCardDetailsEntryMethodONFILE TenderCardDetailsEntryMethod = "ON_FILE"

	// TenderCardDetailsEntryMethodCONTACTLESS captures enum value "CONTACTLESS"
	TenderCardDetailsEntryMethodCONTACTLESS TenderCardDetailsEntryMethod = "CONTACTLESS"
)

func (TenderCardDetailsEntryMethod) ContextValidate

func (m TenderCardDetailsEntryMethod) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this tender card details entry method based on context it is used

func (TenderCardDetailsEntryMethod) Validate

func (m TenderCardDetailsEntryMethod) Validate(formats strfmt.Registry) error

Validate validates this tender card details entry method

type TenderCardDetailsStatus

type TenderCardDetailsStatus string

TenderCardDetailsStatus Indicates the card transaction's current status.

swagger:model TenderCardDetailsStatus

const (

	// TenderCardDetailsStatusAUTHORIZED captures enum value "AUTHORIZED"
	TenderCardDetailsStatusAUTHORIZED TenderCardDetailsStatus = "AUTHORIZED"

	// TenderCardDetailsStatusCAPTURED captures enum value "CAPTURED"
	TenderCardDetailsStatusCAPTURED TenderCardDetailsStatus = "CAPTURED"

	// TenderCardDetailsStatusVOIDED captures enum value "VOIDED"
	TenderCardDetailsStatusVOIDED TenderCardDetailsStatus = "VOIDED"

	// TenderCardDetailsStatusFAILED captures enum value "FAILED"
	TenderCardDetailsStatusFAILED TenderCardDetailsStatus = "FAILED"
)

func (TenderCardDetailsStatus) ContextValidate

func (m TenderCardDetailsStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this tender card details status based on context it is used

func (TenderCardDetailsStatus) Validate

func (m TenderCardDetailsStatus) Validate(formats strfmt.Registry) error

Validate validates this tender card details status

type TenderCashDetails

type TenderCashDetails struct {

	// The total amount of cash provided by the buyer, before change is given.
	BuyerTenderedMoney *Money `json:"buyer_tendered_money,omitempty"`

	// The amount of change returned to the buyer.
	ChangeBackMoney *Money `json:"change_back_money,omitempty"`
}

TenderCashDetails Represents the details of a tender with `type` `CASH`.

swagger:model TenderCashDetails

func (*TenderCashDetails) ContextValidate

func (m *TenderCashDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this tender cash details based on the context it is used

func (*TenderCashDetails) MarshalBinary

func (m *TenderCashDetails) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TenderCashDetails) UnmarshalBinary

func (m *TenderCashDetails) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TenderCashDetails) Validate

func (m *TenderCashDetails) Validate(formats strfmt.Registry) error

Validate validates this tender cash details

type TenderType

type TenderType string

TenderType Indicates a tender's type.

swagger:model TenderType

const (

	// TenderTypeCARD captures enum value "CARD"
	TenderTypeCARD TenderType = "CARD"

	// TenderTypeCASH captures enum value "CASH"
	TenderTypeCASH TenderType = "CASH"

	// TenderTypeTHIRDPARTYCARD captures enum value "THIRD_PARTY_CARD"
	TenderTypeTHIRDPARTYCARD TenderType = "THIRD_PARTY_CARD"

	// TenderTypeSQUAREGIFTCARD captures enum value "SQUARE_GIFT_CARD"
	TenderTypeSQUAREGIFTCARD TenderType = "SQUARE_GIFT_CARD"

	// TenderTypeNOSALE captures enum value "NO_SALE"
	TenderTypeNOSALE TenderType = "NO_SALE"

	// TenderTypeWALLET captures enum value "WALLET"
	TenderTypeWALLET TenderType = "WALLET"

	// TenderTypeOTHER captures enum value "OTHER"
	TenderTypeOTHER TenderType = "OTHER"
)

func (TenderType) ContextValidate

func (m TenderType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this tender type based on context it is used

func (TenderType) Validate

func (m TenderType) Validate(formats strfmt.Registry) error

Validate validates this tender type

type TerminalCheckout

type TerminalCheckout struct {

	// The amount of money (including tax amount) that the Square Terminal device should try to collect.
	// Required: true
	AmountMoney *Money `json:"amount_money"`

	// Present if the status is `CANCELED`.
	// See [ActionCancelReason](#type-actioncancelreason) for possible values
	CancelReason string `json:"cancel_reason,omitempty"`

	// The time when the `TerminalCheckout` was created as an RFC 3339 timestamp.
	CreatedAt string `json:"created_at,omitempty"`

	// The duration as an RFC 3339 duration, after which the checkout will be automatically canceled.
	// TerminalCheckouts that are `PENDING` will be automatically `CANCELED` and have a cancellation reason
	// of `TIMED_OUT`.
	//
	// Default: 5 minutes from creation
	//
	// Maximum: 5 minutes
	DeadlineDuration string `json:"deadline_duration,omitempty"`

	// Options to control the display and behavior of the Square Terminal device.
	// Required: true
	DeviceOptions *DeviceCheckoutOptions `json:"device_options"`

	// A unique ID for this `TerminalCheckout`
	// Max Length: 255
	// Min Length: 10
	ID string `json:"id,omitempty"`

	// An optional note to associate with the checkout, as well any payments used to complete the checkout.
	// Max Length: 250
	Note string `json:"note,omitempty"`

	// A list of ids for payments created by this `TerminalCheckout`.
	PaymentIds []string `json:"payment_ids"`

	// An optional user-defined reference ID which can be used to associate
	// this `TerminalCheckout` to another entity in an external system. For example, an order
	// ID generated by a third-party shopping cart. Will also be associated with any payments
	// used to complete the checkout.
	// Max Length: 40
	ReferenceID string `json:"reference_id,omitempty"`

	// The status of the `TerminalCheckout`.
	// Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED`
	Status string `json:"status,omitempty"`

	// The time when the `TerminalCheckout` was last updated as an RFC 3339 timestamp.
	UpdatedAt string `json:"updated_at,omitempty"`
}

TerminalCheckout terminal checkout

swagger:model TerminalCheckout

func (*TerminalCheckout) ContextValidate

func (m *TerminalCheckout) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this terminal checkout based on the context it is used

func (*TerminalCheckout) MarshalBinary

func (m *TerminalCheckout) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TerminalCheckout) UnmarshalBinary

func (m *TerminalCheckout) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TerminalCheckout) Validate

func (m *TerminalCheckout) Validate(formats strfmt.Registry) error

Validate validates this terminal checkout

type TerminalCheckoutQuery

type TerminalCheckoutQuery struct {

	// Options for filtering returned `TerminalCheckout`s
	Filter *TerminalCheckoutQueryFilter `json:"filter,omitempty"`

	// Option for sorting returned `TerminalCheckout`s
	Sort *TerminalCheckoutQuerySort `json:"sort,omitempty"`
}

TerminalCheckoutQuery terminal checkout query

swagger:model TerminalCheckoutQuery

func (*TerminalCheckoutQuery) ContextValidate

func (m *TerminalCheckoutQuery) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this terminal checkout query based on the context it is used

func (*TerminalCheckoutQuery) MarshalBinary

func (m *TerminalCheckoutQuery) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TerminalCheckoutQuery) UnmarshalBinary

func (m *TerminalCheckoutQuery) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TerminalCheckoutQuery) Validate

func (m *TerminalCheckoutQuery) Validate(formats strfmt.Registry) error

Validate validates this terminal checkout query

type TerminalCheckoutQueryFilter

type TerminalCheckoutQueryFilter struct {

	// Time range for the beginning of the reporting period. Inclusive.
	// Default: The current time minus one day.
	CreatedAt *TimeRange `json:"created_at,omitempty"`

	// `TerminalCheckout`s associated with a specific device. If no device is specified then all
	// `TerminalCheckout`s for the merchant will be displayed.
	DeviceID string `json:"device_id,omitempty"`

	// Filtered results with the desired status of the `TerminalCheckout`
	// Options: PENDING, IN_PROGRESS, CANCELED, COMPLETED
	Status string `json:"status,omitempty"`
}

TerminalCheckoutQueryFilter terminal checkout query filter

swagger:model TerminalCheckoutQueryFilter

func (*TerminalCheckoutQueryFilter) ContextValidate

func (m *TerminalCheckoutQueryFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this terminal checkout query filter based on the context it is used

func (*TerminalCheckoutQueryFilter) MarshalBinary

func (m *TerminalCheckoutQueryFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TerminalCheckoutQueryFilter) UnmarshalBinary

func (m *TerminalCheckoutQueryFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TerminalCheckoutQueryFilter) Validate

func (m *TerminalCheckoutQueryFilter) Validate(formats strfmt.Registry) error

Validate validates this terminal checkout query filter

type TerminalCheckoutQuerySort

type TerminalCheckoutQuerySort struct {

	// The order in which results are listed.
	// - `ASC` - oldest to newest
	// - `DESC` - newest to oldest (default).
	SortOrder string `json:"sort_order,omitempty"`
}

TerminalCheckoutQuerySort terminal checkout query sort

swagger:model TerminalCheckoutQuerySort

func (*TerminalCheckoutQuerySort) ContextValidate

func (m *TerminalCheckoutQuerySort) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this terminal checkout query sort based on context it is used

func (*TerminalCheckoutQuerySort) MarshalBinary

func (m *TerminalCheckoutQuerySort) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TerminalCheckoutQuerySort) UnmarshalBinary

func (m *TerminalCheckoutQuerySort) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TerminalCheckoutQuerySort) Validate

func (m *TerminalCheckoutQuerySort) Validate(formats strfmt.Registry) error

Validate validates this terminal checkout query sort

type TerminalRefund

type TerminalRefund struct {

	// The amount of money, inclusive of `tax_money`, that the `TerminalRefund` should return.
	// This value is limited to the amount taken in the original payment minus any completed or
	// pending refunds.
	// Required: true
	AmountMoney *Money `json:"amount_money"`

	// Present if the status is `CANCELED`.
	// See [ActionCancelReason](#type-actioncancelreason) for possible values
	CancelReason string `json:"cancel_reason,omitempty"`

	// The time when the `TerminalRefund` was created as an RFC 3339 timestamp.
	CreatedAt string `json:"created_at,omitempty"`

	// The duration as an RFC 3339 duration, after which the refund will be automatically canceled.
	// TerminalRefunds that are `PENDING` will be automatically `CANCELED` and have a cancellation reason
	// of `TIMED_OUT`
	//
	// Default: 5 minutes from creation
	//
	// Maximum: 5 minutes
	DeadlineDuration string `json:"deadline_duration,omitempty"`

	// The unique Id of the device intended for this `TerminalRefund`.
	// The Id can be retrieved from /v2/devices api.
	DeviceID string `json:"device_id,omitempty"`

	// A unique ID for this `TerminalRefund`
	// Max Length: 255
	// Min Length: 10
	ID string `json:"id,omitempty"`

	// The reference to the Square order id for the payment identified by the `payment_id`.
	OrderID string `json:"order_id,omitempty"`

	// Unique ID of the payment being refunded.
	// Required: true
	// Min Length: 1
	PaymentID *string `json:"payment_id"`

	// A description of the reason for the refund.
	// Note: maximum 192 characters
	// Max Length: 192
	Reason string `json:"reason,omitempty"`

	// The reference to the payment refund created by completing this `TerminalRefund`.
	RefundID string `json:"refund_id,omitempty"`

	// The status of the `TerminalRefund`.
	// Options: `PENDING`, `IN_PROGRESS`, `CANCELED`, `COMPLETED`
	Status string `json:"status,omitempty"`

	// The time when the `TerminalRefund` was last updated as an RFC 3339 timestamp.
	UpdatedAt string `json:"updated_at,omitempty"`
}

TerminalRefund terminal refund

swagger:model TerminalRefund

func (*TerminalRefund) ContextValidate

func (m *TerminalRefund) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this terminal refund based on the context it is used

func (*TerminalRefund) MarshalBinary

func (m *TerminalRefund) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TerminalRefund) UnmarshalBinary

func (m *TerminalRefund) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TerminalRefund) Validate

func (m *TerminalRefund) Validate(formats strfmt.Registry) error

Validate validates this terminal refund

type TerminalRefundQuery

type TerminalRefundQuery struct {

	// Filter for terminal refund query.
	Filter *TerminalRefundQueryFilter `json:"filter,omitempty"`

	// Sort order for terminal refund query.
	Sort *TerminalRefundQuerySort `json:"sort,omitempty"`
}

TerminalRefundQuery terminal refund query

swagger:model TerminalRefundQuery

func (*TerminalRefundQuery) ContextValidate

func (m *TerminalRefundQuery) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this terminal refund query based on the context it is used

func (*TerminalRefundQuery) MarshalBinary

func (m *TerminalRefundQuery) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TerminalRefundQuery) UnmarshalBinary

func (m *TerminalRefundQuery) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TerminalRefundQuery) Validate

func (m *TerminalRefundQuery) Validate(formats strfmt.Registry) error

Validate validates this terminal refund query

type TerminalRefundQueryFilter

type TerminalRefundQueryFilter struct {

	// Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive.
	// Default: The current time minus one day.
	CreatedAt *TimeRange `json:"created_at,omitempty"`

	// `TerminalRefund`s associated with a specific device. If no device is specified then all
	// `TerminalRefund`s for the signed in account will be displayed.
	DeviceID string `json:"device_id,omitempty"`

	// Filtered results with the desired status of the `TerminalRefund`
	// Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED`
	Status string `json:"status,omitempty"`
}

TerminalRefundQueryFilter terminal refund query filter

swagger:model TerminalRefundQueryFilter

func (*TerminalRefundQueryFilter) ContextValidate

func (m *TerminalRefundQueryFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this terminal refund query filter based on the context it is used

func (*TerminalRefundQueryFilter) MarshalBinary

func (m *TerminalRefundQueryFilter) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TerminalRefundQueryFilter) UnmarshalBinary

func (m *TerminalRefundQueryFilter) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TerminalRefundQueryFilter) Validate

func (m *TerminalRefundQueryFilter) Validate(formats strfmt.Registry) error

Validate validates this terminal refund query filter

type TerminalRefundQuerySort

type TerminalRefundQuerySort struct {

	// The order in which results are listed.
	// - `ASC` - oldest to newest
	// - `DESC` - newest to oldest (default).
	SortOrder string `json:"sort_order,omitempty"`
}

TerminalRefundQuerySort terminal refund query sort

swagger:model TerminalRefundQuerySort

func (*TerminalRefundQuerySort) ContextValidate

func (m *TerminalRefundQuerySort) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this terminal refund query sort based on context it is used

func (*TerminalRefundQuerySort) MarshalBinary

func (m *TerminalRefundQuerySort) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TerminalRefundQuerySort) UnmarshalBinary

func (m *TerminalRefundQuerySort) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TerminalRefundQuerySort) Validate

func (m *TerminalRefundQuerySort) Validate(formats strfmt.Registry) error

Validate validates this terminal refund query sort

type TimeRange

type TimeRange struct {

	// A datetime value in RFC 3339 format indicating when the time range
	// ends.
	EndAt string `json:"end_at,omitempty"`

	// A datetime value in RFC 3339 format indicating when the time range
	// starts.
	StartAt string `json:"start_at,omitempty"`
}

TimeRange Represents a generic time range. The start and end values are represented in RFC 3339 format. Time ranges are customized to be inclusive or exclusive based on the needs of a particular endpoint. Refer to the relevant endpoint-specific documentation to determine how time ranges are handled.

swagger:model TimeRange

func (*TimeRange) ContextValidate

func (m *TimeRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this time range based on context it is used

func (*TimeRange) MarshalBinary

func (m *TimeRange) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TimeRange) UnmarshalBinary

func (m *TimeRange) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TimeRange) Validate

func (m *TimeRange) Validate(formats strfmt.Registry) error

Validate validates this time range

type TipSettings

type TipSettings struct {

	// Indicates whether tipping is enabled for this checkout. Defaults to false.
	AllowTipping bool `json:"allow_tipping,omitempty"`

	// Indicates whether custom tip amounts are allowed during the checkout flow. Defaults to false.
	CustomTipField bool `json:"custom_tip_field,omitempty"`

	// Indicates whether tip options should be presented on their own screen before presenting
	// the signature screen during card payment. Defaults to false.
	SeparateTipScreen bool `json:"separate_tip_screen,omitempty"`

	// Enables the "Smart Tip Amounts" behavior.
	// Exact tipping options depend on the region the Square seller is active in.
	//
	// In the United States and Canada, tipping options will be presented in whole dollar amounts for
	// payments under 10 USD/CAD respectively.
	//
	// If set to true, the tip_percentages settings is ignored.
	// Defaults to false.
	//
	// To learn more about smart tipping, see [Accept Tips with the Square App](https://squareup.com/help/us/en/article/5069-accept-tips-with-the-square-app)
	SmartTipping bool `json:"smart_tipping,omitempty"`

	// A list of tip percentages that should be presented during the checkout flow. Specified as
	// up to 3 non-negative integers from 0 to 100 (inclusive). Defaults to [15, 20, 25]
	TipPercentages []int64 `json:"tip_percentages"`
}

TipSettings tip settings

swagger:model TipSettings

func (*TipSettings) ContextValidate

func (m *TipSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this tip settings based on context it is used

func (*TipSettings) MarshalBinary

func (m *TipSettings) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TipSettings) UnmarshalBinary

func (m *TipSettings) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TipSettings) Validate

func (m *TipSettings) Validate(formats strfmt.Registry) error

Validate validates this tip settings

type Transaction

type Transaction struct {

	// 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.
	// Max Length: 192
	ClientID string `json:"client_id,omitempty"`

	// The timestamp for when the transaction was created, in RFC 3339 format.
	// Max Length: 32
	CreatedAt string `json:"created_at,omitempty"`

	// The transaction's unique ID, issued by Square payments servers.
	// Max Length: 192
	ID string `json:"id,omitempty"`

	// The ID of the transaction's associated location.
	// Max Length: 50
	LocationID string `json:"location_id,omitempty"`

	// The order_id is an identifier for the order associated with this transaction, if any.
	// Max Length: 192
	OrderID string `json:"order_id,omitempty"`

	// The Square product that processed the transaction.
	// See [TransactionProduct](#type-transactionproduct) for possible values
	Product string `json:"product,omitempty"`

	// If the transaction was created with the `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.
	// Max Length: 40
	ReferenceID string `json:"reference_id,omitempty"`

	// Refunds that have been applied to any tender in the transaction.
	Refunds []*Refund `json:"refunds"`

	// The shipping address provided in the request, if any.
	ShippingAddress *Address `json:"shipping_address,omitempty"`

	// The tenders used to pay in the transaction.
	Tenders []*Tender `json:"tenders"`
}

Transaction 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.

swagger:model Transaction

func (*Transaction) ContextValidate

func (m *Transaction) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this transaction based on the context it is used

func (*Transaction) MarshalBinary

func (m *Transaction) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Transaction) UnmarshalBinary

func (m *Transaction) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Transaction) Validate

func (m *Transaction) Validate(formats strfmt.Registry) error

Validate validates this transaction

type TransactionProduct

type TransactionProduct string

TransactionProduct Indicates the Square product used to process a transaction.

swagger:model TransactionProduct

const (

	// TransactionProductREGISTER captures enum value "REGISTER"
	TransactionProductREGISTER TransactionProduct = "REGISTER"

	// TransactionProductEXTERNALAPI captures enum value "EXTERNAL_API"
	TransactionProductEXTERNALAPI TransactionProduct = "EXTERNAL_API"

	// TransactionProductBILLING captures enum value "BILLING"
	TransactionProductBILLING TransactionProduct = "BILLING"

	// TransactionProductAPPOINTMENTS captures enum value "APPOINTMENTS"
	TransactionProductAPPOINTMENTS TransactionProduct = "APPOINTMENTS"

	// TransactionProductINVOICES captures enum value "INVOICES"
	TransactionProductINVOICES TransactionProduct = "INVOICES"

	// TransactionProductONLINESTORE captures enum value "ONLINE_STORE"
	TransactionProductONLINESTORE TransactionProduct = "ONLINE_STORE"

	// TransactionProductPAYROLL captures enum value "PAYROLL"
	TransactionProductPAYROLL TransactionProduct = "PAYROLL"

	// TransactionProductOTHER captures enum value "OTHER"
	TransactionProductOTHER TransactionProduct = "OTHER"
)

func (TransactionProduct) ContextValidate

func (m TransactionProduct) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this transaction product based on context it is used

func (TransactionProduct) Validate

func (m TransactionProduct) Validate(formats strfmt.Registry) error

Validate validates this transaction product

type TransactionType

type TransactionType string

TransactionType The transaction type used in the disputed payment.

swagger:model TransactionType

const (

	// TransactionTypeDEBIT captures enum value "DEBIT"
	TransactionTypeDEBIT TransactionType = "DEBIT"

	// TransactionTypeCREDIT captures enum value "CREDIT"
	TransactionTypeCREDIT TransactionType = "CREDIT"
)

func (TransactionType) ContextValidate

func (m TransactionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this transaction type based on context it is used

func (TransactionType) Validate

func (m TransactionType) Validate(formats strfmt.Registry) error

Validate validates this transaction type

type UpdateBookingRequest

type UpdateBookingRequest struct {

	// The booking to be updated. Individual attributes explicitly specified here override the corresponding values of the existing booking.
	// Required: true
	Booking *Booking `json:"booking"`

	// A unique key to make this request an idempotent operation.
	// Max Length: 255
	IdempotencyKey string `json:"idempotency_key,omitempty"`
}

UpdateBookingRequest update booking request Example: {"booking":{"customer_note":"I would like to sit near the window please","version":1}}

swagger:model UpdateBookingRequest

func (*UpdateBookingRequest) ContextValidate

func (m *UpdateBookingRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update booking request based on the context it is used

func (*UpdateBookingRequest) MarshalBinary

func (m *UpdateBookingRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateBookingRequest) UnmarshalBinary

func (m *UpdateBookingRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateBookingRequest) Validate

func (m *UpdateBookingRequest) Validate(formats strfmt.Registry) error

Validate validates this update booking request

type UpdateBookingResponse

type UpdateBookingResponse struct {

	// The booking that was updated.
	Booking *Booking `json:"booking,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

UpdateBookingResponse update booking response Example: {"booking":{"appointment_segments":[{"duration_minutes":60,"service_variation_id":"RU3PBTZTK7DXZDQFCJHOK2MC","service_variation_version":1599775456731,"team_member_id":"TMXUrsBWWcHTt79t"}],"created_at":"2020-10-28T15:47:41Z","customer_id":"EX2QSVGTZN4K1E5QE1CBFNVQ8M","customer_note":"I would like to sit near the window please","id":"zkras0xv0xwswx","location_id":"LEQHH0YY8B42M","seller_note":"","start_at":"2020-11-26T13:00:00Z","status":"ACCEPTED","updated_at":"2020-10-28T15:49:25Z","version":2},"errors":[]}

swagger:model UpdateBookingResponse

func (*UpdateBookingResponse) ContextValidate

func (m *UpdateBookingResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update booking response based on the context it is used

func (*UpdateBookingResponse) MarshalBinary

func (m *UpdateBookingResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateBookingResponse) UnmarshalBinary

func (m *UpdateBookingResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateBookingResponse) Validate

func (m *UpdateBookingResponse) Validate(formats strfmt.Registry) error

Validate validates this update booking response

type UpdateBreakTypeRequest

type UpdateBreakTypeRequest struct {

	// The updated `BreakType`.
	// Required: true
	BreakType *BreakType `json:"break_type"`
}

UpdateBreakTypeRequest A request to update a `BreakType` Example: {"request_body":{"break_type":{"break_name":"Lunch","expected_duration":"PT50M","is_paid":true,"location_id":"26M7H24AZ9N6R","version":1}}}

swagger:model UpdateBreakTypeRequest

func (*UpdateBreakTypeRequest) ContextValidate

func (m *UpdateBreakTypeRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update break type request based on the context it is used

func (*UpdateBreakTypeRequest) MarshalBinary

func (m *UpdateBreakTypeRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateBreakTypeRequest) UnmarshalBinary

func (m *UpdateBreakTypeRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateBreakTypeRequest) Validate

func (m *UpdateBreakTypeRequest) Validate(formats strfmt.Registry) error

Validate validates this update break type request

type UpdateBreakTypeResponse

type UpdateBreakTypeResponse struct {

	// The response object.
	BreakType *BreakType `json:"break_type,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

UpdateBreakTypeResponse A response to a request to update a `BreakType`. Contains the requested `BreakType` objects. May contain a set of `Error` objects if the request resulted in errors. Example: {"break_type":{"break_name":"Lunch","created_at":"2018-06-12T20:19:12Z","expected_duration":"PT50M","id":"Q6JSJS6D4DBCH","is_paid":true,"location_id":"26M7H24AZ9N6R","updated_at":"2019-02-26T23:12:59Z","version":2}}

swagger:model UpdateBreakTypeResponse

func (*UpdateBreakTypeResponse) ContextValidate

func (m *UpdateBreakTypeResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update break type response based on the context it is used

func (*UpdateBreakTypeResponse) MarshalBinary

func (m *UpdateBreakTypeResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateBreakTypeResponse) UnmarshalBinary

func (m *UpdateBreakTypeResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateBreakTypeResponse) Validate

func (m *UpdateBreakTypeResponse) Validate(formats strfmt.Registry) error

Validate validates this update break type response

type UpdateCustomerGroupRequest

type UpdateCustomerGroupRequest struct {

	// The `CustomerGroup` object including all the updates you want to make.
	// Required: true
	Group *CustomerGroup `json:"group"`
}

UpdateCustomerGroupRequest Defines the body parameters that can be provided in a request to the [UpdateCustomerGroup](#endpoint-updatecustomergroup) endpoint. Example: {"request_body":{"group":{"name":"Loyal Customers"}}}

swagger:model UpdateCustomerGroupRequest

func (*UpdateCustomerGroupRequest) ContextValidate

func (m *UpdateCustomerGroupRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update customer group request based on the context it is used

func (*UpdateCustomerGroupRequest) MarshalBinary

func (m *UpdateCustomerGroupRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateCustomerGroupRequest) UnmarshalBinary

func (m *UpdateCustomerGroupRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateCustomerGroupRequest) Validate

func (m *UpdateCustomerGroupRequest) Validate(formats strfmt.Registry) error

Validate validates this update customer group request

type UpdateCustomerGroupResponse

type UpdateCustomerGroupResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The successfully updated customer group.
	Group *CustomerGroup `json:"group,omitempty"`
}

UpdateCustomerGroupResponse Defines the fields that are included in the response body of a request to the [UpdateCustomerGroup](#endpoint-updatecustomergroup) endpoint.

One of `errors` or `group` is present in a given response (never both). Example: {"group":{"created_at":"2020-04-13T21:54:57.863Z","id":"2TAT3CMH4Q0A9M87XJZED0WMR3","name":"Loyal Customers","updated_at":"2020-04-13T21:54:58Z"}}

swagger:model UpdateCustomerGroupResponse

func (*UpdateCustomerGroupResponse) ContextValidate

func (m *UpdateCustomerGroupResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update customer group response based on the context it is used

func (*UpdateCustomerGroupResponse) MarshalBinary

func (m *UpdateCustomerGroupResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateCustomerGroupResponse) UnmarshalBinary

func (m *UpdateCustomerGroupResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateCustomerGroupResponse) Validate

func (m *UpdateCustomerGroupResponse) Validate(formats strfmt.Registry) error

Validate validates this update customer group response

type UpdateCustomerRequest

type UpdateCustomerRequest struct {

	// The physical address associated with the customer profile.
	Address *Address `json:"address,omitempty"`

	// The birthday associated with the customer profile, in RFC 3339 format.
	// Year is optional, timezone and times are not allowed.
	// For example: `0000-09-01T00:00:00-00:00` indicates a birthday on September 1st.
	// `1998-09-01T00:00:00-00:00` indications a birthday on September 1st __1998__.
	Birthday string `json:"birthday,omitempty"`

	// A business name associated with the customer profile.
	CompanyName string `json:"company_name,omitempty"`

	// The email address associated with the customer profile.
	EmailAddress string `json:"email_address,omitempty"`

	// The family (i.e., last) name associated with the customer profile.
	FamilyName string `json:"family_name,omitempty"`

	// The given (i.e., first) name associated with the customer profile.
	GivenName string `json:"given_name,omitempty"`

	// A nickname for the customer profile.
	Nickname string `json:"nickname,omitempty"`

	// A custom note associated with the customer profile.
	Note string `json:"note,omitempty"`

	// The 11-digit phone number associated with the customer profile.
	PhoneNumber string `json:"phone_number,omitempty"`

	// An optional, second ID used to associate the customer profile with an
	// entity in another system.
	ReferenceID string `json:"reference_id,omitempty"`
}

UpdateCustomerRequest Defines the body parameters that can be provided in a request to the UpdateCustomer endpoint. Example: {"request_body":{"email_address":"New.Amelia.Earhart@example.com","note":"updated customer note","phone_number":""}}

swagger:model UpdateCustomerRequest

func (*UpdateCustomerRequest) ContextValidate

func (m *UpdateCustomerRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update customer request based on the context it is used

func (*UpdateCustomerRequest) MarshalBinary

func (m *UpdateCustomerRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateCustomerRequest) UnmarshalBinary

func (m *UpdateCustomerRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateCustomerRequest) Validate

func (m *UpdateCustomerRequest) Validate(formats strfmt.Registry) error

Validate validates this update customer request

type UpdateCustomerResponse

type UpdateCustomerResponse struct {

	// The updated customer.
	Customer *Customer `json:"customer,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

UpdateCustomerResponse Defines the fields that are included in the response body of a request to the UpdateCustomer endpoint.

One of `errors` or `customer` is present in a given response (never both). Example: {"customer":{"address":{"address_line_1":"500 Electric Ave","address_line_2":"Suite 600","administrative_district_level_1":"NY","country":"US","locality":"New York","postal_code":"10003"},"created_at":"2016-03-23T20:21:54.859Z","email_address":"New.Amelia.Earhart@example.com","family_name":"Earhart","given_name":"Amelia","groups":[{"id":"16894e93-96eb-4ced-b24b-f71d42bf084c","name":"Aviation Enthusiasts"}],"id":"JDKYHBWT1D4F8MFH63DBMEN8Y4","note":"updated customer note","reference_id":"YOUR_REFERENCE_ID","updated_at":"2016-03-25T20:21:55Z"}}

swagger:model UpdateCustomerResponse

func (*UpdateCustomerResponse) ContextValidate

func (m *UpdateCustomerResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update customer response based on the context it is used

func (*UpdateCustomerResponse) MarshalBinary

func (m *UpdateCustomerResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateCustomerResponse) UnmarshalBinary

func (m *UpdateCustomerResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateCustomerResponse) Validate

func (m *UpdateCustomerResponse) Validate(formats strfmt.Registry) error

Validate validates this update customer response

type UpdateInvoiceRequest

type UpdateInvoiceRequest struct {

	// The list of fields to clear.
	// For examples, see [Update an invoice](https://developer.squareup.com/docs/docs/invoices-api/overview#update-an-invoice).
	FieldsToClear []string `json:"fields_to_clear"`

	// A unique string that identifies the `UpdateInvoice` request. If you do not
	// provide `idempotency_key` (or provide an empty string as the value), the endpoint
	// treats each request as independent.
	//
	// For more information, see [Idempotency](https://developer.squareup.com/docs/docs/working-with-apis/idempotency).
	// Max Length: 128
	IdempotencyKey string `json:"idempotency_key,omitempty"`

	// The invoice fields to update.
	// The current invoice version must be specified in the `version` field. For more information,
	// see [Update an invoice](https://developer.squareup.com/docs/docs/invoices-api/overview#update-an-invoice).
	// Required: true
	Invoice *Invoice `json:"invoice"`
}

UpdateInvoiceRequest Describes a `UpdateInvoice` request. Example: {"request_body":{"fields_to_clear":["payments_requests[2da7964f-f3d2-4f43-81e8-5aa220bf3355].reminders"],"idempotency_key":"4ee82288-0910-499e-ab4c-5d0071dad1be","invoice":{"payment_requests":[{"tipping_enabled":false,"uid":"2da7964f-f3d2-4f43-81e8-5aa220bf3355"}]}}}

swagger:model UpdateInvoiceRequest

func (*UpdateInvoiceRequest) ContextValidate

func (m *UpdateInvoiceRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update invoice request based on the context it is used

func (*UpdateInvoiceRequest) MarshalBinary

func (m *UpdateInvoiceRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateInvoiceRequest) UnmarshalBinary

func (m *UpdateInvoiceRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateInvoiceRequest) Validate

func (m *UpdateInvoiceRequest) Validate(formats strfmt.Registry) error

Validate validates this update invoice request

type UpdateInvoiceResponse

type UpdateInvoiceResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The updated invoice.
	Invoice *Invoice `json:"invoice,omitempty"`
}

UpdateInvoiceResponse Describes a `UpdateInvoice` response. Example: {"invoice":{"created_at":"2020-06-18T17:45:13Z","custom_fields":[{"label":"Event Reference Number","placement":"ABOVE_LINE_ITEMS","value":"Ref. #1234"},{"label":"Terms of Service","placement":"BELOW_LINE_ITEMS","value":"The terms of service are..."}],"delivery_method":"EMAIL","description":"We appreciate your business!","id":"gt2zv1z6mnUm1V7KMxxf3w","invoice_number":"inv-100","location_id":"ES0RJRZYEC39A","next_payment_amount_money":{"amount":10000,"currency":"USD"},"order_id":"CAISENgvlJ6jLWAzERDzjyHVybY","payment_requests":[{"automatic_payment_source":"NONE","computed_amount_money":{"amount":10000,"currency":"USD"},"due_date":"2030-01-24","request_type":"BALANCE","tipping_enabled":false,"total_completed_amount_money":{"amount":0,"currency":"USD"},"uid":"2da7964f-f3d2-4f43-81e8-5aa220bf3355"}],"primary_recipient":{"customer_id":"JDKYHBWT1D4F8MFH63DBMEN8Y4","email_address":"Amelia.Earhart@example.com","family_name":"Earhart","given_name":"Amelia","phone_number":"1-212-555-4240"},"scheduled_at":"2030-01-13T10:00:00Z","status":"UNPAID","timezone":"America/Los_Angeles","title":"Event Planning Services","updated_at":"2020-06-18T18:23:11Z","version":2}}

swagger:model UpdateInvoiceResponse

func (*UpdateInvoiceResponse) ContextValidate

func (m *UpdateInvoiceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update invoice response based on the context it is used

func (*UpdateInvoiceResponse) MarshalBinary

func (m *UpdateInvoiceResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateInvoiceResponse) UnmarshalBinary

func (m *UpdateInvoiceResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateInvoiceResponse) Validate

func (m *UpdateInvoiceResponse) Validate(formats strfmt.Registry) error

Validate validates this update invoice response

type UpdateItemModifierListsRequest

type UpdateItemModifierListsRequest struct {

	// The IDs of the catalog items associated with the CatalogModifierList objects being updated.
	// Required: true
	ItemIds []string `json:"item_ids"`

	// The IDs of the CatalogModifierList objects to disable for the CatalogItem.
	ModifierListsToDisable []string `json:"modifier_lists_to_disable"`

	// The IDs of the CatalogModifierList objects to enable for the CatalogItem.
	ModifierListsToEnable []string `json:"modifier_lists_to_enable"`
}

UpdateItemModifierListsRequest update item modifier lists request Example: {"request_body":{"item_ids":["H42BRLUJ5KTZTTMPVSLFAACQ","2JXOBJIHCWBQ4NZ3RIXQGJA6"],"modifier_lists_to_disable":["7WRC16CJZDVLSNDQ35PP6YAD"],"modifier_lists_to_enable":["H42BRLUJ5KTZTTMPVSLFAACQ","2JXOBJIHCWBQ4NZ3RIXQGJA6"]}}

swagger:model UpdateItemModifierListsRequest

func (*UpdateItemModifierListsRequest) ContextValidate

func (m *UpdateItemModifierListsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this update item modifier lists request based on context it is used

func (*UpdateItemModifierListsRequest) MarshalBinary

func (m *UpdateItemModifierListsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateItemModifierListsRequest) UnmarshalBinary

func (m *UpdateItemModifierListsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateItemModifierListsRequest) Validate

func (m *UpdateItemModifierListsRequest) Validate(formats strfmt.Registry) error

Validate validates this update item modifier lists request

type UpdateItemModifierListsResponse

type UpdateItemModifierListsResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-date) of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`.
	UpdatedAt string `json:"updated_at,omitempty"`
}

UpdateItemModifierListsResponse update item modifier lists response Example: {"updated_at":"2016-11-16T22:25:24.878Z"}

swagger:model UpdateItemModifierListsResponse

func (*UpdateItemModifierListsResponse) ContextValidate

func (m *UpdateItemModifierListsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update item modifier lists response based on the context it is used

func (*UpdateItemModifierListsResponse) MarshalBinary

func (m *UpdateItemModifierListsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateItemModifierListsResponse) UnmarshalBinary

func (m *UpdateItemModifierListsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateItemModifierListsResponse) Validate

Validate validates this update item modifier lists response

type UpdateItemTaxesRequest

type UpdateItemTaxesRequest struct {

	// IDs for the CatalogItems associated with the CatalogTax objects being updated.
	// Required: true
	ItemIds []string `json:"item_ids"`

	// IDs of the CatalogTax objects to disable.
	TaxesToDisable []string `json:"taxes_to_disable"`

	// IDs of the CatalogTax objects to enable.
	TaxesToEnable []string `json:"taxes_to_enable"`
}

UpdateItemTaxesRequest update item taxes request Example: {"request_body":{"item_ids":["H42BRLUJ5KTZTTMPVSLFAACQ","2JXOBJIHCWBQ4NZ3RIXQGJA6"],"taxes_to_disable":["AQCEGCEBBQONINDOHRGZISEX"],"taxes_to_enable":["4WRCNHCJZDVLSNDQ35PP6YAD"]}}

swagger:model UpdateItemTaxesRequest

func (*UpdateItemTaxesRequest) ContextValidate

func (m *UpdateItemTaxesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this update item taxes request based on context it is used

func (*UpdateItemTaxesRequest) MarshalBinary

func (m *UpdateItemTaxesRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateItemTaxesRequest) UnmarshalBinary

func (m *UpdateItemTaxesRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateItemTaxesRequest) Validate

func (m *UpdateItemTaxesRequest) Validate(formats strfmt.Registry) error

Validate validates this update item taxes request

type UpdateItemTaxesResponse

type UpdateItemTaxesResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The database [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`.
	UpdatedAt string `json:"updated_at,omitempty"`
}

UpdateItemTaxesResponse update item taxes response Example: {"updated_at":"2016-11-16T22:25:24.878Z"}

swagger:model UpdateItemTaxesResponse

func (*UpdateItemTaxesResponse) ContextValidate

func (m *UpdateItemTaxesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update item taxes response based on the context it is used

func (*UpdateItemTaxesResponse) MarshalBinary

func (m *UpdateItemTaxesResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateItemTaxesResponse) UnmarshalBinary

func (m *UpdateItemTaxesResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateItemTaxesResponse) Validate

func (m *UpdateItemTaxesResponse) Validate(formats strfmt.Registry) error

Validate validates this update item taxes response

type UpdateLocationRequest

type UpdateLocationRequest struct {

	// The `Location` object with only the fields to update.
	Location *Location `json:"location,omitempty"`
}

UpdateLocationRequest Request object for the [UpdateLocation](#endpoint-updatelocation) endpoint. Example: {"request_body":{"location":{"address":{"address_line_1":"1234 Peachtree St. NE","administrative_district_level_1":"GA","locality":"Atlanta","postal_code":"30309"},"business_hours":{"periods":[{"day_of_week":"MON","end_local_time":"17:00","start_local_time":"09:00"}]},"description":"Updated description","facebook_url":null,"instagram_username":"instagram","name":"Updated nickname","twitter_username":"twitter"}}}

swagger:model UpdateLocationRequest

func (*UpdateLocationRequest) ContextValidate

func (m *UpdateLocationRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update location request based on the context it is used

func (*UpdateLocationRequest) MarshalBinary

func (m *UpdateLocationRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateLocationRequest) UnmarshalBinary

func (m *UpdateLocationRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateLocationRequest) Validate

func (m *UpdateLocationRequest) Validate(formats strfmt.Registry) error

Validate validates this update location request

type UpdateLocationResponse

type UpdateLocationResponse struct {

	// Information on errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The updated `Location`.
	Location *Location `json:"location,omitempty"`
}

UpdateLocationResponse Response object returned by the [UpdateLocation](#endpoint-updatelocation) endpoint. Example: {"location":{"address":{"address_line_1":"1234 Peachtree St. NE","administrative_district_level_1":"GA","locality":"Atlanta","postal_code":"30309"},"business_email":"example@squareup.com","business_hours":{"periods":[{"day_of_week":"MON","end_local_time":"17:00","start_local_time":"09:00"}]},"business_name":"Business Name","capabilities":["CREDIT_CARD_PROCESSING"],"coordinates":{"latitude":33.788567,"longitude":-84.466947},"country":"US","created_at":"2019-07-19T17:58:25Z","currency":"USD","description":"Updated description","id":"LOCATION_ID","instagram_username":"instagram","language_code":"en-US","mcc":"1234","merchant_id":"MERCHANT_ID","name":"Updated nickname","phone_number":"5559211234","status":"ACTIVE","timezone":"America/New_York","twitter_username":"twitter","type":"MOBILE","website_url":"examplewebsite.com"}}

swagger:model UpdateLocationResponse

func (*UpdateLocationResponse) ContextValidate

func (m *UpdateLocationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update location response based on the context it is used

func (*UpdateLocationResponse) MarshalBinary

func (m *UpdateLocationResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateLocationResponse) UnmarshalBinary

func (m *UpdateLocationResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateLocationResponse) Validate

func (m *UpdateLocationResponse) Validate(formats strfmt.Registry) error

Validate validates this update location response

type UpdateOrderRequest

type UpdateOrderRequest struct {

	// The [dot notation paths](https://developer.squareup.com/docs/orders-api/manage-orders#on-dot-notation)
	// fields to clear. For example, `line_items[uid].note`
	// [Read more about Deleting fields](https://developer.squareup.com/docs/orders-api/manage-orders#delete-fields).
	FieldsToClear []string `json:"fields_to_clear"`

	// A value you specify that uniquely identifies this update request
	//
	// If you're unsure whether a particular update was applied to an order successfully,
	// you can reattempt it with the same idempotency key without
	// worrying about creating duplicate updates to the order.
	// The latest order version will be returned.
	//
	// See [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency) for more information.
	// Max Length: 192
	IdempotencyKey string `json:"idempotency_key,omitempty"`

	// The [sparse order](https://developer.squareup.com/docs/orders-api/manage-orders#sparse-order-objects)
	// containing only the fields to update and the version the update is
	// being applied to.
	Order *Order `json:"order,omitempty"`
}

UpdateOrderRequest Defines the fields that are included in requests to the [UpdateOrder](#endpoint-orders-updateorder) endpoint. Example: {"request_body":{"fields_to_clear":["discounts"],"idempotency_key":"UNIQUE_STRING","order":{"line_items":[{"base_price_money":{"amount":200,"currency":"USD"},"name":"COOKIE","quantity":"2","uid":"cookie_uid"}],"version":1}}}

swagger:model UpdateOrderRequest

func (*UpdateOrderRequest) ContextValidate

func (m *UpdateOrderRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update order request based on the context it is used

func (*UpdateOrderRequest) MarshalBinary

func (m *UpdateOrderRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateOrderRequest) UnmarshalBinary

func (m *UpdateOrderRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateOrderRequest) Validate

func (m *UpdateOrderRequest) Validate(formats strfmt.Registry) error

Validate validates this update order request

type UpdateOrderResponse

type UpdateOrderResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The updated Order.
	Order *Order `json:"order,omitempty"`
}

UpdateOrderResponse Defines the fields that are included in the response body of a request to the [UpdateOrder](#endpoint-orders-updateorder) endpoint. Example: {"order":{"created_at":"2019-08-23T18:26:18.243Z","id":"DREk7wJcyXNHqULq8JJ2iPAsluJZY","line_items":[{"base_price_money":{"amount":500,"currency":"USD"},"gross_sales_money":{"amount":500,"currency":"USD"},"name":"Small Coffee","quantity":"1","total_discount_money":{"amount":0,"currency":"USD"},"total_money":{"amount":500,"currency":"USD"},"total_tax_money":{"amount":0,"currency":"USD"},"uid":"EuYkakhmu3ksHIds5Hiot","variation_total_price_money":{"amount":500,"currency":"USD"}},{"base_price_money":{"amount":200,"currency":"USD"},"gross_sales_money":{"amount":400,"currency":"USD"},"name":"COOKIE","quantity":"2","total_discount_money":{"amount":0,"currency":"USD"},"total_money":{"amount":400,"currency":"USD"},"total_tax_money":{"amount":0,"currency":"USD"},"uid":"cookie_uid","variation_total_price_money":{"amount":400,"currency":"USD"}}],"location_id":"MXVQSVNDGN3C8","net_amounts":{"discount_money":{"amount":0,"currency":"USD"},"service_charge_money":{"amount":0,"currency":"USD"},"tax_money":{"amount":0,"currency":"USD"},"total_money":{"amount":900,"currency":"USD"}},"source":{"name":"Cookies"},"state":"OPEN","total_discount_money":{"amount":0,"currency":"USD"},"total_money":{"amount":900,"currency":"USD"},"total_service_charge_money":{"amount":0,"currency":"USD"},"total_tax_money":{"amount":0,"currency":"USD"},"updated_at":"2019-08-23T18:33:47.523Z","version":2}}

swagger:model UpdateOrderResponse

func (*UpdateOrderResponse) ContextValidate

func (m *UpdateOrderResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update order response based on the context it is used

func (*UpdateOrderResponse) MarshalBinary

func (m *UpdateOrderResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateOrderResponse) UnmarshalBinary

func (m *UpdateOrderResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateOrderResponse) Validate

func (m *UpdateOrderResponse) Validate(formats strfmt.Registry) error

Validate validates this update order response

type UpdateShiftRequest

type UpdateShiftRequest struct {

	// The updated `Shift` object.
	// Required: true
	Shift *Shift `json:"shift"`
}

UpdateShiftRequest A request to update a `Shift` object. Example: {"request_body":{"shift":{"breaks":[{"break_type_id":"REGS1EQR1TPZ5","end_at":"2019-01-25T06:16:00-05:00","expected_duration":"PT5M","id":"X7GAQYVVRRG6P","is_paid":true,"name":"Tea Break","start_at":"2019-01-25T06:11:00-05:00"}],"end_at":"2019-01-25T13:11:00-05:00","location_id":"PAA1RJZZKXBFG","start_at":"2019-01-25T03:11:00-05:00","team_member_id":"ormj0jJJZ5OZIzxrZYJI","version":1,"wage":{"hourly_rate":{"amount":1500,"currency":"USD"},"title":"Bartender"}}}}

swagger:model UpdateShiftRequest

func (*UpdateShiftRequest) ContextValidate

func (m *UpdateShiftRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update shift request based on the context it is used

func (*UpdateShiftRequest) MarshalBinary

func (m *UpdateShiftRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateShiftRequest) UnmarshalBinary

func (m *UpdateShiftRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateShiftRequest) Validate

func (m *UpdateShiftRequest) Validate(formats strfmt.Registry) error

Validate validates this update shift request

type UpdateShiftResponse

type UpdateShiftResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The updated `Shift`.
	Shift *Shift `json:"shift,omitempty"`
}

UpdateShiftResponse The response to a request to update a `Shift`. Contains the updated `Shift` object. May contain a set of `Error` objects if the request resulted in errors. Example: {"shift":{"breaks":[{"break_type_id":"REGS1EQR1TPZ5","end_at":"2019-01-25T06:16:00-05:00","expected_duration":"PT5M","id":"X7GAQYVVRRG6P","is_paid":true,"name":"Tea Break","start_at":"2019-01-25T06:11:00-05:00"}],"created_at":"2019-02-28T00:39:02Z","employee_id":"ormj0jJJZ5OZIzxrZYJI","end_at":"2019-01-25T13:11:00-05:00","id":"K0YH4CV5462JB","location_id":"PAA1RJZZKXBFG","start_at":"2019-01-25T03:11:00-05:00","status":"CLOSED","team_member_id":"ormj0jJJZ5OZIzxrZYJI","timezone":"America/New_York","updated_at":"2019-02-28T00:42:41Z","version":2,"wage":{"hourly_rate":{"amount":1500,"currency":"USD"},"title":"Bartender"}}}

swagger:model UpdateShiftResponse

func (*UpdateShiftResponse) ContextValidate

func (m *UpdateShiftResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update shift response based on the context it is used

func (*UpdateShiftResponse) MarshalBinary

func (m *UpdateShiftResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateShiftResponse) UnmarshalBinary

func (m *UpdateShiftResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateShiftResponse) Validate

func (m *UpdateShiftResponse) Validate(formats strfmt.Registry) error

Validate validates this update shift response

type UpdateSubscriptionRequest

type UpdateSubscriptionRequest struct {

	// The subscription object containing the current version, and fields to update.
	// Unset fields will be left at their current server values, and JSON `null` values will
	// be treated as a request to clear the relevant data.
	Subscription *Subscription `json:"subscription,omitempty"`
}

UpdateSubscriptionRequest Defines parameters in a [UpdateSubscription](#endpoint-subscriptions-updatesubscription) endpoint request. Example: {"request_body":{"subscription":{"price_override_money":{"amount":2000,"currency":"USD"},"tax_percentage":null,"version":1594155459464}}}

swagger:model UpdateSubscriptionRequest

func (*UpdateSubscriptionRequest) ContextValidate

func (m *UpdateSubscriptionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update subscription request based on the context it is used

func (*UpdateSubscriptionRequest) MarshalBinary

func (m *UpdateSubscriptionRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateSubscriptionRequest) UnmarshalBinary

func (m *UpdateSubscriptionRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateSubscriptionRequest) Validate

func (m *UpdateSubscriptionRequest) Validate(formats strfmt.Registry) error

Validate validates this update subscription request

type UpdateSubscriptionResponse

type UpdateSubscriptionResponse struct {

	// Information about errors encountered during the request.
	Errors []*Error `json:"errors"`

	// The modified `Subscription` object.
	Subscription *Subscription `json:"subscription,omitempty"`
}

UpdateSubscriptionResponse Defines the fields that are included in the response from the [UpdateSubscription](#endpoint-subscriptions-updatesubscription) endpoint. Example: {"subscription":{"created_at":"2020-08-03T21:53:10Z","customer_id":"CHFGVKYY8RSV93M5KCYTG4PN0G","id":"9ba40961-995a-4a3d-8c53-048c40cafc13","location_id":"S8GWD5R9QB376","plan_id":"6JHXF3B2CW3YKHDV4XEM674H","price_override_money":{"amount":2000,"currency":"USD"},"status":"ACTIVE","timezone":"America/Los_Angeles","version":1594311617331}}

swagger:model UpdateSubscriptionResponse

func (*UpdateSubscriptionResponse) ContextValidate

func (m *UpdateSubscriptionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update subscription response based on the context it is used

func (*UpdateSubscriptionResponse) MarshalBinary

func (m *UpdateSubscriptionResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateSubscriptionResponse) UnmarshalBinary

func (m *UpdateSubscriptionResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateSubscriptionResponse) Validate

func (m *UpdateSubscriptionResponse) Validate(formats strfmt.Registry) error

Validate validates this update subscription response

type UpdateTeamMemberRequest

type UpdateTeamMemberRequest struct {

	// The data which will be used to update the `TeamMember` object.
	TeamMember *TeamMember `json:"team_member,omitempty"`
}

UpdateTeamMemberRequest Represents an update request for a `TeamMember` object. Example: {"request_body":{"team_member":{"assigned_locations":{"assignment_type":"EXPLICIT_LOCATIONS","location_ids":["YSGH2WBKG94QZ","GA2Y9HSJ8KRYT"]},"email_address":"joe_doe@gmail.com","family_name":"Doe","given_name":"Joe","phone_number":"+14159283333","reference_id":"reference_id_1","status":"ACTIVE"}}}

swagger:model UpdateTeamMemberRequest

func (*UpdateTeamMemberRequest) ContextValidate

func (m *UpdateTeamMemberRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update team member request based on the context it is used

func (*UpdateTeamMemberRequest) MarshalBinary

func (m *UpdateTeamMemberRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateTeamMemberRequest) UnmarshalBinary

func (m *UpdateTeamMemberRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateTeamMemberRequest) Validate

func (m *UpdateTeamMemberRequest) Validate(formats strfmt.Registry) error

Validate validates this update team member request

type UpdateTeamMemberResponse

type UpdateTeamMemberResponse struct {

	// The errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The successfully updated `TeamMember` object.
	TeamMember *TeamMember `json:"team_member,omitempty"`
}

UpdateTeamMemberResponse Represents a response from an update request, containing the updated `TeamMember` object or error messages. Example: {"team_member":{"assigned_locations":{"assignment_type":"EXPLICIT_LOCATIONS","location_ids":["GA2Y9HSJ8KRYT","YSGH2WBKG94QZ"]},"created_at":"2020-06-11T22:55:45.867Z","email_address":"joe_doe@gmail.com","family_name":"Doe","given_name":"Joe","id":"1yJlHapkseYnNPETIU1B","is_owner":false,"phone_number":"+14159283333","reference_id":"reference_id_1","status":"ACTIVE"}}

swagger:model UpdateTeamMemberResponse

func (*UpdateTeamMemberResponse) ContextValidate

func (m *UpdateTeamMemberResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update team member response based on the context it is used

func (*UpdateTeamMemberResponse) MarshalBinary

func (m *UpdateTeamMemberResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateTeamMemberResponse) UnmarshalBinary

func (m *UpdateTeamMemberResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateTeamMemberResponse) Validate

func (m *UpdateTeamMemberResponse) Validate(formats strfmt.Registry) error

Validate validates this update team member response

type UpdateWageSettingRequest

type UpdateWageSettingRequest struct {

	// The new `WageSetting` object that will completely replace the existing one.
	// Required: true
	WageSetting *WageSetting `json:"wage_setting"`
}

UpdateWageSettingRequest Represents an update request for the `WageSetting` object describing a `TeamMember`. Example: {"request_body":{"wage_setting":{"is_overtime_exempt":true,"job_assignments":[{"annual_rate":{"amount":3000000,"currency":"USD"},"job_title":"Manager","pay_type":"SALARY","weekly_hours":40},{"hourly_rate":{"amount":1200,"currency":"USD"},"job_title":"Cashier","pay_type":"HOURLY"}]}}}

swagger:model UpdateWageSettingRequest

func (*UpdateWageSettingRequest) ContextValidate

func (m *UpdateWageSettingRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update wage setting request based on the context it is used

func (*UpdateWageSettingRequest) MarshalBinary

func (m *UpdateWageSettingRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateWageSettingRequest) UnmarshalBinary

func (m *UpdateWageSettingRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateWageSettingRequest) Validate

func (m *UpdateWageSettingRequest) Validate(formats strfmt.Registry) error

Validate validates this update wage setting request

type UpdateWageSettingResponse

type UpdateWageSettingResponse struct {

	// The errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The successfully updated `WageSetting` object.
	WageSetting *WageSetting `json:"wage_setting,omitempty"`
}

UpdateWageSettingResponse Represents a response from an update request, containing the updated `WageSetting` object or error messages. Example: {"wage_setting":{"created_at":"2019-07-10T17:26:48+00:00","is_overtime_exempt":true,"job_assignments":[{"annual_rate":{"amount":3000000,"currency":"USD"},"hourly_rate":{"amount":1443,"currency":"USD"},"job_title":"Manager","pay_type":"SALARY","weekly_hours":40},{"hourly_rate":{"amount":1200,"currency":"USD"},"job_title":"Cashier","pay_type":"HOURLY"}],"team_member_id":"-3oZQKPKVk6gUXU_V5Qa","updated_at":"2020-06-11T23:12:04+00:00","version":1}}

swagger:model UpdateWageSettingResponse

func (*UpdateWageSettingResponse) ContextValidate

func (m *UpdateWageSettingResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update wage setting response based on the context it is used

func (*UpdateWageSettingResponse) MarshalBinary

func (m *UpdateWageSettingResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateWageSettingResponse) UnmarshalBinary

func (m *UpdateWageSettingResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateWageSettingResponse) Validate

func (m *UpdateWageSettingResponse) Validate(formats strfmt.Registry) error

Validate validates this update wage setting response

type UpdateWorkweekConfigRequest

type UpdateWorkweekConfigRequest struct {

	// The updated `WorkweekConfig` object.
	// Required: true
	WorkweekConfig *WorkweekConfig `json:"workweek_config"`
}

UpdateWorkweekConfigRequest A request to update a `WorkweekConfig` object Example: {"request_body":{"workweek_config":{"start_of_day_local_time":"10:00","start_of_week":"MON","version":10}}}

swagger:model UpdateWorkweekConfigRequest

func (*UpdateWorkweekConfigRequest) ContextValidate

func (m *UpdateWorkweekConfigRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update workweek config request based on the context it is used

func (*UpdateWorkweekConfigRequest) MarshalBinary

func (m *UpdateWorkweekConfigRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateWorkweekConfigRequest) UnmarshalBinary

func (m *UpdateWorkweekConfigRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateWorkweekConfigRequest) Validate

func (m *UpdateWorkweekConfigRequest) Validate(formats strfmt.Registry) error

Validate validates this update workweek config request

type UpdateWorkweekConfigResponse

type UpdateWorkweekConfigResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The response object.
	WorkweekConfig *WorkweekConfig `json:"workweek_config,omitempty"`
}

UpdateWorkweekConfigResponse The response to a request to update a `WorkweekConfig` object. Contains the updated `WorkweekConfig` object. May contain a set of `Error` objects if the request resulted in errors. Example: {"workweek_config":{"created_at":"2016-02-04T00:58:24Z","id":"FY4VCAQN700GM","start_of_day_local_time":"10:00","start_of_week":"MON","updated_at":"2019-02-28T01:04:35Z","version":11}}

swagger:model UpdateWorkweekConfigResponse

func (*UpdateWorkweekConfigResponse) ContextValidate

func (m *UpdateWorkweekConfigResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update workweek config response based on the context it is used

func (*UpdateWorkweekConfigResponse) MarshalBinary

func (m *UpdateWorkweekConfigResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateWorkweekConfigResponse) UnmarshalBinary

func (m *UpdateWorkweekConfigResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateWorkweekConfigResponse) Validate

func (m *UpdateWorkweekConfigResponse) Validate(formats strfmt.Registry) error

Validate validates this update workweek config response

type UpsertCatalogObjectRequest

type UpsertCatalogObjectRequest struct {

	// A value you specify that uniquely identifies this
	// request among all your requests. A common way to create
	// a valid idempotency key is to use a Universally unique
	// identifier (UUID).
	//
	// If you're unsure whether a particular request was successful,
	// you can reattempt it with the same idempotency key without
	// worrying about creating duplicate objects.
	//
	// See [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency) for more information.
	// Required: true
	// Min Length: 1
	IdempotencyKey *string `json:"idempotency_key"`

	// A CatalogObject to be created or updated.
	//
	// - For updates, the object must be active (the `is_deleted` field is not `true`).
	// - For creates, the object ID must start with `#`. The provided ID is replaced with a server-generated ID.
	// Required: true
	Object *CatalogObject `json:"object"`
}

UpsertCatalogObjectRequest upsert catalog object request Example: {"request_body":{"idempotency_key":"af3d1afc-7212-4300-b463-0bfc5314a5ae","object":{"id":"#Cocoa","item_data":{"abbreviation":"Ch","description":"Hot chocolate","name":"Cocoa"},"type":"ITEM"}}}

swagger:model UpsertCatalogObjectRequest

func (*UpsertCatalogObjectRequest) ContextValidate

func (m *UpsertCatalogObjectRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this upsert catalog object request based on the context it is used

func (*UpsertCatalogObjectRequest) MarshalBinary

func (m *UpsertCatalogObjectRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpsertCatalogObjectRequest) UnmarshalBinary

func (m *UpsertCatalogObjectRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpsertCatalogObjectRequest) Validate

func (m *UpsertCatalogObjectRequest) Validate(formats strfmt.Registry) error

Validate validates this upsert catalog object request

type UpsertCatalogObjectResponse

type UpsertCatalogObjectResponse struct {

	// The successfully created or updated CatalogObject.
	CatalogObject *CatalogObject `json:"catalog_object,omitempty"`

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`

	// The mapping between client and server IDs for this upsert.
	IDMappings []*CatalogIDMapping `json:"id_mappings"`
}

UpsertCatalogObjectResponse upsert catalog object response Example: {"catalog_object":{"id":"7SB3ZQYJ5GDMVFL7JK46JCHT","is_deleted":false,"item_data":{"abbreviation":"Ch","description":"Hot chocolate","name":"Cocoa"},"type":"ITEM","updated_at":"2016-11-16T22:32:42.996Z","version":1479335562996},"id_mappings":[{"client_object_id":"#Cocoa","object_id":"7SB3ZQYJ5GDMVFL7JK46JCHT"}]}

swagger:model UpsertCatalogObjectResponse

func (*UpsertCatalogObjectResponse) ContextValidate

func (m *UpsertCatalogObjectResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this upsert catalog object response based on the context it is used

func (*UpsertCatalogObjectResponse) MarshalBinary

func (m *UpsertCatalogObjectResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpsertCatalogObjectResponse) UnmarshalBinary

func (m *UpsertCatalogObjectResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpsertCatalogObjectResponse) Validate

func (m *UpsertCatalogObjectResponse) Validate(formats strfmt.Registry) error

Validate validates this upsert catalog object response

type VoidTransactionRequest

type VoidTransactionRequest interface{}

VoidTransactionRequest void transaction request Example: {}

swagger:model VoidTransactionRequest

type VoidTransactionResponse

type VoidTransactionResponse struct {

	// Any errors that occurred during the request.
	Errors []*Error `json:"errors"`
}

VoidTransactionResponse Defines the fields that are included in the response body of a request to the [VoidTransaction](#endpoint-voidtransaction) endpoint. Example: {}

swagger:model VoidTransactionResponse

func (*VoidTransactionResponse) ContextValidate

func (m *VoidTransactionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this void transaction response based on the context it is used

func (*VoidTransactionResponse) MarshalBinary

func (m *VoidTransactionResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*VoidTransactionResponse) UnmarshalBinary

func (m *VoidTransactionResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*VoidTransactionResponse) Validate

func (m *VoidTransactionResponse) Validate(formats strfmt.Registry) error

Validate validates this void transaction response

type WageSetting

type WageSetting struct {

	// The timestamp in RFC 3339 format describing when the wage setting object was created.
	// Ex: "2018-10-04T04:00:00-07:00" or "2019-02-05T12:00:00Z"
	CreatedAt string `json:"created_at,omitempty"`

	// Whether the team member is exempt from the overtime rules of the seller country.
	IsOvertimeExempt bool `json:"is_overtime_exempt,omitempty"`

	// <b>Required</b> The ordered list of jobs that the team member is assigned to.
	// The first job assignment is considered the team member's "Primary Job".
	// <br>
	// <b>Min Length 1    Max Length 12</b>
	JobAssignments []*JobAssignment `json:"job_assignments"`

	// The unique ID of the `TeamMember` whom this wage setting describes.
	TeamMemberID string `json:"team_member_id,omitempty"`

	// The timestamp in RFC 3339 format describing when the wage setting object was last updated.
	// Ex: "2018-10-04T04:00:00-07:00" or "2019-02-05T12:00:00Z"
	UpdatedAt string `json:"updated_at,omitempty"`

	// Used for resolving concurrency issues; request will fail if version
	// provided does not match server version at time of request. If not provided,
	// Square executes a blind write, potentially overwriting data from another write. Read
	// about [optimistic concurrency](https://developer.squareup.com/docs/docs/working-with-apis/optimistic-concurrency)
	// in Square APIs for more information.
	Version int64 `json:"version,omitempty"`
}

WageSetting An object representing a team member's wage information.

swagger:model WageSetting

func (*WageSetting) ContextValidate

func (m *WageSetting) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this wage setting based on the context it is used

func (*WageSetting) MarshalBinary

func (m *WageSetting) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*WageSetting) UnmarshalBinary

func (m *WageSetting) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*WageSetting) Validate

func (m *WageSetting) Validate(formats strfmt.Registry) error

Validate validates this wage setting

type Weekday

type Weekday string

Weekday The days of the week.

swagger:model Weekday

const (

	// WeekdayMON captures enum value "MON"
	WeekdayMON Weekday = "MON"

	// WeekdayTUE captures enum value "TUE"
	WeekdayTUE Weekday = "TUE"

	// WeekdayWED captures enum value "WED"
	WeekdayWED Weekday = "WED"

	// WeekdayTHU captures enum value "THU"
	WeekdayTHU Weekday = "THU"

	// WeekdayFRI captures enum value "FRI"
	WeekdayFRI Weekday = "FRI"

	// WeekdaySAT captures enum value "SAT"
	WeekdaySAT Weekday = "SAT"

	// WeekdaySUN captures enum value "SUN"
	WeekdaySUN Weekday = "SUN"
)

func (Weekday) ContextValidate

func (m Weekday) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this weekday based on context it is used

func (Weekday) Validate

func (m Weekday) Validate(formats strfmt.Registry) error

Validate validates this weekday

type WorkweekConfig

type WorkweekConfig struct {

	// A read-only timestamp in RFC 3339 format; presented in UTC
	CreatedAt string `json:"created_at,omitempty"`

	// UUID for this object
	ID string `json:"id,omitempty"`

	// The local time at which a business week cuts over. Represented as a
	// string in `HH:MM` format (`HH:MM:SS` is also accepted, but seconds are
	// truncated).
	// Required: true
	// Min Length: 1
	StartOfDayLocalTime *string `json:"start_of_day_local_time"`

	// The day of the week on which a business week cuts over for
	// compensation purposes.
	// See [Weekday](#type-weekday) for possible values
	// Required: true
	StartOfWeek *string `json:"start_of_week"`

	// A read-only timestamp in RFC 3339 format; presented in UTC
	UpdatedAt string `json:"updated_at,omitempty"`

	// Used for resolving concurrency issues; request will fail if version
	// provided does not match server version at time of request. If not provided,
	// Square executes a blind write; potentially overwriting data from another
	// write.
	Version int64 `json:"version,omitempty"`
}

WorkweekConfig Sets the Day of the week and hour of the day that a business starts a work week. Used for the calculation of overtime pay.

swagger:model WorkweekConfig

func (*WorkweekConfig) ContextValidate

func (m *WorkweekConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this workweek config based on context it is used

func (*WorkweekConfig) MarshalBinary

func (m *WorkweekConfig) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*WorkweekConfig) UnmarshalBinary

func (m *WorkweekConfig) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*WorkweekConfig) Validate

func (m *WorkweekConfig) Validate(formats strfmt.Registry) error

Validate validates this workweek config

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL