square

package module
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

README

Square Go Library

fern shield go shield

The Square Go library provides convenient access to the Square API from Go.

Requirements

This module requires Go version >= 1.18.

Installation

Run the following command to use the Square Go library in your module:

go get github.com/square/square-go-sdk

Usage

package main

import (
    "context"
    "fmt"

    "github.com/square/square-go-sdk"
    squareclient "github.com/square/square-go-sdk/client"
    "github.com/square/square-go-sdk/option"
)


func main() {
	client := squareclient.NewClient(
		option.WithToken("<YOUR_ACCESS_TOKEN>"),
	)
	
	response, err := client.Payments.Create(
		context.TODO(),
		&square.CreatePaymentRequest{
			IdempotencyKey: "4935a656-a929-4792-b97c-8848be85c27c",
			SourceID:       "CASH",
			AmountMoney: &square.Money{
				Amount:   square.Int64(100),
				Currency: square.CurrencyUsd.Ptr(),
			},
			TipMoney: &square.Money{
				Amount:   square.Int64(50),
				Currency: square.CurrencyUsd.Ptr(),
			},
			CashDetails: &square.CashPaymentDetails{
				BuyerSuppliedMoney: &square.Money{
					Amount:   square.Int64(200),
					Currency: square.CurrencyUsd.Ptr(),
				},
			},
		},
	)

	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(response.Payment)
}

Optional Parameters

This library models optional primitives and enum types as pointers. This is primarily meant to distinguish default zero values from explicit values (e.g. false for bool and "" for string). A collection of helper functions are provided to easily map a primitive or enum to its pointer-equivalent (e.g. square.String).

For example, consider the client.Payments.List endpoint usage below:

response, err := client.Payments.List(
    context.TODO(),
    &square.ListPaymentsRequest{
        Total: square.Int64(100),
    },
)

Environments

By default, Square's production environment is used. However, you can choose between Square's different environments (i.e. sandbox and production), by using the square.Environments type like so:

client := squareclient.NewClient(
    option.WithBaseURL(square.Environments.Sandbox),
)

You can also configure any arbitrary base URL, which is particularly useful in test environments, like so:

client := squareclient.NewClient(
    option.WithBaseURL("https://example.com"),
)

Automatic Pagination

List endpoints are paginated. The SDK provides an iterator so that you can simply loop over the items:

ctx := context.TODO()
page, err := client.Payments.List(
    ctx,
    &square.ListPaymentsRequest{
        Total: square.Int64(100),
    },
)
if err != nil {
    return nil, err
}
iter := page.Iterator()
for iter.Next(ctx) {
    payment := iter.Current()
    fmt.Printf("Got payment: %v\n", *payment.ID)
}
if err := iter.Err(); err != nil {
    // Handle the error!
}

You can also iterate page-by-page:

for page != nil {
    for _, payment := range page.Results {
        fmt.Printf("Got payment: %v\n", *payment.ID)
    }
    page, err = page.GetNextPage(ctx)
    if errors.Is(err, core.ErrNoPages) {
        break
    }
    if err != nil {
        // Handle the error!
    }
}

Timeouts

Setting a timeout for each individual request is as simple as using the standard context library. Setting a one second timeout for an individual API call looks like the following:

ctx, cancel := context.WithTimeout(context.TODO(), time.Second)
defer cancel()

response, err := client.Payments.List(
    ctx,
    &square.ListPaymentsRequest{
        Total: square.Int64(100),
    },
)

Errors

Structured error types are returned from API calls that return non-success status codes. For example, you can check if the error was due to an unauthorized request (i.e. status code 401) with the following:

response, err := client.Payments.Create(...)
if err != nil {
    if apiError, ok := err.(*core.APIError); ok {
        switch (apiError.StatusCode) {
            case http.StatusUnauthorized:
                // Do something with the unauthorized request ...
        }
    }
    return err
}

These errors are also compatible with the errors.Is and errors.As APIs, so you can access the error like so:

response, err := client.Payments.Create(...)
if err != nil {
    var apiError *core.APIError
    if errors.As(err, apiError) {
        // Do something with the API error ...
    }
    return err
}

If you'd like to wrap the errors with additional information and still retain the ability to access the type with errors.Is and errors.As, you can use the %w directive:

response, err := client.Payments.Create(...)
if err != nil {
    return fmt.Errorf("failed to create payment: %w", err)
}

Webhook Signature Verification

The SDK provides a utility method that allow you to verify webhook signatures and ensure that all webhook events originate from Square. The client.Webhooks.VerifySignature method will verify the signature:

err := client.Webhooks.VerifySignature(
    context.TODO(),
    &square.VerifySignatureRequest{
        RequestBody: requestBody,
        SignatureHeader: header.Get("x-square-hmacsha256-signature"),
        SignatureKey: "YOUR_SIGNATURE_KEY",
        NotificationURL: "https://example.com/webhook", // The URL where event notifications are sent.
    },
);
if err != nil {
    return nil, err
}

Advanced

Request Options

A variety of request options are included to adapt the behavior of the library, which includes configuring authorization tokens, or providing your own instrumented *http.Client. Both of these options are shown below:

client := squareclient.NewClient(
    option.WithToken("<YOUR_API_KEY>"),
    option.WithHTTPClient(
        &http.Client{
            Timeout: 5 * time.Second,
        },
    ),
)

These request options can either be specified on the client so that they're applied on every request (shown above), or for an individual request like so:

response, err := client.Payments.List(
    ctx,
    &square.ListPaymentsRequest{
        Total: square.Int64(100),
    },
    option.WithToken("<YOUR_API_KEY>"),
)

Providing your own *http.Client is recommended. Otherwise, the http.DefaultClient will be used, and your client will wait indefinitely for a response (unless the per-request, context-based timeout is used).

Send Extra Properties

All endpoints support sending additional request body properties and query parameters that are not already supported by the SDK. This is useful whenever you need to interact with an unreleased or hidden feature.

For example, suppose that a new feature was rolled out that allowed users to list all deactivated team members. You could the relevant query parameters like so:

response, err := client.TeamMembers.Search(
    context.TODO(),
    &square.SearchTeamMembersRequest{
        Limit: square.Int(100),
    },
    option.WithQueryParameters(
        url.Values{
            "status": []string{"DEACTIVATED"},
        },
    ),
)
Receive Extra Properties

Every response type includes the GetExtraProperties method, which returns a map that contains any properties in the JSON response that were not specified in the struct. Similar to the use case for sending additional parameters, this can be useful for API features not present in the SDK yet.

You can receive and interact with the extra properties like so:

response, err := client.Payments.Create(...)
if err != nil {
    return nil, err
}
extraProperties := response.GetExtraProperties()
Retries

The Square Go client is instrumented with automatic retries with exponential backoff. A request will be retried as long as the request is deemed retriable and the number of retry attempts has not grown larger than the configured retry limit (default: 2).

A request is deemed retriable when any of the following HTTP status codes is returned:

  • 408 (Timeout)
  • 429 (Too Many Requests)
  • 5XX (Internal Server Errors)

You can use the option.WithMaxAttempts option to configure the maximum retry limit to your liking. For example, if you want to disable retries for the client entirely, you can set this value to 1 like so:

client := squareclient.NewClient(
    option.WithMaxAttempts(1),
)

This can be done for an individual request, too:

response, err := client.Payments.List(
    context.TODO(),
    &square.ListPaymentsRequest{
        Total: square.Int64(100),
    },
    option.WithMaxAttempts(1),
)

Contributing

While we value open-source contributions to this SDK, this library is generated programmatically. Additions made directly to this library would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us!

On the other hand, contributions to the README.md are always very welcome!

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Environments = struct {
	Production string
	Sandbox    string
}{
	Production: "https://connect.squareup.com",
	Sandbox:    "https://connect.squareupsandbox.com",
}

Environments defines all of the API environments. These values can be used with the WithBaseURL RequestOption to override the client's default environment, if any.

Functions

func Bool

func Bool(b bool) *bool

Bool returns a pointer to the given bool value.

func Byte

func Byte(b byte) *byte

Byte returns a pointer to the given byte value.

func Complex128

func Complex128(c complex128) *complex128

Complex128 returns a pointer to the given complex128 value.

func Complex64

func Complex64(c complex64) *complex64

Complex64 returns a pointer to the given complex64 value.

func Float32

func Float32(f float32) *float32

Float32 returns a pointer to the given float32 value.

func Float64

func Float64(f float64) *float64

Float64 returns a pointer to the given float64 value.

func Int

func Int(i int) *int

Int returns a pointer to the given int value.

func Int16

func Int16(i int16) *int16

Int16 returns a pointer to the given int16 value.

func Int32

func Int32(i int32) *int32

Int32 returns a pointer to the given int32 value.

func Int64

func Int64(i int64) *int64

Int64 returns a pointer to the given int64 value.

func Int8

func Int8(i int8) *int8

Int8 returns a pointer to the given int8 value.

func MustParseDate

func MustParseDate(date string) time.Time

MustParseDate attempts to parse the given string as a date time.Time, and panics upon failure.

func MustParseDateTime

func MustParseDateTime(datetime string) time.Time

MustParseDateTime attempts to parse the given string as a datetime time.Time, and panics upon failure.

func Rune

func Rune(r rune) *rune

Rune returns a pointer to the given rune value.

func String

func String(s string) *string

String returns a pointer to the given string value.

func Time

func Time(t time.Time) *time.Time

Time returns a pointer to the given time.Time value.

func UUID

func UUID(u uuid.UUID) *uuid.UUID

UUID returns a pointer to the given uuid.UUID value.

func Uint

func Uint(u uint) *uint

Uint returns a pointer to the given uint value.

func Uint16

func Uint16(u uint16) *uint16

Uint16 returns a pointer to the given uint16 value.

func Uint32

func Uint32(u uint32) *uint32

Uint32 returns a pointer to the given uint32 value.

func Uint64

func Uint64(u uint64) *uint64

Uint64 returns a pointer to the given uint64 value.

func Uint8

func Uint8(u uint8) *uint8

Uint8 returns a pointer to the given uint8 value.

func Uintptr

func Uintptr(u uintptr) *uintptr

Uintptr returns a pointer to the given uintptr value.

Types

type AcceptDisputeResponse

type AcceptDisputeResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// Details about the accepted dispute.
	Dispute *Dispute `json:"dispute,omitempty" url:"dispute,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields in an `AcceptDispute` response.

func (*AcceptDisputeResponse) GetDispute

func (a *AcceptDisputeResponse) GetDispute() *Dispute

func (*AcceptDisputeResponse) GetErrors

func (a *AcceptDisputeResponse) GetErrors() []*Error

func (*AcceptDisputeResponse) GetExtraProperties

func (a *AcceptDisputeResponse) GetExtraProperties() map[string]interface{}

func (*AcceptDisputeResponse) String

func (a *AcceptDisputeResponse) String() string

func (*AcceptDisputeResponse) UnmarshalJSON

func (a *AcceptDisputeResponse) UnmarshalJSON(data []byte) error

type AcceptDisputesRequest added in v1.2.0

type AcceptDisputesRequest struct {
	// The ID of the dispute you want to accept.
	DisputeID string `json:"-" url:"-"`
}

type AcceptedPaymentMethods

type AcceptedPaymentMethods struct {
	// Whether Apple Pay is accepted at checkout.
	ApplePay *bool `json:"apple_pay,omitempty" url:"apple_pay,omitempty"`
	// Whether Google Pay is accepted at checkout.
	GooglePay *bool `json:"google_pay,omitempty" url:"google_pay,omitempty"`
	// Whether Cash App Pay is accepted at checkout.
	CashAppPay *bool `json:"cash_app_pay,omitempty" url:"cash_app_pay,omitempty"`
	// Whether Afterpay/Clearpay is accepted at checkout.
	AfterpayClearpay *bool `json:"afterpay_clearpay,omitempty" url:"afterpay_clearpay,omitempty"`
	// contains filtered or unexported fields
}

func (*AcceptedPaymentMethods) GetAfterpayClearpay

func (a *AcceptedPaymentMethods) GetAfterpayClearpay() *bool

func (*AcceptedPaymentMethods) GetApplePay

func (a *AcceptedPaymentMethods) GetApplePay() *bool

func (*AcceptedPaymentMethods) GetCashAppPay

func (a *AcceptedPaymentMethods) GetCashAppPay() *bool

func (*AcceptedPaymentMethods) GetExtraProperties

func (a *AcceptedPaymentMethods) GetExtraProperties() map[string]interface{}

func (*AcceptedPaymentMethods) GetGooglePay

func (a *AcceptedPaymentMethods) GetGooglePay() *bool

func (*AcceptedPaymentMethods) String

func (a *AcceptedPaymentMethods) String() string

func (*AcceptedPaymentMethods) UnmarshalJSON

func (a *AcceptedPaymentMethods) UnmarshalJSON(data []byte) error

type AccumulateLoyaltyPointsResponse

type AccumulateLoyaltyPointsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The resulting loyalty event. Starting in Square version 2022-08-17, this field is no longer returned.
	Event *LoyaltyEvent `json:"event,omitempty" url:"event,omitempty"`
	// The resulting loyalty events. If the purchase qualifies for points, the `ACCUMULATE_POINTS` event
	// is always included. When using the Orders API, the `ACCUMULATE_PROMOTION_POINTS` event is included
	// if the purchase also qualifies for a loyalty promotion.
	Events []*LoyaltyEvent `json:"events,omitempty" url:"events,omitempty"`
	// contains filtered or unexported fields
}

Represents an [AccumulateLoyaltyPoints](api-endpoint:Loyalty-AccumulateLoyaltyPoints) response.

func (*AccumulateLoyaltyPointsResponse) GetErrors

func (a *AccumulateLoyaltyPointsResponse) GetErrors() []*Error

func (*AccumulateLoyaltyPointsResponse) GetEvent

func (*AccumulateLoyaltyPointsResponse) GetEvents

func (*AccumulateLoyaltyPointsResponse) GetExtraProperties

func (a *AccumulateLoyaltyPointsResponse) GetExtraProperties() map[string]interface{}

func (*AccumulateLoyaltyPointsResponse) String

func (*AccumulateLoyaltyPointsResponse) UnmarshalJSON

func (a *AccumulateLoyaltyPointsResponse) UnmarshalJSON(data []byte) error

type AchDetails

type AchDetails struct {
	// The routing number for the bank account.
	RoutingNumber *string `json:"routing_number,omitempty" url:"routing_number,omitempty"`
	// The last few digits of the bank account number.
	AccountNumberSuffix *string `json:"account_number_suffix,omitempty" url:"account_number_suffix,omitempty"`
	// The type of the bank account performing the transfer. The account type can be `CHECKING`,
	// `SAVINGS`, or `UNKNOWN`.
	AccountType *string `json:"account_type,omitempty" url:"account_type,omitempty"`
	// contains filtered or unexported fields
}

ACH-specific details about `BANK_ACCOUNT` type payments with the `transfer_type` of `ACH`.

func (*AchDetails) GetAccountNumberSuffix

func (a *AchDetails) GetAccountNumberSuffix() *string

func (*AchDetails) GetAccountType

func (a *AchDetails) GetAccountType() *string

func (*AchDetails) GetExtraProperties

func (a *AchDetails) GetExtraProperties() map[string]interface{}

func (*AchDetails) GetRoutingNumber

func (a *AchDetails) GetRoutingNumber() *string

func (*AchDetails) String

func (a *AchDetails) String() string

func (*AchDetails) UnmarshalJSON

func (a *AchDetails) UnmarshalJSON(data []byte) error

type ActionCancelReason

type ActionCancelReason string
const (
	ActionCancelReasonBuyerCanceled  ActionCancelReason = "BUYER_CANCELED"
	ActionCancelReasonSellerCanceled ActionCancelReason = "SELLER_CANCELED"
	ActionCancelReasonTimedOut       ActionCancelReason = "TIMED_OUT"
)

func NewActionCancelReasonFromString

func NewActionCancelReasonFromString(s string) (ActionCancelReason, error)

func (ActionCancelReason) Ptr

type ActivityType

type ActivityType string
const (
	ActivityTypeAdjustment                            ActivityType = "ADJUSTMENT"
	ActivityTypeAppFeeRefund                          ActivityType = "APP_FEE_REFUND"
	ActivityTypeAppFeeRevenue                         ActivityType = "APP_FEE_REVENUE"
	ActivityTypeAutomaticSavings                      ActivityType = "AUTOMATIC_SAVINGS"
	ActivityTypeAutomaticSavingsReversed              ActivityType = "AUTOMATIC_SAVINGS_REVERSED"
	ActivityTypeCharge                                ActivityType = "CHARGE"
	ActivityTypeDepositFee                            ActivityType = "DEPOSIT_FEE"
	ActivityTypeDepositFeeReversed                    ActivityType = "DEPOSIT_FEE_REVERSED"
	ActivityTypeDispute                               ActivityType = "DISPUTE"
	ActivityTypeEscheatment                           ActivityType = "ESCHEATMENT"
	ActivityTypeFee                                   ActivityType = "FEE"
	ActivityTypeFreeProcessing                        ActivityType = "FREE_PROCESSING"
	ActivityTypeHoldAdjustment                        ActivityType = "HOLD_ADJUSTMENT"
	ActivityTypeInitialBalanceChange                  ActivityType = "INITIAL_BALANCE_CHANGE"
	ActivityTypeMoneyTransfer                         ActivityType = "MONEY_TRANSFER"
	ActivityTypeMoneyTransferReversal                 ActivityType = "MONEY_TRANSFER_REVERSAL"
	ActivityTypeOpenDispute                           ActivityType = "OPEN_DISPUTE"
	ActivityTypeOther                                 ActivityType = "OTHER"
	ActivityTypeOtherAdjustment                       ActivityType = "OTHER_ADJUSTMENT"
	ActivityTypePaidServiceFee                        ActivityType = "PAID_SERVICE_FEE"
	ActivityTypePaidServiceFeeRefund                  ActivityType = "PAID_SERVICE_FEE_REFUND"
	ActivityTypeRedemptionCode                        ActivityType = "REDEMPTION_CODE"
	ActivityTypeRefund                                ActivityType = "REFUND"
	ActivityTypeReleaseAdjustment                     ActivityType = "RELEASE_ADJUSTMENT"
	ActivityTypeReserveHold                           ActivityType = "RESERVE_HOLD"
	ActivityTypeReserveRelease                        ActivityType = "RESERVE_RELEASE"
	ActivityTypeReturnedPayout                        ActivityType = "RETURNED_PAYOUT"
	ActivityTypeSquareCapitalPayment                  ActivityType = "SQUARE_CAPITAL_PAYMENT"
	ActivityTypeSquareCapitalReversedPayment          ActivityType = "SQUARE_CAPITAL_REVERSED_PAYMENT"
	ActivityTypeSubscriptionFee                       ActivityType = "SUBSCRIPTION_FEE"
	ActivityTypeSubscriptionFeePaidRefund             ActivityType = "SUBSCRIPTION_FEE_PAID_REFUND"
	ActivityTypeSubscriptionFeeRefund                 ActivityType = "SUBSCRIPTION_FEE_REFUND"
	ActivityTypeTaxOnFee                              ActivityType = "TAX_ON_FEE"
	ActivityTypeThirdPartyFee                         ActivityType = "THIRD_PARTY_FEE"
	ActivityTypeThirdPartyFeeRefund                   ActivityType = "THIRD_PARTY_FEE_REFUND"
	ActivityTypePayout                                ActivityType = "PAYOUT"
	ActivityTypeAutomaticBitcoinConversions           ActivityType = "AUTOMATIC_BITCOIN_CONVERSIONS"
	ActivityTypeAutomaticBitcoinConversionsReversed   ActivityType = "AUTOMATIC_BITCOIN_CONVERSIONS_REVERSED"
	ActivityTypeCreditCardRepayment                   ActivityType = "CREDIT_CARD_REPAYMENT"
	ActivityTypeCreditCardRepaymentReversed           ActivityType = "CREDIT_CARD_REPAYMENT_REVERSED"
	ActivityTypeLocalOffersCashback                   ActivityType = "LOCAL_OFFERS_CASHBACK"
	ActivityTypeLocalOffersFee                        ActivityType = "LOCAL_OFFERS_FEE"
	ActivityTypePercentageProcessingEnrollment        ActivityType = "PERCENTAGE_PROCESSING_ENROLLMENT"
	ActivityTypePercentageProcessingDeactivation      ActivityType = "PERCENTAGE_PROCESSING_DEACTIVATION"
	ActivityTypePercentageProcessingRepayment         ActivityType = "PERCENTAGE_PROCESSING_REPAYMENT"
	ActivityTypePercentageProcessingRepaymentReversed ActivityType = "PERCENTAGE_PROCESSING_REPAYMENT_REVERSED"
	ActivityTypeProcessingFee                         ActivityType = "PROCESSING_FEE"
	ActivityTypeProcessingFeeRefund                   ActivityType = "PROCESSING_FEE_REFUND"
	ActivityTypeUndoProcessingFeeRefund               ActivityType = "UNDO_PROCESSING_FEE_REFUND"
	ActivityTypeGiftCardLoadFee                       ActivityType = "GIFT_CARD_LOAD_FEE"
	ActivityTypeGiftCardLoadFeeRefund                 ActivityType = "GIFT_CARD_LOAD_FEE_REFUND"
	ActivityTypeUndoGiftCardLoadFeeRefund             ActivityType = "UNDO_GIFT_CARD_LOAD_FEE_REFUND"
	ActivityTypeBalanceFoldersTransfer                ActivityType = "BALANCE_FOLDERS_TRANSFER"
	ActivityTypeBalanceFoldersTransferReversed        ActivityType = "BALANCE_FOLDERS_TRANSFER_REVERSED"
	ActivityTypeGiftCardPoolTransfer                  ActivityType = "GIFT_CARD_POOL_TRANSFER"
	ActivityTypeGiftCardPoolTransferReversed          ActivityType = "GIFT_CARD_POOL_TRANSFER_REVERSED"
	ActivityTypeSquarePayrollTransfer                 ActivityType = "SQUARE_PAYROLL_TRANSFER"
	ActivityTypeSquarePayrollTransferReversed         ActivityType = "SQUARE_PAYROLL_TRANSFER_REVERSED"
)

func NewActivityTypeFromString

func NewActivityTypeFromString(s string) (ActivityType, error)

func (ActivityType) Ptr

func (a ActivityType) Ptr() *ActivityType

type AddGroupToCustomerResponse

type AddGroupToCustomerResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [AddGroupToCustomer](api-endpoint:Customers-AddGroupToCustomer) endpoint.

func (*AddGroupToCustomerResponse) GetErrors

func (a *AddGroupToCustomerResponse) GetErrors() []*Error

func (*AddGroupToCustomerResponse) GetExtraProperties

func (a *AddGroupToCustomerResponse) GetExtraProperties() map[string]interface{}

func (*AddGroupToCustomerResponse) String

func (a *AddGroupToCustomerResponse) String() string

func (*AddGroupToCustomerResponse) UnmarshalJSON

func (a *AddGroupToCustomerResponse) UnmarshalJSON(data []byte) error

type AdditionalRecipient

type AdditionalRecipient struct {
	// The location ID for a recipient (other than the merchant) receiving a portion of this tender.
	LocationID string `json:"location_id" url:"location_id"`
	// The description of the additional recipient.
	Description *string `json:"description,omitempty" url:"description,omitempty"`
	// The amount of money distributed to the recipient.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// The unique ID for the RETIRED `AdditionalRecipientReceivable` object. This field should be empty for any `AdditionalRecipient` objects created after the retirement.
	ReceivableID *string `json:"receivable_id,omitempty" url:"receivable_id,omitempty"`
	// contains filtered or unexported fields
}

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

func (*AdditionalRecipient) GetAmountMoney

func (a *AdditionalRecipient) GetAmountMoney() *Money

func (*AdditionalRecipient) GetDescription

func (a *AdditionalRecipient) GetDescription() *string

func (*AdditionalRecipient) GetExtraProperties

func (a *AdditionalRecipient) GetExtraProperties() map[string]interface{}

func (*AdditionalRecipient) GetLocationID

func (a *AdditionalRecipient) GetLocationID() string

func (*AdditionalRecipient) GetReceivableID

func (a *AdditionalRecipient) GetReceivableID() *string

func (*AdditionalRecipient) String

func (a *AdditionalRecipient) String() string

func (*AdditionalRecipient) UnmarshalJSON

func (a *AdditionalRecipient) UnmarshalJSON(data []byte) error

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" url:"address_line_1,omitempty"`
	// The second line of the address, if any.
	AddressLine2 *string `json:"address_line_2,omitempty" url:"address_line_2,omitempty"`
	// The third line of the address, if any.
	AddressLine3 *string `json:"address_line_3,omitempty" url:"address_line_3,omitempty"`
	// The city or town of the address. For a full list of field meanings by country, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses).
	Locality *string `json:"locality,omitempty" url:"locality,omitempty"`
	// A civil region within the address's `locality`, if any.
	Sublocality *string `json:"sublocality,omitempty" url:"sublocality,omitempty"`
	// A civil region within the address's `sublocality`, if any.
	Sublocality2 *string `json:"sublocality_2,omitempty" url:"sublocality_2,omitempty"`
	// A civil region within the address's `sublocality_2`, if any.
	Sublocality3 *string `json:"sublocality_3,omitempty" url:"sublocality_3,omitempty"`
	// A civil entity within the address's country. In the US, this
	// is the state. For a full list of field meanings by country, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses).
	AdministrativeDistrictLevel1 *string `json:"administrative_district_level_1,omitempty" url:"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" url:"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" url:"administrative_district_level_3,omitempty"`
	// The address's postal code. For a full list of field meanings by country, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses).
	PostalCode *string `json:"postal_code,omitempty" url:"postal_code,omitempty"`
	// The address's country, in the two-letter format of ISO 3166. For example, `US` or `FR`.
	// See [Country](#type-country) for possible values
	Country *Country `json:"country,omitempty" url:"country,omitempty"`
	// Optional first name when it's representing recipient.
	FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"`
	// Optional last name when it's representing recipient.
	LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"`
	// contains filtered or unexported fields
}

Represents a postal address in a country. For more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses).

func (*Address) GetAddressLine1

func (a *Address) GetAddressLine1() *string

func (*Address) GetAddressLine2

func (a *Address) GetAddressLine2() *string

func (*Address) GetAddressLine3

func (a *Address) GetAddressLine3() *string

func (*Address) GetAdministrativeDistrictLevel1

func (a *Address) GetAdministrativeDistrictLevel1() *string

func (*Address) GetAdministrativeDistrictLevel2

func (a *Address) GetAdministrativeDistrictLevel2() *string

func (*Address) GetAdministrativeDistrictLevel3

func (a *Address) GetAdministrativeDistrictLevel3() *string

func (*Address) GetCountry

func (a *Address) GetCountry() *Country

func (*Address) GetExtraProperties

func (a *Address) GetExtraProperties() map[string]interface{}

func (*Address) GetFirstName

func (a *Address) GetFirstName() *string

func (*Address) GetLastName

func (a *Address) GetLastName() *string

func (*Address) GetLocality

func (a *Address) GetLocality() *string

func (*Address) GetPostalCode

func (a *Address) GetPostalCode() *string

func (*Address) GetSublocality

func (a *Address) GetSublocality() *string

func (*Address) GetSublocality2

func (a *Address) GetSublocality2() *string

func (*Address) GetSublocality3

func (a *Address) GetSublocality3() *string

func (*Address) String

func (a *Address) String() string

func (*Address) UnmarshalJSON

func (a *Address) UnmarshalJSON(data []byte) error

type AdjustLoyaltyPointsResponse

type AdjustLoyaltyPointsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The resulting event data for the adjustment.
	Event *LoyaltyEvent `json:"event,omitempty" url:"event,omitempty"`
	// contains filtered or unexported fields
}

Represents an [AdjustLoyaltyPoints](api-endpoint:Loyalty-AdjustLoyaltyPoints) request.

func (*AdjustLoyaltyPointsResponse) GetErrors

func (a *AdjustLoyaltyPointsResponse) GetErrors() []*Error

func (*AdjustLoyaltyPointsResponse) GetEvent

func (*AdjustLoyaltyPointsResponse) GetExtraProperties

func (a *AdjustLoyaltyPointsResponse) GetExtraProperties() map[string]interface{}

func (*AdjustLoyaltyPointsResponse) String

func (a *AdjustLoyaltyPointsResponse) String() string

func (*AdjustLoyaltyPointsResponse) UnmarshalJSON

func (a *AdjustLoyaltyPointsResponse) UnmarshalJSON(data []byte) error

type AfterpayDetails

type AfterpayDetails struct {
	// Email address on the buyer's Afterpay account.
	EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"`
	// contains filtered or unexported fields
}

Additional details about Afterpay payments.

func (*AfterpayDetails) GetEmailAddress

func (a *AfterpayDetails) GetEmailAddress() *string

func (*AfterpayDetails) GetExtraProperties

func (a *AfterpayDetails) GetExtraProperties() map[string]interface{}

func (*AfterpayDetails) String

func (a *AfterpayDetails) String() string

func (*AfterpayDetails) UnmarshalJSON

func (a *AfterpayDetails) UnmarshalJSON(data []byte) error

type ApplicationDetails

type ApplicationDetails struct {
	// The Square product, such as Square Point of Sale (POS),
	// Square Invoices, or Square Virtual Terminal.
	// See [ExternalSquareProduct](#type-externalsquareproduct) for possible values
	SquareProduct *ApplicationDetailsExternalSquareProduct `json:"square_product,omitempty" url:"square_product,omitempty"`
	// The Square ID assigned to the application used to take the payment.
	// Application developers can use this information to identify payments that
	// their application processed.
	// For example, if a developer uses a custom application to process payments,
	// this field contains the application ID from the Developer Dashboard.
	// If a seller uses a [Square App Marketplace](https://developer.squareup.com/docs/app-marketplace)
	// application to process payments, the field contains the corresponding application ID.
	ApplicationID *string `json:"application_id,omitempty" url:"application_id,omitempty"`
	// contains filtered or unexported fields
}

Details about the application that took the payment.

func (*ApplicationDetails) GetApplicationID

func (a *ApplicationDetails) GetApplicationID() *string

func (*ApplicationDetails) GetExtraProperties

func (a *ApplicationDetails) GetExtraProperties() map[string]interface{}

func (*ApplicationDetails) GetSquareProduct

func (*ApplicationDetails) String

func (a *ApplicationDetails) String() string

func (*ApplicationDetails) UnmarshalJSON

func (a *ApplicationDetails) UnmarshalJSON(data []byte) error

type ApplicationDetailsExternalSquareProduct

type ApplicationDetailsExternalSquareProduct string

A list of products to return to external callers.

const (
	ApplicationDetailsExternalSquareProductAppointments    ApplicationDetailsExternalSquareProduct = "APPOINTMENTS"
	ApplicationDetailsExternalSquareProductEcommerceAPI    ApplicationDetailsExternalSquareProduct = "ECOMMERCE_API"
	ApplicationDetailsExternalSquareProductInvoices        ApplicationDetailsExternalSquareProduct = "INVOICES"
	ApplicationDetailsExternalSquareProductOnlineStore     ApplicationDetailsExternalSquareProduct = "ONLINE_STORE"
	ApplicationDetailsExternalSquareProductOther           ApplicationDetailsExternalSquareProduct = "OTHER"
	ApplicationDetailsExternalSquareProductRestaurants     ApplicationDetailsExternalSquareProduct = "RESTAURANTS"
	ApplicationDetailsExternalSquareProductRetail          ApplicationDetailsExternalSquareProduct = "RETAIL"
	ApplicationDetailsExternalSquareProductSquarePos       ApplicationDetailsExternalSquareProduct = "SQUARE_POS"
	ApplicationDetailsExternalSquareProductTerminalAPI     ApplicationDetailsExternalSquareProduct = "TERMINAL_API"
	ApplicationDetailsExternalSquareProductVirtualTerminal ApplicationDetailsExternalSquareProduct = "VIRTUAL_TERMINAL"
)

func NewApplicationDetailsExternalSquareProductFromString

func NewApplicationDetailsExternalSquareProductFromString(s string) (ApplicationDetailsExternalSquareProduct, error)

func (ApplicationDetailsExternalSquareProduct) Ptr

type ApplicationType

type ApplicationType = string

type AppointmentSegment

type AppointmentSegment struct {
	// The time span in minutes of an appointment segment.
	DurationMinutes *int `json:"duration_minutes,omitempty" url:"duration_minutes,omitempty"`
	// The ID of the [CatalogItemVariation](entity:CatalogItemVariation) object representing the service booked in this segment.
	ServiceVariationID *string `json:"service_variation_id,omitempty" url:"service_variation_id,omitempty"`
	// The ID of the [TeamMember](entity:TeamMember) object representing the team member booked in this segment.
	TeamMemberID string `json:"team_member_id" url:"team_member_id"`
	// The current version of the item variation representing the service booked in this segment.
	ServiceVariationVersion *int64 `json:"service_variation_version,omitempty" url:"service_variation_version,omitempty"`
	// Time between the end of this segment and the beginning of the subsequent segment.
	IntermissionMinutes *int `json:"intermission_minutes,omitempty" url:"intermission_minutes,omitempty"`
	// Whether the customer accepts any team member, instead of a specific one, to serve this segment.
	AnyTeamMember *bool `json:"any_team_member,omitempty" url:"any_team_member,omitempty"`
	// The IDs of the seller-accessible resources used for this appointment segment.
	ResourceIDs []string `json:"resource_ids,omitempty" url:"resource_ids,omitempty"`
	// contains filtered or unexported fields
}

Defines an appointment segment of a booking.

func (*AppointmentSegment) GetAnyTeamMember

func (a *AppointmentSegment) GetAnyTeamMember() *bool

func (*AppointmentSegment) GetDurationMinutes

func (a *AppointmentSegment) GetDurationMinutes() *int

func (*AppointmentSegment) GetExtraProperties

func (a *AppointmentSegment) GetExtraProperties() map[string]interface{}

func (*AppointmentSegment) GetIntermissionMinutes

func (a *AppointmentSegment) GetIntermissionMinutes() *int

func (*AppointmentSegment) GetResourceIDs

func (a *AppointmentSegment) GetResourceIDs() []string

func (*AppointmentSegment) GetServiceVariationID

func (a *AppointmentSegment) GetServiceVariationID() *string

func (*AppointmentSegment) GetServiceVariationVersion

func (a *AppointmentSegment) GetServiceVariationVersion() *int64

func (*AppointmentSegment) GetTeamMemberID

func (a *AppointmentSegment) GetTeamMemberID() string

func (*AppointmentSegment) String

func (a *AppointmentSegment) String() string

func (*AppointmentSegment) UnmarshalJSON

func (a *AppointmentSegment) UnmarshalJSON(data []byte) error

type ArchivedState

type ArchivedState string

Defines the values for the `archived_state` query expression used in [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) to return the archived, not archived or either type of catalog items.

const (
	ArchivedStateArchivedStateNotArchived ArchivedState = "ARCHIVED_STATE_NOT_ARCHIVED"
	ArchivedStateArchivedStateArchived    ArchivedState = "ARCHIVED_STATE_ARCHIVED"
	ArchivedStateArchivedStateAll         ArchivedState = "ARCHIVED_STATE_ALL"
)

func NewArchivedStateFromString

func NewArchivedStateFromString(s string) (ArchivedState, error)

func (ArchivedState) Ptr

func (a ArchivedState) Ptr() *ArchivedState

type Availability

type Availability struct {
	// The RFC 3339 timestamp specifying the beginning time of the slot available for booking.
	StartAt *string `json:"start_at,omitempty" url:"start_at,omitempty"`
	// The ID of the location available for booking.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The list of appointment segments available for booking
	AppointmentSegments []*AppointmentSegment `json:"appointment_segments,omitempty" url:"appointment_segments,omitempty"`
	// contains filtered or unexported fields
}

Defines an appointment slot that encapsulates the appointment segments, location and starting time available for booking.

func (*Availability) GetAppointmentSegments

func (a *Availability) GetAppointmentSegments() []*AppointmentSegment

func (*Availability) GetExtraProperties

func (a *Availability) GetExtraProperties() map[string]interface{}

func (*Availability) GetLocationID

func (a *Availability) GetLocationID() *string

func (*Availability) GetStartAt

func (a *Availability) GetStartAt() *string

func (*Availability) String

func (a *Availability) String() string

func (*Availability) UnmarshalJSON

func (a *Availability) UnmarshalJSON(data []byte) error

type BankAccount

type BankAccount struct {
	// The unique, Square-issued identifier for the bank account.
	ID string `json:"id" url:"id"`
	// The last few digits of the account number.
	AccountNumberSuffix string `json:"account_number_suffix" url:"account_number_suffix"`
	// The ISO 3166 Alpha-2 country code where the bank account is based.
	// See [Country](#type-country) for possible values
	Country Country `json:"country" url:"country"`
	// 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
	Currency Currency `json:"currency" url:"currency"`
	// The financial purpose of the associated bank account.
	// See [BankAccountType](#type-bankaccounttype) for possible values
	AccountType BankAccountType `json:"account_type" url:"account_type"`
	// Name of the account holder. This name must match the name
	// on the targeted bank account record.
	HolderName string `json:"holder_name" url:"holder_name"`
	// Primary identifier for the bank. For more information, see
	// [Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api).
	PrimaryBankIdentificationNumber string `json:"primary_bank_identification_number" url:"primary_bank_identification_number"`
	// Secondary identifier for the bank. For more information, see
	// [Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api).
	SecondaryBankIdentificationNumber *string `json:"secondary_bank_identification_number,omitempty" url:"secondary_bank_identification_number,omitempty"`
	// 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" url:"debit_mandate_reference_id,omitempty"`
	// 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" url:"reference_id,omitempty"`
	// The location to which the bank account belongs.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// Read-only. The current verification status of this BankAccount object.
	// See [BankAccountStatus](#type-bankaccountstatus) for possible values
	Status BankAccountStatus `json:"status" url:"status"`
	// Indicates whether it is possible for Square to send money to this bank account.
	Creditable bool `json:"creditable" url:"creditable"`
	// Indicates whether it is possible for Square to take money from this
	// bank account.
	Debitable bool `json:"debitable" url:"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" url:"fingerprint,omitempty"`
	// The current version of the `BankAccount`.
	Version *int `json:"version,omitempty" url:"version,omitempty"`
	// Read only. Name of actual financial institution.
	// For example "Bank of America".
	BankName *string `json:"bank_name,omitempty" url:"bank_name,omitempty"`
	// contains filtered or unexported fields
}

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

func (*BankAccount) GetAccountNumberSuffix

func (b *BankAccount) GetAccountNumberSuffix() string

func (*BankAccount) GetAccountType

func (b *BankAccount) GetAccountType() BankAccountType

func (*BankAccount) GetBankName

func (b *BankAccount) GetBankName() *string

func (*BankAccount) GetCountry

func (b *BankAccount) GetCountry() Country

func (*BankAccount) GetCreditable

func (b *BankAccount) GetCreditable() bool

func (*BankAccount) GetCurrency

func (b *BankAccount) GetCurrency() Currency

func (*BankAccount) GetDebitMandateReferenceID

func (b *BankAccount) GetDebitMandateReferenceID() *string

func (*BankAccount) GetDebitable

func (b *BankAccount) GetDebitable() bool

func (*BankAccount) GetExtraProperties

func (b *BankAccount) GetExtraProperties() map[string]interface{}

func (*BankAccount) GetFingerprint

func (b *BankAccount) GetFingerprint() *string

func (*BankAccount) GetHolderName

func (b *BankAccount) GetHolderName() string

func (*BankAccount) GetID

func (b *BankAccount) GetID() string

func (*BankAccount) GetLocationID

func (b *BankAccount) GetLocationID() *string

func (*BankAccount) GetPrimaryBankIdentificationNumber

func (b *BankAccount) GetPrimaryBankIdentificationNumber() string

func (*BankAccount) GetReferenceID

func (b *BankAccount) GetReferenceID() *string

func (*BankAccount) GetSecondaryBankIdentificationNumber

func (b *BankAccount) GetSecondaryBankIdentificationNumber() *string

func (*BankAccount) GetStatus

func (b *BankAccount) GetStatus() BankAccountStatus

func (*BankAccount) GetVersion

func (b *BankAccount) GetVersion() *int

func (*BankAccount) String

func (b *BankAccount) String() string

func (*BankAccount) UnmarshalJSON

func (b *BankAccount) UnmarshalJSON(data []byte) error

type BankAccountPaymentDetails

type BankAccountPaymentDetails struct {
	// The name of the bank associated with the bank account.
	BankName *string `json:"bank_name,omitempty" url:"bank_name,omitempty"`
	// The type of the bank transfer. The type can be `ACH` or `UNKNOWN`.
	TransferType *string `json:"transfer_type,omitempty" url:"transfer_type,omitempty"`
	// The ownership type of the bank account performing the transfer.
	// The type can be `INDIVIDUAL`, `COMPANY`, or `ACCOUNT_TYPE_UNKNOWN`.
	AccountOwnershipType *string `json:"account_ownership_type,omitempty" url:"account_ownership_type,omitempty"`
	// Uniquely identifies the bank account for this seller and can be used
	// to determine if payments are from the same bank account.
	Fingerprint *string `json:"fingerprint,omitempty" url:"fingerprint,omitempty"`
	// The two-letter ISO code representing the country the bank account is located in.
	Country *string `json:"country,omitempty" url:"country,omitempty"`
	// The statement description as sent to the bank.
	StatementDescription *string `json:"statement_description,omitempty" url:"statement_description,omitempty"`
	// ACH-specific information about the transfer. The information is only populated
	// if the `transfer_type` is `ACH`.
	AchDetails *AchDetails `json:"ach_details,omitempty" url:"ach_details,omitempty"`
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Additional details about BANK_ACCOUNT type payments.

func (*BankAccountPaymentDetails) GetAccountOwnershipType

func (b *BankAccountPaymentDetails) GetAccountOwnershipType() *string

func (*BankAccountPaymentDetails) GetAchDetails

func (b *BankAccountPaymentDetails) GetAchDetails() *AchDetails

func (*BankAccountPaymentDetails) GetBankName

func (b *BankAccountPaymentDetails) GetBankName() *string

func (*BankAccountPaymentDetails) GetCountry

func (b *BankAccountPaymentDetails) GetCountry() *string

func (*BankAccountPaymentDetails) GetErrors

func (b *BankAccountPaymentDetails) GetErrors() []*Error

func (*BankAccountPaymentDetails) GetExtraProperties

func (b *BankAccountPaymentDetails) GetExtraProperties() map[string]interface{}

func (*BankAccountPaymentDetails) GetFingerprint

func (b *BankAccountPaymentDetails) GetFingerprint() *string

func (*BankAccountPaymentDetails) GetStatementDescription

func (b *BankAccountPaymentDetails) GetStatementDescription() *string

func (*BankAccountPaymentDetails) GetTransferType

func (b *BankAccountPaymentDetails) GetTransferType() *string

func (*BankAccountPaymentDetails) String

func (b *BankAccountPaymentDetails) String() string

func (*BankAccountPaymentDetails) UnmarshalJSON

func (b *BankAccountPaymentDetails) UnmarshalJSON(data []byte) error

type BankAccountStatus

type BankAccountStatus string

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

const (
	BankAccountStatusVerificationInProgress BankAccountStatus = "VERIFICATION_IN_PROGRESS"
	BankAccountStatusVerified               BankAccountStatus = "VERIFIED"
	BankAccountStatusDisabled               BankAccountStatus = "DISABLED"
)

func NewBankAccountStatusFromString

func NewBankAccountStatusFromString(s string) (BankAccountStatus, error)

func (BankAccountStatus) Ptr

type BankAccountType

type BankAccountType string

Indicates the financial purpose of the bank account.

const (
	BankAccountTypeChecking         BankAccountType = "CHECKING"
	BankAccountTypeSavings          BankAccountType = "SAVINGS"
	BankAccountTypeInvestment       BankAccountType = "INVESTMENT"
	BankAccountTypeOther            BankAccountType = "OTHER"
	BankAccountTypeBusinessChecking BankAccountType = "BUSINESS_CHECKING"
)

func NewBankAccountTypeFromString

func NewBankAccountTypeFromString(s string) (BankAccountType, error)

func (BankAccountType) Ptr

type BatchChangeInventoryRequest

type BatchChangeInventoryRequest struct {
	// A client-supplied, universally unique identifier (UUID) for the
	// request.
	//
	// See [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) in the
	// [API Development 101](https://developer.squareup.com/docs/buildbasics) section for more
	// information.
	IdempotencyKey string `json:"idempotency_key" url:"idempotency_key"`
	// 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,omitempty" url:"changes,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" url:"ignore_unchanged_counts,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchChangeInventoryRequest) GetChanges

func (b *BatchChangeInventoryRequest) GetChanges() []*InventoryChange

func (*BatchChangeInventoryRequest) GetExtraProperties

func (b *BatchChangeInventoryRequest) GetExtraProperties() map[string]interface{}

func (*BatchChangeInventoryRequest) GetIdempotencyKey

func (b *BatchChangeInventoryRequest) GetIdempotencyKey() string

func (*BatchChangeInventoryRequest) GetIgnoreUnchangedCounts

func (b *BatchChangeInventoryRequest) GetIgnoreUnchangedCounts() *bool

func (*BatchChangeInventoryRequest) String

func (b *BatchChangeInventoryRequest) String() string

func (*BatchChangeInventoryRequest) UnmarshalJSON

func (b *BatchChangeInventoryRequest) UnmarshalJSON(data []byte) error

type BatchChangeInventoryResponse

type BatchChangeInventoryResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The current counts for all objects referenced in the request.
	Counts []*InventoryCount `json:"counts,omitempty" url:"counts,omitempty"`
	// Changes created for the request.
	Changes []*InventoryChange `json:"changes,omitempty" url:"changes,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchChangeInventoryResponse) GetChanges

func (b *BatchChangeInventoryResponse) GetChanges() []*InventoryChange

func (*BatchChangeInventoryResponse) GetCounts

func (b *BatchChangeInventoryResponse) GetCounts() []*InventoryCount

func (*BatchChangeInventoryResponse) GetErrors

func (b *BatchChangeInventoryResponse) GetErrors() []*Error

func (*BatchChangeInventoryResponse) GetExtraProperties

func (b *BatchChangeInventoryResponse) GetExtraProperties() map[string]interface{}

func (*BatchChangeInventoryResponse) String

func (*BatchChangeInventoryResponse) UnmarshalJSON

func (b *BatchChangeInventoryResponse) UnmarshalJSON(data []byte) error

type BatchCreateTeamMembersRequest

type BatchCreateTeamMembersRequest struct {
	// The data used to create the `TeamMember` objects. Each key is the `idempotency_key` that maps to the `CreateTeamMemberRequest`.
	// The maximum number of create objects is 25.
	//
	// If you include a team member's `wage_setting`, you must provide `job_id` for each job assignment. To get job IDs,
	// call [ListJobs](api-endpoint:Team-ListJobs).
	TeamMembers map[string]*CreateTeamMemberRequest `json:"team_members,omitempty" url:"-"`
}

type BatchCreateTeamMembersResponse

type BatchCreateTeamMembersResponse struct {
	// The successfully created `TeamMember` objects. Each key is the `idempotency_key` that maps to the `CreateTeamMemberRequest`.
	TeamMembers map[string]*CreateTeamMemberResponse `json:"team_members,omitempty" url:"team_members,omitempty"`
	// The errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from a bulk create request containing the created `TeamMember` objects or error messages.

func (*BatchCreateTeamMembersResponse) GetErrors

func (b *BatchCreateTeamMembersResponse) GetErrors() []*Error

func (*BatchCreateTeamMembersResponse) GetExtraProperties

func (b *BatchCreateTeamMembersResponse) GetExtraProperties() map[string]interface{}

func (*BatchCreateTeamMembersResponse) GetTeamMembers

func (*BatchCreateTeamMembersResponse) String

func (*BatchCreateTeamMembersResponse) UnmarshalJSON

func (b *BatchCreateTeamMembersResponse) UnmarshalJSON(data []byte) error

type BatchCreateVendorsRequest

type BatchCreateVendorsRequest struct {
	// Specifies a set of new [Vendor](entity:Vendor) objects as represented by a collection of idempotency-key/`Vendor`-object pairs.
	Vendors map[string]*Vendor `json:"vendors,omitempty" url:"-"`
}

type BatchCreateVendorsResponse

type BatchCreateVendorsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// A set of [CreateVendorResponse](entity:CreateVendorResponse) objects encapsulating successfully created [Vendor](entity:Vendor)
	// objects or error responses for failed attempts. The set is represented by
	// a collection of idempotency-key/`Vendor`-object or idempotency-key/error-object pairs. The idempotency keys correspond to those specified
	// in the input.
	Responses map[string]*CreateVendorResponse `json:"responses,omitempty" url:"responses,omitempty"`
	// contains filtered or unexported fields
}

Represents an output from a call to [BulkCreateVendors](api-endpoint:Vendors-BulkCreateVendors).

func (*BatchCreateVendorsResponse) GetErrors

func (b *BatchCreateVendorsResponse) GetErrors() []*Error

func (*BatchCreateVendorsResponse) GetExtraProperties

func (b *BatchCreateVendorsResponse) GetExtraProperties() map[string]interface{}

func (*BatchCreateVendorsResponse) GetResponses

func (*BatchCreateVendorsResponse) String

func (b *BatchCreateVendorsResponse) String() string

func (*BatchCreateVendorsResponse) UnmarshalJSON

func (b *BatchCreateVendorsResponse) UnmarshalJSON(data []byte) error

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,omitempty" url:"-"`
}

type BatchDeleteCatalogObjectsResponse

type BatchDeleteCatalogObjectsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The IDs of all CatalogObjects deleted by this request.
	DeletedObjectIDs []string `json:"deleted_object_ids,omitempty" url:"deleted_object_ids,omitempty"`
	// 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" url:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchDeleteCatalogObjectsResponse) GetDeletedAt

func (b *BatchDeleteCatalogObjectsResponse) GetDeletedAt() *string

func (*BatchDeleteCatalogObjectsResponse) GetDeletedObjectIDs

func (b *BatchDeleteCatalogObjectsResponse) GetDeletedObjectIDs() []string

func (*BatchDeleteCatalogObjectsResponse) GetErrors

func (b *BatchDeleteCatalogObjectsResponse) GetErrors() []*Error

func (*BatchDeleteCatalogObjectsResponse) GetExtraProperties

func (b *BatchDeleteCatalogObjectsResponse) GetExtraProperties() map[string]interface{}

func (*BatchDeleteCatalogObjectsResponse) String

func (*BatchDeleteCatalogObjectsResponse) UnmarshalJSON

func (b *BatchDeleteCatalogObjectsResponse) UnmarshalJSON(data []byte) error

type BatchGetCatalogObjectsRequest

type BatchGetCatalogObjectsRequest struct {
	// The IDs of the CatalogObjects to be retrieved.
	ObjectIDs []string `json:"object_ids,omitempty" url:"-"`
	// If `true`, the response will include additional objects that are related to the
	// requested objects. Related objects are defined as any objects referenced by ID by the results in the `objects` field
	// of the response. These objects are put in the `related_objects` field. Setting this to `true` is
	// helpful when the objects are needed for immediate display to a user.
	// This process only goes one level deep. Objects referenced by the related objects will not be included. For example,
	//
	// 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.
	//
	// Default value: `false`
	IncludeRelatedObjects *bool `json:"include_related_objects,omitempty" url:"-"`
	// 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](entity:CatalogObject)s' `version` attribute. If not included, results will
	// be from the current version of the catalog.
	CatalogVersion *int64 `json:"catalog_version,omitempty" url:"-"`
	// Indicates whether to include (`true`) or not (`false`) in the response deleted objects, namely, those with the `is_deleted` attribute set to `true`.
	IncludeDeletedObjects *bool `json:"include_deleted_objects,omitempty" url:"-"`
	// Specifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists
	// of `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category
	// and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned
	// in the response payload.
	IncludeCategoryPathToRoot *bool `json:"include_category_path_to_root,omitempty" url:"-"`
}

type BatchGetCatalogObjectsResponse

type BatchGetCatalogObjectsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// A list of [CatalogObject](entity:CatalogObject)s returned.
	Objects []*CatalogObject `json:"objects,omitempty" url:"objects,omitempty"`
	// A list of [CatalogObject](entity:CatalogObject)s referenced by the object in the `objects` field.
	RelatedObjects []*CatalogObject `json:"related_objects,omitempty" url:"related_objects,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchGetCatalogObjectsResponse) GetErrors

func (b *BatchGetCatalogObjectsResponse) GetErrors() []*Error

func (*BatchGetCatalogObjectsResponse) GetExtraProperties

func (b *BatchGetCatalogObjectsResponse) GetExtraProperties() map[string]interface{}

func (*BatchGetCatalogObjectsResponse) GetObjects

func (b *BatchGetCatalogObjectsResponse) GetObjects() []*CatalogObject

func (*BatchGetCatalogObjectsResponse) GetRelatedObjects

func (b *BatchGetCatalogObjectsResponse) GetRelatedObjects() []*CatalogObject

func (*BatchGetCatalogObjectsResponse) String

func (*BatchGetCatalogObjectsResponse) UnmarshalJSON

func (b *BatchGetCatalogObjectsResponse) UnmarshalJSON(data []byte) error

type BatchGetInventoryChangesResponse

type BatchGetInventoryChangesResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The current calculated inventory changes for the requested objects
	// and locations.
	Changes []*InventoryChange `json:"changes,omitempty" url:"changes,omitempty"`
	// 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" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchGetInventoryChangesResponse) GetChanges

func (*BatchGetInventoryChangesResponse) GetCursor

func (b *BatchGetInventoryChangesResponse) GetCursor() *string

func (*BatchGetInventoryChangesResponse) GetErrors

func (b *BatchGetInventoryChangesResponse) GetErrors() []*Error

func (*BatchGetInventoryChangesResponse) GetExtraProperties

func (b *BatchGetInventoryChangesResponse) GetExtraProperties() map[string]interface{}

func (*BatchGetInventoryChangesResponse) String

func (*BatchGetInventoryChangesResponse) UnmarshalJSON

func (b *BatchGetInventoryChangesResponse) UnmarshalJSON(data []byte) error

type BatchGetInventoryCountsRequest

type BatchGetInventoryCountsRequest 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,omitempty" url:"catalog_object_ids,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,omitempty" url:"location_ids,omitempty"`
	// 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" url:"updated_after,omitempty"`
	// 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" url:"cursor,omitempty"`
	// 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.
	States []InventoryState `json:"states,omitempty" url:"states,omitempty"`
	// The number of [records](entity:InventoryCount) to return.
	Limit *int `json:"limit,omitempty" url:"limit,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchGetInventoryCountsRequest) GetCatalogObjectIDs

func (b *BatchGetInventoryCountsRequest) GetCatalogObjectIDs() []string

func (*BatchGetInventoryCountsRequest) GetCursor

func (b *BatchGetInventoryCountsRequest) GetCursor() *string

func (*BatchGetInventoryCountsRequest) GetExtraProperties

func (b *BatchGetInventoryCountsRequest) GetExtraProperties() map[string]interface{}

func (*BatchGetInventoryCountsRequest) GetLimit

func (b *BatchGetInventoryCountsRequest) GetLimit() *int

func (*BatchGetInventoryCountsRequest) GetLocationIDs

func (b *BatchGetInventoryCountsRequest) GetLocationIDs() []string

func (*BatchGetInventoryCountsRequest) GetStates

func (*BatchGetInventoryCountsRequest) GetUpdatedAfter

func (b *BatchGetInventoryCountsRequest) GetUpdatedAfter() *string

func (*BatchGetInventoryCountsRequest) String

func (*BatchGetInventoryCountsRequest) UnmarshalJSON

func (b *BatchGetInventoryCountsRequest) UnmarshalJSON(data []byte) error

type BatchGetInventoryCountsResponse

type BatchGetInventoryCountsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The current calculated inventory counts for the requested objects
	// and locations.
	Counts []*InventoryCount `json:"counts,omitempty" url:"counts,omitempty"`
	// 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" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchGetInventoryCountsResponse) GetCounts

func (*BatchGetInventoryCountsResponse) GetCursor

func (b *BatchGetInventoryCountsResponse) GetCursor() *string

func (*BatchGetInventoryCountsResponse) GetErrors

func (b *BatchGetInventoryCountsResponse) GetErrors() []*Error

func (*BatchGetInventoryCountsResponse) GetExtraProperties

func (b *BatchGetInventoryCountsResponse) GetExtraProperties() map[string]interface{}

func (*BatchGetInventoryCountsResponse) String

func (*BatchGetInventoryCountsResponse) UnmarshalJSON

func (b *BatchGetInventoryCountsResponse) UnmarshalJSON(data []byte) error

type BatchGetOrdersRequest

type BatchGetOrdersRequest 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" url:"-"`
	// The IDs of the orders to retrieve. A maximum of 100 orders can be retrieved per request.
	OrderIDs []string `json:"order_ids,omitempty" url:"-"`
}

type BatchGetOrdersResponse

type BatchGetOrdersResponse struct {
	// The requested orders. This will omit any requested orders that do not exist.
	Orders []*Order `json:"orders,omitempty" url:"orders,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the `BatchRetrieveOrders` endpoint.

func (*BatchGetOrdersResponse) GetErrors

func (b *BatchGetOrdersResponse) GetErrors() []*Error

func (*BatchGetOrdersResponse) GetExtraProperties

func (b *BatchGetOrdersResponse) GetExtraProperties() map[string]interface{}

func (*BatchGetOrdersResponse) GetOrders

func (b *BatchGetOrdersResponse) GetOrders() []*Order

func (*BatchGetOrdersResponse) String

func (b *BatchGetOrdersResponse) String() string

func (*BatchGetOrdersResponse) UnmarshalJSON

func (b *BatchGetOrdersResponse) UnmarshalJSON(data []byte) error

type BatchGetVendorsRequest

type BatchGetVendorsRequest struct {
	// IDs of the [Vendor](entity:Vendor) objects to retrieve.
	VendorIDs []string `json:"vendor_ids,omitempty" url:"-"`
}

type BatchGetVendorsResponse

type BatchGetVendorsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The set of [RetrieveVendorResponse](entity:RetrieveVendorResponse) objects encapsulating successfully retrieved [Vendor](entity:Vendor)
	// objects or error responses for failed attempts. The set is represented by
	// a collection of `Vendor`-ID/`Vendor`-object or `Vendor`-ID/error-object pairs.
	Responses map[string]*GetVendorResponse `json:"responses,omitempty" url:"responses,omitempty"`
	// contains filtered or unexported fields
}

Represents an output from a call to [BulkRetrieveVendors](api-endpoint:Vendors-BulkRetrieveVendors).

func (*BatchGetVendorsResponse) GetErrors

func (b *BatchGetVendorsResponse) GetErrors() []*Error

func (*BatchGetVendorsResponse) GetExtraProperties

func (b *BatchGetVendorsResponse) GetExtraProperties() map[string]interface{}

func (*BatchGetVendorsResponse) GetResponses

func (b *BatchGetVendorsResponse) GetResponses() map[string]*GetVendorResponse

func (*BatchGetVendorsResponse) String

func (b *BatchGetVendorsResponse) String() string

func (*BatchGetVendorsResponse) UnmarshalJSON

func (b *BatchGetVendorsResponse) UnmarshalJSON(data []byte) error

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,omitempty" url:"catalog_object_ids,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,omitempty" url:"location_ids,omitempty"`
	// The filter to return results by `InventoryChangeType` values other than `TRANSFER`.
	// The default value is `[PHYSICAL_COUNT, ADJUSTMENT]`.
	Types []InventoryChangeType `json:"types,omitempty" url:"types,omitempty"`
	// The filter to return `ADJUSTMENT` query results by
	// `InventoryState`. This filter is only applied when set.
	// The default value is null.
	States []InventoryState `json:"states,omitempty" url:"states,omitempty"`
	// 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" url:"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" url:"updated_before,omitempty"`
	// 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" url:"cursor,omitempty"`
	// The number of [records](entity:InventoryChange) to return.
	Limit *int `json:"limit,omitempty" url:"limit,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchRetrieveInventoryChangesRequest) GetCatalogObjectIDs

func (b *BatchRetrieveInventoryChangesRequest) GetCatalogObjectIDs() []string

func (*BatchRetrieveInventoryChangesRequest) GetCursor

func (*BatchRetrieveInventoryChangesRequest) GetExtraProperties

func (b *BatchRetrieveInventoryChangesRequest) GetExtraProperties() map[string]interface{}

func (*BatchRetrieveInventoryChangesRequest) GetLimit

func (*BatchRetrieveInventoryChangesRequest) GetLocationIDs

func (b *BatchRetrieveInventoryChangesRequest) GetLocationIDs() []string

func (*BatchRetrieveInventoryChangesRequest) GetStates

func (*BatchRetrieveInventoryChangesRequest) GetTypes

func (*BatchRetrieveInventoryChangesRequest) GetUpdatedAfter

func (b *BatchRetrieveInventoryChangesRequest) GetUpdatedAfter() *string

func (*BatchRetrieveInventoryChangesRequest) GetUpdatedBefore

func (b *BatchRetrieveInventoryChangesRequest) GetUpdatedBefore() *string

func (*BatchRetrieveInventoryChangesRequest) String

func (*BatchRetrieveInventoryChangesRequest) UnmarshalJSON

func (b *BatchRetrieveInventoryChangesRequest) UnmarshalJSON(data []byte) error

type BatchUpdateTeamMembersRequest

type BatchUpdateTeamMembersRequest struct {
	// The data used to update the `TeamMember` objects. Each key is the `team_member_id` that maps to the `UpdateTeamMemberRequest`.
	// The maximum number of update objects is 25.
	//
	// For each team member, include the fields to add, change, or clear. Fields can be cleared using a null value.
	// To update `wage_setting.job_assignments`, you must provide the complete list of job assignments. If needed,
	// call [ListJobs](api-endpoint:Team-ListJobs) to get the required `job_id` values.
	TeamMembers map[string]*UpdateTeamMemberRequest `json:"team_members,omitempty" url:"-"`
}

type BatchUpdateTeamMembersResponse

type BatchUpdateTeamMembersResponse struct {
	// 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" url:"team_members,omitempty"`
	// The errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from a bulk update request containing the updated `TeamMember` objects or error messages.

func (*BatchUpdateTeamMembersResponse) GetErrors

func (b *BatchUpdateTeamMembersResponse) GetErrors() []*Error

func (*BatchUpdateTeamMembersResponse) GetExtraProperties

func (b *BatchUpdateTeamMembersResponse) GetExtraProperties() map[string]interface{}

func (*BatchUpdateTeamMembersResponse) GetTeamMembers

func (*BatchUpdateTeamMembersResponse) String

func (*BatchUpdateTeamMembersResponse) UnmarshalJSON

func (b *BatchUpdateTeamMembersResponse) UnmarshalJSON(data []byte) error

type BatchUpdateVendorsRequest

type BatchUpdateVendorsRequest struct {
	// A set of [UpdateVendorRequest](entity:UpdateVendorRequest) objects encapsulating to-be-updated [Vendor](entity:Vendor)
	// objects. The set is represented by  a collection of `Vendor`-ID/`UpdateVendorRequest`-object pairs.
	Vendors map[string]*UpdateVendorRequest `json:"vendors,omitempty" url:"-"`
}

type BatchUpdateVendorsResponse

type BatchUpdateVendorsResponse struct {
	// Errors encountered when the request fails.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// A set of [UpdateVendorResponse](entity:UpdateVendorResponse) objects encapsulating successfully created [Vendor](entity:Vendor)
	// objects or error responses for failed attempts. The set is represented by a collection of `Vendor`-ID/`UpdateVendorResponse`-object or
	// `Vendor`-ID/error-object pairs.
	Responses map[string]*UpdateVendorResponse `json:"responses,omitempty" url:"responses,omitempty"`
	// contains filtered or unexported fields
}

Represents an output from a call to [BulkUpdateVendors](api-endpoint:Vendors-BulkUpdateVendors).

func (*BatchUpdateVendorsResponse) GetErrors

func (b *BatchUpdateVendorsResponse) GetErrors() []*Error

func (*BatchUpdateVendorsResponse) GetExtraProperties

func (b *BatchUpdateVendorsResponse) GetExtraProperties() map[string]interface{}

func (*BatchUpdateVendorsResponse) GetResponses

func (*BatchUpdateVendorsResponse) String

func (b *BatchUpdateVendorsResponse) String() string

func (*BatchUpdateVendorsResponse) UnmarshalJSON

func (b *BatchUpdateVendorsResponse) UnmarshalJSON(data []byte) error

type BatchUpsertCatalogObjectsRequest

type BatchUpsertCatalogObjectsRequest 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/build-basics/common-api-patterns/idempotency) for more information.
	IdempotencyKey string `json:"idempotency_key" url:"-"`
	// 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.
	Batches []*CatalogObjectBatch `json:"batches,omitempty" url:"-"`
}

type BatchUpsertCatalogObjectsResponse

type BatchUpsertCatalogObjectsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The created successfully created CatalogObjects.
	Objects []*CatalogObject `json:"objects,omitempty" url:"objects,omitempty"`
	// 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" url:"updated_at,omitempty"`
	// The mapping between client and server IDs for this upsert.
	IDMappings []*CatalogIDMapping `json:"id_mappings,omitempty" url:"id_mappings,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchUpsertCatalogObjectsResponse) GetErrors

func (b *BatchUpsertCatalogObjectsResponse) GetErrors() []*Error

func (*BatchUpsertCatalogObjectsResponse) GetExtraProperties

func (b *BatchUpsertCatalogObjectsResponse) GetExtraProperties() map[string]interface{}

func (*BatchUpsertCatalogObjectsResponse) GetIDMappings

func (*BatchUpsertCatalogObjectsResponse) GetObjects

func (*BatchUpsertCatalogObjectsResponse) GetUpdatedAt

func (b *BatchUpsertCatalogObjectsResponse) GetUpdatedAt() *string

func (*BatchUpsertCatalogObjectsResponse) String

func (*BatchUpsertCatalogObjectsResponse) UnmarshalJSON

func (b *BatchUpsertCatalogObjectsResponse) UnmarshalJSON(data []byte) error

type BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest

type BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest struct {
	// The ID of the target [customer profile](entity:Customer).
	CustomerID string `json:"customer_id" url:"customer_id"`
	// The custom attribute to create or update, with following fields:
	//
	// - `key`. This key must match the `key` of a custom attribute definition in the Square seller
	// account. If the requesting application is not the definition owner, you must provide the qualified key.
	//
	// - `value`. This value must conform to the `schema` specified by the definition.
	// For more information, see [Value data types](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attributes#value-data-types).
	//
	// - `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)
	// control for update operations, include this optional field in the request and set the
	// value to the current version of the custom attribute.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// A unique identifier for this individual upsert request, used to ensure idempotency.
	// For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"idempotency_key,omitempty"`
	// contains filtered or unexported fields
}

Represents an individual upsert request in a [BulkUpsertCustomerCustomAttributes](api-endpoint:CustomerCustomAttributes-BulkUpsertCustomerCustomAttributes) request. An individual request contains a customer ID, the custom attribute to create or update, and an optional idempotency key.

func (*BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest) GetCustomAttribute

func (*BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest) GetCustomerID

func (*BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest) GetExtraProperties

func (*BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest) GetIdempotencyKey

func (*BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest) String

func (*BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest) UnmarshalJSON

type BatchUpsertCustomerCustomAttributesResponse

type BatchUpsertCustomerCustomAttributesResponse struct {
	// A map of responses that correspond to individual upsert requests. Each response has the
	// same ID as the corresponding request and contains either a `customer_id` and `custom_attribute` or an `errors` field.
	Values map[string]*BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse `json:"values,omitempty" url:"values,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [BulkUpsertCustomerCustomAttributes](api-endpoint:CustomerCustomAttributes-BulkUpsertCustomerCustomAttributes) response, which contains a map of responses that each corresponds to an individual upsert request.

func (*BatchUpsertCustomerCustomAttributesResponse) GetErrors

func (*BatchUpsertCustomerCustomAttributesResponse) GetExtraProperties

func (b *BatchUpsertCustomerCustomAttributesResponse) GetExtraProperties() map[string]interface{}

func (*BatchUpsertCustomerCustomAttributesResponse) String

func (*BatchUpsertCustomerCustomAttributesResponse) UnmarshalJSON

func (b *BatchUpsertCustomerCustomAttributesResponse) UnmarshalJSON(data []byte) error

type BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse

type BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse struct {
	// The ID of the customer profile associated with the custom attribute.
	CustomerID *string `json:"customer_id,omitempty" url:"customer_id,omitempty"`
	// The new or updated custom attribute.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// Any errors that occurred while processing the individual request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response for an individual upsert request in a [BulkUpsertCustomerCustomAttributes](api-endpoint:CustomerCustomAttributes-BulkUpsertCustomerCustomAttributes) operation.

func (*BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse) GetCustomAttribute

func (*BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse) GetCustomerID

func (*BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse) GetErrors

func (*BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse) GetExtraProperties

func (*BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse) String

func (*BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse) UnmarshalJSON

type Booking

type Booking struct {
	// A unique ID of this object representing a booking.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The revision number for the booking used for optimistic concurrency.
	Version *int `json:"version,omitempty" url:"version,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 *BookingStatus `json:"status,omitempty" url:"status,omitempty"`
	// The RFC 3339 timestamp specifying the creation time of this booking.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The RFC 3339 timestamp specifying the most recent update time of this booking.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The RFC 3339 timestamp specifying the starting time of this booking.
	StartAt *string `json:"start_at,omitempty" url:"start_at,omitempty"`
	// The ID of the [Location](entity:Location) object representing the location where the booked service is provided. Once set when the booking is created, its value cannot be changed.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The ID of the [Customer](entity:Customer) object representing the customer receiving the booked service.
	CustomerID *string `json:"customer_id,omitempty" url:"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](entity:CatalogObject) instance.
	CustomerNote *string `json:"customer_note,omitempty" url:"customer_note,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](entity:CatalogObject) instance.
	// This field should not be visible to customers.
	SellerNote *string `json:"seller_note,omitempty" url:"seller_note,omitempty"`
	// A list of appointment segments for this booking.
	AppointmentSegments []*AppointmentSegment `json:"appointment_segments,omitempty" url:"appointment_segments,omitempty"`
	// Additional time at the end of a booking.
	// Applications should not make this field visible to customers of a seller.
	TransitionTimeMinutes *int `json:"transition_time_minutes,omitempty" url:"transition_time_minutes,omitempty"`
	// Whether the booking is of a full business day.
	AllDay *bool `json:"all_day,omitempty" url:"all_day,omitempty"`
	// The type of location where the booking is held.
	// See [BusinessAppointmentSettingsBookingLocationType](#type-businessappointmentsettingsbookinglocationtype) for possible values
	LocationType *BusinessAppointmentSettingsBookingLocationType `json:"location_type,omitempty" url:"location_type,omitempty"`
	// Information about the booking creator.
	CreatorDetails *BookingCreatorDetails `json:"creator_details,omitempty" url:"creator_details,omitempty"`
	// The source of the booking.
	// Access to this field requires seller-level permissions.
	// See [BookingBookingSource](#type-bookingbookingsource) for possible values
	Source *BookingBookingSource `json:"source,omitempty" url:"source,omitempty"`
	// Stores a customer address if the location type is `CUSTOMER_LOCATION`.
	Address *Address `json:"address,omitempty" url:"address,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*Booking) GetAddress

func (b *Booking) GetAddress() *Address

func (*Booking) GetAllDay

func (b *Booking) GetAllDay() *bool

func (*Booking) GetAppointmentSegments

func (b *Booking) GetAppointmentSegments() []*AppointmentSegment

func (*Booking) GetCreatedAt

func (b *Booking) GetCreatedAt() *string

func (*Booking) GetCreatorDetails

func (b *Booking) GetCreatorDetails() *BookingCreatorDetails

func (*Booking) GetCustomerID

func (b *Booking) GetCustomerID() *string

func (*Booking) GetCustomerNote

func (b *Booking) GetCustomerNote() *string

func (*Booking) GetExtraProperties

func (b *Booking) GetExtraProperties() map[string]interface{}

func (*Booking) GetID

func (b *Booking) GetID() *string

func (*Booking) GetLocationID

func (b *Booking) GetLocationID() *string

func (*Booking) GetLocationType

func (*Booking) GetSellerNote

func (b *Booking) GetSellerNote() *string

func (*Booking) GetSource

func (b *Booking) GetSource() *BookingBookingSource

func (*Booking) GetStartAt

func (b *Booking) GetStartAt() *string

func (*Booking) GetStatus

func (b *Booking) GetStatus() *BookingStatus

func (*Booking) GetTransitionTimeMinutes

func (b *Booking) GetTransitionTimeMinutes() *int

func (*Booking) GetUpdatedAt

func (b *Booking) GetUpdatedAt() *string

func (*Booking) GetVersion

func (b *Booking) GetVersion() *int

func (*Booking) String

func (b *Booking) String() string

func (*Booking) UnmarshalJSON

func (b *Booking) UnmarshalJSON(data []byte) error

type BookingBookingSource

type BookingBookingSource string

Supported sources a booking was created from.

const (
	BookingBookingSourceFirstPartyMerchant BookingBookingSource = "FIRST_PARTY_MERCHANT"
	BookingBookingSourceFirstPartyBuyer    BookingBookingSource = "FIRST_PARTY_BUYER"
	BookingBookingSourceThirdPartyBuyer    BookingBookingSource = "THIRD_PARTY_BUYER"
	BookingBookingSourceAPI                BookingBookingSource = "API"
)

func NewBookingBookingSourceFromString

func NewBookingBookingSourceFromString(s string) (BookingBookingSource, error)

func (BookingBookingSource) Ptr

type BookingCreatorDetails

type BookingCreatorDetails struct {
	// The seller-accessible type of the creator of the booking.
	// See [BookingCreatorDetailsCreatorType](#type-bookingcreatordetailscreatortype) for possible values
	CreatorType *BookingCreatorDetailsCreatorType `json:"creator_type,omitempty" url:"creator_type,omitempty"`
	// The ID of the team member who created the booking, when the booking creator is of the `TEAM_MEMBER` type.
	// Access to this field requires seller-level permissions.
	TeamMemberID *string `json:"team_member_id,omitempty" url:"team_member_id,omitempty"`
	// The ID of the customer who created the booking, when the booking creator is of the `CUSTOMER` type.
	// Access to this field requires seller-level permissions.
	CustomerID *string `json:"customer_id,omitempty" url:"customer_id,omitempty"`
	// contains filtered or unexported fields
}

Information about a booking creator.

func (*BookingCreatorDetails) GetCreatorType

func (*BookingCreatorDetails) GetCustomerID

func (b *BookingCreatorDetails) GetCustomerID() *string

func (*BookingCreatorDetails) GetExtraProperties

func (b *BookingCreatorDetails) GetExtraProperties() map[string]interface{}

func (*BookingCreatorDetails) GetTeamMemberID

func (b *BookingCreatorDetails) GetTeamMemberID() *string

func (*BookingCreatorDetails) String

func (b *BookingCreatorDetails) String() string

func (*BookingCreatorDetails) UnmarshalJSON

func (b *BookingCreatorDetails) UnmarshalJSON(data []byte) error

type BookingCreatorDetailsCreatorType

type BookingCreatorDetailsCreatorType string

Supported types of a booking creator.

const (
	BookingCreatorDetailsCreatorTypeTeamMember BookingCreatorDetailsCreatorType = "TEAM_MEMBER"
	BookingCreatorDetailsCreatorTypeCustomer   BookingCreatorDetailsCreatorType = "CUSTOMER"
)

func NewBookingCreatorDetailsCreatorTypeFromString

func NewBookingCreatorDetailsCreatorTypeFromString(s string) (BookingCreatorDetailsCreatorType, error)

func (BookingCreatorDetailsCreatorType) Ptr

type BookingCustomAttributeDeleteRequest

type BookingCustomAttributeDeleteRequest struct {
	// The ID of the target [booking](entity:Booking).
	BookingID string `json:"booking_id" url:"booking_id"`
	// The key of the custom attribute to delete. This key must match the `key` of a
	// custom attribute definition in the Square seller account. If the requesting application is not
	// the definition owner, you must use the qualified key.
	Key string `json:"key" url:"key"`
	// contains filtered or unexported fields
}

Represents an individual delete request in a [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes) request. An individual request contains a booking ID, the custom attribute to delete, and an optional idempotency key.

func (*BookingCustomAttributeDeleteRequest) GetBookingID

func (b *BookingCustomAttributeDeleteRequest) GetBookingID() string

func (*BookingCustomAttributeDeleteRequest) GetExtraProperties

func (b *BookingCustomAttributeDeleteRequest) GetExtraProperties() map[string]interface{}

func (*BookingCustomAttributeDeleteRequest) GetKey

func (*BookingCustomAttributeDeleteRequest) String

func (*BookingCustomAttributeDeleteRequest) UnmarshalJSON

func (b *BookingCustomAttributeDeleteRequest) UnmarshalJSON(data []byte) error

type BookingCustomAttributeDeleteResponse

type BookingCustomAttributeDeleteResponse struct {
	// The ID of the [booking](entity:Booking) associated with the custom attribute.
	BookingID *string `json:"booking_id,omitempty" url:"booking_id,omitempty"`
	// Any errors that occurred while processing the individual request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response for an individual upsert request in a [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes) operation.

func (*BookingCustomAttributeDeleteResponse) GetBookingID

func (b *BookingCustomAttributeDeleteResponse) GetBookingID() *string

func (*BookingCustomAttributeDeleteResponse) GetErrors

func (b *BookingCustomAttributeDeleteResponse) GetErrors() []*Error

func (*BookingCustomAttributeDeleteResponse) GetExtraProperties

func (b *BookingCustomAttributeDeleteResponse) GetExtraProperties() map[string]interface{}

func (*BookingCustomAttributeDeleteResponse) String

func (*BookingCustomAttributeDeleteResponse) UnmarshalJSON

func (b *BookingCustomAttributeDeleteResponse) UnmarshalJSON(data []byte) error

type BookingCustomAttributeUpsertRequest

type BookingCustomAttributeUpsertRequest struct {
	// The ID of the target [booking](entity:Booking).
	BookingID string `json:"booking_id" url:"booking_id"`
	// The custom attribute to create or update, with following fields:
	//
	// - `key`. This key must match the `key` of a custom attribute definition in the Square seller
	// account. If the requesting application is not the definition owner, you must provide the qualified key.
	//
	// - `value`. This value must conform to the `schema` specified by the definition.
	// For more information, see [Value data types](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attributes#value-data-types).
	//
	// - `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)
	// control for update operations, include this optional field in the request and set the
	// value to the current version of the custom attribute.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// A unique identifier for this individual upsert request, used to ensure idempotency.
	// For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"idempotency_key,omitempty"`
	// contains filtered or unexported fields
}

Represents an individual upsert request in a [BulkUpsertBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkUpsertBookingCustomAttributes) request. An individual request contains a booking ID, the custom attribute to create or update, and an optional idempotency key.

func (*BookingCustomAttributeUpsertRequest) GetBookingID

func (b *BookingCustomAttributeUpsertRequest) GetBookingID() string

func (*BookingCustomAttributeUpsertRequest) GetCustomAttribute

func (b *BookingCustomAttributeUpsertRequest) GetCustomAttribute() *CustomAttribute

func (*BookingCustomAttributeUpsertRequest) GetExtraProperties

func (b *BookingCustomAttributeUpsertRequest) GetExtraProperties() map[string]interface{}

func (*BookingCustomAttributeUpsertRequest) GetIdempotencyKey

func (b *BookingCustomAttributeUpsertRequest) GetIdempotencyKey() *string

func (*BookingCustomAttributeUpsertRequest) String

func (*BookingCustomAttributeUpsertRequest) UnmarshalJSON

func (b *BookingCustomAttributeUpsertRequest) UnmarshalJSON(data []byte) error

type BookingCustomAttributeUpsertResponse

type BookingCustomAttributeUpsertResponse struct {
	// The ID of the [booking](entity:Booking) associated with the custom attribute.
	BookingID *string `json:"booking_id,omitempty" url:"booking_id,omitempty"`
	// The new or updated custom attribute.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// Any errors that occurred while processing the individual request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response for an individual upsert request in a [BulkUpsertBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkUpsertBookingCustomAttributes) operation.

func (*BookingCustomAttributeUpsertResponse) GetBookingID

func (b *BookingCustomAttributeUpsertResponse) GetBookingID() *string

func (*BookingCustomAttributeUpsertResponse) GetCustomAttribute

func (b *BookingCustomAttributeUpsertResponse) GetCustomAttribute() *CustomAttribute

func (*BookingCustomAttributeUpsertResponse) GetErrors

func (b *BookingCustomAttributeUpsertResponse) GetErrors() []*Error

func (*BookingCustomAttributeUpsertResponse) GetExtraProperties

func (b *BookingCustomAttributeUpsertResponse) GetExtraProperties() map[string]interface{}

func (*BookingCustomAttributeUpsertResponse) String

func (*BookingCustomAttributeUpsertResponse) UnmarshalJSON

func (b *BookingCustomAttributeUpsertResponse) UnmarshalJSON(data []byte) error

type BookingStatus

type BookingStatus string

Supported booking statuses.

const (
	BookingStatusPending             BookingStatus = "PENDING"
	BookingStatusCancelledByCustomer BookingStatus = "CANCELLED_BY_CUSTOMER"
	BookingStatusCancelledBySeller   BookingStatus = "CANCELLED_BY_SELLER"
	BookingStatusDeclined            BookingStatus = "DECLINED"
	BookingStatusAccepted            BookingStatus = "ACCEPTED"
	BookingStatusNoShow              BookingStatus = "NO_SHOW"
)

func NewBookingStatusFromString

func NewBookingStatusFromString(s string) (BookingStatus, error)

func (BookingStatus) Ptr

func (b BookingStatus) Ptr() *BookingStatus

type Break

type Break struct {
	// The UUID for this object.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// RFC 3339; follows the same timezone information as `Shift`. Precision up to
	// the minute is respected; seconds are truncated.
	StartAt string `json:"start_at" url:"start_at"`
	// RFC 3339; follows the same timezone information as `Shift`. Precision up to
	// the minute is respected; seconds are truncated.
	EndAt *string `json:"end_at,omitempty" url:"end_at,omitempty"`
	// The `BreakType` that this `Break` was templated on.
	BreakTypeID string `json:"break_type_id" url:"break_type_id"`
	// A human-readable name.
	Name string `json:"name" url:"name"`
	// Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of
	// the break.
	ExpectedDuration string `json:"expected_duration" url:"expected_duration"`
	// Whether this break counts towards time worked for compensation
	// purposes.
	IsPaid bool `json:"is_paid" url:"is_paid"`
	// contains filtered or unexported fields
}

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

func (*Break) GetBreakTypeID

func (b *Break) GetBreakTypeID() string

func (*Break) GetEndAt

func (b *Break) GetEndAt() *string

func (*Break) GetExpectedDuration

func (b *Break) GetExpectedDuration() string

func (*Break) GetExtraProperties

func (b *Break) GetExtraProperties() map[string]interface{}

func (*Break) GetID

func (b *Break) GetID() *string

func (*Break) GetIsPaid

func (b *Break) GetIsPaid() bool

func (*Break) GetName

func (b *Break) GetName() string

func (*Break) GetStartAt

func (b *Break) GetStartAt() string

func (*Break) String

func (b *Break) String() string

func (*Break) UnmarshalJSON

func (b *Break) UnmarshalJSON(data []byte) error

type BreakType

type BreakType struct {
	// The UUID for this object.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The ID of the business location this type of break applies to.
	LocationID string `json:"location_id" url:"location_id"`
	// A human-readable name for this type of break. The name is displayed to
	// employees in Square products.
	BreakName string `json:"break_name" url:"break_name"`
	// Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of
	// this break. Precision less than minutes is truncated.
	//
	// Example for break expected duration of 15 minutes: T15M
	ExpectedDuration string `json:"expected_duration" url:"expected_duration"`
	// Whether this break counts towards time worked for compensation
	// purposes.
	IsPaid bool `json:"is_paid" url:"is_paid"`
	// Used for resolving concurrency issues. The request fails if the version
	// provided does not match the server version at the time of the request. If a value is not
	// provided, Square's servers execute a "blind" write; potentially
	// overwriting another writer's data.
	Version *int `json:"version,omitempty" url:"version,omitempty"`
	// A read-only timestamp in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// A read-only timestamp in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

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

func (*BreakType) GetBreakName

func (b *BreakType) GetBreakName() string

func (*BreakType) GetCreatedAt

func (b *BreakType) GetCreatedAt() *string

func (*BreakType) GetExpectedDuration

func (b *BreakType) GetExpectedDuration() string

func (*BreakType) GetExtraProperties

func (b *BreakType) GetExtraProperties() map[string]interface{}

func (*BreakType) GetID

func (b *BreakType) GetID() *string

func (*BreakType) GetIsPaid

func (b *BreakType) GetIsPaid() bool

func (*BreakType) GetLocationID

func (b *BreakType) GetLocationID() string

func (*BreakType) GetUpdatedAt

func (b *BreakType) GetUpdatedAt() *string

func (*BreakType) GetVersion

func (b *BreakType) GetVersion() *int

func (*BreakType) String

func (b *BreakType) String() string

func (*BreakType) UnmarshalJSON

func (b *BreakType) UnmarshalJSON(data []byte) error

type BulkCreateCustomerData

type BulkCreateCustomerData struct {
	// The given name (that is, the first name) associated with the customer profile.
	GivenName *string `json:"given_name,omitempty" url:"given_name,omitempty"`
	// The family name (that is, the last name) associated with the customer profile.
	FamilyName *string `json:"family_name,omitempty" url:"family_name,omitempty"`
	// A business name associated with the customer profile.
	CompanyName *string `json:"company_name,omitempty" url:"company_name,omitempty"`
	// A nickname for the customer profile.
	Nickname *string `json:"nickname,omitempty" url:"nickname,omitempty"`
	// The email address associated with the customer profile.
	EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"`
	// The physical address associated with the customer profile. For maximum length constraints,
	// see [Customer addresses](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#address).
	// The `first_name` and `last_name` fields are ignored if they are present in the request.
	Address *Address `json:"address,omitempty" url:"address,omitempty"`
	// The phone number associated with the customer profile. The phone number must be valid
	// and can contain 9–16 digits, with an optional `+` prefix and country code. For more information,
	// see [Customer phone numbers](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#phone-number).
	PhoneNumber *string `json:"phone_number,omitempty" url:"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" url:"reference_id,omitempty"`
	// A custom note associated with the customer profile.
	Note *string `json:"note,omitempty" url:"note,omitempty"`
	// The birthday associated with the customer profile, in `YYYY-MM-DD` or `MM-DD` format.
	// For example, specify `1998-09-21` for September 21, 1998, or `09-21` for September 21.
	// Birthdays are returned in `YYYY-MM-DD` format, where `YYYY` is the specified birth year or
	// `0000` if a birth year is not specified.
	Birthday *string `json:"birthday,omitempty" url:"birthday,omitempty"`
	// The tax ID associated with the customer profile. This field is available only for
	// customers of sellers in EU countries or the United Kingdom. For more information, see
	// [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids).
	TaxIDs *CustomerTaxIDs `json:"tax_ids,omitempty" url:"tax_ids,omitempty"`
	// contains filtered or unexported fields
}

Defines the customer data provided in individual create requests for a [BulkCreateCustomers](api-endpoint:Customers-BulkCreateCustomers) operation.

func (*BulkCreateCustomerData) GetAddress

func (b *BulkCreateCustomerData) GetAddress() *Address

func (*BulkCreateCustomerData) GetBirthday

func (b *BulkCreateCustomerData) GetBirthday() *string

func (*BulkCreateCustomerData) GetCompanyName

func (b *BulkCreateCustomerData) GetCompanyName() *string

func (*BulkCreateCustomerData) GetEmailAddress

func (b *BulkCreateCustomerData) GetEmailAddress() *string

func (*BulkCreateCustomerData) GetExtraProperties

func (b *BulkCreateCustomerData) GetExtraProperties() map[string]interface{}

func (*BulkCreateCustomerData) GetFamilyName

func (b *BulkCreateCustomerData) GetFamilyName() *string

func (*BulkCreateCustomerData) GetGivenName

func (b *BulkCreateCustomerData) GetGivenName() *string

func (*BulkCreateCustomerData) GetNickname

func (b *BulkCreateCustomerData) GetNickname() *string

func (*BulkCreateCustomerData) GetNote

func (b *BulkCreateCustomerData) GetNote() *string

func (*BulkCreateCustomerData) GetPhoneNumber

func (b *BulkCreateCustomerData) GetPhoneNumber() *string

func (*BulkCreateCustomerData) GetReferenceID

func (b *BulkCreateCustomerData) GetReferenceID() *string

func (*BulkCreateCustomerData) GetTaxIDs

func (b *BulkCreateCustomerData) GetTaxIDs() *CustomerTaxIDs

func (*BulkCreateCustomerData) String

func (b *BulkCreateCustomerData) String() string

func (*BulkCreateCustomerData) UnmarshalJSON

func (b *BulkCreateCustomerData) UnmarshalJSON(data []byte) error

type BulkCreateCustomersRequest

type BulkCreateCustomersRequest struct {
	// A map of 1 to 100 individual create requests, represented by `idempotency key: { customer data }`
	// key-value pairs.
	//
	// Each key is an [idempotency key](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency)
	// that uniquely identifies the create request. Each value contains the customer data used to create the
	// customer profile.
	Customers map[string]*BulkCreateCustomerData `json:"customers,omitempty" url:"-"`
}

type BulkCreateCustomersResponse

type BulkCreateCustomersResponse struct {
	// A map of responses that correspond to individual create requests, represented by
	// key-value pairs.
	//
	// Each key is the idempotency key that was provided for a create request and each value
	// is the corresponding response.
	// If the request succeeds, the value is the new customer profile.
	// If the request fails, the value contains any errors that occurred during the request.
	Responses map[string]*CreateCustomerResponse `json:"responses,omitempty" url:"responses,omitempty"`
	// Any top-level errors that prevented the bulk operation from running.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields included in the response body from the [BulkCreateCustomers](api-endpoint:Customers-BulkCreateCustomers) endpoint.

func (*BulkCreateCustomersResponse) GetErrors

func (b *BulkCreateCustomersResponse) GetErrors() []*Error

func (*BulkCreateCustomersResponse) GetExtraProperties

func (b *BulkCreateCustomersResponse) GetExtraProperties() map[string]interface{}

func (*BulkCreateCustomersResponse) GetResponses

func (*BulkCreateCustomersResponse) String

func (b *BulkCreateCustomersResponse) String() string

func (*BulkCreateCustomersResponse) UnmarshalJSON

func (b *BulkCreateCustomersResponse) UnmarshalJSON(data []byte) error

type BulkDeleteBookingCustomAttributesResponse

type BulkDeleteBookingCustomAttributesResponse struct {
	// A map of responses that correspond to individual delete requests. Each response has the
	// same ID as the corresponding request and contains `booking_id` and  `errors` field.
	Values map[string]*BookingCustomAttributeDeleteResponse `json:"values,omitempty" url:"values,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes) response, which contains a map of responses that each corresponds to an individual delete request.

func (*BulkDeleteBookingCustomAttributesResponse) GetErrors

func (*BulkDeleteBookingCustomAttributesResponse) GetExtraProperties

func (b *BulkDeleteBookingCustomAttributesResponse) GetExtraProperties() map[string]interface{}

func (*BulkDeleteBookingCustomAttributesResponse) GetValues

func (*BulkDeleteBookingCustomAttributesResponse) String

func (*BulkDeleteBookingCustomAttributesResponse) UnmarshalJSON

func (b *BulkDeleteBookingCustomAttributesResponse) UnmarshalJSON(data []byte) error

type BulkDeleteCustomersRequest

type BulkDeleteCustomersRequest struct {
	// The IDs of the [customer profiles](entity:Customer) to delete.
	CustomerIDs []string `json:"customer_ids,omitempty" url:"-"`
}

type BulkDeleteCustomersResponse

type BulkDeleteCustomersResponse struct {
	// A map of responses that correspond to individual delete requests, represented by
	// key-value pairs.
	//
	// Each key is the customer ID that was specified for a delete request and each value
	// is the corresponding response.
	// If the request succeeds, the value is an empty object (`{ }`).
	// If the request fails, the value contains any errors that occurred during the request.
	Responses map[string]*DeleteCustomerResponse `json:"responses,omitempty" url:"responses,omitempty"`
	// Any top-level errors that prevented the bulk operation from running.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields included in the response body from the [BulkDeleteCustomers](api-endpoint:Customers-BulkDeleteCustomers) endpoint.

func (*BulkDeleteCustomersResponse) GetErrors

func (b *BulkDeleteCustomersResponse) GetErrors() []*Error

func (*BulkDeleteCustomersResponse) GetExtraProperties

func (b *BulkDeleteCustomersResponse) GetExtraProperties() map[string]interface{}

func (*BulkDeleteCustomersResponse) GetResponses

func (*BulkDeleteCustomersResponse) String

func (b *BulkDeleteCustomersResponse) String() string

func (*BulkDeleteCustomersResponse) UnmarshalJSON

func (b *BulkDeleteCustomersResponse) UnmarshalJSON(data []byte) error

type BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest

type BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest struct {
	// The key of the associated custom attribute definition.
	// Represented as a qualified key if the requesting app is not the definition owner.
	Key *string `json:"key,omitempty" url:"key,omitempty"`
	// contains filtered or unexported fields
}

Represents an individual delete request in a [BulkDeleteLocationCustomAttributes](api-endpoint:LocationCustomAttributes-BulkDeleteLocationCustomAttributes) request. An individual request contains an optional ID of the associated custom attribute definition and optional key of the associated custom attribute definition.

func (*BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest) GetExtraProperties

func (*BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest) GetKey

func (*BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest) String

func (*BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest) UnmarshalJSON

type BulkDeleteLocationCustomAttributesResponse

type BulkDeleteLocationCustomAttributesResponse struct {
	// A map of responses that correspond to individual delete requests. Each response has the
	// same key as the corresponding request.
	Values map[string]*BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse `json:"values,omitempty" url:"values,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [BulkDeleteLocationCustomAttributes](api-endpoint:LocationCustomAttributes-BulkDeleteLocationCustomAttributes) response, which contains a map of responses that each corresponds to an individual delete request.

func (*BulkDeleteLocationCustomAttributesResponse) GetErrors

func (*BulkDeleteLocationCustomAttributesResponse) GetExtraProperties

func (b *BulkDeleteLocationCustomAttributesResponse) GetExtraProperties() map[string]interface{}

func (*BulkDeleteLocationCustomAttributesResponse) String

func (*BulkDeleteLocationCustomAttributesResponse) UnmarshalJSON

func (b *BulkDeleteLocationCustomAttributesResponse) UnmarshalJSON(data []byte) error

type BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse

type BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse struct {
	// The ID of the location associated with the custom attribute.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// Errors that occurred while processing the individual LocationCustomAttributeDeleteRequest request
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents an individual delete response in a [BulkDeleteLocationCustomAttributes](api-endpoint:LocationCustomAttributes-BulkDeleteLocationCustomAttributes) request.

func (*BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse) GetErrors

func (*BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse) GetExtraProperties

func (*BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse) GetLocationID

func (*BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse) String

func (*BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse) UnmarshalJSON

type BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest

type BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest struct {
	// The key of the associated custom attribute definition.
	// Represented as a qualified key if the requesting app is not the definition owner.
	Key *string `json:"key,omitempty" url:"key,omitempty"`
	// contains filtered or unexported fields
}

Represents an individual delete request in a [BulkDeleteMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-BulkDeleteMerchantCustomAttributes) request. An individual request contains an optional ID of the associated custom attribute definition and optional key of the associated custom attribute definition.

func (*BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest) GetExtraProperties

func (*BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest) GetKey

func (*BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest) String

func (*BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest) UnmarshalJSON

type BulkDeleteMerchantCustomAttributesResponse

type BulkDeleteMerchantCustomAttributesResponse struct {
	// A map of responses that correspond to individual delete requests. Each response has the
	// same key as the corresponding request.
	Values map[string]*BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse `json:"values,omitempty" url:"values,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [BulkDeleteMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-BulkDeleteMerchantCustomAttributes) response, which contains a map of responses that each corresponds to an individual delete request.

func (*BulkDeleteMerchantCustomAttributesResponse) GetErrors

func (*BulkDeleteMerchantCustomAttributesResponse) GetExtraProperties

func (b *BulkDeleteMerchantCustomAttributesResponse) GetExtraProperties() map[string]interface{}

func (*BulkDeleteMerchantCustomAttributesResponse) String

func (*BulkDeleteMerchantCustomAttributesResponse) UnmarshalJSON

func (b *BulkDeleteMerchantCustomAttributesResponse) UnmarshalJSON(data []byte) error

type BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse

type BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse struct {
	// Errors that occurred while processing the individual MerchantCustomAttributeDeleteRequest request
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents an individual delete response in a [BulkDeleteMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-BulkDeleteMerchantCustomAttributes) request.

func (*BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse) GetErrors

func (*BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse) GetExtraProperties

func (*BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse) String

func (*BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse) UnmarshalJSON

type BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute

type BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute struct {
	// The key of the custom attribute to delete.  This key must match the key
	// of an existing custom attribute definition.
	Key *string `json:"key,omitempty" url:"key,omitempty"`
	// The ID of the target [order](entity:Order).
	OrderID string `json:"order_id" url:"order_id"`
	// contains filtered or unexported fields
}

Represents one delete within the bulk operation.

func (*BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute) GetExtraProperties

func (b *BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute) GetExtraProperties() map[string]interface{}

func (*BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute) GetKey

func (*BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute) GetOrderID

func (*BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute) String

func (*BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute) UnmarshalJSON

type BulkDeleteOrderCustomAttributesResponse

type BulkDeleteOrderCustomAttributesResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	//	A map of responses that correspond to individual delete requests. Each response has the same ID
	//
	// as the corresponding request and contains either a `custom_attribute` or an `errors` field.
	Values map[string]*DeleteOrderCustomAttributeResponse `json:"values,omitempty" url:"values,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from deleting one or more order custom attributes.

func (*BulkDeleteOrderCustomAttributesResponse) GetErrors

func (*BulkDeleteOrderCustomAttributesResponse) GetExtraProperties

func (b *BulkDeleteOrderCustomAttributesResponse) GetExtraProperties() map[string]interface{}

func (*BulkDeleteOrderCustomAttributesResponse) GetValues

func (*BulkDeleteOrderCustomAttributesResponse) String

func (*BulkDeleteOrderCustomAttributesResponse) UnmarshalJSON

func (b *BulkDeleteOrderCustomAttributesResponse) UnmarshalJSON(data []byte) error

type BulkRetrieveBookingsRequest

type BulkRetrieveBookingsRequest struct {
	// A non-empty list of [Booking](entity:Booking) IDs specifying bookings to retrieve.
	BookingIDs []string `json:"booking_ids,omitempty" url:"-"`
}

type BulkRetrieveBookingsResponse

type BulkRetrieveBookingsResponse struct {
	// Requested bookings returned as a map containing `booking_id` as the key and `RetrieveBookingResponse` as the value.
	Bookings map[string]*GetBookingResponse `json:"bookings,omitempty" url:"bookings,omitempty"`
	// Errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Response payload for bulk retrieval of bookings.

func (*BulkRetrieveBookingsResponse) GetBookings

func (*BulkRetrieveBookingsResponse) GetErrors

func (b *BulkRetrieveBookingsResponse) GetErrors() []*Error

func (*BulkRetrieveBookingsResponse) GetExtraProperties

func (b *BulkRetrieveBookingsResponse) GetExtraProperties() map[string]interface{}

func (*BulkRetrieveBookingsResponse) String

func (*BulkRetrieveBookingsResponse) UnmarshalJSON

func (b *BulkRetrieveBookingsResponse) UnmarshalJSON(data []byte) error

type BulkRetrieveCustomersRequest

type BulkRetrieveCustomersRequest struct {
	// The IDs of the [customer profiles](entity:Customer) to retrieve.
	CustomerIDs []string `json:"customer_ids,omitempty" url:"-"`
}

type BulkRetrieveCustomersResponse

type BulkRetrieveCustomersResponse struct {
	// A map of responses that correspond to individual retrieve requests, represented by
	// key-value pairs.
	//
	// Each key is the customer ID that was specified for a retrieve request and each value
	// is the corresponding response.
	// If the request succeeds, the value is the requested customer profile.
	// If the request fails, the value contains any errors that occurred during the request.
	Responses map[string]*GetCustomerResponse `json:"responses,omitempty" url:"responses,omitempty"`
	// Any top-level errors that prevented the bulk operation from running.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields included in the response body from the [BulkRetrieveCustomers](api-endpoint:Customers-BulkRetrieveCustomers) endpoint.

func (*BulkRetrieveCustomersResponse) GetErrors

func (b *BulkRetrieveCustomersResponse) GetErrors() []*Error

func (*BulkRetrieveCustomersResponse) GetExtraProperties

func (b *BulkRetrieveCustomersResponse) GetExtraProperties() map[string]interface{}

func (*BulkRetrieveCustomersResponse) GetResponses

func (*BulkRetrieveCustomersResponse) String

func (*BulkRetrieveCustomersResponse) UnmarshalJSON

func (b *BulkRetrieveCustomersResponse) UnmarshalJSON(data []byte) error

type BulkRetrieveTeamMemberBookingProfilesRequest

type BulkRetrieveTeamMemberBookingProfilesRequest struct {
	// A non-empty list of IDs of team members whose booking profiles you want to retrieve.
	TeamMemberIDs []string `json:"team_member_ids,omitempty" url:"-"`
}

type BulkRetrieveTeamMemberBookingProfilesResponse

type BulkRetrieveTeamMemberBookingProfilesResponse struct {
	// The returned team members' booking profiles, as a map with `team_member_id` as the key and [TeamMemberBookingProfile](entity:TeamMemberBookingProfile) the value.
	TeamMemberBookingProfiles map[string]*GetTeamMemberBookingProfileResponse `json:"team_member_booking_profiles,omitempty" url:"team_member_booking_profiles,omitempty"`
	// Errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Response payload for the [BulkRetrieveTeamMemberBookingProfiles](api-endpoint:Bookings-BulkRetrieveTeamMemberBookingProfiles) endpoint.

func (*BulkRetrieveTeamMemberBookingProfilesResponse) GetErrors

func (*BulkRetrieveTeamMemberBookingProfilesResponse) GetExtraProperties

func (b *BulkRetrieveTeamMemberBookingProfilesResponse) GetExtraProperties() map[string]interface{}

func (*BulkRetrieveTeamMemberBookingProfilesResponse) GetTeamMemberBookingProfiles

func (*BulkRetrieveTeamMemberBookingProfilesResponse) String

func (*BulkRetrieveTeamMemberBookingProfilesResponse) UnmarshalJSON

func (b *BulkRetrieveTeamMemberBookingProfilesResponse) UnmarshalJSON(data []byte) error

type BulkSwapPlanRequest

type BulkSwapPlanRequest struct {
	// The ID of the new subscription plan variation.
	//
	// This field is required.
	NewPlanVariationID string `json:"new_plan_variation_id" url:"-"`
	// The ID of the plan variation whose subscriptions should be swapped. Active subscriptions
	// using this plan variation will be subscribed to the new plan variation on their next billing
	// day.
	OldPlanVariationID string `json:"old_plan_variation_id" url:"-"`
	// The ID of the location to associate with the swapped subscriptions.
	LocationID string `json:"location_id" url:"-"`
}

type BulkSwapPlanResponse

type BulkSwapPlanResponse struct {
	// Errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The number of affected subscriptions.
	AffectedSubscriptions *int `json:"affected_subscriptions,omitempty" url:"affected_subscriptions,omitempty"`
	// contains filtered or unexported fields
}

Defines output parameters in a response of the [BulkSwapPlan](api-endpoint:Subscriptions-BulkSwapPlan) endpoint.

func (*BulkSwapPlanResponse) GetAffectedSubscriptions

func (b *BulkSwapPlanResponse) GetAffectedSubscriptions() *int

func (*BulkSwapPlanResponse) GetErrors

func (b *BulkSwapPlanResponse) GetErrors() []*Error

func (*BulkSwapPlanResponse) GetExtraProperties

func (b *BulkSwapPlanResponse) GetExtraProperties() map[string]interface{}

func (*BulkSwapPlanResponse) String

func (b *BulkSwapPlanResponse) String() string

func (*BulkSwapPlanResponse) UnmarshalJSON

func (b *BulkSwapPlanResponse) UnmarshalJSON(data []byte) error

type BulkUpdateCustomerData

type BulkUpdateCustomerData struct {
	// The given name (that is, the first name) associated with the customer profile.
	GivenName *string `json:"given_name,omitempty" url:"given_name,omitempty"`
	// The family name (that is, the last name) associated with the customer profile.
	FamilyName *string `json:"family_name,omitempty" url:"family_name,omitempty"`
	// A business name associated with the customer profile.
	CompanyName *string `json:"company_name,omitempty" url:"company_name,omitempty"`
	// A nickname for the customer profile.
	Nickname *string `json:"nickname,omitempty" url:"nickname,omitempty"`
	// The email address associated with the customer profile.
	EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"`
	// The physical address associated with the customer profile. For maximum length constraints,
	// see [Customer addresses](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#address).
	// The `first_name` and `last_name` fields are ignored if they are present in the request.
	Address *Address `json:"address,omitempty" url:"address,omitempty"`
	// The phone number associated with the customer profile. The phone number must be valid
	// and can contain 9–16 digits, with an optional `+` prefix and country code. For more information,
	// see [Customer phone numbers](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#phone-number).
	PhoneNumber *string `json:"phone_number,omitempty" url:"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" url:"reference_id,omitempty"`
	// An custom note associates with the customer profile.
	Note *string `json:"note,omitempty" url:"note,omitempty"`
	// The birthday associated with the customer profile, in `YYYY-MM-DD` or `MM-DD` format.
	// For example, specify `1998-09-21` for September 21, 1998, or `09-21` for September 21.
	// Birthdays are returned in `YYYY-MM-DD` format, where `YYYY` is the specified birth year or
	// `0000` if a birth year is not specified.
	Birthday *string `json:"birthday,omitempty" url:"birthday,omitempty"`
	// The tax ID associated with the customer profile. This field is available only for
	// customers of sellers in EU countries or the United Kingdom. For more information, see
	// [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids).
	TaxIDs *CustomerTaxIDs `json:"tax_ids,omitempty" url:"tax_ids,omitempty"`
	// The current version of the customer profile.
	//
	// As a best practice, you should include this field to enable
	// [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)
	// control.
	Version *int64 `json:"version,omitempty" url:"version,omitempty"`
	// contains filtered or unexported fields
}

Defines the customer data provided in individual update requests for a [BulkUpdateCustomers](api-endpoint:Customers-BulkUpdateCustomers) operation.

func (*BulkUpdateCustomerData) GetAddress

func (b *BulkUpdateCustomerData) GetAddress() *Address

func (*BulkUpdateCustomerData) GetBirthday

func (b *BulkUpdateCustomerData) GetBirthday() *string

func (*BulkUpdateCustomerData) GetCompanyName

func (b *BulkUpdateCustomerData) GetCompanyName() *string

func (*BulkUpdateCustomerData) GetEmailAddress

func (b *BulkUpdateCustomerData) GetEmailAddress() *string

func (*BulkUpdateCustomerData) GetExtraProperties

func (b *BulkUpdateCustomerData) GetExtraProperties() map[string]interface{}

func (*BulkUpdateCustomerData) GetFamilyName

func (b *BulkUpdateCustomerData) GetFamilyName() *string

func (*BulkUpdateCustomerData) GetGivenName

func (b *BulkUpdateCustomerData) GetGivenName() *string

func (*BulkUpdateCustomerData) GetNickname

func (b *BulkUpdateCustomerData) GetNickname() *string

func (*BulkUpdateCustomerData) GetNote

func (b *BulkUpdateCustomerData) GetNote() *string

func (*BulkUpdateCustomerData) GetPhoneNumber

func (b *BulkUpdateCustomerData) GetPhoneNumber() *string

func (*BulkUpdateCustomerData) GetReferenceID

func (b *BulkUpdateCustomerData) GetReferenceID() *string

func (*BulkUpdateCustomerData) GetTaxIDs

func (b *BulkUpdateCustomerData) GetTaxIDs() *CustomerTaxIDs

func (*BulkUpdateCustomerData) GetVersion

func (b *BulkUpdateCustomerData) GetVersion() *int64

func (*BulkUpdateCustomerData) String

func (b *BulkUpdateCustomerData) String() string

func (*BulkUpdateCustomerData) UnmarshalJSON

func (b *BulkUpdateCustomerData) UnmarshalJSON(data []byte) error

type BulkUpdateCustomersRequest

type BulkUpdateCustomersRequest struct {
	// A map of 1 to 100 individual update requests, represented by `customer ID: { customer data }`
	// key-value pairs.
	//
	// Each key is the ID of the [customer profile](entity:Customer) to update. To update a customer profile
	// that was created by merging existing profiles, provide the ID of the newly created profile.
	//
	// Each value contains the updated customer data. Only new or changed fields are required. To add or
	// update a field, specify the new value. To remove a field, specify `null`.
	Customers map[string]*BulkUpdateCustomerData `json:"customers,omitempty" url:"-"`
}

type BulkUpdateCustomersResponse

type BulkUpdateCustomersResponse struct {
	// A map of responses that correspond to individual update requests, represented by
	// key-value pairs.
	//
	// Each key is the customer ID that was specified for an update request and each value
	// is the corresponding response.
	// If the request succeeds, the value is the updated customer profile.
	// If the request fails, the value contains any errors that occurred during the request.
	Responses map[string]*UpdateCustomerResponse `json:"responses,omitempty" url:"responses,omitempty"`
	// Any top-level errors that prevented the bulk operation from running.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields included in the response body from the [BulkUpdateCustomers](api-endpoint:Customers-BulkUpdateCustomers) endpoint.

func (*BulkUpdateCustomersResponse) GetErrors

func (b *BulkUpdateCustomersResponse) GetErrors() []*Error

func (*BulkUpdateCustomersResponse) GetExtraProperties

func (b *BulkUpdateCustomersResponse) GetExtraProperties() map[string]interface{}

func (*BulkUpdateCustomersResponse) GetResponses

func (*BulkUpdateCustomersResponse) String

func (b *BulkUpdateCustomersResponse) String() string

func (*BulkUpdateCustomersResponse) UnmarshalJSON

func (b *BulkUpdateCustomersResponse) UnmarshalJSON(data []byte) error

type BulkUpsertBookingCustomAttributesResponse

type BulkUpsertBookingCustomAttributesResponse struct {
	// A map of responses that correspond to individual upsert requests. Each response has the
	// same ID as the corresponding request and contains either a `booking_id` and `custom_attribute` or an `errors` field.
	Values map[string]*BookingCustomAttributeUpsertResponse `json:"values,omitempty" url:"values,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [BulkUpsertBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkUpsertBookingCustomAttributes) response, which contains a map of responses that each corresponds to an individual upsert request.

func (*BulkUpsertBookingCustomAttributesResponse) GetErrors

func (*BulkUpsertBookingCustomAttributesResponse) GetExtraProperties

func (b *BulkUpsertBookingCustomAttributesResponse) GetExtraProperties() map[string]interface{}

func (*BulkUpsertBookingCustomAttributesResponse) GetValues

func (*BulkUpsertBookingCustomAttributesResponse) String

func (*BulkUpsertBookingCustomAttributesResponse) UnmarshalJSON

func (b *BulkUpsertBookingCustomAttributesResponse) UnmarshalJSON(data []byte) error

type BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest

type BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest struct {
	// The ID of the target [location](entity:Location).
	LocationID string `json:"location_id" url:"location_id"`
	// The custom attribute to create or update, with following fields:
	// - `key`. This key must match the `key` of a custom attribute definition in the Square seller
	// account. If the requesting application is not the definition owner, you must provide the qualified key.
	// - `value`. This value must conform to the `schema` specified by the definition.
	// For more information, see [Supported data types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types)..
	// - `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)
	// control, specify the current version of the custom attribute.
	// If this is not important for your application, `version` can be set to -1.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// A unique identifier for this individual upsert request, used to ensure idempotency.
	// For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"idempotency_key,omitempty"`
	// contains filtered or unexported fields
}

Represents an individual upsert request in a [BulkUpsertLocationCustomAttributes](api-endpoint:LocationCustomAttributes-BulkUpsertLocationCustomAttributes) request. An individual request contains a location ID, the custom attribute to create or update, and an optional idempotency key.

func (*BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest) GetCustomAttribute

func (*BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest) GetExtraProperties

func (*BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest) GetIdempotencyKey

func (*BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest) GetLocationID

func (*BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest) String

func (*BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest) UnmarshalJSON

type BulkUpsertLocationCustomAttributesResponse

type BulkUpsertLocationCustomAttributesResponse struct {
	// A map of responses that correspond to individual upsert requests. Each response has the
	// same ID as the corresponding request and contains either a `location_id` and `custom_attribute` or an `errors` field.
	Values map[string]*BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse `json:"values,omitempty" url:"values,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [BulkUpsertLocationCustomAttributes](api-endpoint:LocationCustomAttributes-BulkUpsertLocationCustomAttributes) response, which contains a map of responses that each corresponds to an individual upsert request.

func (*BulkUpsertLocationCustomAttributesResponse) GetErrors

func (*BulkUpsertLocationCustomAttributesResponse) GetExtraProperties

func (b *BulkUpsertLocationCustomAttributesResponse) GetExtraProperties() map[string]interface{}

func (*BulkUpsertLocationCustomAttributesResponse) String

func (*BulkUpsertLocationCustomAttributesResponse) UnmarshalJSON

func (b *BulkUpsertLocationCustomAttributesResponse) UnmarshalJSON(data []byte) error

type BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse

type BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse struct {
	// The ID of the location associated with the custom attribute.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The new or updated custom attribute.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// Any errors that occurred while processing the individual request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response for an individual upsert request in a [BulkUpsertLocationCustomAttributes](api-endpoint:LocationCustomAttributes-BulkUpsertLocationCustomAttributes) operation.

func (*BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse) GetCustomAttribute

func (*BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse) GetErrors

func (*BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse) GetExtraProperties

func (*BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse) GetLocationID

func (*BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse) String

func (*BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse) UnmarshalJSON

type BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest

type BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest struct {
	// The ID of the target [merchant](entity:Merchant).
	MerchantID string `json:"merchant_id" url:"merchant_id"`
	// The custom attribute to create or update, with following fields:
	// - `key`. This key must match the `key` of a custom attribute definition in the Square seller
	// account. If the requesting application is not the definition owner, you must provide the qualified key.
	// - `value`. This value must conform to the `schema` specified by the definition.
	// For more information, see [Supported data types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types).
	// - The version field must match the current version of the custom attribute definition to enable
	// [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)
	// If this is not important for your application, version can be set to -1. For any other values, the request fails with a BAD_REQUEST error.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// A unique identifier for this individual upsert request, used to ensure idempotency.
	// For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"idempotency_key,omitempty"`
	// contains filtered or unexported fields
}

Represents an individual upsert request in a [BulkUpsertMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-BulkUpsertMerchantCustomAttributes) request. An individual request contains a merchant ID, the custom attribute to create or update, and an optional idempotency key.

func (*BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest) GetCustomAttribute

func (*BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest) GetExtraProperties

func (*BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest) GetIdempotencyKey

func (*BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest) GetMerchantID

func (*BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest) String

func (*BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest) UnmarshalJSON

type BulkUpsertMerchantCustomAttributesResponse

type BulkUpsertMerchantCustomAttributesResponse struct {
	// A map of responses that correspond to individual upsert requests. Each response has the
	// same ID as the corresponding request and contains either a `merchant_id` and `custom_attribute` or an `errors` field.
	Values map[string]*BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse `json:"values,omitempty" url:"values,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [BulkUpsertMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-BulkUpsertMerchantCustomAttributes) response, which contains a map of responses that each corresponds to an individual upsert request.

func (*BulkUpsertMerchantCustomAttributesResponse) GetErrors

func (*BulkUpsertMerchantCustomAttributesResponse) GetExtraProperties

func (b *BulkUpsertMerchantCustomAttributesResponse) GetExtraProperties() map[string]interface{}

func (*BulkUpsertMerchantCustomAttributesResponse) String

func (*BulkUpsertMerchantCustomAttributesResponse) UnmarshalJSON

func (b *BulkUpsertMerchantCustomAttributesResponse) UnmarshalJSON(data []byte) error

type BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse

type BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse struct {
	// The ID of the merchant associated with the custom attribute.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The new or updated custom attribute.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// Any errors that occurred while processing the individual request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response for an individual upsert request in a [BulkUpsertMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-BulkUpsertMerchantCustomAttributes) operation.

func (*BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse) GetCustomAttribute

func (*BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse) GetErrors

func (*BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse) GetExtraProperties

func (*BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse) GetMerchantID

func (*BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse) String

func (*BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse) UnmarshalJSON

type BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute

type BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute struct {
	// The custom attribute to create or update, with the following fields:
	//
	// - `value`. This value must conform to the `schema` specified by the definition.
	// For more information, see [Value data types](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attributes#value-data-types).
	//
	// - `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)
	// control, include this optional field and specify the current version of the custom attribute.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// A unique identifier for this request, used to ensure idempotency.
	// For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"idempotency_key,omitempty"`
	// The ID of the target [order](entity:Order).
	OrderID string `json:"order_id" url:"order_id"`
	// contains filtered or unexported fields
}

Represents one upsert within the bulk operation.

func (*BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute) GetCustomAttribute

func (*BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute) GetExtraProperties

func (b *BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute) GetExtraProperties() map[string]interface{}

func (*BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute) GetIdempotencyKey

func (*BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute) GetOrderID

func (*BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute) String

func (*BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute) UnmarshalJSON

type BulkUpsertOrderCustomAttributesResponse

type BulkUpsertOrderCustomAttributesResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// A map of responses that correspond to individual upsert operations for custom attributes.
	Values map[string]*UpsertOrderCustomAttributeResponse `json:"values,omitempty" url:"values,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from a bulk upsert of order custom attributes.

func (*BulkUpsertOrderCustomAttributesResponse) GetErrors

func (*BulkUpsertOrderCustomAttributesResponse) GetExtraProperties

func (b *BulkUpsertOrderCustomAttributesResponse) GetExtraProperties() map[string]interface{}

func (*BulkUpsertOrderCustomAttributesResponse) GetValues

func (*BulkUpsertOrderCustomAttributesResponse) String

func (*BulkUpsertOrderCustomAttributesResponse) UnmarshalJSON

func (b *BulkUpsertOrderCustomAttributesResponse) UnmarshalJSON(data []byte) error

type BusinessAppointmentSettings

type BusinessAppointmentSettings struct {
	// Types of the location allowed for bookings.
	// See [BusinessAppointmentSettingsBookingLocationType](#type-businessappointmentsettingsbookinglocationtype) for possible values
	LocationTypes []BusinessAppointmentSettingsBookingLocationType `json:"location_types,omitempty" url:"location_types,omitempty"`
	// The time unit of the service duration for bookings.
	// See [BusinessAppointmentSettingsAlignmentTime](#type-businessappointmentsettingsalignmenttime) for possible values
	AlignmentTime *BusinessAppointmentSettingsAlignmentTime `json:"alignment_time,omitempty" url:"alignment_time,omitempty"`
	// The minimum lead time in seconds before a service can be booked. A booking must be created at least this amount of time before its starting time.
	MinBookingLeadTimeSeconds *int `json:"min_booking_lead_time_seconds,omitempty" url:"min_booking_lead_time_seconds,omitempty"`
	// The maximum lead time in seconds before a service can be booked. A booking must be created at most this amount of time before its starting time.
	MaxBookingLeadTimeSeconds *int `json:"max_booking_lead_time_seconds,omitempty" url:"max_booking_lead_time_seconds,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" url:"any_team_member_booking_enabled,omitempty"`
	// Indicates whether a customer can book multiple services in a single online booking.
	MultipleServiceBookingEnabled *bool `json:"multiple_service_booking_enabled,omitempty" url:"multiple_service_booking_enabled,omitempty"`
	// Indicates whether the daily appointment limit applies to team members or to
	// business locations.
	// See [BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType](#type-businessappointmentsettingsmaxappointmentsperdaylimittype) for possible values
	MaxAppointmentsPerDayLimitType *BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType `json:"max_appointments_per_day_limit_type,omitempty" url:"max_appointments_per_day_limit_type,omitempty"`
	// The maximum number of daily appointments per team member or per location.
	MaxAppointmentsPerDayLimit *int `json:"max_appointments_per_day_limit,omitempty" url:"max_appointments_per_day_limit,omitempty"`
	// The cut-off time in seconds for allowing clients to cancel or reschedule an appointment.
	CancellationWindowSeconds *int `json:"cancellation_window_seconds,omitempty" url:"cancellation_window_seconds,omitempty"`
	// The flat-fee amount charged for a no-show booking.
	CancellationFeeMoney *Money `json:"cancellation_fee_money,omitempty" url:"cancellation_fee_money,omitempty"`
	// The cancellation policy adopted by the seller.
	// See [BusinessAppointmentSettingsCancellationPolicy](#type-businessappointmentsettingscancellationpolicy) for possible values
	CancellationPolicy *BusinessAppointmentSettingsCancellationPolicy `json:"cancellation_policy,omitempty" url:"cancellation_policy,omitempty"`
	// The free-form text of the seller's cancellation policy.
	CancellationPolicyText *string `json:"cancellation_policy_text,omitempty" url:"cancellation_policy_text,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" url:"skip_booking_flow_staff_selection,omitempty"`
	// contains filtered or unexported fields
}

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

func (*BusinessAppointmentSettings) GetAlignmentTime

func (*BusinessAppointmentSettings) GetAnyTeamMemberBookingEnabled

func (b *BusinessAppointmentSettings) GetAnyTeamMemberBookingEnabled() *bool

func (*BusinessAppointmentSettings) GetCancellationFeeMoney

func (b *BusinessAppointmentSettings) GetCancellationFeeMoney() *Money

func (*BusinessAppointmentSettings) GetCancellationPolicy

func (*BusinessAppointmentSettings) GetCancellationPolicyText

func (b *BusinessAppointmentSettings) GetCancellationPolicyText() *string

func (*BusinessAppointmentSettings) GetCancellationWindowSeconds

func (b *BusinessAppointmentSettings) GetCancellationWindowSeconds() *int

func (*BusinessAppointmentSettings) GetExtraProperties

func (b *BusinessAppointmentSettings) GetExtraProperties() map[string]interface{}

func (*BusinessAppointmentSettings) GetLocationTypes

func (*BusinessAppointmentSettings) GetMaxAppointmentsPerDayLimit

func (b *BusinessAppointmentSettings) GetMaxAppointmentsPerDayLimit() *int

func (*BusinessAppointmentSettings) GetMaxAppointmentsPerDayLimitType

func (*BusinessAppointmentSettings) GetMaxBookingLeadTimeSeconds

func (b *BusinessAppointmentSettings) GetMaxBookingLeadTimeSeconds() *int

func (*BusinessAppointmentSettings) GetMinBookingLeadTimeSeconds

func (b *BusinessAppointmentSettings) GetMinBookingLeadTimeSeconds() *int

func (*BusinessAppointmentSettings) GetMultipleServiceBookingEnabled

func (b *BusinessAppointmentSettings) GetMultipleServiceBookingEnabled() *bool

func (*BusinessAppointmentSettings) GetSkipBookingFlowStaffSelection

func (b *BusinessAppointmentSettings) GetSkipBookingFlowStaffSelection() *bool

func (*BusinessAppointmentSettings) String

func (b *BusinessAppointmentSettings) String() string

func (*BusinessAppointmentSettings) UnmarshalJSON

func (b *BusinessAppointmentSettings) UnmarshalJSON(data []byte) error

type BusinessAppointmentSettingsAlignmentTime

type BusinessAppointmentSettingsAlignmentTime string

Time units of a service duration for bookings.

const (
	BusinessAppointmentSettingsAlignmentTimeServiceDuration BusinessAppointmentSettingsAlignmentTime = "SERVICE_DURATION"
	BusinessAppointmentSettingsAlignmentTimeQuarterHourly   BusinessAppointmentSettingsAlignmentTime = "QUARTER_HOURLY"
	BusinessAppointmentSettingsAlignmentTimeHalfHourly      BusinessAppointmentSettingsAlignmentTime = "HALF_HOURLY"
	BusinessAppointmentSettingsAlignmentTimeHourly          BusinessAppointmentSettingsAlignmentTime = "HOURLY"
)

func NewBusinessAppointmentSettingsAlignmentTimeFromString

func NewBusinessAppointmentSettingsAlignmentTimeFromString(s string) (BusinessAppointmentSettingsAlignmentTime, error)

func (BusinessAppointmentSettingsAlignmentTime) Ptr

type BusinessAppointmentSettingsBookingLocationType

type BusinessAppointmentSettingsBookingLocationType string

Supported types of location where service is provided.

const (
	BusinessAppointmentSettingsBookingLocationTypeBusinessLocation BusinessAppointmentSettingsBookingLocationType = "BUSINESS_LOCATION"
	BusinessAppointmentSettingsBookingLocationTypeCustomerLocation BusinessAppointmentSettingsBookingLocationType = "CUSTOMER_LOCATION"
	BusinessAppointmentSettingsBookingLocationTypePhone            BusinessAppointmentSettingsBookingLocationType = "PHONE"
)

func NewBusinessAppointmentSettingsBookingLocationTypeFromString

func NewBusinessAppointmentSettingsBookingLocationTypeFromString(s string) (BusinessAppointmentSettingsBookingLocationType, error)

func (BusinessAppointmentSettingsBookingLocationType) Ptr

type BusinessAppointmentSettingsCancellationPolicy

type BusinessAppointmentSettingsCancellationPolicy string

The category of the seller’s cancellation policy.

const (
	BusinessAppointmentSettingsCancellationPolicyCancellationTreatedAsNoShow BusinessAppointmentSettingsCancellationPolicy = "CANCELLATION_TREATED_AS_NO_SHOW"
	BusinessAppointmentSettingsCancellationPolicyCustomPolicy                BusinessAppointmentSettingsCancellationPolicy = "CUSTOM_POLICY"
)

func NewBusinessAppointmentSettingsCancellationPolicyFromString

func NewBusinessAppointmentSettingsCancellationPolicyFromString(s string) (BusinessAppointmentSettingsCancellationPolicy, error)

func (BusinessAppointmentSettingsCancellationPolicy) Ptr

type BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType

type BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType string

Types of daily appointment limits.

const (
	BusinessAppointmentSettingsMaxAppointmentsPerDayLimitTypePerTeamMember BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType = "PER_TEAM_MEMBER"
	BusinessAppointmentSettingsMaxAppointmentsPerDayLimitTypePerLocation   BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType = "PER_LOCATION"
)

func (BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType) Ptr

type BusinessBookingProfile

type BusinessBookingProfile struct {
	// The ID of the seller, obtainable using the Merchants API.
	SellerID *string `json:"seller_id,omitempty" url:"seller_id,omitempty"`
	// The RFC 3339 timestamp specifying the booking's creation time.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// Indicates whether the seller is open for booking.
	BookingEnabled *bool `json:"booking_enabled,omitempty" url:"booking_enabled,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 *BusinessBookingProfileCustomerTimezoneChoice `json:"customer_timezone_choice,omitempty" url:"customer_timezone_choice,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 *BusinessBookingProfileBookingPolicy `json:"booking_policy,omitempty" url:"booking_policy,omitempty"`
	// Indicates whether customers can cancel or reschedule their own bookings (`true`) or not (`false`).
	AllowUserCancel *bool `json:"allow_user_cancel,omitempty" url:"allow_user_cancel,omitempty"`
	// Settings for appointment-type bookings.
	BusinessAppointmentSettings *BusinessAppointmentSettings `json:"business_appointment_settings,omitempty" url:"business_appointment_settings,omitempty"`
	// Indicates whether the seller's subscription to Square Appointments supports creating, updating or canceling an appointment through the API (`true`) or not (`false`) using seller permission.
	SupportSellerLevelWrites *bool `json:"support_seller_level_writes,omitempty" url:"support_seller_level_writes,omitempty"`
	// contains filtered or unexported fields
}

A seller's business booking profile, including booking policy, appointment settings, etc.

func (*BusinessBookingProfile) GetAllowUserCancel

func (b *BusinessBookingProfile) GetAllowUserCancel() *bool

func (*BusinessBookingProfile) GetBookingEnabled

func (b *BusinessBookingProfile) GetBookingEnabled() *bool

func (*BusinessBookingProfile) GetBookingPolicy

func (*BusinessBookingProfile) GetBusinessAppointmentSettings

func (b *BusinessBookingProfile) GetBusinessAppointmentSettings() *BusinessAppointmentSettings

func (*BusinessBookingProfile) GetCreatedAt

func (b *BusinessBookingProfile) GetCreatedAt() *string

func (*BusinessBookingProfile) GetCustomerTimezoneChoice

func (*BusinessBookingProfile) GetExtraProperties

func (b *BusinessBookingProfile) GetExtraProperties() map[string]interface{}

func (*BusinessBookingProfile) GetSellerID

func (b *BusinessBookingProfile) GetSellerID() *string

func (*BusinessBookingProfile) GetSupportSellerLevelWrites

func (b *BusinessBookingProfile) GetSupportSellerLevelWrites() *bool

func (*BusinessBookingProfile) String

func (b *BusinessBookingProfile) String() string

func (*BusinessBookingProfile) UnmarshalJSON

func (b *BusinessBookingProfile) UnmarshalJSON(data []byte) error

type BusinessBookingProfileBookingPolicy

type BusinessBookingProfileBookingPolicy string

Policies for accepting bookings.

const (
	BusinessBookingProfileBookingPolicyAcceptAll          BusinessBookingProfileBookingPolicy = "ACCEPT_ALL"
	BusinessBookingProfileBookingPolicyRequiresAcceptance BusinessBookingProfileBookingPolicy = "REQUIRES_ACCEPTANCE"
)

func NewBusinessBookingProfileBookingPolicyFromString

func NewBusinessBookingProfileBookingPolicyFromString(s string) (BusinessBookingProfileBookingPolicy, error)

func (BusinessBookingProfileBookingPolicy) Ptr

type BusinessBookingProfileCustomerTimezoneChoice

type BusinessBookingProfileCustomerTimezoneChoice string

Choices of customer-facing time zone used for bookings.

const (
	BusinessBookingProfileCustomerTimezoneChoiceBusinessLocationTimezone BusinessBookingProfileCustomerTimezoneChoice = "BUSINESS_LOCATION_TIMEZONE"
	BusinessBookingProfileCustomerTimezoneChoiceCustomerChoice           BusinessBookingProfileCustomerTimezoneChoice = "CUSTOMER_CHOICE"
)

func NewBusinessBookingProfileCustomerTimezoneChoiceFromString

func NewBusinessBookingProfileCustomerTimezoneChoiceFromString(s string) (BusinessBookingProfileCustomerTimezoneChoice, error)

func (BusinessBookingProfileCustomerTimezoneChoice) Ptr

type BusinessHours

type BusinessHours struct {
	// The list of time periods during which the business is open. There can be at most 10 periods per day.
	Periods []*BusinessHoursPeriod `json:"periods,omitempty" url:"periods,omitempty"`
	// contains filtered or unexported fields
}

The hours of operation for a location.

func (*BusinessHours) GetExtraProperties

func (b *BusinessHours) GetExtraProperties() map[string]interface{}

func (*BusinessHours) GetPeriods

func (b *BusinessHours) GetPeriods() []*BusinessHoursPeriod

func (*BusinessHours) String

func (b *BusinessHours) String() string

func (*BusinessHours) UnmarshalJSON

func (b *BusinessHours) UnmarshalJSON(data []byte) error

type BusinessHoursPeriod

type BusinessHoursPeriod struct {
	// The day of the week for this time period.
	// See [DayOfWeek](#type-dayofweek) for possible values
	DayOfWeek *DayOfWeek `json:"day_of_week,omitempty" url:"day_of_week,omitempty"`
	// The start time of a business hours period, specified in local time using partial-time
	// RFC 3339 format. For example, `8:30:00` for a period starting at 8:30 in the morning.
	// Note that the seconds value is always :00, but it is appended for conformance to the RFC.
	StartLocalTime *string `json:"start_local_time,omitempty" url:"start_local_time,omitempty"`
	// The end time of a business hours period, specified in local time using partial-time
	// RFC 3339 format. For example, `21:00:00` for a period ending at 9:00 in the evening.
	// Note that the seconds value is always :00, but it is appended for conformance to the RFC.
	EndLocalTime *string `json:"end_local_time,omitempty" url:"end_local_time,omitempty"`
	// contains filtered or unexported fields
}

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

func (*BusinessHoursPeriod) GetDayOfWeek

func (b *BusinessHoursPeriod) GetDayOfWeek() *DayOfWeek

func (*BusinessHoursPeriod) GetEndLocalTime

func (b *BusinessHoursPeriod) GetEndLocalTime() *string

func (*BusinessHoursPeriod) GetExtraProperties

func (b *BusinessHoursPeriod) GetExtraProperties() map[string]interface{}

func (*BusinessHoursPeriod) GetStartLocalTime

func (b *BusinessHoursPeriod) GetStartLocalTime() *string

func (*BusinessHoursPeriod) String

func (b *BusinessHoursPeriod) String() string

func (*BusinessHoursPeriod) UnmarshalJSON

func (b *BusinessHoursPeriod) UnmarshalJSON(data []byte) error

type BuyNowPayLaterDetails

type BuyNowPayLaterDetails struct {
	// The brand used for the Buy Now Pay Later payment.
	// The brand can be `AFTERPAY`, `CLEARPAY` or `UNKNOWN`.
	Brand *string `json:"brand,omitempty" url:"brand,omitempty"`
	// Details about an Afterpay payment. These details are only populated if the `brand` is
	// `AFTERPAY`.
	AfterpayDetails *AfterpayDetails `json:"afterpay_details,omitempty" url:"afterpay_details,omitempty"`
	// Details about a Clearpay payment. These details are only populated if the `brand` is
	// `CLEARPAY`.
	ClearpayDetails *ClearpayDetails `json:"clearpay_details,omitempty" url:"clearpay_details,omitempty"`
	// contains filtered or unexported fields
}

Additional details about a Buy Now Pay Later payment type.

func (*BuyNowPayLaterDetails) GetAfterpayDetails

func (b *BuyNowPayLaterDetails) GetAfterpayDetails() *AfterpayDetails

func (*BuyNowPayLaterDetails) GetBrand

func (b *BuyNowPayLaterDetails) GetBrand() *string

func (*BuyNowPayLaterDetails) GetClearpayDetails

func (b *BuyNowPayLaterDetails) GetClearpayDetails() *ClearpayDetails

func (*BuyNowPayLaterDetails) GetExtraProperties

func (b *BuyNowPayLaterDetails) GetExtraProperties() map[string]interface{}

func (*BuyNowPayLaterDetails) String

func (b *BuyNowPayLaterDetails) String() string

func (*BuyNowPayLaterDetails) UnmarshalJSON

func (b *BuyNowPayLaterDetails) UnmarshalJSON(data []byte) error

type CalculateLoyaltyPointsResponse

type CalculateLoyaltyPointsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The number of points that the buyer can earn from the base loyalty program.
	Points *int `json:"points,omitempty" url:"points,omitempty"`
	// The number of points that the buyer can earn from a loyalty promotion. To be eligible
	// to earn promotion points, the purchase must first qualify for program points. When `order_id`
	// is not provided in the request, this value is always 0.
	PromotionPoints *int `json:"promotion_points,omitempty" url:"promotion_points,omitempty"`
	// contains filtered or unexported fields
}

Represents a [CalculateLoyaltyPoints](api-endpoint:Loyalty-CalculateLoyaltyPoints) response.

func (*CalculateLoyaltyPointsResponse) GetErrors

func (c *CalculateLoyaltyPointsResponse) GetErrors() []*Error

func (*CalculateLoyaltyPointsResponse) GetExtraProperties

func (c *CalculateLoyaltyPointsResponse) GetExtraProperties() map[string]interface{}

func (*CalculateLoyaltyPointsResponse) GetPoints

func (c *CalculateLoyaltyPointsResponse) GetPoints() *int

func (*CalculateLoyaltyPointsResponse) GetPromotionPoints

func (c *CalculateLoyaltyPointsResponse) GetPromotionPoints() *int

func (*CalculateLoyaltyPointsResponse) String

func (*CalculateLoyaltyPointsResponse) UnmarshalJSON

func (c *CalculateLoyaltyPointsResponse) UnmarshalJSON(data []byte) error

type CalculateOrderRequest

type CalculateOrderRequest struct {
	// The order to be calculated. Expects the entire order, not a sparse update.
	Order *Order `json:"order,omitempty" url:"-"`
	// Identifies one or more loyalty reward tiers to apply during the order calculation.
	// The discounts defined by the reward tiers are added to the order only to preview the
	// effect of applying the specified rewards. The rewards 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,omitempty" url:"-"`
}

type CalculateOrderResponse

type CalculateOrderResponse struct {
	// The calculated version of the order provided in the request.
	Order *Order `json:"order,omitempty" url:"order,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*CalculateOrderResponse) GetErrors

func (c *CalculateOrderResponse) GetErrors() []*Error

func (*CalculateOrderResponse) GetExtraProperties

func (c *CalculateOrderResponse) GetExtraProperties() map[string]interface{}

func (*CalculateOrderResponse) GetOrder

func (c *CalculateOrderResponse) GetOrder() *Order

func (*CalculateOrderResponse) String

func (c *CalculateOrderResponse) String() string

func (*CalculateOrderResponse) UnmarshalJSON

func (c *CalculateOrderResponse) UnmarshalJSON(data []byte) error

type CancelBookingRequest

type CancelBookingRequest struct {
	// The ID of the [Booking](entity:Booking) object representing the to-be-cancelled booking.
	BookingID string `json:"-" url:"-"`
	// A unique key to make this request an idempotent operation.
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"`
	// The revision number for the booking used for optimistic concurrency.
	BookingVersion *int `json:"booking_version,omitempty" url:"-"`
}

type CancelBookingResponse

type CancelBookingResponse struct {
	// The booking that was cancelled.
	Booking *Booking `json:"booking,omitempty" url:"booking,omitempty"`
	// Errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*CancelBookingResponse) GetBooking

func (c *CancelBookingResponse) GetBooking() *Booking

func (*CancelBookingResponse) GetErrors

func (c *CancelBookingResponse) GetErrors() []*Error

func (*CancelBookingResponse) GetExtraProperties

func (c *CancelBookingResponse) GetExtraProperties() map[string]interface{}

func (*CancelBookingResponse) String

func (c *CancelBookingResponse) String() string

func (*CancelBookingResponse) UnmarshalJSON

func (c *CancelBookingResponse) UnmarshalJSON(data []byte) error

type CancelInvoiceRequest

type CancelInvoiceRequest struct {
	// The ID of the [invoice](entity:Invoice) to cancel.
	InvoiceID string `json:"-" url:"-"`
	// The version of the [invoice](entity:Invoice) to cancel.
	// If you do not know the version, you can call
	// [GetInvoice](api-endpoint:Invoices-GetInvoice) or [ListInvoices](api-endpoint:Invoices-ListInvoices).
	Version int `json:"version" url:"-"`
}

type CancelInvoiceResponse

type CancelInvoiceResponse struct {
	// The canceled invoice.
	Invoice *Invoice `json:"invoice,omitempty" url:"invoice,omitempty"`
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response returned by the `CancelInvoice` request.

func (*CancelInvoiceResponse) GetErrors

func (c *CancelInvoiceResponse) GetErrors() []*Error

func (*CancelInvoiceResponse) GetExtraProperties

func (c *CancelInvoiceResponse) GetExtraProperties() map[string]interface{}

func (*CancelInvoiceResponse) GetInvoice

func (c *CancelInvoiceResponse) GetInvoice() *Invoice

func (*CancelInvoiceResponse) String

func (c *CancelInvoiceResponse) String() string

func (*CancelInvoiceResponse) UnmarshalJSON

func (c *CancelInvoiceResponse) UnmarshalJSON(data []byte) error

type CancelLoyaltyPromotionResponse

type CancelLoyaltyPromotionResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The canceled loyalty promotion.
	LoyaltyPromotion *LoyaltyPromotion `json:"loyalty_promotion,omitempty" url:"loyalty_promotion,omitempty"`
	// contains filtered or unexported fields
}

Represents a [CancelLoyaltyPromotion](api-endpoint:Loyalty-CancelLoyaltyPromotion) response. Either `loyalty_promotion` or `errors` is present in the response.

func (*CancelLoyaltyPromotionResponse) GetErrors

func (c *CancelLoyaltyPromotionResponse) GetErrors() []*Error

func (*CancelLoyaltyPromotionResponse) GetExtraProperties

func (c *CancelLoyaltyPromotionResponse) GetExtraProperties() map[string]interface{}

func (*CancelLoyaltyPromotionResponse) GetLoyaltyPromotion

func (c *CancelLoyaltyPromotionResponse) GetLoyaltyPromotion() *LoyaltyPromotion

func (*CancelLoyaltyPromotionResponse) String

func (*CancelLoyaltyPromotionResponse) UnmarshalJSON

func (c *CancelLoyaltyPromotionResponse) UnmarshalJSON(data []byte) error

type CancelPaymentByIdempotencyKeyRequest added in v1.1.0

type CancelPaymentByIdempotencyKeyRequest struct {
	// The `idempotency_key` identifying the payment to be canceled.
	IdempotencyKey string `json:"idempotency_key" url:"-"`
}

type CancelPaymentByIdempotencyKeyResponse

type CancelPaymentByIdempotencyKeyResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the response returned by [CancelPaymentByIdempotencyKey](api-endpoint:Payments-CancelPaymentByIdempotencyKey). On success, `errors` is empty.

func (*CancelPaymentByIdempotencyKeyResponse) GetErrors

func (c *CancelPaymentByIdempotencyKeyResponse) GetErrors() []*Error

func (*CancelPaymentByIdempotencyKeyResponse) GetExtraProperties

func (c *CancelPaymentByIdempotencyKeyResponse) GetExtraProperties() map[string]interface{}

func (*CancelPaymentByIdempotencyKeyResponse) String

func (*CancelPaymentByIdempotencyKeyResponse) UnmarshalJSON

func (c *CancelPaymentByIdempotencyKeyResponse) UnmarshalJSON(data []byte) error

type CancelPaymentResponse

type CancelPaymentResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The successfully canceled `Payment` object.
	Payment *Payment `json:"payment,omitempty" url:"payment,omitempty"`
	// contains filtered or unexported fields
}

Defines the response returned by [CancelPayment](api-endpoint:Payments-CancelPayment).

func (*CancelPaymentResponse) GetErrors

func (c *CancelPaymentResponse) GetErrors() []*Error

func (*CancelPaymentResponse) GetExtraProperties

func (c *CancelPaymentResponse) GetExtraProperties() map[string]interface{}

func (*CancelPaymentResponse) GetPayment

func (c *CancelPaymentResponse) GetPayment() *Payment

func (*CancelPaymentResponse) String

func (c *CancelPaymentResponse) String() string

func (*CancelPaymentResponse) UnmarshalJSON

func (c *CancelPaymentResponse) UnmarshalJSON(data []byte) error

type CancelPaymentsRequest added in v1.2.0

type CancelPaymentsRequest struct {
	// The ID of the payment to cancel.
	PaymentID string `json:"-" url:"-"`
}

type CancelSubscriptionResponse

type CancelSubscriptionResponse struct {
	// Errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The specified subscription scheduled for cancellation according to the action created by the request.
	Subscription *Subscription `json:"subscription,omitempty" url:"subscription,omitempty"`
	// A list of a single `CANCEL` action scheduled for the subscription.
	Actions []*SubscriptionAction `json:"actions,omitempty" url:"actions,omitempty"`
	// contains filtered or unexported fields
}

Defines output parameters in a response from the [CancelSubscription](api-endpoint:Subscriptions-CancelSubscription) endpoint.

func (*CancelSubscriptionResponse) GetActions

func (*CancelSubscriptionResponse) GetErrors

func (c *CancelSubscriptionResponse) GetErrors() []*Error

func (*CancelSubscriptionResponse) GetExtraProperties

func (c *CancelSubscriptionResponse) GetExtraProperties() map[string]interface{}

func (*CancelSubscriptionResponse) GetSubscription

func (c *CancelSubscriptionResponse) GetSubscription() *Subscription

func (*CancelSubscriptionResponse) String

func (c *CancelSubscriptionResponse) String() string

func (*CancelSubscriptionResponse) UnmarshalJSON

func (c *CancelSubscriptionResponse) UnmarshalJSON(data []byte) error

type CancelSubscriptionsRequest added in v1.2.0

type CancelSubscriptionsRequest struct {
	// The ID of the subscription to cancel.
	SubscriptionID string `json:"-" url:"-"`
}

type CancelTerminalActionResponse

type CancelTerminalActionResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The canceled `TerminalAction`
	Action *TerminalAction `json:"action,omitempty" url:"action,omitempty"`
	// contains filtered or unexported fields
}

func (*CancelTerminalActionResponse) GetAction

func (*CancelTerminalActionResponse) GetErrors

func (c *CancelTerminalActionResponse) GetErrors() []*Error

func (*CancelTerminalActionResponse) GetExtraProperties

func (c *CancelTerminalActionResponse) GetExtraProperties() map[string]interface{}

func (*CancelTerminalActionResponse) String

func (*CancelTerminalActionResponse) UnmarshalJSON

func (c *CancelTerminalActionResponse) UnmarshalJSON(data []byte) error

type CancelTerminalCheckoutResponse

type CancelTerminalCheckoutResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The canceled `TerminalCheckout`.
	Checkout *TerminalCheckout `json:"checkout,omitempty" url:"checkout,omitempty"`
	// contains filtered or unexported fields
}

func (*CancelTerminalCheckoutResponse) GetCheckout

func (*CancelTerminalCheckoutResponse) GetErrors

func (c *CancelTerminalCheckoutResponse) GetErrors() []*Error

func (*CancelTerminalCheckoutResponse) GetExtraProperties

func (c *CancelTerminalCheckoutResponse) GetExtraProperties() map[string]interface{}

func (*CancelTerminalCheckoutResponse) String

func (*CancelTerminalCheckoutResponse) UnmarshalJSON

func (c *CancelTerminalCheckoutResponse) UnmarshalJSON(data []byte) error

type CancelTerminalRefundResponse

type CancelTerminalRefundResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The updated `TerminalRefund`.
	Refund *TerminalRefund `json:"refund,omitempty" url:"refund,omitempty"`
	// contains filtered or unexported fields
}

func (*CancelTerminalRefundResponse) GetErrors

func (c *CancelTerminalRefundResponse) GetErrors() []*Error

func (*CancelTerminalRefundResponse) GetExtraProperties

func (c *CancelTerminalRefundResponse) GetExtraProperties() map[string]interface{}

func (*CancelTerminalRefundResponse) GetRefund

func (*CancelTerminalRefundResponse) String

func (*CancelTerminalRefundResponse) UnmarshalJSON

func (c *CancelTerminalRefundResponse) UnmarshalJSON(data []byte) error

type CaptureTransactionResponse

type CaptureTransactionResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [CaptureTransaction](api-endpoint:Transactions-CaptureTransaction) endpoint.

func (*CaptureTransactionResponse) GetErrors

func (c *CaptureTransactionResponse) GetErrors() []*Error

func (*CaptureTransactionResponse) GetExtraProperties

func (c *CaptureTransactionResponse) GetExtraProperties() map[string]interface{}

func (*CaptureTransactionResponse) String

func (c *CaptureTransactionResponse) String() string

func (*CaptureTransactionResponse) UnmarshalJSON

func (c *CaptureTransactionResponse) UnmarshalJSON(data []byte) error

type Card

type Card struct {
	// Unique ID for this card. Generated by Square.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The card's brand.
	// See [CardBrand](#type-cardbrand) for possible values
	CardBrand *CardBrand `json:"card_brand,omitempty" url:"card_brand,omitempty"`
	// The last 4 digits of the card number.
	Last4 *string `json:"last_4,omitempty" url:"last_4,omitempty"`
	// The expiration month of the associated card as an integer between 1 and 12.
	ExpMonth *int64 `json:"exp_month,omitempty" url:"exp_month,omitempty"`
	// The four-digit year of the card's expiration date.
	ExpYear *int64 `json:"exp_year,omitempty" url:"exp_year,omitempty"`
	// The name of the cardholder.
	CardholderName *string `json:"cardholder_name,omitempty" url:"cardholder_name,omitempty"`
	// The billing address for this card. `US` postal codes can be provided as a 5-digit zip code
	// or 9-digit ZIP+4 (example: `12345-6789`). For a full list of field meanings by country, see
	// [Working with Addresses](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-addresses).
	BillingAddress *Address `json:"billing_address,omitempty" url:"billing_address,omitempty"`
	// Intended as a Square-assigned identifier, based
	// on the card number, to identify the card across multiple locations within a
	// single application.
	Fingerprint *string `json:"fingerprint,omitempty" url:"fingerprint,omitempty"`
	// **Required** The ID of a [customer](entity:Customer) to be associated with the card.
	CustomerID *string `json:"customer_id,omitempty" url:"customer_id,omitempty"`
	// The ID of the merchant associated with the card.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// An optional user-defined reference ID that associates this card with
	// another entity in an external system. For example, a customer ID from an
	// external customer management system.
	ReferenceID *string `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// Indicates whether or not a card can be used for payments.
	Enabled *bool `json:"enabled,omitempty" url:"enabled,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 *CardType `json:"card_type,omitempty" url:"card_type,omitempty"`
	// Indicates whether the card is prepaid or not.
	// See [CardPrepaidType](#type-cardprepaidtype) for possible values
	PrepaidType *CardPrepaidType `json:"prepaid_type,omitempty" url:"prepaid_type,omitempty"`
	// The first six digits of the card number, known as the Bank Identification Number (BIN). Only the Payments API
	// returns this field.
	Bin *string `json:"bin,omitempty" url:"bin,omitempty"`
	// Current version number of the card. Increments with each card update. Requests to update an
	// existing Card object will be rejected unless the version in the request matches the current
	// version for the Card.
	Version *int64 `json:"version,omitempty" url:"version,omitempty"`
	// The card's co-brand if available. For example, an Afterpay virtual card would have a
	// co-brand of AFTERPAY.
	// See [CardCoBrand](#type-cardcobrand) for possible values
	CardCoBrand *CardCoBrand `json:"card_co_brand,omitempty" url:"card_co_brand,omitempty"`
	// An alert from the issuing bank about the card status. Alerts can indicate whether
	// future charges to the card are likely to fail. For more information, see
	// [Manage Card on File Declines](https://developer.squareup.com/docs/cards-api/manage-card-on-file-declines).
	//
	// This field is present only if there's an active issuer alert.
	// See [IssuerAlert](#type-issueralert) for possible values
	IssuerAlert *CardIssuerAlert `json:"issuer_alert,omitempty" url:"issuer_alert,omitempty"`
	// The timestamp of when the current issuer alert was received and processed, in
	// RFC 3339 format.
	//
	// This field is present only if there's an active issuer alert.
	IssuerAlertAt *string `json:"issuer_alert_at,omitempty" url:"issuer_alert_at,omitempty"`
	// Indicates whether the card is linked to a Health Savings Account (HSA) or Flexible
	// Spending Account (FSA), based on the card BIN.
	HsaFsa *bool `json:"hsa_fsa,omitempty" url:"hsa_fsa,omitempty"`
	// contains filtered or unexported fields
}

Represents the payment details of a card to be used for payments. These details are determined by the payment token generated by Web Payments SDK.

func (*Card) GetBillingAddress

func (c *Card) GetBillingAddress() *Address

func (*Card) GetBin

func (c *Card) GetBin() *string

func (*Card) GetCardBrand

func (c *Card) GetCardBrand() *CardBrand

func (*Card) GetCardCoBrand

func (c *Card) GetCardCoBrand() *CardCoBrand

func (*Card) GetCardType

func (c *Card) GetCardType() *CardType

func (*Card) GetCardholderName

func (c *Card) GetCardholderName() *string

func (*Card) GetCustomerID

func (c *Card) GetCustomerID() *string

func (*Card) GetEnabled

func (c *Card) GetEnabled() *bool

func (*Card) GetExpMonth

func (c *Card) GetExpMonth() *int64

func (*Card) GetExpYear

func (c *Card) GetExpYear() *int64

func (*Card) GetExtraProperties

func (c *Card) GetExtraProperties() map[string]interface{}

func (*Card) GetFingerprint

func (c *Card) GetFingerprint() *string

func (*Card) GetHsaFsa added in v1.3.0

func (c *Card) GetHsaFsa() *bool

func (*Card) GetID

func (c *Card) GetID() *string

func (*Card) GetIssuerAlertAt added in v1.3.0

func (c *Card) GetIssuerAlertAt() *string

func (*Card) GetLast4

func (c *Card) GetLast4() *string

func (*Card) GetMerchantID

func (c *Card) GetMerchantID() *string

func (*Card) GetPrepaidType

func (c *Card) GetPrepaidType() *CardPrepaidType

func (*Card) GetReferenceID

func (c *Card) GetReferenceID() *string

func (*Card) GetVersion

func (c *Card) GetVersion() *int64

func (*Card) String

func (c *Card) String() string

func (*Card) UnmarshalJSON

func (c *Card) UnmarshalJSON(data []byte) error

type CardBrand

type CardBrand string

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

const (
	CardBrandOtherBrand        CardBrand = "OTHER_BRAND"
	CardBrandVisa              CardBrand = "VISA"
	CardBrandMastercard        CardBrand = "MASTERCARD"
	CardBrandAmericanExpress   CardBrand = "AMERICAN_EXPRESS"
	CardBrandDiscover          CardBrand = "DISCOVER"
	CardBrandDiscoverDiners    CardBrand = "DISCOVER_DINERS"
	CardBrandJcb               CardBrand = "JCB"
	CardBrandChinaUnionpay     CardBrand = "CHINA_UNIONPAY"
	CardBrandSquareGiftCard    CardBrand = "SQUARE_GIFT_CARD"
	CardBrandSquareCapitalCard CardBrand = "SQUARE_CAPITAL_CARD"
	CardBrandInterac           CardBrand = "INTERAC"
	CardBrandEftpos            CardBrand = "EFTPOS"
	CardBrandFelica            CardBrand = "FELICA"
	CardBrandEbt               CardBrand = "EBT"
)

func NewCardBrandFromString

func NewCardBrandFromString(s string) (CardBrand, error)

func (CardBrand) Ptr

func (c CardBrand) Ptr() *CardBrand

type CardCoBrand

type CardCoBrand string

Indicates the brand for a co-branded card.

const (
	CardCoBrandUnknown  CardCoBrand = "UNKNOWN"
	CardCoBrandAfterpay CardCoBrand = "AFTERPAY"
	CardCoBrandClearpay CardCoBrand = "CLEARPAY"
)

func NewCardCoBrandFromString

func NewCardCoBrandFromString(s string) (CardCoBrand, error)

func (CardCoBrand) Ptr

func (c CardCoBrand) Ptr() *CardCoBrand

type CardIssuerAlert added in v1.3.0

type CardIssuerAlert = string

Indicates the type of issuer alert for a [card on file](entity:Card).

type CardPaymentDetails

type CardPaymentDetails struct {
	// The card payment's current state. The state can be AUTHORIZED, CAPTURED, VOIDED, or
	// FAILED.
	Status *string `json:"status,omitempty" url:"status,omitempty"`
	// The credit card's non-confidential details.
	Card *Card `json:"card,omitempty" url:"card,omitempty"`
	// The method used to enter the card's details for the payment. The method can be
	// `KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`.
	EntryMethod *string `json:"entry_method,omitempty" url:"entry_method,omitempty"`
	// The status code returned from the Card Verification Value (CVV) check. The code can be
	// `CVV_ACCEPTED`, `CVV_REJECTED`, or `CVV_NOT_CHECKED`.
	CvvStatus *string `json:"cvv_status,omitempty" url:"cvv_status,omitempty"`
	// The status code returned from the Address Verification System (AVS) check. The code can be
	// `AVS_ACCEPTED`, `AVS_REJECTED`, or `AVS_NOT_CHECKED`.
	AvsStatus *string `json:"avs_status,omitempty" url:"avs_status,omitempty"`
	// The status code returned by the card issuer that describes the payment's
	// authorization status.
	AuthResultCode *string `json:"auth_result_code,omitempty" url:"auth_result_code,omitempty"`
	// For EMV payments, the application ID identifies the EMV application used for the payment.
	ApplicationIdentifier *string `json:"application_identifier,omitempty" url:"application_identifier,omitempty"`
	// For EMV payments, the human-readable name of the EMV application used for the payment.
	ApplicationName *string `json:"application_name,omitempty" url:"application_name,omitempty"`
	// For EMV payments, the cryptogram generated for the payment.
	ApplicationCryptogram *string `json:"application_cryptogram,omitempty" url:"application_cryptogram,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`.
	VerificationMethod *string `json:"verification_method,omitempty" url:"verification_method,omitempty"`
	// For EMV payments, the results of the cardholder verification. The result can be
	// `SUCCESS`, `FAILURE`, or `UNKNOWN`.
	VerificationResults *string `json:"verification_results,omitempty" url:"verification_results,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.
	StatementDescription *string `json:"statement_description,omitempty" url:"statement_description,omitempty"`
	// __Deprecated__: Use `Payment.device_details` instead.
	//
	// Details about the device that took the payment.
	DeviceDetails *DeviceDetails `json:"device_details,omitempty" url:"device_details,omitempty"`
	// The timeline for card payments.
	CardPaymentTimeline *CardPaymentTimeline `json:"card_payment_timeline,omitempty" url:"card_payment_timeline,omitempty"`
	// 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" url:"refund_requires_card_presence,omitempty"`
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Reflects the current status of a card payment. Contains only non-confidential information.

func (*CardPaymentDetails) GetApplicationCryptogram

func (c *CardPaymentDetails) GetApplicationCryptogram() *string

func (*CardPaymentDetails) GetApplicationIdentifier

func (c *CardPaymentDetails) GetApplicationIdentifier() *string

func (*CardPaymentDetails) GetApplicationName

func (c *CardPaymentDetails) GetApplicationName() *string

func (*CardPaymentDetails) GetAuthResultCode

func (c *CardPaymentDetails) GetAuthResultCode() *string

func (*CardPaymentDetails) GetAvsStatus

func (c *CardPaymentDetails) GetAvsStatus() *string

func (*CardPaymentDetails) GetCard

func (c *CardPaymentDetails) GetCard() *Card

func (*CardPaymentDetails) GetCardPaymentTimeline

func (c *CardPaymentDetails) GetCardPaymentTimeline() *CardPaymentTimeline

func (*CardPaymentDetails) GetCvvStatus

func (c *CardPaymentDetails) GetCvvStatus() *string

func (*CardPaymentDetails) GetDeviceDetails

func (c *CardPaymentDetails) GetDeviceDetails() *DeviceDetails

func (*CardPaymentDetails) GetEntryMethod

func (c *CardPaymentDetails) GetEntryMethod() *string

func (*CardPaymentDetails) GetErrors

func (c *CardPaymentDetails) GetErrors() []*Error

func (*CardPaymentDetails) GetExtraProperties

func (c *CardPaymentDetails) GetExtraProperties() map[string]interface{}

func (*CardPaymentDetails) GetRefundRequiresCardPresence

func (c *CardPaymentDetails) GetRefundRequiresCardPresence() *bool

func (*CardPaymentDetails) GetStatementDescription

func (c *CardPaymentDetails) GetStatementDescription() *string

func (*CardPaymentDetails) GetStatus

func (c *CardPaymentDetails) GetStatus() *string

func (*CardPaymentDetails) GetVerificationMethod

func (c *CardPaymentDetails) GetVerificationMethod() *string

func (*CardPaymentDetails) GetVerificationResults

func (c *CardPaymentDetails) GetVerificationResults() *string

func (*CardPaymentDetails) String

func (c *CardPaymentDetails) String() string

func (*CardPaymentDetails) UnmarshalJSON

func (c *CardPaymentDetails) UnmarshalJSON(data []byte) error

type CardPaymentTimeline

type CardPaymentTimeline struct {
	// The timestamp when the payment was authorized, in RFC 3339 format.
	AuthorizedAt *string `json:"authorized_at,omitempty" url:"authorized_at,omitempty"`
	// The timestamp when the payment was captured, in RFC 3339 format.
	CapturedAt *string `json:"captured_at,omitempty" url:"captured_at,omitempty"`
	// The timestamp when the payment was voided, in RFC 3339 format.
	VoidedAt *string `json:"voided_at,omitempty" url:"voided_at,omitempty"`
	// contains filtered or unexported fields
}

The timeline for card payments.

func (*CardPaymentTimeline) GetAuthorizedAt

func (c *CardPaymentTimeline) GetAuthorizedAt() *string

func (*CardPaymentTimeline) GetCapturedAt

func (c *CardPaymentTimeline) GetCapturedAt() *string

func (*CardPaymentTimeline) GetExtraProperties

func (c *CardPaymentTimeline) GetExtraProperties() map[string]interface{}

func (*CardPaymentTimeline) GetVoidedAt

func (c *CardPaymentTimeline) GetVoidedAt() *string

func (*CardPaymentTimeline) String

func (c *CardPaymentTimeline) String() string

func (*CardPaymentTimeline) UnmarshalJSON

func (c *CardPaymentTimeline) UnmarshalJSON(data []byte) error

type CardPrepaidType

type CardPrepaidType string

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

const (
	CardPrepaidTypeUnknownPrepaidType CardPrepaidType = "UNKNOWN_PREPAID_TYPE"
	CardPrepaidTypeNotPrepaid         CardPrepaidType = "NOT_PREPAID"
	CardPrepaidTypePrepaid            CardPrepaidType = "PREPAID"
)

func NewCardPrepaidTypeFromString

func NewCardPrepaidTypeFromString(s string) (CardPrepaidType, error)

func (CardPrepaidType) Ptr

type CardType

type CardType string

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

const (
	CardTypeUnknownCardType CardType = "UNKNOWN_CARD_TYPE"
	CardTypeCredit          CardType = "CREDIT"
	CardTypeDebit           CardType = "DEBIT"
)

func NewCardTypeFromString

func NewCardTypeFromString(s string) (CardType, error)

func (CardType) Ptr

func (c CardType) Ptr() *CardType

type CardsDisableRequest

type CardsDisableRequest = DisableCardsRequest

CardsDisableRequest is an alias for DisableCardsRequest.

type CardsGetRequest

type CardsGetRequest = GetCardsRequest

CardsGetRequest is an alias for GetCardsRequest.

type CardsListRequest

type CardsListRequest = ListCardsRequest

CardsListRequest is an alias for ListCardsRequest.

type CashAppDetails

type CashAppDetails struct {
	// The name of the Cash App account holder.
	BuyerFullName *string `json:"buyer_full_name,omitempty" url:"buyer_full_name,omitempty"`
	// The country of the Cash App account holder, in ISO 3166-1-alpha-2 format.
	//
	// For possible values, see [Country](entity:Country).
	BuyerCountryCode *string `json:"buyer_country_code,omitempty" url:"buyer_country_code,omitempty"`
	// $Cashtag of the Cash App account holder.
	BuyerCashtag *string `json:"buyer_cashtag,omitempty" url:"buyer_cashtag,omitempty"`
	// contains filtered or unexported fields
}

Additional details about `WALLET` type payments with the `brand` of `CASH_APP`.

func (*CashAppDetails) GetBuyerCashtag

func (c *CashAppDetails) GetBuyerCashtag() *string

func (*CashAppDetails) GetBuyerCountryCode

func (c *CashAppDetails) GetBuyerCountryCode() *string

func (*CashAppDetails) GetBuyerFullName

func (c *CashAppDetails) GetBuyerFullName() *string

func (*CashAppDetails) GetExtraProperties

func (c *CashAppDetails) GetExtraProperties() map[string]interface{}

func (*CashAppDetails) String

func (c *CashAppDetails) String() string

func (*CashAppDetails) UnmarshalJSON

func (c *CashAppDetails) UnmarshalJSON(data []byte) error

type CashDrawerDevice

type CashDrawerDevice struct {
	// The device Square-issued ID
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The device merchant-specified name.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*CashDrawerDevice) GetExtraProperties

func (c *CashDrawerDevice) GetExtraProperties() map[string]interface{}

func (*CashDrawerDevice) GetID

func (c *CashDrawerDevice) GetID() *string

func (*CashDrawerDevice) GetName

func (c *CashDrawerDevice) GetName() *string

func (*CashDrawerDevice) String

func (c *CashDrawerDevice) String() string

func (*CashDrawerDevice) UnmarshalJSON

func (c *CashDrawerDevice) UnmarshalJSON(data []byte) error

type CashDrawerEventType

type CashDrawerEventType string

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

const (
	CashDrawerEventTypeNoSale                      CashDrawerEventType = "NO_SALE"
	CashDrawerEventTypeCashTenderPayment           CashDrawerEventType = "CASH_TENDER_PAYMENT"
	CashDrawerEventTypeOtherTenderPayment          CashDrawerEventType = "OTHER_TENDER_PAYMENT"
	CashDrawerEventTypeCashTenderCancelledPayment  CashDrawerEventType = "CASH_TENDER_CANCELLED_PAYMENT"
	CashDrawerEventTypeOtherTenderCancelledPayment CashDrawerEventType = "OTHER_TENDER_CANCELLED_PAYMENT"
	CashDrawerEventTypeCashTenderRefund            CashDrawerEventType = "CASH_TENDER_REFUND"
	CashDrawerEventTypeOtherTenderRefund           CashDrawerEventType = "OTHER_TENDER_REFUND"
	CashDrawerEventTypePaidIn                      CashDrawerEventType = "PAID_IN"
	CashDrawerEventTypePaidOut                     CashDrawerEventType = "PAID_OUT"
)

func NewCashDrawerEventTypeFromString

func NewCashDrawerEventTypeFromString(s string) (CashDrawerEventType, error)

func (CashDrawerEventType) Ptr

type CashDrawerShift

type CashDrawerShift struct {
	// The shift unique ID.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The shift current state.
	// See [CashDrawerShiftState](#type-cashdrawershiftstate) for possible values
	State *CashDrawerShiftState `json:"state,omitempty" url:"state,omitempty"`
	// The time when the shift began, in ISO 8601 format.
	OpenedAt *string `json:"opened_at,omitempty" url:"opened_at,omitempty"`
	// The time when the shift ended, in ISO 8601 format.
	EndedAt *string `json:"ended_at,omitempty" url:"ended_at,omitempty"`
	// The time when the shift was closed, in ISO 8601 format.
	ClosedAt *string `json:"closed_at,omitempty" url:"closed_at,omitempty"`
	// The free-form text description of a cash drawer by an employee.
	Description *string `json:"description,omitempty" url:"description,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" url:"opened_cash_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" url:"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" url:"cash_refunds_money,omitempty"`
	// 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" url:"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" url:"cash_paid_out_money,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" url:"expected_cash_money,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" url:"closed_cash_money,omitempty"`
	// The device running Square Point of Sale that was connected to the cash drawer.
	Device *CashDrawerDevice `json:"device,omitempty" url:"device,omitempty"`
	// The shift start time in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The shift updated at time in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The ID of the location the cash drawer shift belongs to.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The IDs of all team members that were logged into Square Point of Sale at any
	// point while the cash drawer shift was open.
	TeamMemberIDs []string `json:"team_member_ids,omitempty" url:"team_member_ids,omitempty"`
	// The ID of the team member that started the cash drawer shift.
	OpeningTeamMemberID *string `json:"opening_team_member_id,omitempty" url:"opening_team_member_id,omitempty"`
	// The ID of the team member that ended the cash drawer shift.
	EndingTeamMemberID *string `json:"ending_team_member_id,omitempty" url:"ending_team_member_id,omitempty"`
	// The ID of the team member that closed the cash drawer shift by auditing
	// the cash drawer contents.
	ClosingTeamMemberID *string `json:"closing_team_member_id,omitempty" url:"closing_team_member_id,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*CashDrawerShift) GetCashPaidInMoney

func (c *CashDrawerShift) GetCashPaidInMoney() *Money

func (*CashDrawerShift) GetCashPaidOutMoney

func (c *CashDrawerShift) GetCashPaidOutMoney() *Money

func (*CashDrawerShift) GetCashPaymentMoney

func (c *CashDrawerShift) GetCashPaymentMoney() *Money

func (*CashDrawerShift) GetCashRefundsMoney

func (c *CashDrawerShift) GetCashRefundsMoney() *Money

func (*CashDrawerShift) GetClosedAt

func (c *CashDrawerShift) GetClosedAt() *string

func (*CashDrawerShift) GetClosedCashMoney

func (c *CashDrawerShift) GetClosedCashMoney() *Money

func (*CashDrawerShift) GetClosingTeamMemberID

func (c *CashDrawerShift) GetClosingTeamMemberID() *string

func (*CashDrawerShift) GetCreatedAt

func (c *CashDrawerShift) GetCreatedAt() *string

func (*CashDrawerShift) GetDescription

func (c *CashDrawerShift) GetDescription() *string

func (*CashDrawerShift) GetDevice

func (c *CashDrawerShift) GetDevice() *CashDrawerDevice

func (*CashDrawerShift) GetEndedAt

func (c *CashDrawerShift) GetEndedAt() *string

func (*CashDrawerShift) GetEndingTeamMemberID

func (c *CashDrawerShift) GetEndingTeamMemberID() *string

func (*CashDrawerShift) GetExpectedCashMoney

func (c *CashDrawerShift) GetExpectedCashMoney() *Money

func (*CashDrawerShift) GetExtraProperties

func (c *CashDrawerShift) GetExtraProperties() map[string]interface{}

func (*CashDrawerShift) GetID

func (c *CashDrawerShift) GetID() *string

func (*CashDrawerShift) GetLocationID

func (c *CashDrawerShift) GetLocationID() *string

func (*CashDrawerShift) GetOpenedAt

func (c *CashDrawerShift) GetOpenedAt() *string

func (*CashDrawerShift) GetOpenedCashMoney

func (c *CashDrawerShift) GetOpenedCashMoney() *Money

func (*CashDrawerShift) GetOpeningTeamMemberID

func (c *CashDrawerShift) GetOpeningTeamMemberID() *string

func (*CashDrawerShift) GetState

func (c *CashDrawerShift) GetState() *CashDrawerShiftState

func (*CashDrawerShift) GetTeamMemberIDs

func (c *CashDrawerShift) GetTeamMemberIDs() []string

func (*CashDrawerShift) GetUpdatedAt

func (c *CashDrawerShift) GetUpdatedAt() *string

func (*CashDrawerShift) String

func (c *CashDrawerShift) String() string

func (*CashDrawerShift) UnmarshalJSON

func (c *CashDrawerShift) UnmarshalJSON(data []byte) error

type CashDrawerShiftEvent

type CashDrawerShiftEvent struct {
	// The unique ID of the event.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The type of cash drawer shift event.
	// See [CashDrawerEventType](#type-cashdrawereventtype) for possible values
	EventType *CashDrawerEventType `json:"event_type,omitempty" url:"event_type,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" url:"event_money,omitempty"`
	// The event time in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// An optional description of the event, entered by the employee that
	// created the event.
	Description *string `json:"description,omitempty" url:"description,omitempty"`
	// The ID of the team member that created the event.
	TeamMemberID *string `json:"team_member_id,omitempty" url:"team_member_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CashDrawerShiftEvent) GetCreatedAt

func (c *CashDrawerShiftEvent) GetCreatedAt() *string

func (*CashDrawerShiftEvent) GetDescription

func (c *CashDrawerShiftEvent) GetDescription() *string

func (*CashDrawerShiftEvent) GetEventMoney

func (c *CashDrawerShiftEvent) GetEventMoney() *Money

func (*CashDrawerShiftEvent) GetEventType

func (c *CashDrawerShiftEvent) GetEventType() *CashDrawerEventType

func (*CashDrawerShiftEvent) GetExtraProperties

func (c *CashDrawerShiftEvent) GetExtraProperties() map[string]interface{}

func (*CashDrawerShiftEvent) GetID

func (c *CashDrawerShiftEvent) GetID() *string

func (*CashDrawerShiftEvent) GetTeamMemberID

func (c *CashDrawerShiftEvent) GetTeamMemberID() *string

func (*CashDrawerShiftEvent) String

func (c *CashDrawerShiftEvent) String() string

func (*CashDrawerShiftEvent) UnmarshalJSON

func (c *CashDrawerShiftEvent) UnmarshalJSON(data []byte) error

type CashDrawerShiftState

type CashDrawerShiftState string

The current state of a cash drawer shift.

const (
	CashDrawerShiftStateOpen   CashDrawerShiftState = "OPEN"
	CashDrawerShiftStateEnded  CashDrawerShiftState = "ENDED"
	CashDrawerShiftStateClosed CashDrawerShiftState = "CLOSED"
)

func NewCashDrawerShiftStateFromString

func NewCashDrawerShiftStateFromString(s string) (CashDrawerShiftState, error)

func (CashDrawerShiftState) Ptr

type CashDrawerShiftSummary

type CashDrawerShiftSummary struct {
	// The shift unique ID.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The shift current state.
	// See [CashDrawerShiftState](#type-cashdrawershiftstate) for possible values
	State *CashDrawerShiftState `json:"state,omitempty" url:"state,omitempty"`
	// The shift start time in ISO 8601 format.
	OpenedAt *string `json:"opened_at,omitempty" url:"opened_at,omitempty"`
	// The shift end time in ISO 8601 format.
	EndedAt *string `json:"ended_at,omitempty" url:"ended_at,omitempty"`
	// The shift close time in ISO 8601 format.
	ClosedAt *string `json:"closed_at,omitempty" url:"closed_at,omitempty"`
	// An employee free-text description of a cash drawer shift.
	Description *string `json:"description,omitempty" url:"description,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" url:"opened_cash_money,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" url:"expected_cash_money,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" url:"closed_cash_money,omitempty"`
	// The shift start time in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The shift updated at time in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The ID of the location the cash drawer shift belongs to.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*CashDrawerShiftSummary) GetClosedAt

func (c *CashDrawerShiftSummary) GetClosedAt() *string

func (*CashDrawerShiftSummary) GetClosedCashMoney

func (c *CashDrawerShiftSummary) GetClosedCashMoney() *Money

func (*CashDrawerShiftSummary) GetCreatedAt

func (c *CashDrawerShiftSummary) GetCreatedAt() *string

func (*CashDrawerShiftSummary) GetDescription

func (c *CashDrawerShiftSummary) GetDescription() *string

func (*CashDrawerShiftSummary) GetEndedAt

func (c *CashDrawerShiftSummary) GetEndedAt() *string

func (*CashDrawerShiftSummary) GetExpectedCashMoney

func (c *CashDrawerShiftSummary) GetExpectedCashMoney() *Money

func (*CashDrawerShiftSummary) GetExtraProperties

func (c *CashDrawerShiftSummary) GetExtraProperties() map[string]interface{}

func (*CashDrawerShiftSummary) GetID

func (c *CashDrawerShiftSummary) GetID() *string

func (*CashDrawerShiftSummary) GetLocationID

func (c *CashDrawerShiftSummary) GetLocationID() *string

func (*CashDrawerShiftSummary) GetOpenedAt

func (c *CashDrawerShiftSummary) GetOpenedAt() *string

func (*CashDrawerShiftSummary) GetOpenedCashMoney

func (c *CashDrawerShiftSummary) GetOpenedCashMoney() *Money

func (*CashDrawerShiftSummary) GetState

func (*CashDrawerShiftSummary) GetUpdatedAt

func (c *CashDrawerShiftSummary) GetUpdatedAt() *string

func (*CashDrawerShiftSummary) String

func (c *CashDrawerShiftSummary) String() string

func (*CashDrawerShiftSummary) UnmarshalJSON

func (c *CashDrawerShiftSummary) UnmarshalJSON(data []byte) error

type CashPaymentDetails

type CashPaymentDetails struct {
	// The amount and currency of the money supplied by the buyer.
	BuyerSuppliedMoney *Money `json:"buyer_supplied_money,omitempty" url:"buyer_supplied_money,omitempty"`
	// The amount of change due back to the buyer.
	// This read-only field is calculated
	// from the `amount_money` and `buyer_supplied_money` fields.
	ChangeBackMoney *Money `json:"change_back_money,omitempty" url:"change_back_money,omitempty"`
	// contains filtered or unexported fields
}

Stores details about a cash payment. Contains only non-confidential information. For more information, see [Take Cash Payments](https://developer.squareup.com/docs/payments-api/take-payments/cash-payments).

func (*CashPaymentDetails) GetBuyerSuppliedMoney

func (c *CashPaymentDetails) GetBuyerSuppliedMoney() *Money

func (*CashPaymentDetails) GetChangeBackMoney

func (c *CashPaymentDetails) GetChangeBackMoney() *Money

func (*CashPaymentDetails) GetExtraProperties

func (c *CashPaymentDetails) GetExtraProperties() map[string]interface{}

func (*CashPaymentDetails) String

func (c *CashPaymentDetails) String() string

func (*CashPaymentDetails) UnmarshalJSON

func (c *CashPaymentDetails) UnmarshalJSON(data []byte) error

type CatalogAvailabilityPeriod added in v1.4.0

type CatalogAvailabilityPeriod struct {
	// The start time of an availability period, specified in local time using partial-time
	// RFC 3339 format. For example, `8:30:00` for a period starting at 8:30 in the morning.
	// Note that the seconds value is always :00, but it is appended for conformance to the RFC.
	StartLocalTime *string `json:"start_local_time,omitempty" url:"start_local_time,omitempty"`
	// The end time of an availability period, specified in local time using partial-time
	// RFC 3339 format. For example, `21:00:00` for a period ending at 9:00 in the evening.
	// Note that the seconds value is always :00, but it is appended for conformance to the RFC.
	EndLocalTime *string `json:"end_local_time,omitempty" url:"end_local_time,omitempty"`
	// The day of the week for this availability period.
	// See [DayOfWeek](#type-dayofweek) for possible values
	DayOfWeek *DayOfWeek `json:"day_of_week,omitempty" url:"day_of_week,omitempty"`
	// contains filtered or unexported fields
}

Represents a time period of availability.

func (*CatalogAvailabilityPeriod) GetDayOfWeek added in v1.4.0

func (c *CatalogAvailabilityPeriod) GetDayOfWeek() *DayOfWeek

func (*CatalogAvailabilityPeriod) GetEndLocalTime added in v1.4.0

func (c *CatalogAvailabilityPeriod) GetEndLocalTime() *string

func (*CatalogAvailabilityPeriod) GetExtraProperties added in v1.4.0

func (c *CatalogAvailabilityPeriod) GetExtraProperties() map[string]interface{}

func (*CatalogAvailabilityPeriod) GetStartLocalTime added in v1.4.0

func (c *CatalogAvailabilityPeriod) GetStartLocalTime() *string

func (*CatalogAvailabilityPeriod) String added in v1.4.0

func (c *CatalogAvailabilityPeriod) String() string

func (*CatalogAvailabilityPeriod) UnmarshalJSON added in v1.4.0

func (c *CatalogAvailabilityPeriod) UnmarshalJSON(data []byte) error

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.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The IDs of images associated with this `CatalogCategory` instance.
	// Currently these images are not displayed by Square, but are free to be displayed in 3rd party applications.
	ImageIDs []string `json:"image_ids,omitempty" url:"image_ids,omitempty"`
	// The type of the category.
	// See [CatalogCategoryType](#type-catalogcategorytype) for possible values
	CategoryType *CatalogCategoryType `json:"category_type,omitempty" url:"category_type,omitempty"`
	// The ID of the parent category of this category instance.
	ParentCategory *CatalogObjectCategory `json:"parent_category,omitempty" url:"parent_category,omitempty"`
	// Indicates whether a category is a top level category, which does not have any parent_category.
	IsTopLevel *bool `json:"is_top_level,omitempty" url:"is_top_level,omitempty"`
	// A list of IDs representing channels, such as a Square Online site, where the category can be made visible.
	Channels []string `json:"channels,omitempty" url:"channels,omitempty"`
	// The IDs of the `CatalogAvailabilityPeriod` objects associated with the category.
	AvailabilityPeriodIDs []string `json:"availability_period_ids,omitempty" url:"availability_period_ids,omitempty"`
	// Indicates whether the category is visible (`true`) or hidden (`false`) on all of the seller's Square Online sites.
	OnlineVisibility *bool `json:"online_visibility,omitempty" url:"online_visibility,omitempty"`
	// The top-level category in a category hierarchy.
	RootCategory *string `json:"root_category,omitempty" url:"root_category,omitempty"`
	// The SEO data for a seller's Square Online store.
	EcomSeoData *CatalogEcomSeoData `json:"ecom_seo_data,omitempty" url:"ecom_seo_data,omitempty"`
	// The path from the category to its root category. The first node of the path is the parent of the category
	// and the last is the root category. The path is empty if the category is a root category.
	PathToRoot []*CategoryPathToRootNode `json:"path_to_root,omitempty" url:"path_to_root,omitempty"`
	// contains filtered or unexported fields
}

A category to which a `CatalogItem` instance belongs.

func (*CatalogCategory) GetAvailabilityPeriodIDs

func (c *CatalogCategory) GetAvailabilityPeriodIDs() []string

func (*CatalogCategory) GetCategoryType

func (c *CatalogCategory) GetCategoryType() *CatalogCategoryType

func (*CatalogCategory) GetChannels

func (c *CatalogCategory) GetChannels() []string

func (*CatalogCategory) GetEcomSeoData

func (c *CatalogCategory) GetEcomSeoData() *CatalogEcomSeoData

func (*CatalogCategory) GetExtraProperties

func (c *CatalogCategory) GetExtraProperties() map[string]interface{}

func (*CatalogCategory) GetImageIDs

func (c *CatalogCategory) GetImageIDs() []string

func (*CatalogCategory) GetIsTopLevel

func (c *CatalogCategory) GetIsTopLevel() *bool

func (*CatalogCategory) GetName

func (c *CatalogCategory) GetName() *string

func (*CatalogCategory) GetOnlineVisibility

func (c *CatalogCategory) GetOnlineVisibility() *bool

func (*CatalogCategory) GetParentCategory

func (c *CatalogCategory) GetParentCategory() *CatalogObjectCategory

func (*CatalogCategory) GetPathToRoot

func (c *CatalogCategory) GetPathToRoot() []*CategoryPathToRootNode

func (*CatalogCategory) GetRootCategory

func (c *CatalogCategory) GetRootCategory() *string

func (*CatalogCategory) String

func (c *CatalogCategory) String() string

func (*CatalogCategory) UnmarshalJSON

func (c *CatalogCategory) UnmarshalJSON(data []byte) error

type CatalogCategoryType

type CatalogCategoryType string

Indicates the type of a category.

const (
	CatalogCategoryTypeRegularCategory CatalogCategoryType = "REGULAR_CATEGORY"
	CatalogCategoryTypeMenuCategory    CatalogCategoryType = "MENU_CATEGORY"
	CatalogCategoryTypeKitchenCategory CatalogCategoryType = "KITCHEN_CATEGORY"
)

func NewCatalogCategoryTypeFromString

func NewCatalogCategoryTypeFromString(s string) (CatalogCategoryType, error)

func (CatalogCategoryType) Ptr

type CatalogCustomAttributeDefinition

type CatalogCustomAttributeDefinition struct {
	// The type of this custom attribute. Cannot be modified after creation.
	// Required.
	// See [CatalogCustomAttributeDefinitionType](#type-catalogcustomattributedefinitiontype) for possible values
	Type CatalogCustomAttributeDefinitionType `json:"type" url:"type"`
	//	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.
	Name string `json:"name" url:"name"`
	// 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.
	Description *string `json:"description,omitempty" url:"description,omitempty"`
	// __Read only.__ Contains information about the application that
	// created this custom attribute definition.
	SourceApplication *SourceApplication `json:"source_application,omitempty" url:"source_application,omitempty"`
	// The set of `CatalogObject` types that this custom atttribute may be applied to.
	// Currently, only `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, and `CATEGORY` are allowed. At least one type must be included.
	// See [CatalogObjectType](#type-catalogobjecttype) for possible values
	AllowedObjectTypes []CatalogObjectType `json:"allowed_object_types,omitempty" url:"allowed_object_types,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 *CatalogCustomAttributeDefinitionSellerVisibility `json:"seller_visibility,omitempty" url:"seller_visibility,omitempty"`
	// The visibility of a custom attribute to applications other than the application
	// that created the attribute.
	// See [CatalogCustomAttributeDefinitionAppVisibility](#type-catalogcustomattributedefinitionappvisibility) for possible values
	AppVisibility *CatalogCustomAttributeDefinitionAppVisibility `json:"app_visibility,omitempty" url:"app_visibility,omitempty"`
	// Optionally, populated when `type` = `STRING`, unset otherwise.
	StringConfig *CatalogCustomAttributeDefinitionStringConfig `json:"string_config,omitempty" url:"string_config,omitempty"`
	// Optionally, populated when `type` = `NUMBER`, unset otherwise.
	NumberConfig *CatalogCustomAttributeDefinitionNumberConfig `json:"number_config,omitempty" url:"number_config,omitempty"`
	// Populated when `type` is set to `SELECTION`, unset otherwise.
	SelectionConfig *CatalogCustomAttributeDefinitionSelectionConfig `json:"selection_config,omitempty" url:"selection_config,omitempty"`
	// 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 *int `json:"custom_attribute_usage_count,omitempty" url:"custom_attribute_usage_count,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_-]`.
	Key *string `json:"key,omitempty" url:"key,omitempty"`
	// contains filtered or unexported fields
}

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](https://developer.squareup.com/docs/catalog-api/add-custom-attributes)

func (*CatalogCustomAttributeDefinition) GetAllowedObjectTypes

func (c *CatalogCustomAttributeDefinition) GetAllowedObjectTypes() []CatalogObjectType

func (*CatalogCustomAttributeDefinition) GetAppVisibility

func (*CatalogCustomAttributeDefinition) GetCustomAttributeUsageCount

func (c *CatalogCustomAttributeDefinition) GetCustomAttributeUsageCount() *int

func (*CatalogCustomAttributeDefinition) GetDescription

func (c *CatalogCustomAttributeDefinition) GetDescription() *string

func (*CatalogCustomAttributeDefinition) GetExtraProperties

func (c *CatalogCustomAttributeDefinition) GetExtraProperties() map[string]interface{}

func (*CatalogCustomAttributeDefinition) GetKey

func (*CatalogCustomAttributeDefinition) GetName

func (*CatalogCustomAttributeDefinition) GetNumberConfig

func (*CatalogCustomAttributeDefinition) GetSelectionConfig

func (*CatalogCustomAttributeDefinition) GetSellerVisibility

func (*CatalogCustomAttributeDefinition) GetSourceApplication

func (c *CatalogCustomAttributeDefinition) GetSourceApplication() *SourceApplication

func (*CatalogCustomAttributeDefinition) GetStringConfig

func (*CatalogCustomAttributeDefinition) GetType

func (*CatalogCustomAttributeDefinition) String

func (*CatalogCustomAttributeDefinition) UnmarshalJSON

func (c *CatalogCustomAttributeDefinition) UnmarshalJSON(data []byte) error

type CatalogCustomAttributeDefinitionAppVisibility

type CatalogCustomAttributeDefinitionAppVisibility string

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

const (
	CatalogCustomAttributeDefinitionAppVisibilityAppVisibilityHidden          CatalogCustomAttributeDefinitionAppVisibility = "APP_VISIBILITY_HIDDEN"
	CatalogCustomAttributeDefinitionAppVisibilityAppVisibilityReadOnly        CatalogCustomAttributeDefinitionAppVisibility = "APP_VISIBILITY_READ_ONLY"
	CatalogCustomAttributeDefinitionAppVisibilityAppVisibilityReadWriteValues CatalogCustomAttributeDefinitionAppVisibility = "APP_VISIBILITY_READ_WRITE_VALUES"
)

func NewCatalogCustomAttributeDefinitionAppVisibilityFromString

func NewCatalogCustomAttributeDefinitionAppVisibilityFromString(s string) (CatalogCustomAttributeDefinitionAppVisibility, error)

func (CatalogCustomAttributeDefinitionAppVisibility) Ptr

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
	Precision *int `json:"precision,omitempty" url:"precision,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogCustomAttributeDefinitionNumberConfig) GetExtraProperties

func (c *CatalogCustomAttributeDefinitionNumberConfig) GetExtraProperties() map[string]interface{}

func (*CatalogCustomAttributeDefinitionNumberConfig) GetPrecision

func (*CatalogCustomAttributeDefinitionNumberConfig) String

func (*CatalogCustomAttributeDefinitionNumberConfig) UnmarshalJSON

func (c *CatalogCustomAttributeDefinitionNumberConfig) UnmarshalJSON(data []byte) error

type CatalogCustomAttributeDefinitionSelectionConfig

type CatalogCustomAttributeDefinitionSelectionConfig struct {
	// 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.
	MaxAllowedSelections *int `json:"max_allowed_selections,omitempty" url:"max_allowed_selections,omitempty"`
	// The set of valid `CatalogCustomAttributeSelections`. Up to a maximum of 100
	// selections can be defined. Can be modified.
	AllowedSelections []*CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection `json:"allowed_selections,omitempty" url:"allowed_selections,omitempty"`
	// contains filtered or unexported fields
}

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

func (*CatalogCustomAttributeDefinitionSelectionConfig) GetAllowedSelections

func (*CatalogCustomAttributeDefinitionSelectionConfig) GetExtraProperties

func (c *CatalogCustomAttributeDefinitionSelectionConfig) GetExtraProperties() map[string]interface{}

func (*CatalogCustomAttributeDefinitionSelectionConfig) GetMaxAllowedSelections

func (c *CatalogCustomAttributeDefinitionSelectionConfig) GetMaxAllowedSelections() *int

func (*CatalogCustomAttributeDefinitionSelectionConfig) String

func (*CatalogCustomAttributeDefinitionSelectionConfig) UnmarshalJSON

type CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection

type CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection struct {
	// Unique ID set by Square.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// Selection name, unique within `allowed_selections`.
	Name string `json:"name" url:"name"`
	// contains filtered or unexported fields
}

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

func (*CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection) GetExtraProperties

func (*CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection) GetName

func (*CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection) GetUID

func (*CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection) String

func (*CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection) UnmarshalJSON

type CatalogCustomAttributeDefinitionSellerVisibility

type CatalogCustomAttributeDefinitionSellerVisibility string

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).

const (
	CatalogCustomAttributeDefinitionSellerVisibilitySellerVisibilityHidden          CatalogCustomAttributeDefinitionSellerVisibility = "SELLER_VISIBILITY_HIDDEN"
	CatalogCustomAttributeDefinitionSellerVisibilitySellerVisibilityReadWriteValues CatalogCustomAttributeDefinitionSellerVisibility = "SELLER_VISIBILITY_READ_WRITE_VALUES"
)

func NewCatalogCustomAttributeDefinitionSellerVisibilityFromString

func NewCatalogCustomAttributeDefinitionSellerVisibilityFromString(s string) (CatalogCustomAttributeDefinitionSellerVisibility, error)

func (CatalogCustomAttributeDefinitionSellerVisibility) Ptr

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" url:"enforce_uniqueness,omitempty"`
	// contains filtered or unexported fields
}

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

func (*CatalogCustomAttributeDefinitionStringConfig) GetEnforceUniqueness

func (c *CatalogCustomAttributeDefinitionStringConfig) GetEnforceUniqueness() *bool

func (*CatalogCustomAttributeDefinitionStringConfig) GetExtraProperties

func (c *CatalogCustomAttributeDefinitionStringConfig) GetExtraProperties() map[string]interface{}

func (*CatalogCustomAttributeDefinitionStringConfig) String

func (*CatalogCustomAttributeDefinitionStringConfig) UnmarshalJSON

func (c *CatalogCustomAttributeDefinitionStringConfig) UnmarshalJSON(data []byte) error

type CatalogCustomAttributeDefinitionType

type CatalogCustomAttributeDefinitionType string

Defines the possible types for a custom attribute.

const (
	CatalogCustomAttributeDefinitionTypeString    CatalogCustomAttributeDefinitionType = "STRING"
	CatalogCustomAttributeDefinitionTypeBoolean   CatalogCustomAttributeDefinitionType = "BOOLEAN"
	CatalogCustomAttributeDefinitionTypeNumber    CatalogCustomAttributeDefinitionType = "NUMBER"
	CatalogCustomAttributeDefinitionTypeSelection CatalogCustomAttributeDefinitionType = "SELECTION"
)

func NewCatalogCustomAttributeDefinitionTypeFromString

func NewCatalogCustomAttributeDefinitionTypeFromString(s string) (CatalogCustomAttributeDefinitionType, error)

func (CatalogCustomAttributeDefinitionType) Ptr

type CatalogCustomAttributeValue

type CatalogCustomAttributeValue struct {
	// The name of the custom attribute.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The string value of the custom attribute.  Populated if `type` = `STRING`.
	StringValue *string `json:"string_value,omitempty" url:"string_value,omitempty"`
	// The id of the [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) this value belongs to.
	CustomAttributeDefinitionID *string `json:"custom_attribute_definition_id,omitempty" url:"custom_attribute_definition_id,omitempty"`
	// A copy of type from the associated `CatalogCustomAttributeDefinition`.
	// See [CatalogCustomAttributeDefinitionType](#type-catalogcustomattributedefinitiontype) for possible values
	Type *CatalogCustomAttributeDefinitionType `json:"type,omitempty" url:"type,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" url:"number_value,omitempty"`
	// A `true` or `false` value. Populated if `type` = `BOOLEAN`.
	BooleanValue *bool `json:"boolean_value,omitempty" url:"boolean_value,omitempty"`
	// One or more choices from `allowed_selections`. Populated if `type` = `SELECTION`.
	SelectionUIDValues []string `json:"selection_uid_values,omitempty" url:"selection_uid_values,omitempty"`
	// If the associated `CatalogCustomAttributeDefinition` object is defined by another application, this key 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", this key is "abcd1234:cocoa_brand"
	// when the application making the request is different from the application defining the custom attribute definition. Otherwise, the key is simply "cocoa_brand".
	Key *string `json:"key,omitempty" url:"key,omitempty"`
	// contains filtered or unexported fields
}

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](https://developer.squareup.com/docs/catalog-api/add-custom-attributes).

func (*CatalogCustomAttributeValue) GetBooleanValue

func (c *CatalogCustomAttributeValue) GetBooleanValue() *bool

func (*CatalogCustomAttributeValue) GetCustomAttributeDefinitionID

func (c *CatalogCustomAttributeValue) GetCustomAttributeDefinitionID() *string

func (*CatalogCustomAttributeValue) GetExtraProperties

func (c *CatalogCustomAttributeValue) GetExtraProperties() map[string]interface{}

func (*CatalogCustomAttributeValue) GetKey

func (c *CatalogCustomAttributeValue) GetKey() *string

func (*CatalogCustomAttributeValue) GetName

func (c *CatalogCustomAttributeValue) GetName() *string

func (*CatalogCustomAttributeValue) GetNumberValue

func (c *CatalogCustomAttributeValue) GetNumberValue() *string

func (*CatalogCustomAttributeValue) GetSelectionUIDValues

func (c *CatalogCustomAttributeValue) GetSelectionUIDValues() []string

func (*CatalogCustomAttributeValue) GetStringValue

func (c *CatalogCustomAttributeValue) GetStringValue() *string

func (*CatalogCustomAttributeValue) GetType

func (*CatalogCustomAttributeValue) String

func (c *CatalogCustomAttributeValue) String() string

func (*CatalogCustomAttributeValue) UnmarshalJSON

func (c *CatalogCustomAttributeValue) UnmarshalJSON(data []byte) error

type CatalogDiscount

type CatalogDiscount struct {
	// The discount name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
	Name *string `json:"name,omitempty" url:"name,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 *CatalogDiscountType `json:"discount_type,omitempty" url:"discount_type,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" url:"percentage,omitempty"`
	// 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" url:"amount_money,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" url:"pin_required,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" url:"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 *CatalogDiscountModifyTaxBasis `json:"modify_tax_basis,omitempty" url:"modify_tax_basis,omitempty"`
	// For a percentage discount, the maximum absolute value of the discount. For example, if a
	// 50% discount has a `maximum_amount_money` of $20, a $100 purchase will yield a $20 discount,
	// not a $50 discount.
	MaximumAmountMoney *Money `json:"maximum_amount_money,omitempty" url:"maximum_amount_money,omitempty"`
	// contains filtered or unexported fields
}

A discount applicable to items.

func (*CatalogDiscount) GetAmountMoney

func (c *CatalogDiscount) GetAmountMoney() *Money

func (*CatalogDiscount) GetDiscountType

func (c *CatalogDiscount) GetDiscountType() *CatalogDiscountType

func (*CatalogDiscount) GetExtraProperties

func (c *CatalogDiscount) GetExtraProperties() map[string]interface{}

func (*CatalogDiscount) GetLabelColor

func (c *CatalogDiscount) GetLabelColor() *string

func (*CatalogDiscount) GetMaximumAmountMoney

func (c *CatalogDiscount) GetMaximumAmountMoney() *Money

func (*CatalogDiscount) GetModifyTaxBasis

func (c *CatalogDiscount) GetModifyTaxBasis() *CatalogDiscountModifyTaxBasis

func (*CatalogDiscount) GetName

func (c *CatalogDiscount) GetName() *string

func (*CatalogDiscount) GetPercentage

func (c *CatalogDiscount) GetPercentage() *string

func (*CatalogDiscount) GetPinRequired

func (c *CatalogDiscount) GetPinRequired() *bool

func (*CatalogDiscount) String

func (c *CatalogDiscount) String() string

func (*CatalogDiscount) UnmarshalJSON

func (c *CatalogDiscount) UnmarshalJSON(data []byte) error

type CatalogDiscountModifyTaxBasis

type CatalogDiscountModifyTaxBasis string
const (
	CatalogDiscountModifyTaxBasisModifyTaxBasis      CatalogDiscountModifyTaxBasis = "MODIFY_TAX_BASIS"
	CatalogDiscountModifyTaxBasisDoNotModifyTaxBasis CatalogDiscountModifyTaxBasis = "DO_NOT_MODIFY_TAX_BASIS"
)

func NewCatalogDiscountModifyTaxBasisFromString

func NewCatalogDiscountModifyTaxBasisFromString(s string) (CatalogDiscountModifyTaxBasis, error)

func (CatalogDiscountModifyTaxBasis) Ptr

type CatalogDiscountType

type CatalogDiscountType string

How to apply a CatalogDiscount to a CatalogItem.

const (
	CatalogDiscountTypeFixedPercentage    CatalogDiscountType = "FIXED_PERCENTAGE"
	CatalogDiscountTypeFixedAmount        CatalogDiscountType = "FIXED_AMOUNT"
	CatalogDiscountTypeVariablePercentage CatalogDiscountType = "VARIABLE_PERCENTAGE"
	CatalogDiscountTypeVariableAmount     CatalogDiscountType = "VARIABLE_AMOUNT"
)

func NewCatalogDiscountTypeFromString

func NewCatalogDiscountTypeFromString(s string) (CatalogDiscountType, error)

func (CatalogDiscountType) Ptr

type CatalogEcomSeoData

type CatalogEcomSeoData struct {
	// The SEO title used for the Square Online store.
	PageTitle *string `json:"page_title,omitempty" url:"page_title,omitempty"`
	// The SEO description used for the Square Online store.
	PageDescription *string `json:"page_description,omitempty" url:"page_description,omitempty"`
	// The SEO permalink used for the Square Online store.
	Permalink *string `json:"permalink,omitempty" url:"permalink,omitempty"`
	// contains filtered or unexported fields
}

SEO data for for a seller's Square Online store.

func (*CatalogEcomSeoData) GetExtraProperties

func (c *CatalogEcomSeoData) GetExtraProperties() map[string]interface{}

func (*CatalogEcomSeoData) GetPageDescription

func (c *CatalogEcomSeoData) GetPageDescription() *string

func (*CatalogEcomSeoData) GetPageTitle

func (c *CatalogEcomSeoData) GetPageTitle() *string
func (c *CatalogEcomSeoData) GetPermalink() *string

func (*CatalogEcomSeoData) String

func (c *CatalogEcomSeoData) String() string

func (*CatalogEcomSeoData) UnmarshalJSON

func (c *CatalogEcomSeoData) UnmarshalJSON(data []byte) error

type CatalogIDMapping

type CatalogIDMapping struct {
	// The client-supplied temporary `#`-prefixed ID for a new `CatalogObject`.
	ClientObjectID *string `json:"client_object_id,omitempty" url:"client_object_id,omitempty"`
	// The permanent ID for the CatalogObject created by the server.
	ObjectID *string `json:"object_id,omitempty" url:"object_id,omitempty"`
	// contains filtered or unexported fields
}

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

When calling [UpsertCatalogObject](api-endpoint:Catalog-UpsertCatalogObject) or [BatchUpsertCatalogObjects](api-endpoint:Catalog-BatchUpsertCatalogObjects) to create a CatalogObject(entity: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.

func (*CatalogIDMapping) GetClientObjectID

func (c *CatalogIDMapping) GetClientObjectID() *string

func (*CatalogIDMapping) GetExtraProperties

func (c *CatalogIDMapping) GetExtraProperties() map[string]interface{}

func (*CatalogIDMapping) GetObjectID

func (c *CatalogIDMapping) GetObjectID() *string

func (*CatalogIDMapping) String

func (c *CatalogIDMapping) String() string

func (*CatalogIDMapping) UnmarshalJSON

func (c *CatalogIDMapping) UnmarshalJSON(data []byte) error

type CatalogImage

type CatalogImage struct {
	// The internal name to identify this image in calls to the Square API.
	// This is a searchable attribute for use in applicable query filters
	// using the [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects).
	// It is not unique and should not be shown in a buyer facing context.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The URL of this image, generated by Square after an image is uploaded
	// using the [CreateCatalogImage](api-endpoint:Catalog-CreateCatalogImage) endpoint.
	// To modify the image, use the UpdateCatalogImage endpoint. Do not change the URL field.
	URL *string `json:"url,omitempty" url:"url,omitempty"`
	// 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
	// using the [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects).
	Caption *string `json:"caption,omitempty" url:"caption,omitempty"`
	// The immutable order ID for this image object created by the Photo Studio service in Square Online Store.
	PhotoStudioOrderID *string `json:"photo_studio_order_id,omitempty" url:"photo_studio_order_id,omitempty"`
	// contains filtered or unexported fields
}

An image file to use in Square catalogs. It can be associated with `CatalogItem`, `CatalogItemVariation`, `CatalogCategory`, and `CatalogModifierList` objects. Only the images on items and item variations are exposed in Dashboard. Only the first image on an item is displayed in Square Point of Sale (SPOS). Images on items and variations are displayed through Square Online Store. Images on other object types are for use by 3rd party application developers.

func (*CatalogImage) GetCaption

func (c *CatalogImage) GetCaption() *string

func (*CatalogImage) GetExtraProperties

func (c *CatalogImage) GetExtraProperties() map[string]interface{}

func (*CatalogImage) GetName

func (c *CatalogImage) GetName() *string

func (*CatalogImage) GetPhotoStudioOrderID

func (c *CatalogImage) GetPhotoStudioOrderID() *string

func (*CatalogImage) GetURL

func (c *CatalogImage) GetURL() *string

func (*CatalogImage) String

func (c *CatalogImage) String() string

func (*CatalogImage) UnmarshalJSON

func (c *CatalogImage) UnmarshalJSON(data []byte) error

type CatalogInfoResponse

type CatalogInfoResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// Limits that apply to this API.
	Limits *CatalogInfoResponseLimits `json:"limits,omitempty" url:"limits,omitempty"`
	// Names and abbreviations for standard units.
	StandardUnitDescriptionGroup *StandardUnitDescriptionGroup `json:"standard_unit_description_group,omitempty" url:"standard_unit_description_group,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogInfoResponse) GetErrors

func (c *CatalogInfoResponse) GetErrors() []*Error

func (*CatalogInfoResponse) GetExtraProperties

func (c *CatalogInfoResponse) GetExtraProperties() map[string]interface{}

func (*CatalogInfoResponse) GetLimits

func (*CatalogInfoResponse) GetStandardUnitDescriptionGroup

func (c *CatalogInfoResponse) GetStandardUnitDescriptionGroup() *StandardUnitDescriptionGroup

func (*CatalogInfoResponse) String

func (c *CatalogInfoResponse) String() string

func (*CatalogInfoResponse) UnmarshalJSON

func (c *CatalogInfoResponse) UnmarshalJSON(data []byte) error

type CatalogInfoResponseLimits

type CatalogInfoResponseLimits struct {
	// The maximum number of objects that may appear within a single batch in a
	// `/v2/catalog/batch-upsert` request.
	BatchUpsertMaxObjectsPerBatch *int `json:"batch_upsert_max_objects_per_batch,omitempty" url:"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 *int `json:"batch_upsert_max_total_objects,omitempty" url:"batch_upsert_max_total_objects,omitempty"`
	// The maximum number of object IDs that may appear in a `/v2/catalog/batch-retrieve`
	// request.
	BatchRetrieveMaxObjectIDs *int `json:"batch_retrieve_max_object_ids,omitempty" url:"batch_retrieve_max_object_ids,omitempty"`
	// The maximum number of results that may be returned in a page of a
	// `/v2/catalog/search` response.
	SearchMaxPageLimit *int `json:"search_max_page_limit,omitempty" url:"search_max_page_limit,omitempty"`
	// The maximum number of object IDs that may be included in a single
	// `/v2/catalog/batch-delete` request.
	BatchDeleteMaxObjectIDs *int `json:"batch_delete_max_object_ids,omitempty" url:"batch_delete_max_object_ids,omitempty"`
	// The maximum number of item IDs that may be included in a single
	// `/v2/catalog/update-item-taxes` request.
	UpdateItemTaxesMaxItemIDs *int `json:"update_item_taxes_max_item_ids,omitempty" url:"update_item_taxes_max_item_ids,omitempty"`
	// The maximum number of tax IDs to be enabled that may be included in a single
	// `/v2/catalog/update-item-taxes` request.
	UpdateItemTaxesMaxTaxesToEnable *int `json:"update_item_taxes_max_taxes_to_enable,omitempty" url:"update_item_taxes_max_taxes_to_enable,omitempty"`
	// The maximum number of tax IDs to be disabled that may be included in a single
	// `/v2/catalog/update-item-taxes` request.
	UpdateItemTaxesMaxTaxesToDisable *int `json:"update_item_taxes_max_taxes_to_disable,omitempty" url:"update_item_taxes_max_taxes_to_disable,omitempty"`
	// The maximum number of item IDs that may be included in a single
	// `/v2/catalog/update-item-modifier-lists` request.
	UpdateItemModifierListsMaxItemIDs *int `json:"update_item_modifier_lists_max_item_ids,omitempty" url:"update_item_modifier_lists_max_item_ids,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 *int `` /* 144-byte string literal not displayed */
	// 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 *int `` /* 146-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*CatalogInfoResponseLimits) GetBatchDeleteMaxObjectIDs

func (c *CatalogInfoResponseLimits) GetBatchDeleteMaxObjectIDs() *int

func (*CatalogInfoResponseLimits) GetBatchRetrieveMaxObjectIDs

func (c *CatalogInfoResponseLimits) GetBatchRetrieveMaxObjectIDs() *int

func (*CatalogInfoResponseLimits) GetBatchUpsertMaxObjectsPerBatch

func (c *CatalogInfoResponseLimits) GetBatchUpsertMaxObjectsPerBatch() *int

func (*CatalogInfoResponseLimits) GetBatchUpsertMaxTotalObjects

func (c *CatalogInfoResponseLimits) GetBatchUpsertMaxTotalObjects() *int

func (*CatalogInfoResponseLimits) GetExtraProperties

func (c *CatalogInfoResponseLimits) GetExtraProperties() map[string]interface{}

func (*CatalogInfoResponseLimits) GetSearchMaxPageLimit

func (c *CatalogInfoResponseLimits) GetSearchMaxPageLimit() *int

func (*CatalogInfoResponseLimits) GetUpdateItemModifierListsMaxItemIDs

func (c *CatalogInfoResponseLimits) GetUpdateItemModifierListsMaxItemIDs() *int

func (*CatalogInfoResponseLimits) GetUpdateItemModifierListsMaxModifierListsToDisable

func (c *CatalogInfoResponseLimits) GetUpdateItemModifierListsMaxModifierListsToDisable() *int

func (*CatalogInfoResponseLimits) GetUpdateItemModifierListsMaxModifierListsToEnable

func (c *CatalogInfoResponseLimits) GetUpdateItemModifierListsMaxModifierListsToEnable() *int

func (*CatalogInfoResponseLimits) GetUpdateItemTaxesMaxItemIDs

func (c *CatalogInfoResponseLimits) GetUpdateItemTaxesMaxItemIDs() *int

func (*CatalogInfoResponseLimits) GetUpdateItemTaxesMaxTaxesToDisable

func (c *CatalogInfoResponseLimits) GetUpdateItemTaxesMaxTaxesToDisable() *int

func (*CatalogInfoResponseLimits) GetUpdateItemTaxesMaxTaxesToEnable

func (c *CatalogInfoResponseLimits) GetUpdateItemTaxesMaxTaxesToEnable() *int

func (*CatalogInfoResponseLimits) String

func (c *CatalogInfoResponseLimits) String() string

func (*CatalogInfoResponseLimits) UnmarshalJSON

func (c *CatalogInfoResponseLimits) UnmarshalJSON(data []byte) error

type CatalogItem

type CatalogItem struct {
	// 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.
	Name *string `json:"name,omitempty" url:"name,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.
	//
	// Deprecated at 2022-07-20, this field is planned to retire in 6 months. You should migrate to use `description_html` to set the description
	// of the [CatalogItem](entity:CatalogItem) instance.  The `description` and `description_html` field values are kept in sync. If you try to
	// set the both fields, the `description_html` text value overwrites the `description` value. Updates in one field are also reflected in the other,
	// except for when you use an early version before Square API 2022-07-20 and `description_html` is set to blank, setting the `description` value to null
	// does not nullify `description_html`.
	Description *string `json:"description,omitempty" url:"description,omitempty"`
	// 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.
	Abbreviation *string `json:"abbreviation,omitempty" url:"abbreviation,omitempty"`
	// 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" url:"label_color,omitempty"`
	// Indicates whether the item is taxable (`true`) or non-taxable (`false`). Default is `true`.
	IsTaxable *bool `json:"is_taxable,omitempty" url:"is_taxable,omitempty"`
	// The ID of the item's category, if any. Deprecated since 2023-12-13. Use `CatalogItem.categories`, instead.
	CategoryID *string `json:"category_id,omitempty" url:"category_id,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,omitempty" url:"tax_ids,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,omitempty" url:"modifier_list_info,omitempty"`
	// A list of [CatalogItemVariation](entity:CatalogItemVariation) objects for this item. An item must have
	// at least one variation.
	Variations []*CatalogObject `json:"variations,omitempty" url:"variations,omitempty"`
	// The product type of the item. Once set, the `product_type` value cannot be modified.
	//
	// Items of the `LEGACY_SQUARE_ONLINE_SERVICE` and `LEGACY_SQUARE_ONLINE_MEMBERSHIP` product types can be updated
	// but cannot be created using the API.
	// See [CatalogItemProductType](#type-catalogitemproducttype) for possible values
	ProductType *CatalogItemProductType `json:"product_type,omitempty" url:"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" url:"skip_modifier_screen,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,omitempty" url:"item_options,omitempty"`
	// Deprecated; see go/ecomUriUseCases. A URI pointing to a published e-commerce product page for the Item.
	EcomURI *string `json:"ecom_uri,omitempty" url:"ecom_uri,omitempty"`
	// Deprecated; see go/ecomUriUseCases. A comma-separated list of encoded URIs pointing to a set of published e-commerce images for the Item.
	EcomImageURIs []string `json:"ecom_image_uris,omitempty" url:"ecom_image_uris,omitempty"`
	// The IDs of images associated with this `CatalogItem` instance.
	// These images will be shown to customers in Square Online Store.
	// The first image will show up as the icon for this item in POS.
	ImageIDs []string `json:"image_ids,omitempty" url:"image_ids,omitempty"`
	// A name to sort the item by. If this name is unspecified, namely, the `sort_name` field is absent, the regular `name` field is used for sorting.
	// Its value must not be empty.
	//
	// It is currently supported for sellers of the Japanese locale only.
	SortName *string `json:"sort_name,omitempty" url:"sort_name,omitempty"`
	// The list of categories.
	Categories []*CatalogObjectCategory `json:"categories,omitempty" url:"categories,omitempty"`
	// The item's description as expressed in valid HTML elements. The length of this field value, including those of HTML tags,
	// is of Unicode points. With application query filters, the text values of the HTML elements and attributes are searchable. Invalid or
	// unsupported HTML elements or attributes are ignored.
	//
	// Supported HTML elements include:
	// - `a`: Link. Supports linking to website URLs, email address, and telephone numbers.
	// - `b`, `strong`:  Bold text
	// - `br`: Line break
	// - `code`: Computer code
	// - `div`: Section
	// - `h1-h6`: Headings
	// - `i`, `em`: Italics
	// - `li`: List element
	// - `ol`: Numbered list
	// - `p`: Paragraph
	// - `ul`: Bullet list
	// - `u`: Underline
	//
	// Supported HTML attributes include:
	// - `align`: Alignment of the text content
	// - `href`: Link destination
	// - `rel`: Relationship between link's target and source
	// - `target`: Place to open the linked document
	DescriptionHTML *string `json:"description_html,omitempty" url:"description_html,omitempty"`
	// A server-generated plaintext version of the `description_html` field, without formatting tags.
	DescriptionPlaintext *string `json:"description_plaintext,omitempty" url:"description_plaintext,omitempty"`
	// A list of IDs representing channels, such as a Square Online site, where the item can be made visible or available.
	// This field is read only and cannot be edited.
	Channels []string `json:"channels,omitempty" url:"channels,omitempty"`
	// Indicates whether this item is archived (`true`) or not (`false`).
	IsArchived *bool `json:"is_archived,omitempty" url:"is_archived,omitempty"`
	// The SEO data for a seller's Square Online store.
	EcomSeoData *CatalogEcomSeoData `json:"ecom_seo_data,omitempty" url:"ecom_seo_data,omitempty"`
	// The food and beverage-specific details for the `FOOD_AND_BEV` item.
	FoodAndBeverageDetails *CatalogItemFoodAndBeverageDetails `json:"food_and_beverage_details,omitempty" url:"food_and_beverage_details,omitempty"`
	// The item's reporting category.
	ReportingCategory *CatalogObjectCategory `json:"reporting_category,omitempty" url:"reporting_category,omitempty"`
	// Indicates whether this item is alcoholic (`true`) or not (`false`).
	IsAlcoholic *bool `json:"is_alcoholic,omitempty" url:"is_alcoholic,omitempty"`
	// contains filtered or unexported fields
}

A CatalogObject(entity:CatalogObject) instance of the `ITEM` type, also referred to as an item, in the catalog.

func (*CatalogItem) GetAbbreviation

func (c *CatalogItem) GetAbbreviation() *string

func (*CatalogItem) GetCategories

func (c *CatalogItem) GetCategories() []*CatalogObjectCategory

func (*CatalogItem) GetCategoryID

func (c *CatalogItem) GetCategoryID() *string

func (*CatalogItem) GetChannels

func (c *CatalogItem) GetChannels() []string

func (*CatalogItem) GetDescription

func (c *CatalogItem) GetDescription() *string

func (*CatalogItem) GetDescriptionHTML

func (c *CatalogItem) GetDescriptionHTML() *string

func (*CatalogItem) GetDescriptionPlaintext

func (c *CatalogItem) GetDescriptionPlaintext() *string

func (*CatalogItem) GetEcomImageURIs added in v1.4.0

func (c *CatalogItem) GetEcomImageURIs() []string

func (*CatalogItem) GetEcomSeoData

func (c *CatalogItem) GetEcomSeoData() *CatalogEcomSeoData

func (*CatalogItem) GetEcomURI added in v1.4.0

func (c *CatalogItem) GetEcomURI() *string

func (*CatalogItem) GetExtraProperties

func (c *CatalogItem) GetExtraProperties() map[string]interface{}

func (*CatalogItem) GetFoodAndBeverageDetails

func (c *CatalogItem) GetFoodAndBeverageDetails() *CatalogItemFoodAndBeverageDetails

func (*CatalogItem) GetImageIDs

func (c *CatalogItem) GetImageIDs() []string

func (*CatalogItem) GetIsAlcoholic added in v1.4.0

func (c *CatalogItem) GetIsAlcoholic() *bool

func (*CatalogItem) GetIsArchived

func (c *CatalogItem) GetIsArchived() *bool

func (*CatalogItem) GetIsTaxable

func (c *CatalogItem) GetIsTaxable() *bool

func (*CatalogItem) GetItemOptions

func (c *CatalogItem) GetItemOptions() []*CatalogItemOptionForItem

func (*CatalogItem) GetLabelColor

func (c *CatalogItem) GetLabelColor() *string

func (*CatalogItem) GetModifierListInfo

func (c *CatalogItem) GetModifierListInfo() []*CatalogItemModifierListInfo

func (*CatalogItem) GetName

func (c *CatalogItem) GetName() *string

func (*CatalogItem) GetProductType

func (c *CatalogItem) GetProductType() *CatalogItemProductType

func (*CatalogItem) GetReportingCategory

func (c *CatalogItem) GetReportingCategory() *CatalogObjectCategory

func (*CatalogItem) GetSkipModifierScreen

func (c *CatalogItem) GetSkipModifierScreen() *bool

func (*CatalogItem) GetSortName

func (c *CatalogItem) GetSortName() *string

func (*CatalogItem) GetTaxIDs

func (c *CatalogItem) GetTaxIDs() []string

func (*CatalogItem) GetVariations

func (c *CatalogItem) GetVariations() []*CatalogObject

func (*CatalogItem) String

func (c *CatalogItem) String() string

func (*CatalogItem) UnmarshalJSON

func (c *CatalogItem) UnmarshalJSON(data []byte) error

type CatalogItemFoodAndBeverageDetails

type CatalogItemFoodAndBeverageDetails struct {
	// The calorie count (in the unit of kcal) for the `FOOD_AND_BEV` type of items.
	CalorieCount *int `json:"calorie_count,omitempty" url:"calorie_count,omitempty"`
	// The dietary preferences for the `FOOD_AND_BEV` item.
	DietaryPreferences []*CatalogItemFoodAndBeverageDetailsDietaryPreference `json:"dietary_preferences,omitempty" url:"dietary_preferences,omitempty"`
	// The ingredients for the `FOOD_AND_BEV` type item.
	Ingredients []*CatalogItemFoodAndBeverageDetailsIngredient `json:"ingredients,omitempty" url:"ingredients,omitempty"`
	// contains filtered or unexported fields
}

The food and beverage-specific details of a `FOOD_AND_BEV` item.

func (*CatalogItemFoodAndBeverageDetails) GetCalorieCount

func (c *CatalogItemFoodAndBeverageDetails) GetCalorieCount() *int

func (*CatalogItemFoodAndBeverageDetails) GetDietaryPreferences

func (*CatalogItemFoodAndBeverageDetails) GetExtraProperties

func (c *CatalogItemFoodAndBeverageDetails) GetExtraProperties() map[string]interface{}

func (*CatalogItemFoodAndBeverageDetails) GetIngredients

func (*CatalogItemFoodAndBeverageDetails) String

func (*CatalogItemFoodAndBeverageDetails) UnmarshalJSON

func (c *CatalogItemFoodAndBeverageDetails) UnmarshalJSON(data []byte) error

type CatalogItemFoodAndBeverageDetailsDietaryPreference

type CatalogItemFoodAndBeverageDetailsDietaryPreference struct {
	// The dietary preference type. Supported values include `STANDARD` and `CUSTOM` as specified in `FoodAndBeverageDetails.DietaryPreferenceType`.
	// See [DietaryPreferenceType](#type-dietarypreferencetype) for possible values
	Type *CatalogItemFoodAndBeverageDetailsDietaryPreferenceType `json:"type,omitempty" url:"type,omitempty"`
	// The name of the dietary preference from a standard pre-defined list. This should be null if it's a custom dietary preference.
	// See [StandardDietaryPreference](#type-standarddietarypreference) for possible values
	StandardName *CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference `json:"standard_name,omitempty" url:"standard_name,omitempty"`
	// The name of a user-defined custom dietary preference. This should be null if it's a standard dietary preference.
	CustomName *string `json:"custom_name,omitempty" url:"custom_name,omitempty"`
	// contains filtered or unexported fields
}

Dietary preferences that can be assigned to an `FOOD_AND_BEV` item and its ingredients.

func (*CatalogItemFoodAndBeverageDetailsDietaryPreference) GetCustomName

func (*CatalogItemFoodAndBeverageDetailsDietaryPreference) GetExtraProperties

func (c *CatalogItemFoodAndBeverageDetailsDietaryPreference) GetExtraProperties() map[string]interface{}

func (*CatalogItemFoodAndBeverageDetailsDietaryPreference) GetType

func (*CatalogItemFoodAndBeverageDetailsDietaryPreference) String

func (*CatalogItemFoodAndBeverageDetailsDietaryPreference) UnmarshalJSON

type CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference

type CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference string

Standard dietary preferences for food and beverage items that are recommended on item creation.

const (
	CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreferenceDairyFree  CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference = "DAIRY_FREE"
	CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreferenceGlutenFree CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference = "GLUTEN_FREE"
	CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreferenceHalal      CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference = "HALAL"
	CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreferenceKosher     CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference = "KOSHER"
	CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreferenceNutFree    CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference = "NUT_FREE"
	CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreferenceVegan      CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference = "VEGAN"
	CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreferenceVegetarian CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference = "VEGETARIAN"
)

func (CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference) Ptr

type CatalogItemFoodAndBeverageDetailsDietaryPreferenceType

type CatalogItemFoodAndBeverageDetailsDietaryPreferenceType string

The type of dietary preference for the `FOOD_AND_BEV` type of items and integredients.

const (
	CatalogItemFoodAndBeverageDetailsDietaryPreferenceTypeStandard CatalogItemFoodAndBeverageDetailsDietaryPreferenceType = "STANDARD"
	CatalogItemFoodAndBeverageDetailsDietaryPreferenceTypeCustom   CatalogItemFoodAndBeverageDetailsDietaryPreferenceType = "CUSTOM"
)

func NewCatalogItemFoodAndBeverageDetailsDietaryPreferenceTypeFromString

func NewCatalogItemFoodAndBeverageDetailsDietaryPreferenceTypeFromString(s string) (CatalogItemFoodAndBeverageDetailsDietaryPreferenceType, error)

func (CatalogItemFoodAndBeverageDetailsDietaryPreferenceType) Ptr

type CatalogItemFoodAndBeverageDetailsIngredient

type CatalogItemFoodAndBeverageDetailsIngredient struct {
	// The dietary preference type of the ingredient. Supported values include `STANDARD` and `CUSTOM` as specified in `FoodAndBeverageDetails.DietaryPreferenceType`.
	// See [DietaryPreferenceType](#type-dietarypreferencetype) for possible values
	Type *CatalogItemFoodAndBeverageDetailsDietaryPreferenceType `json:"type,omitempty" url:"type,omitempty"`
	// The name of the ingredient from a standard pre-defined list. This should be null if it's a custom dietary preference.
	// See [StandardIngredient](#type-standardingredient) for possible values
	StandardName *CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient `json:"standard_name,omitempty" url:"standard_name,omitempty"`
	// The name of a custom user-defined ingredient. This should be null if it's a standard dietary preference.
	CustomName *string `json:"custom_name,omitempty" url:"custom_name,omitempty"`
	// contains filtered or unexported fields
}

Describes the ingredient used in a `FOOD_AND_BEV` item.

func (*CatalogItemFoodAndBeverageDetailsIngredient) GetCustomName

func (*CatalogItemFoodAndBeverageDetailsIngredient) GetExtraProperties

func (c *CatalogItemFoodAndBeverageDetailsIngredient) GetExtraProperties() map[string]interface{}

func (*CatalogItemFoodAndBeverageDetailsIngredient) GetStandardName

func (*CatalogItemFoodAndBeverageDetailsIngredient) GetType

func (*CatalogItemFoodAndBeverageDetailsIngredient) String

func (*CatalogItemFoodAndBeverageDetailsIngredient) UnmarshalJSON

func (c *CatalogItemFoodAndBeverageDetailsIngredient) UnmarshalJSON(data []byte) error

type CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient

type CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient string

Standard ingredients for food and beverage items that are recommended on item creation.

const (
	CatalogItemFoodAndBeverageDetailsIngredientStandardIngredientCelery      CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient = "CELERY"
	CatalogItemFoodAndBeverageDetailsIngredientStandardIngredientCrustaceans CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient = "CRUSTACEANS"
	CatalogItemFoodAndBeverageDetailsIngredientStandardIngredientEggs        CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient = "EGGS"
	CatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFish        CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient = "FISH"
	CatalogItemFoodAndBeverageDetailsIngredientStandardIngredientGluten      CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient = "GLUTEN"
	CatalogItemFoodAndBeverageDetailsIngredientStandardIngredientLupin       CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient = "LUPIN"
	CatalogItemFoodAndBeverageDetailsIngredientStandardIngredientMilk        CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient = "MILK"
	CatalogItemFoodAndBeverageDetailsIngredientStandardIngredientMolluscs    CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient = "MOLLUSCS"
	CatalogItemFoodAndBeverageDetailsIngredientStandardIngredientMustard     CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient = "MUSTARD"
	CatalogItemFoodAndBeverageDetailsIngredientStandardIngredientPeanuts     CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient = "PEANUTS"
	CatalogItemFoodAndBeverageDetailsIngredientStandardIngredientSesame      CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient = "SESAME"
	CatalogItemFoodAndBeverageDetailsIngredientStandardIngredientSoy         CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient = "SOY"
	CatalogItemFoodAndBeverageDetailsIngredientStandardIngredientSulphites   CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient = "SULPHITES"
	CatalogItemFoodAndBeverageDetailsIngredientStandardIngredientTreeNuts    CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient = "TREE_NUTS"
)

func (CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient) Ptr

type CatalogItemModifierListInfo

type CatalogItemModifierListInfo struct {
	// The ID of the `CatalogModifierList` controlled by this `CatalogModifierListInfo`.
	ModifierListID string `json:"modifier_list_id" url:"modifier_list_id"`
	// A set of `CatalogModifierOverride` objects that override whether a given `CatalogModifier` is enabled by default.
	ModifierOverrides []*CatalogModifierOverride `json:"modifier_overrides,omitempty" url:"modifier_overrides,omitempty"`
	// If 0 or larger, the smallest number of `CatalogModifier`s that must be selected from this `CatalogModifierList`.
	// The default value is `-1`.
	//
	// When  `CatalogModifierList.selection_type` is `MULTIPLE`, `CatalogModifierListInfo.min_selected_modifiers=-1`
	// and `CatalogModifierListInfo.max_selected_modifier=-1` means that from zero to the maximum number of modifiers of
	// the `CatalogModifierList` can be selected from the `CatalogModifierList`.
	//
	// When the `CatalogModifierList.selection_type` is `SINGLE`, `CatalogModifierListInfo.min_selected_modifiers=-1`
	// and `CatalogModifierListInfo.max_selected_modifier=-1` means that exactly one modifier must be present in
	// and can be selected from the `CatalogModifierList`
	MinSelectedModifiers *int `json:"min_selected_modifiers,omitempty" url:"min_selected_modifiers,omitempty"`
	// If 0 or larger, the largest number of `CatalogModifier`s that can be selected from this `CatalogModifierList`.
	// The default value is `-1`.
	//
	// When  `CatalogModifierList.selection_type` is `MULTIPLE`, `CatalogModifierListInfo.min_selected_modifiers=-1`
	// and `CatalogModifierListInfo.max_selected_modifier=-1` means that from zero to the maximum number of modifiers of
	// the `CatalogModifierList` can be selected from the `CatalogModifierList`.
	//
	// When the `CatalogModifierList.selection_type` is `SINGLE`, `CatalogModifierListInfo.min_selected_modifiers=-1`
	// and `CatalogModifierListInfo.max_selected_modifier=-1` means that exactly one modifier must be present in
	// and can be selected from the `CatalogModifierList`
	MaxSelectedModifiers *int `json:"max_selected_modifiers,omitempty" url:"max_selected_modifiers,omitempty"`
	// If `true`, enable this `CatalogModifierList`. The default value is `true`.
	Enabled *bool `json:"enabled,omitempty" url:"enabled,omitempty"`
	// The position of this `CatalogItemModifierListInfo` object within the `modifier_list_info` list applied
	// to a `CatalogItem` instance.
	Ordinal *int `json:"ordinal,omitempty" url:"ordinal,omitempty"`
	// contains filtered or unexported fields
}

References a text-based modifier or a list of non text-based modifiers applied to a `CatalogItem` instance and specifies supported behaviors of the application.

func (*CatalogItemModifierListInfo) GetEnabled

func (c *CatalogItemModifierListInfo) GetEnabled() *bool

func (*CatalogItemModifierListInfo) GetExtraProperties

func (c *CatalogItemModifierListInfo) GetExtraProperties() map[string]interface{}

func (*CatalogItemModifierListInfo) GetMaxSelectedModifiers

func (c *CatalogItemModifierListInfo) GetMaxSelectedModifiers() *int

func (*CatalogItemModifierListInfo) GetMinSelectedModifiers

func (c *CatalogItemModifierListInfo) GetMinSelectedModifiers() *int

func (*CatalogItemModifierListInfo) GetModifierListID

func (c *CatalogItemModifierListInfo) GetModifierListID() string

func (*CatalogItemModifierListInfo) GetModifierOverrides

func (c *CatalogItemModifierListInfo) GetModifierOverrides() []*CatalogModifierOverride

func (*CatalogItemModifierListInfo) GetOrdinal

func (c *CatalogItemModifierListInfo) GetOrdinal() *int

func (*CatalogItemModifierListInfo) String

func (c *CatalogItemModifierListInfo) String() string

func (*CatalogItemModifierListInfo) UnmarshalJSON

func (c *CatalogItemModifierListInfo) UnmarshalJSON(data []byte) error

type CatalogItemOption

type CatalogItemOption struct {
	// 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" url:"name,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" url:"display_name,omitempty"`
	// 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" url:"description,omitempty"`
	// If true, display colors for entries in `values` when present.
	ShowColors *bool `json:"show_colors,omitempty" url:"show_colors,omitempty"`
	// A list of CatalogObjects containing the
	// `CatalogItemOptionValue`s for this item.
	Values []*CatalogObject `json:"values,omitempty" url:"values,omitempty"`
	// contains filtered or unexported fields
}

A group of variations for a `CatalogItem`.

func (*CatalogItemOption) GetDescription

func (c *CatalogItemOption) GetDescription() *string

func (*CatalogItemOption) GetDisplayName

func (c *CatalogItemOption) GetDisplayName() *string

func (*CatalogItemOption) GetExtraProperties

func (c *CatalogItemOption) GetExtraProperties() map[string]interface{}

func (*CatalogItemOption) GetName

func (c *CatalogItemOption) GetName() *string

func (*CatalogItemOption) GetShowColors

func (c *CatalogItemOption) GetShowColors() *bool

func (*CatalogItemOption) GetValues

func (c *CatalogItemOption) GetValues() []*CatalogObject

func (*CatalogItemOption) String

func (c *CatalogItemOption) String() string

func (*CatalogItemOption) UnmarshalJSON

func (c *CatalogItemOption) UnmarshalJSON(data []byte) error

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" url:"item_option_id,omitempty"`
	// contains filtered or unexported fields
}
An option that can be assigned to an item.

For example, a t-shirt item may offer a color option or a size option.

func (*CatalogItemOptionForItem) GetExtraProperties

func (c *CatalogItemOptionForItem) GetExtraProperties() map[string]interface{}

func (*CatalogItemOptionForItem) GetItemOptionID

func (c *CatalogItemOptionForItem) GetItemOptionID() *string

func (*CatalogItemOptionForItem) String

func (c *CatalogItemOptionForItem) String() string

func (*CatalogItemOptionForItem) UnmarshalJSON

func (c *CatalogItemOptionForItem) UnmarshalJSON(data []byte) error

type CatalogItemOptionValue

type CatalogItemOptionValue struct {
	// Unique ID of the associated item option.
	ItemOptionID *string `json:"item_option_id,omitempty" url:"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" url:"name,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" url:"description,omitempty"`
	// 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" url:"color,omitempty"`
	// Determines where this option value appears in a list of option values.
	Ordinal *int `json:"ordinal,omitempty" url:"ordinal,omitempty"`
	// contains filtered or unexported fields
}

An enumerated value that can link a `CatalogItemVariation` to an item option as one of its item option values.

func (*CatalogItemOptionValue) GetColor

func (c *CatalogItemOptionValue) GetColor() *string

func (*CatalogItemOptionValue) GetDescription

func (c *CatalogItemOptionValue) GetDescription() *string

func (*CatalogItemOptionValue) GetExtraProperties

func (c *CatalogItemOptionValue) GetExtraProperties() map[string]interface{}

func (*CatalogItemOptionValue) GetItemOptionID

func (c *CatalogItemOptionValue) GetItemOptionID() *string

func (*CatalogItemOptionValue) GetName

func (c *CatalogItemOptionValue) GetName() *string

func (*CatalogItemOptionValue) GetOrdinal

func (c *CatalogItemOptionValue) GetOrdinal() *int

func (*CatalogItemOptionValue) String

func (c *CatalogItemOptionValue) String() string

func (*CatalogItemOptionValue) UnmarshalJSON

func (c *CatalogItemOptionValue) UnmarshalJSON(data []byte) error

type CatalogItemOptionValueForItemVariation

type CatalogItemOptionValueForItemVariation struct {
	// The unique id of an item option.
	ItemOptionID *string `json:"item_option_id,omitempty" url:"item_option_id,omitempty"`
	// The unique id of the selected value for the item option.
	ItemOptionValueID *string `json:"item_option_value_id,omitempty" url:"item_option_value_id,omitempty"`
	// contains filtered or unexported fields
}

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".

func (*CatalogItemOptionValueForItemVariation) GetExtraProperties

func (c *CatalogItemOptionValueForItemVariation) GetExtraProperties() map[string]interface{}

func (*CatalogItemOptionValueForItemVariation) GetItemOptionID

func (c *CatalogItemOptionValueForItemVariation) GetItemOptionID() *string

func (*CatalogItemOptionValueForItemVariation) GetItemOptionValueID

func (c *CatalogItemOptionValueForItemVariation) GetItemOptionValueID() *string

func (*CatalogItemOptionValueForItemVariation) String

func (*CatalogItemOptionValueForItemVariation) UnmarshalJSON

func (c *CatalogItemOptionValueForItemVariation) UnmarshalJSON(data []byte) error

type CatalogItemProductType

type CatalogItemProductType string

The type of a CatalogItem. Connect V2 only allows the creation of `REGULAR` or `APPOINTMENTS_SERVICE` items.

const (
	CatalogItemProductTypeRegular                      CatalogItemProductType = "REGULAR"
	CatalogItemProductTypeGiftCard                     CatalogItemProductType = "GIFT_CARD"
	CatalogItemProductTypeAppointmentsService          CatalogItemProductType = "APPOINTMENTS_SERVICE"
	CatalogItemProductTypeFoodAndBev                   CatalogItemProductType = "FOOD_AND_BEV"
	CatalogItemProductTypeEvent                        CatalogItemProductType = "EVENT"
	CatalogItemProductTypeDigital                      CatalogItemProductType = "DIGITAL"
	CatalogItemProductTypeDonation                     CatalogItemProductType = "DONATION"
	CatalogItemProductTypeLegacySquareOnlineService    CatalogItemProductType = "LEGACY_SQUARE_ONLINE_SERVICE"
	CatalogItemProductTypeLegacySquareOnlineMembership CatalogItemProductType = "LEGACY_SQUARE_ONLINE_MEMBERSHIP"
)

func NewCatalogItemProductTypeFromString

func NewCatalogItemProductTypeFromString(s string) (CatalogItemProductType, error)

func (CatalogItemProductType) Ptr

type CatalogItemVariation

type CatalogItemVariation struct {
	// The ID of the `CatalogItem` associated with this item variation.
	ItemID *string `json:"item_id,omitempty" url:"item_id,omitempty"`
	// The item variation's name. This is a searchable attribute for use in applicable query filters.
	//
	// Its value has a maximum length of 255 Unicode code points. However, when the parent [item](entity:CatalogItem)
	// uses [item options](entity:CatalogItemOption), this attribute is auto-generated, read-only, and can be
	// longer than 255 Unicode code points.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The item variation's SKU, if any. This is a searchable attribute for use in applicable query filters.
	Sku *string `json:"sku,omitempty" url:"sku,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" url:"upc,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 *int `json:"ordinal,omitempty" url:"ordinal,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 *CatalogPricingType `json:"pricing_type,omitempty" url:"pricing_type,omitempty"`
	// The item variation's price, if fixed pricing is used.
	PriceMoney *Money `json:"price_money,omitempty" url:"price_money,omitempty"`
	// Per-location price and inventory overrides.
	LocationOverrides []*ItemVariationLocationOverrides `json:"location_overrides,omitempty" url:"location_overrides,omitempty"`
	// If `true`, inventory tracking is active for the variation.
	TrackInventory *bool `json:"track_inventory,omitempty" url:"track_inventory,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 *InventoryAlertType `json:"inventory_alert_type,omitempty" url:"inventory_alert_type,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" url:"inventory_alert_threshold,omitempty"`
	// Arbitrary user metadata to associate with the item variation. This attribute value length is of Unicode code points.
	UserData *string `json:"user_data,omitempty" url:"user_data,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" url:"service_duration,omitempty"`
	// 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" url:"available_for_booking,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,omitempty" url:"item_option_values,omitempty"`
	// 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" url:"measurement_unit_id,omitempty"`
	// Whether this variation can be sold. The inventory count of a sellable variation indicates
	// the number of units available for sale. When a variation is both stockable and sellable,
	// its sellable inventory count can be smaller than or equal to its stockable count.
	Sellable *bool `json:"sellable,omitempty" url:"sellable,omitempty"`
	// Whether stock is counted directly on this variation (TRUE) or only on its components (FALSE).
	// When a variation is both stockable and sellable, the inventory count of a stockable variation keeps track of the number of units of this variation in stock
	// and is not an indicator of the number of units of the variation that can be sold.
	Stockable *bool `json:"stockable,omitempty" url:"stockable,omitempty"`
	// The IDs of images associated with this `CatalogItemVariation` instance.
	// These images will be shown to customers in Square Online Store.
	ImageIDs []string `json:"image_ids,omitempty" url:"image_ids,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,omitempty" url:"team_member_ids,omitempty"`
	// The unit conversion rule, as prescribed by the [CatalogStockConversion](entity:CatalogStockConversion) type,
	// that describes how this non-stockable (i.e., sellable/receivable) item variation is converted
	// to/from the stockable item variation sharing the same parent item. With the stock conversion,
	// you can accurately track inventory when an item variation is sold in one unit, but stocked in
	// another unit.
	StockableConversion *CatalogStockConversion `json:"stockable_conversion,omitempty" url:"stockable_conversion,omitempty"`
	// contains filtered or unexported fields
}

An item variation, representing a product for sale, in the Catalog object model. Each [item](entity:CatalogItem) must have at least one item variation and can have at most 250 item variations.

An item variation can be sellable, stockable, or both if it has a unit of measure for its count for the sold number of the variation, the stocked number of the variation, or both. For example, when a variation representing wine is stocked and sold by the bottle, the variation is both stockable and sellable. But when a variation of the wine is sold by the glass, the sold units cannot be used as a measure of the stocked units. This by-the-glass variation is sellable, but not stockable. To accurately keep track of the wine's inventory count at any time, the sellable count must be converted to stockable count. Typically, the seller defines this unit conversion. For example, 1 bottle equals 5 glasses. The Square API exposes the `stockable_conversion` property on the variation to specify the conversion. Thus, when two glasses of the wine are sold, the sellable count decreases by 2, and the stockable count automatically decreases by 0.4 bottle according to the conversion.

func (*CatalogItemVariation) GetAvailableForBooking

func (c *CatalogItemVariation) GetAvailableForBooking() *bool

func (*CatalogItemVariation) GetExtraProperties

func (c *CatalogItemVariation) GetExtraProperties() map[string]interface{}

func (*CatalogItemVariation) GetImageIDs

func (c *CatalogItemVariation) GetImageIDs() []string

func (*CatalogItemVariation) GetInventoryAlertThreshold

func (c *CatalogItemVariation) GetInventoryAlertThreshold() *int64

func (*CatalogItemVariation) GetInventoryAlertType

func (c *CatalogItemVariation) GetInventoryAlertType() *InventoryAlertType

func (*CatalogItemVariation) GetItemID

func (c *CatalogItemVariation) GetItemID() *string

func (*CatalogItemVariation) GetItemOptionValues

func (*CatalogItemVariation) GetLocationOverrides

func (c *CatalogItemVariation) GetLocationOverrides() []*ItemVariationLocationOverrides

func (*CatalogItemVariation) GetMeasurementUnitID

func (c *CatalogItemVariation) GetMeasurementUnitID() *string

func (*CatalogItemVariation) GetName

func (c *CatalogItemVariation) GetName() *string

func (*CatalogItemVariation) GetOrdinal

func (c *CatalogItemVariation) GetOrdinal() *int

func (*CatalogItemVariation) GetPriceMoney

func (c *CatalogItemVariation) GetPriceMoney() *Money

func (*CatalogItemVariation) GetPricingType

func (c *CatalogItemVariation) GetPricingType() *CatalogPricingType

func (*CatalogItemVariation) GetSellable

func (c *CatalogItemVariation) GetSellable() *bool

func (*CatalogItemVariation) GetServiceDuration

func (c *CatalogItemVariation) GetServiceDuration() *int64

func (*CatalogItemVariation) GetSku

func (c *CatalogItemVariation) GetSku() *string

func (*CatalogItemVariation) GetStockable

func (c *CatalogItemVariation) GetStockable() *bool

func (*CatalogItemVariation) GetStockableConversion

func (c *CatalogItemVariation) GetStockableConversion() *CatalogStockConversion

func (*CatalogItemVariation) GetTeamMemberIDs

func (c *CatalogItemVariation) GetTeamMemberIDs() []string

func (*CatalogItemVariation) GetTrackInventory

func (c *CatalogItemVariation) GetTrackInventory() *bool

func (*CatalogItemVariation) GetUpc

func (c *CatalogItemVariation) GetUpc() *string

func (*CatalogItemVariation) GetUserData

func (c *CatalogItemVariation) GetUserData() *string

func (*CatalogItemVariation) String

func (c *CatalogItemVariation) String() string

func (*CatalogItemVariation) UnmarshalJSON

func (c *CatalogItemVariation) UnmarshalJSON(data []byte) error

type CatalogListRequest

type CatalogListRequest = ListCatalogRequest

CatalogListRequest is an alias for ListCatalogRequest.

type CatalogMeasurementUnit

type CatalogMeasurementUnit struct {
	// Indicates the unit used to measure the quantity of a catalog item variation.
	MeasurementUnit *MeasurementUnit `json:"measurement_unit,omitempty" url:"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 *int `json:"precision,omitempty" url:"precision,omitempty"`
	// contains filtered or unexported fields
}

Represents the unit used to measure a `CatalogItemVariation` and specifies the precision for decimal quantities.

func (*CatalogMeasurementUnit) GetExtraProperties

func (c *CatalogMeasurementUnit) GetExtraProperties() map[string]interface{}

func (*CatalogMeasurementUnit) GetMeasurementUnit

func (c *CatalogMeasurementUnit) GetMeasurementUnit() *MeasurementUnit

func (*CatalogMeasurementUnit) GetPrecision

func (c *CatalogMeasurementUnit) GetPrecision() *int

func (*CatalogMeasurementUnit) String

func (c *CatalogMeasurementUnit) String() string

func (*CatalogMeasurementUnit) UnmarshalJSON

func (c *CatalogMeasurementUnit) UnmarshalJSON(data []byte) error

type CatalogModifier

type CatalogModifier struct {
	// The modifier name.  This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The modifier price.
	PriceMoney *Money `json:"price_money,omitempty" url:"price_money,omitempty"`
	// Determines where this `CatalogModifier` appears in the `CatalogModifierList`.
	Ordinal *int `json:"ordinal,omitempty" url:"ordinal,omitempty"`
	// The ID of the `CatalogModifierList` associated with this modifier.
	ModifierListID *string `json:"modifier_list_id,omitempty" url:"modifier_list_id,omitempty"`
	// Location-specific price overrides.
	LocationOverrides []*ModifierLocationOverrides `json:"location_overrides,omitempty" url:"location_overrides,omitempty"`
	// The ID of the image associated with this `CatalogModifier` instance.
	// Currently this image is not displayed by Square, but is free to be displayed in 3rd party applications.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// contains filtered or unexported fields
}

A modifier applicable to items at the time of sale. An example of a modifier is a Cheese add-on to a Burger item.

func (*CatalogModifier) GetExtraProperties

func (c *CatalogModifier) GetExtraProperties() map[string]interface{}

func (*CatalogModifier) GetImageID

func (c *CatalogModifier) GetImageID() *string

func (*CatalogModifier) GetLocationOverrides

func (c *CatalogModifier) GetLocationOverrides() []*ModifierLocationOverrides

func (*CatalogModifier) GetModifierListID

func (c *CatalogModifier) GetModifierListID() *string

func (*CatalogModifier) GetName

func (c *CatalogModifier) GetName() *string

func (*CatalogModifier) GetOrdinal

func (c *CatalogModifier) GetOrdinal() *int

func (*CatalogModifier) GetPriceMoney

func (c *CatalogModifier) GetPriceMoney() *Money

func (*CatalogModifier) String

func (c *CatalogModifier) String() string

func (*CatalogModifier) UnmarshalJSON

func (c *CatalogModifier) UnmarshalJSON(data []byte) error

type CatalogModifierList

type CatalogModifierList struct {
	// The name of the `CatalogModifierList` instance. This is a searchable attribute for use in applicable query filters, and its value length is of
	// Unicode code points.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The position of this `CatalogModifierList` within a list of `CatalogModifierList` instances.
	Ordinal *int `json:"ordinal,omitempty" url:"ordinal,omitempty"`
	// Indicates whether a single (`SINGLE`) or multiple (`MULTIPLE`) modifiers from the list
	// can be applied to a single `CatalogItem`.
	//
	// For text-based modifiers, the `selection_type` attribute is always `SINGLE`. The other value is ignored.
	// See [CatalogModifierListSelectionType](#type-catalogmodifierlistselectiontype) for possible values
	SelectionType *CatalogModifierListSelectionType `json:"selection_type,omitempty" url:"selection_type,omitempty"`
	// A non-empty list of `CatalogModifier` objects to be included in the `CatalogModifierList`,
	// for non text-based modifiers when the `modifier_type` attribute is `LIST`. Each element of this list
	// is a `CatalogObject` instance of the `MODIFIER` type, containing the following attributes:
	// “`
	// {
	// "id": "{{catalog_modifier_id}}",
	// "type": "MODIFIER",
	// "modifier_data": {{a CatalogModifier instance>}}
	// }
	// “`
	Modifiers []*CatalogObject `json:"modifiers,omitempty" url:"modifiers,omitempty"`
	// The IDs of images associated with this `CatalogModifierList` instance.
	// Currently these images are not displayed on Square products, but may be displayed in 3rd-party applications.
	ImageIDs []string `json:"image_ids,omitempty" url:"image_ids,omitempty"`
	// The type of the modifier.
	//
	// When this `modifier_type` value is `TEXT`,  the `CatalogModifierList` represents a text-based modifier.
	// When this `modifier_type` value is `LIST`, the `CatalogModifierList` contains a list of `CatalogModifier` objects.
	// See [CatalogModifierListModifierType](#type-catalogmodifierlistmodifiertype) for possible values
	ModifierType *CatalogModifierListModifierType `json:"modifier_type,omitempty" url:"modifier_type,omitempty"`
	// The maximum length, in Unicode points, of the text string of the text-based modifier as represented by
	// this `CatalogModifierList` object with the `modifier_type` set to `TEXT`.
	MaxLength *int `json:"max_length,omitempty" url:"max_length,omitempty"`
	// Whether the text string must be a non-empty string (`true`) or not (`false`) for a text-based modifier
	// as represented by this `CatalogModifierList` object with the `modifier_type` set to `TEXT`.
	TextRequired *bool `json:"text_required,omitempty" url:"text_required,omitempty"`
	// A note for internal use by the business.
	//
	// For example, for a text-based modifier applied to a T-shirt item, if the buyer-supplied text of "Hello, Kitty!"
	// is to be printed on the T-shirt, this `internal_name` attribute can be "Use italic face" as
	// an instruction for the business to follow.
	//
	// For non text-based modifiers, this `internal_name` attribute can be
	// used to include SKUs, internal codes, or supplemental descriptions for internal use.
	InternalName *string `json:"internal_name,omitempty" url:"internal_name,omitempty"`
	// contains filtered or unexported fields
}

For a text-based modifier, this encapsulates the modifier's text when its `modifier_type` is `TEXT`. For example, to sell T-shirts with custom prints, a text-based modifier can be used to capture the buyer-supplied text string to be selected for the T-shirt at the time of sale.

For non text-based modifiers, this encapsulates a non-empty list of modifiers applicable to items at the time of sale. Each element of the modifier list is a `CatalogObject` instance of the `MODIFIER` type. For example, a "Condiments" modifier list applicable to a "Hot Dog" item may contain "Ketchup", "Mustard", and "Relish" modifiers.

A non text-based modifier can be applied to the modified item once or multiple times, if the `selection_type` field is set to `SINGLE` or `MULTIPLE`, respectively. On the other hand, a text-based modifier can be applied to the item only once and the `selection_type` field is always set to `SINGLE`.

func (*CatalogModifierList) GetExtraProperties

func (c *CatalogModifierList) GetExtraProperties() map[string]interface{}

func (*CatalogModifierList) GetImageIDs

func (c *CatalogModifierList) GetImageIDs() []string

func (*CatalogModifierList) GetInternalName

func (c *CatalogModifierList) GetInternalName() *string

func (*CatalogModifierList) GetMaxLength

func (c *CatalogModifierList) GetMaxLength() *int

func (*CatalogModifierList) GetModifierType

func (*CatalogModifierList) GetModifiers

func (c *CatalogModifierList) GetModifiers() []*CatalogObject

func (*CatalogModifierList) GetName

func (c *CatalogModifierList) GetName() *string

func (*CatalogModifierList) GetOrdinal

func (c *CatalogModifierList) GetOrdinal() *int

func (*CatalogModifierList) GetSelectionType

func (*CatalogModifierList) GetTextRequired

func (c *CatalogModifierList) GetTextRequired() *bool

func (*CatalogModifierList) String

func (c *CatalogModifierList) String() string

func (*CatalogModifierList) UnmarshalJSON

func (c *CatalogModifierList) UnmarshalJSON(data []byte) error

type CatalogModifierListModifierType

type CatalogModifierListModifierType string

Defines the type of `CatalogModifierList`.

const (
	CatalogModifierListModifierTypeList CatalogModifierListModifierType = "LIST"
	CatalogModifierListModifierTypeText CatalogModifierListModifierType = "TEXT"
)

func NewCatalogModifierListModifierTypeFromString

func NewCatalogModifierListModifierTypeFromString(s string) (CatalogModifierListModifierType, error)

func (CatalogModifierListModifierType) Ptr

type CatalogModifierListSelectionType

type CatalogModifierListSelectionType string

Indicates whether a CatalogModifierList supports multiple selections.

const (
	CatalogModifierListSelectionTypeSingle   CatalogModifierListSelectionType = "SINGLE"
	CatalogModifierListSelectionTypeMultiple CatalogModifierListSelectionType = "MULTIPLE"
)

func NewCatalogModifierListSelectionTypeFromString

func NewCatalogModifierListSelectionTypeFromString(s string) (CatalogModifierListSelectionType, error)

func (CatalogModifierListSelectionType) Ptr

type CatalogModifierOverride

type CatalogModifierOverride struct {
	// The ID of the `CatalogModifier` whose default behavior is being overridden.
	ModifierID string `json:"modifier_id" url:"modifier_id"`
	// If `true`, this `CatalogModifier` should be selected by default for this `CatalogItem`.
	OnByDefault *bool `json:"on_by_default,omitempty" url:"on_by_default,omitempty"`
	// contains filtered or unexported fields
}

Options to control how to override the default behavior of the specified modifier.

func (*CatalogModifierOverride) GetExtraProperties

func (c *CatalogModifierOverride) GetExtraProperties() map[string]interface{}

func (*CatalogModifierOverride) GetModifierID

func (c *CatalogModifierOverride) GetModifierID() string

func (*CatalogModifierOverride) GetOnByDefault

func (c *CatalogModifierOverride) GetOnByDefault() *bool

func (*CatalogModifierOverride) String

func (c *CatalogModifierOverride) String() string

func (*CatalogModifierOverride) UnmarshalJSON

func (c *CatalogModifierOverride) UnmarshalJSON(data []byte) error

type CatalogObject

The wrapper object for the catalog entries of a given object type.

Depending on the `type` attribute value, a `CatalogObject` instance assumes a type-specific data to yield the corresponding type of catalog object.

For example, if `type=ITEM`, the `CatalogObject` instance must have the ITEM-specific data set on the `item_data` attribute. The resulting `CatalogObject` instance is also a `CatalogItem` instance.

In general, if `type=<OBJECT_TYPE>`, the `CatalogObject` instance must have the `<OBJECT_TYPE>`-specific data set on the `<object_type>_data` attribute. The resulting `CatalogObject` instance is also a `Catalog<ObjectType>` instance.

For a more detailed discussion of the Catalog data model, please see the [Design a Catalog](https://developer.squareup.com/docs/catalog-api/design-a-catalog) guide.

func (*CatalogObject) Accept

func (c *CatalogObject) Accept(visitor CatalogObjectVisitor) error

func (*CatalogObject) GetAddress

func (c *CatalogObject) GetAddress() *CatalogObjectAddress

func (*CatalogObject) GetAvailabilityPeriod added in v1.4.0

func (c *CatalogObject) GetAvailabilityPeriod() *CatalogObjectAvailabilityPeriod

func (*CatalogObject) GetCategory

func (c *CatalogObject) GetCategory() *CatalogObjectCategory
func (c *CatalogObject) GetCheckoutLink() *CatalogObjectCheckoutLink

func (*CatalogObject) GetComponent

func (c *CatalogObject) GetComponent() *CatalogObjectComponent

func (*CatalogObject) GetComposition

func (c *CatalogObject) GetComposition() *CatalogObjectComposition

func (*CatalogObject) GetCustomAttributeDefinition

func (c *CatalogObject) GetCustomAttributeDefinition() *CatalogObjectCustomAttributeDefinition

func (*CatalogObject) GetDiningOption

func (c *CatalogObject) GetDiningOption() *CatalogObjectDiningOption

func (*CatalogObject) GetDiscount

func (c *CatalogObject) GetDiscount() *CatalogObjectDiscount

func (*CatalogObject) GetImage

func (c *CatalogObject) GetImage() *CatalogObjectImage

func (*CatalogObject) GetItem

func (c *CatalogObject) GetItem() *CatalogObjectItem

func (*CatalogObject) GetItemOption

func (c *CatalogObject) GetItemOption() *CatalogObjectItemOption

func (*CatalogObject) GetItemOptionVal

func (c *CatalogObject) GetItemOptionVal() *CatalogObjectItemOptionValue

func (*CatalogObject) GetItemVariation

func (c *CatalogObject) GetItemVariation() *CatalogObjectItemVariation

func (*CatalogObject) GetMeasurementUnit

func (c *CatalogObject) GetMeasurementUnit() *CatalogObjectMeasurementUnit

func (*CatalogObject) GetModifier

func (c *CatalogObject) GetModifier() *CatalogObjectModifier

func (*CatalogObject) GetModifierList

func (c *CatalogObject) GetModifierList() *CatalogObjectModifierList

func (*CatalogObject) GetPricingRule

func (c *CatalogObject) GetPricingRule() *CatalogObjectPricingRule

func (*CatalogObject) GetProductSet

func (c *CatalogObject) GetProductSet() *CatalogObjectProductSet

func (*CatalogObject) GetQuickAmountsSettings

func (c *CatalogObject) GetQuickAmountsSettings() *CatalogObjectQuickAmountsSettings

func (*CatalogObject) GetResource

func (c *CatalogObject) GetResource() *CatalogObjectResource

func (*CatalogObject) GetServiceCharge

func (c *CatalogObject) GetServiceCharge() *CatalogObjectServiceCharge

func (*CatalogObject) GetSubscriptionPlan

func (c *CatalogObject) GetSubscriptionPlan() *CatalogObjectSubscriptionPlan

func (*CatalogObject) GetSubscriptionPlanVariation added in v1.4.0

func (c *CatalogObject) GetSubscriptionPlanVariation() *CatalogObjectSubscriptionPlanVariation

func (*CatalogObject) GetSubscriptionProduct

func (c *CatalogObject) GetSubscriptionProduct() *CatalogObjectSubscriptionProduct

func (*CatalogObject) GetTax

func (c *CatalogObject) GetTax() *CatalogObjectTax

func (*CatalogObject) GetTaxExemption

func (c *CatalogObject) GetTaxExemption() *CatalogObjectTaxExemption

func (*CatalogObject) GetTimePeriod

func (c *CatalogObject) GetTimePeriod() *CatalogObjectTimePeriod

func (*CatalogObject) GetType

func (c *CatalogObject) GetType() string

func (CatalogObject) MarshalJSON

func (c CatalogObject) MarshalJSON() ([]byte, error)

func (*CatalogObject) UnmarshalJSON

func (c *CatalogObject) UnmarshalJSON(data []byte) error

type CatalogObjectAddress

type CatalogObjectAddress struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectAddress) GetAbsentAtLocationIDs

func (c *CatalogObjectAddress) GetAbsentAtLocationIDs() []string

func (*CatalogObjectAddress) GetCatalogV1IDs

func (c *CatalogObjectAddress) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectAddress) GetCustomAttributeValues

func (c *CatalogObjectAddress) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectAddress) GetExtraProperties

func (c *CatalogObjectAddress) GetExtraProperties() map[string]interface{}

func (*CatalogObjectAddress) GetID

func (c *CatalogObjectAddress) GetID() string

func (*CatalogObjectAddress) GetImageID

func (c *CatalogObjectAddress) GetImageID() *string

func (*CatalogObjectAddress) GetIsDeleted

func (c *CatalogObjectAddress) GetIsDeleted() *bool

func (*CatalogObjectAddress) GetPresentAtAllLocations

func (c *CatalogObjectAddress) GetPresentAtAllLocations() *bool

func (*CatalogObjectAddress) GetPresentAtLocationIDs

func (c *CatalogObjectAddress) GetPresentAtLocationIDs() []string

func (*CatalogObjectAddress) GetUpdatedAt

func (c *CatalogObjectAddress) GetUpdatedAt() *string

func (*CatalogObjectAddress) GetVersion

func (c *CatalogObjectAddress) GetVersion() *int64

func (*CatalogObjectAddress) String

func (c *CatalogObjectAddress) String() string

func (*CatalogObjectAddress) UnmarshalJSON

func (c *CatalogObjectAddress) UnmarshalJSON(data []byte) error

type CatalogObjectAvailabilityPeriod added in v1.4.0

type CatalogObjectAvailabilityPeriod struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogAvailabilityPeriod`, set for CatalogObjects of type `AVAILABILITY_PERIOD`.
	AvailabilityPeriodData *CatalogAvailabilityPeriod `json:"availability_period_data,omitempty" url:"availability_period_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectAvailabilityPeriod) GetAbsentAtLocationIDs added in v1.4.0

func (c *CatalogObjectAvailabilityPeriod) GetAbsentAtLocationIDs() []string

func (*CatalogObjectAvailabilityPeriod) GetAvailabilityPeriodData added in v1.4.0

func (c *CatalogObjectAvailabilityPeriod) GetAvailabilityPeriodData() *CatalogAvailabilityPeriod

func (*CatalogObjectAvailabilityPeriod) GetCatalogV1IDs added in v1.4.0

func (c *CatalogObjectAvailabilityPeriod) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectAvailabilityPeriod) GetCustomAttributeValues added in v1.4.0

func (c *CatalogObjectAvailabilityPeriod) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectAvailabilityPeriod) GetExtraProperties added in v1.4.0

func (c *CatalogObjectAvailabilityPeriod) GetExtraProperties() map[string]interface{}

func (*CatalogObjectAvailabilityPeriod) GetID added in v1.4.0

func (*CatalogObjectAvailabilityPeriod) GetImageID added in v1.4.0

func (c *CatalogObjectAvailabilityPeriod) GetImageID() *string

func (*CatalogObjectAvailabilityPeriod) GetIsDeleted added in v1.4.0

func (c *CatalogObjectAvailabilityPeriod) GetIsDeleted() *bool

func (*CatalogObjectAvailabilityPeriod) GetPresentAtAllLocations added in v1.4.0

func (c *CatalogObjectAvailabilityPeriod) GetPresentAtAllLocations() *bool

func (*CatalogObjectAvailabilityPeriod) GetPresentAtLocationIDs added in v1.4.0

func (c *CatalogObjectAvailabilityPeriod) GetPresentAtLocationIDs() []string

func (*CatalogObjectAvailabilityPeriod) GetUpdatedAt added in v1.4.0

func (c *CatalogObjectAvailabilityPeriod) GetUpdatedAt() *string

func (*CatalogObjectAvailabilityPeriod) GetVersion added in v1.4.0

func (c *CatalogObjectAvailabilityPeriod) GetVersion() *int64

func (*CatalogObjectAvailabilityPeriod) String added in v1.4.0

func (*CatalogObjectAvailabilityPeriod) UnmarshalJSON added in v1.4.0

func (c *CatalogObjectAvailabilityPeriod) UnmarshalJSON(data []byte) error

type CatalogObjectBase

type CatalogObjectBase struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectBase) GetAbsentAtLocationIDs

func (c *CatalogObjectBase) GetAbsentAtLocationIDs() []string

func (*CatalogObjectBase) GetCatalogV1IDs

func (c *CatalogObjectBase) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectBase) GetCustomAttributeValues

func (c *CatalogObjectBase) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectBase) GetExtraProperties

func (c *CatalogObjectBase) GetExtraProperties() map[string]interface{}

func (*CatalogObjectBase) GetID

func (c *CatalogObjectBase) GetID() string

func (*CatalogObjectBase) GetImageID

func (c *CatalogObjectBase) GetImageID() *string

func (*CatalogObjectBase) GetIsDeleted

func (c *CatalogObjectBase) GetIsDeleted() *bool

func (*CatalogObjectBase) GetPresentAtAllLocations

func (c *CatalogObjectBase) GetPresentAtAllLocations() *bool

func (*CatalogObjectBase) GetPresentAtLocationIDs

func (c *CatalogObjectBase) GetPresentAtLocationIDs() []string

func (*CatalogObjectBase) GetUpdatedAt

func (c *CatalogObjectBase) GetUpdatedAt() *string

func (*CatalogObjectBase) GetVersion

func (c *CatalogObjectBase) GetVersion() *int64

func (*CatalogObjectBase) String

func (c *CatalogObjectBase) String() string

func (*CatalogObjectBase) UnmarshalJSON

func (c *CatalogObjectBase) UnmarshalJSON(data []byte) error

type CatalogObjectBatch

type CatalogObjectBatch struct {
	// A list of CatalogObjects belonging to this batch.
	Objects []*CatalogObject `json:"objects,omitempty" url:"objects,omitempty"`
	// contains filtered or unexported fields
}

A batch of catalog objects.

func (*CatalogObjectBatch) GetExtraProperties

func (c *CatalogObjectBatch) GetExtraProperties() map[string]interface{}

func (*CatalogObjectBatch) GetObjects

func (c *CatalogObjectBatch) GetObjects() []*CatalogObject

func (*CatalogObjectBatch) String

func (c *CatalogObjectBatch) String() string

func (*CatalogObjectBatch) UnmarshalJSON

func (c *CatalogObjectBatch) UnmarshalJSON(data []byte) error

type CatalogObjectCategory

type CatalogObjectCategory struct {
	// The ID of the object's category.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The order of the object within the context of the category.
	Ordinal *int64 `json:"ordinal,omitempty" url:"ordinal,omitempty"`
	// Structured data for a `CatalogCategory`, set for CatalogObjects of type `CATEGORY`.
	CategoryData *CatalogCategory `json:"category_data,omitempty" url:"category_data,omitempty"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// contains filtered or unexported fields
}

A category that can be assigned to an item or a parent category that can be assigned to another category. For example, a clothing category can be assigned to a t-shirt item or be made as the parent category to the pants category.

func (*CatalogObjectCategory) GetAbsentAtLocationIDs

func (c *CatalogObjectCategory) GetAbsentAtLocationIDs() []string

func (*CatalogObjectCategory) GetCatalogV1IDs

func (c *CatalogObjectCategory) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectCategory) GetCategoryData

func (c *CatalogObjectCategory) GetCategoryData() *CatalogCategory

func (*CatalogObjectCategory) GetCustomAttributeValues

func (c *CatalogObjectCategory) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectCategory) GetExtraProperties

func (c *CatalogObjectCategory) GetExtraProperties() map[string]interface{}

func (*CatalogObjectCategory) GetID

func (c *CatalogObjectCategory) GetID() *string

func (*CatalogObjectCategory) GetImageID

func (c *CatalogObjectCategory) GetImageID() *string

func (*CatalogObjectCategory) GetIsDeleted

func (c *CatalogObjectCategory) GetIsDeleted() *bool

func (*CatalogObjectCategory) GetOrdinal

func (c *CatalogObjectCategory) GetOrdinal() *int64

func (*CatalogObjectCategory) GetPresentAtAllLocations

func (c *CatalogObjectCategory) GetPresentAtAllLocations() *bool

func (*CatalogObjectCategory) GetPresentAtLocationIDs

func (c *CatalogObjectCategory) GetPresentAtLocationIDs() []string

func (*CatalogObjectCategory) GetUpdatedAt

func (c *CatalogObjectCategory) GetUpdatedAt() *string

func (*CatalogObjectCategory) GetVersion

func (c *CatalogObjectCategory) GetVersion() *int64

func (*CatalogObjectCategory) String

func (c *CatalogObjectCategory) String() string

func (*CatalogObjectCategory) UnmarshalJSON

func (c *CatalogObjectCategory) UnmarshalJSON(data []byte) error
type CatalogObjectCheckoutLink struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectCheckoutLink) GetAbsentAtLocationIDs

func (c *CatalogObjectCheckoutLink) GetAbsentAtLocationIDs() []string

func (*CatalogObjectCheckoutLink) GetCatalogV1IDs

func (c *CatalogObjectCheckoutLink) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectCheckoutLink) GetCustomAttributeValues

func (c *CatalogObjectCheckoutLink) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectCheckoutLink) GetExtraProperties

func (c *CatalogObjectCheckoutLink) GetExtraProperties() map[string]interface{}

func (*CatalogObjectCheckoutLink) GetID

func (c *CatalogObjectCheckoutLink) GetID() string

func (*CatalogObjectCheckoutLink) GetImageID

func (c *CatalogObjectCheckoutLink) GetImageID() *string

func (*CatalogObjectCheckoutLink) GetIsDeleted

func (c *CatalogObjectCheckoutLink) GetIsDeleted() *bool

func (*CatalogObjectCheckoutLink) GetPresentAtAllLocations

func (c *CatalogObjectCheckoutLink) GetPresentAtAllLocations() *bool

func (*CatalogObjectCheckoutLink) GetPresentAtLocationIDs

func (c *CatalogObjectCheckoutLink) GetPresentAtLocationIDs() []string

func (*CatalogObjectCheckoutLink) GetUpdatedAt

func (c *CatalogObjectCheckoutLink) GetUpdatedAt() *string

func (*CatalogObjectCheckoutLink) GetVersion

func (c *CatalogObjectCheckoutLink) GetVersion() *int64

func (*CatalogObjectCheckoutLink) String

func (c *CatalogObjectCheckoutLink) String() string

func (*CatalogObjectCheckoutLink) UnmarshalJSON

func (c *CatalogObjectCheckoutLink) UnmarshalJSON(data []byte) error

type CatalogObjectComponent

type CatalogObjectComponent struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectComponent) GetAbsentAtLocationIDs

func (c *CatalogObjectComponent) GetAbsentAtLocationIDs() []string

func (*CatalogObjectComponent) GetCatalogV1IDs

func (c *CatalogObjectComponent) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectComponent) GetCustomAttributeValues

func (c *CatalogObjectComponent) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectComponent) GetExtraProperties

func (c *CatalogObjectComponent) GetExtraProperties() map[string]interface{}

func (*CatalogObjectComponent) GetID

func (c *CatalogObjectComponent) GetID() string

func (*CatalogObjectComponent) GetImageID

func (c *CatalogObjectComponent) GetImageID() *string

func (*CatalogObjectComponent) GetIsDeleted

func (c *CatalogObjectComponent) GetIsDeleted() *bool

func (*CatalogObjectComponent) GetPresentAtAllLocations

func (c *CatalogObjectComponent) GetPresentAtAllLocations() *bool

func (*CatalogObjectComponent) GetPresentAtLocationIDs

func (c *CatalogObjectComponent) GetPresentAtLocationIDs() []string

func (*CatalogObjectComponent) GetUpdatedAt

func (c *CatalogObjectComponent) GetUpdatedAt() *string

func (*CatalogObjectComponent) GetVersion

func (c *CatalogObjectComponent) GetVersion() *int64

func (*CatalogObjectComponent) String

func (c *CatalogObjectComponent) String() string

func (*CatalogObjectComponent) UnmarshalJSON

func (c *CatalogObjectComponent) UnmarshalJSON(data []byte) error

type CatalogObjectComposition

type CatalogObjectComposition struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectComposition) GetAbsentAtLocationIDs

func (c *CatalogObjectComposition) GetAbsentAtLocationIDs() []string

func (*CatalogObjectComposition) GetCatalogV1IDs

func (c *CatalogObjectComposition) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectComposition) GetCustomAttributeValues

func (c *CatalogObjectComposition) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectComposition) GetExtraProperties

func (c *CatalogObjectComposition) GetExtraProperties() map[string]interface{}

func (*CatalogObjectComposition) GetID

func (c *CatalogObjectComposition) GetID() string

func (*CatalogObjectComposition) GetImageID

func (c *CatalogObjectComposition) GetImageID() *string

func (*CatalogObjectComposition) GetIsDeleted

func (c *CatalogObjectComposition) GetIsDeleted() *bool

func (*CatalogObjectComposition) GetPresentAtAllLocations

func (c *CatalogObjectComposition) GetPresentAtAllLocations() *bool

func (*CatalogObjectComposition) GetPresentAtLocationIDs

func (c *CatalogObjectComposition) GetPresentAtLocationIDs() []string

func (*CatalogObjectComposition) GetUpdatedAt

func (c *CatalogObjectComposition) GetUpdatedAt() *string

func (*CatalogObjectComposition) GetVersion

func (c *CatalogObjectComposition) GetVersion() *int64

func (*CatalogObjectComposition) String

func (c *CatalogObjectComposition) String() string

func (*CatalogObjectComposition) UnmarshalJSON

func (c *CatalogObjectComposition) UnmarshalJSON(data []byte) error

type CatalogObjectCustomAttributeDefinition

type CatalogObjectCustomAttributeDefinition struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogCustomAttributeDefinition`, set for CatalogObjects of type `CUSTOM_ATTRIBUTE_DEFINITION`.
	CustomAttributeDefinitionData *CatalogCustomAttributeDefinition `json:"custom_attribute_definition_data,omitempty" url:"custom_attribute_definition_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectCustomAttributeDefinition) GetAbsentAtLocationIDs

func (c *CatalogObjectCustomAttributeDefinition) GetAbsentAtLocationIDs() []string

func (*CatalogObjectCustomAttributeDefinition) GetCatalogV1IDs

func (c *CatalogObjectCustomAttributeDefinition) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectCustomAttributeDefinition) GetCustomAttributeDefinitionData

func (c *CatalogObjectCustomAttributeDefinition) GetCustomAttributeDefinitionData() *CatalogCustomAttributeDefinition

func (*CatalogObjectCustomAttributeDefinition) GetCustomAttributeValues

func (*CatalogObjectCustomAttributeDefinition) GetExtraProperties

func (c *CatalogObjectCustomAttributeDefinition) GetExtraProperties() map[string]interface{}

func (*CatalogObjectCustomAttributeDefinition) GetID

func (*CatalogObjectCustomAttributeDefinition) GetImageID

func (*CatalogObjectCustomAttributeDefinition) GetIsDeleted

func (c *CatalogObjectCustomAttributeDefinition) GetIsDeleted() *bool

func (*CatalogObjectCustomAttributeDefinition) GetPresentAtAllLocations

func (c *CatalogObjectCustomAttributeDefinition) GetPresentAtAllLocations() *bool

func (*CatalogObjectCustomAttributeDefinition) GetPresentAtLocationIDs

func (c *CatalogObjectCustomAttributeDefinition) GetPresentAtLocationIDs() []string

func (*CatalogObjectCustomAttributeDefinition) GetUpdatedAt

func (*CatalogObjectCustomAttributeDefinition) GetVersion

func (*CatalogObjectCustomAttributeDefinition) String

func (*CatalogObjectCustomAttributeDefinition) UnmarshalJSON

func (c *CatalogObjectCustomAttributeDefinition) UnmarshalJSON(data []byte) error

type CatalogObjectDiningOption

type CatalogObjectDiningOption struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectDiningOption) GetAbsentAtLocationIDs

func (c *CatalogObjectDiningOption) GetAbsentAtLocationIDs() []string

func (*CatalogObjectDiningOption) GetCatalogV1IDs

func (c *CatalogObjectDiningOption) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectDiningOption) GetCustomAttributeValues

func (c *CatalogObjectDiningOption) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectDiningOption) GetExtraProperties

func (c *CatalogObjectDiningOption) GetExtraProperties() map[string]interface{}

func (*CatalogObjectDiningOption) GetID

func (c *CatalogObjectDiningOption) GetID() string

func (*CatalogObjectDiningOption) GetImageID

func (c *CatalogObjectDiningOption) GetImageID() *string

func (*CatalogObjectDiningOption) GetIsDeleted

func (c *CatalogObjectDiningOption) GetIsDeleted() *bool

func (*CatalogObjectDiningOption) GetPresentAtAllLocations

func (c *CatalogObjectDiningOption) GetPresentAtAllLocations() *bool

func (*CatalogObjectDiningOption) GetPresentAtLocationIDs

func (c *CatalogObjectDiningOption) GetPresentAtLocationIDs() []string

func (*CatalogObjectDiningOption) GetUpdatedAt

func (c *CatalogObjectDiningOption) GetUpdatedAt() *string

func (*CatalogObjectDiningOption) GetVersion

func (c *CatalogObjectDiningOption) GetVersion() *int64

func (*CatalogObjectDiningOption) String

func (c *CatalogObjectDiningOption) String() string

func (*CatalogObjectDiningOption) UnmarshalJSON

func (c *CatalogObjectDiningOption) UnmarshalJSON(data []byte) error

type CatalogObjectDiscount

type CatalogObjectDiscount struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogDiscount`, set for CatalogObjects of type `DISCOUNT`.
	DiscountData *CatalogDiscount `json:"discount_data,omitempty" url:"discount_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectDiscount) GetAbsentAtLocationIDs

func (c *CatalogObjectDiscount) GetAbsentAtLocationIDs() []string

func (*CatalogObjectDiscount) GetCatalogV1IDs

func (c *CatalogObjectDiscount) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectDiscount) GetCustomAttributeValues

func (c *CatalogObjectDiscount) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectDiscount) GetDiscountData

func (c *CatalogObjectDiscount) GetDiscountData() *CatalogDiscount

func (*CatalogObjectDiscount) GetExtraProperties

func (c *CatalogObjectDiscount) GetExtraProperties() map[string]interface{}

func (*CatalogObjectDiscount) GetID

func (c *CatalogObjectDiscount) GetID() string

func (*CatalogObjectDiscount) GetImageID

func (c *CatalogObjectDiscount) GetImageID() *string

func (*CatalogObjectDiscount) GetIsDeleted

func (c *CatalogObjectDiscount) GetIsDeleted() *bool

func (*CatalogObjectDiscount) GetPresentAtAllLocations

func (c *CatalogObjectDiscount) GetPresentAtAllLocations() *bool

func (*CatalogObjectDiscount) GetPresentAtLocationIDs

func (c *CatalogObjectDiscount) GetPresentAtLocationIDs() []string

func (*CatalogObjectDiscount) GetUpdatedAt

func (c *CatalogObjectDiscount) GetUpdatedAt() *string

func (*CatalogObjectDiscount) GetVersion

func (c *CatalogObjectDiscount) GetVersion() *int64

func (*CatalogObjectDiscount) String

func (c *CatalogObjectDiscount) String() string

func (*CatalogObjectDiscount) UnmarshalJSON

func (c *CatalogObjectDiscount) UnmarshalJSON(data []byte) error

type CatalogObjectImage

type CatalogObjectImage struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogImage`, set for CatalogObjects of type `IMAGE`.
	ImageData *CatalogImage `json:"image_data,omitempty" url:"image_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectImage) GetAbsentAtLocationIDs

func (c *CatalogObjectImage) GetAbsentAtLocationIDs() []string

func (*CatalogObjectImage) GetCatalogV1IDs

func (c *CatalogObjectImage) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectImage) GetCustomAttributeValues

func (c *CatalogObjectImage) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectImage) GetExtraProperties

func (c *CatalogObjectImage) GetExtraProperties() map[string]interface{}

func (*CatalogObjectImage) GetID

func (c *CatalogObjectImage) GetID() string

func (*CatalogObjectImage) GetImageData

func (c *CatalogObjectImage) GetImageData() *CatalogImage

func (*CatalogObjectImage) GetImageID

func (c *CatalogObjectImage) GetImageID() *string

func (*CatalogObjectImage) GetIsDeleted

func (c *CatalogObjectImage) GetIsDeleted() *bool

func (*CatalogObjectImage) GetPresentAtAllLocations

func (c *CatalogObjectImage) GetPresentAtAllLocations() *bool

func (*CatalogObjectImage) GetPresentAtLocationIDs

func (c *CatalogObjectImage) GetPresentAtLocationIDs() []string

func (*CatalogObjectImage) GetUpdatedAt

func (c *CatalogObjectImage) GetUpdatedAt() *string

func (*CatalogObjectImage) GetVersion

func (c *CatalogObjectImage) GetVersion() *int64

func (*CatalogObjectImage) String

func (c *CatalogObjectImage) String() string

func (*CatalogObjectImage) UnmarshalJSON

func (c *CatalogObjectImage) UnmarshalJSON(data []byte) error

type CatalogObjectItem

type CatalogObjectItem struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogItem`, set for CatalogObjects of type `ITEM`.
	ItemData *CatalogItem `json:"item_data,omitempty" url:"item_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectItem) GetAbsentAtLocationIDs

func (c *CatalogObjectItem) GetAbsentAtLocationIDs() []string

func (*CatalogObjectItem) GetCatalogV1IDs

func (c *CatalogObjectItem) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectItem) GetCustomAttributeValues

func (c *CatalogObjectItem) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectItem) GetExtraProperties

func (c *CatalogObjectItem) GetExtraProperties() map[string]interface{}

func (*CatalogObjectItem) GetID

func (c *CatalogObjectItem) GetID() string

func (*CatalogObjectItem) GetImageID

func (c *CatalogObjectItem) GetImageID() *string

func (*CatalogObjectItem) GetIsDeleted

func (c *CatalogObjectItem) GetIsDeleted() *bool

func (*CatalogObjectItem) GetItemData

func (c *CatalogObjectItem) GetItemData() *CatalogItem

func (*CatalogObjectItem) GetPresentAtAllLocations

func (c *CatalogObjectItem) GetPresentAtAllLocations() *bool

func (*CatalogObjectItem) GetPresentAtLocationIDs

func (c *CatalogObjectItem) GetPresentAtLocationIDs() []string

func (*CatalogObjectItem) GetUpdatedAt

func (c *CatalogObjectItem) GetUpdatedAt() *string

func (*CatalogObjectItem) GetVersion

func (c *CatalogObjectItem) GetVersion() *int64

func (*CatalogObjectItem) String

func (c *CatalogObjectItem) String() string

func (*CatalogObjectItem) UnmarshalJSON

func (c *CatalogObjectItem) UnmarshalJSON(data []byte) error

type CatalogObjectItemOption

type CatalogObjectItemOption struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogItemOption`, set for CatalogObjects of type `ITEM_OPTION`.
	ItemOptionData *CatalogItemOption `json:"item_option_data,omitempty" url:"item_option_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectItemOption) GetAbsentAtLocationIDs

func (c *CatalogObjectItemOption) GetAbsentAtLocationIDs() []string

func (*CatalogObjectItemOption) GetCatalogV1IDs

func (c *CatalogObjectItemOption) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectItemOption) GetCustomAttributeValues

func (c *CatalogObjectItemOption) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectItemOption) GetExtraProperties

func (c *CatalogObjectItemOption) GetExtraProperties() map[string]interface{}

func (*CatalogObjectItemOption) GetID

func (c *CatalogObjectItemOption) GetID() string

func (*CatalogObjectItemOption) GetImageID

func (c *CatalogObjectItemOption) GetImageID() *string

func (*CatalogObjectItemOption) GetIsDeleted

func (c *CatalogObjectItemOption) GetIsDeleted() *bool

func (*CatalogObjectItemOption) GetItemOptionData

func (c *CatalogObjectItemOption) GetItemOptionData() *CatalogItemOption

func (*CatalogObjectItemOption) GetPresentAtAllLocations

func (c *CatalogObjectItemOption) GetPresentAtAllLocations() *bool

func (*CatalogObjectItemOption) GetPresentAtLocationIDs

func (c *CatalogObjectItemOption) GetPresentAtLocationIDs() []string

func (*CatalogObjectItemOption) GetUpdatedAt

func (c *CatalogObjectItemOption) GetUpdatedAt() *string

func (*CatalogObjectItemOption) GetVersion

func (c *CatalogObjectItemOption) GetVersion() *int64

func (*CatalogObjectItemOption) String

func (c *CatalogObjectItemOption) String() string

func (*CatalogObjectItemOption) UnmarshalJSON

func (c *CatalogObjectItemOption) UnmarshalJSON(data []byte) error

type CatalogObjectItemOptionValue

type CatalogObjectItemOptionValue struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogItemOptionValue`, set for CatalogObjects of type `ITEM_OPTION_VAL`.
	ItemOptionValueData *CatalogItemOptionValue `json:"item_option_value_data,omitempty" url:"item_option_value_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectItemOptionValue) GetAbsentAtLocationIDs

func (c *CatalogObjectItemOptionValue) GetAbsentAtLocationIDs() []string

func (*CatalogObjectItemOptionValue) GetCatalogV1IDs

func (c *CatalogObjectItemOptionValue) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectItemOptionValue) GetCustomAttributeValues

func (c *CatalogObjectItemOptionValue) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectItemOptionValue) GetExtraProperties

func (c *CatalogObjectItemOptionValue) GetExtraProperties() map[string]interface{}

func (*CatalogObjectItemOptionValue) GetID

func (*CatalogObjectItemOptionValue) GetImageID

func (c *CatalogObjectItemOptionValue) GetImageID() *string

func (*CatalogObjectItemOptionValue) GetIsDeleted

func (c *CatalogObjectItemOptionValue) GetIsDeleted() *bool

func (*CatalogObjectItemOptionValue) GetItemOptionValueData

func (c *CatalogObjectItemOptionValue) GetItemOptionValueData() *CatalogItemOptionValue

func (*CatalogObjectItemOptionValue) GetPresentAtAllLocations

func (c *CatalogObjectItemOptionValue) GetPresentAtAllLocations() *bool

func (*CatalogObjectItemOptionValue) GetPresentAtLocationIDs

func (c *CatalogObjectItemOptionValue) GetPresentAtLocationIDs() []string

func (*CatalogObjectItemOptionValue) GetUpdatedAt

func (c *CatalogObjectItemOptionValue) GetUpdatedAt() *string

func (*CatalogObjectItemOptionValue) GetVersion

func (c *CatalogObjectItemOptionValue) GetVersion() *int64

func (*CatalogObjectItemOptionValue) String

func (*CatalogObjectItemOptionValue) UnmarshalJSON

func (c *CatalogObjectItemOptionValue) UnmarshalJSON(data []byte) error

type CatalogObjectItemVariation

type CatalogObjectItemVariation struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogItemVariation`, set for CatalogObjects of type `ITEM_VARIATION`.
	ItemVariationData *CatalogItemVariation `json:"item_variation_data,omitempty" url:"item_variation_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectItemVariation) GetAbsentAtLocationIDs

func (c *CatalogObjectItemVariation) GetAbsentAtLocationIDs() []string

func (*CatalogObjectItemVariation) GetCatalogV1IDs

func (c *CatalogObjectItemVariation) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectItemVariation) GetCustomAttributeValues

func (c *CatalogObjectItemVariation) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectItemVariation) GetExtraProperties

func (c *CatalogObjectItemVariation) GetExtraProperties() map[string]interface{}

func (*CatalogObjectItemVariation) GetID

func (*CatalogObjectItemVariation) GetImageID

func (c *CatalogObjectItemVariation) GetImageID() *string

func (*CatalogObjectItemVariation) GetIsDeleted

func (c *CatalogObjectItemVariation) GetIsDeleted() *bool

func (*CatalogObjectItemVariation) GetItemVariationData

func (c *CatalogObjectItemVariation) GetItemVariationData() *CatalogItemVariation

func (*CatalogObjectItemVariation) GetPresentAtAllLocations

func (c *CatalogObjectItemVariation) GetPresentAtAllLocations() *bool

func (*CatalogObjectItemVariation) GetPresentAtLocationIDs

func (c *CatalogObjectItemVariation) GetPresentAtLocationIDs() []string

func (*CatalogObjectItemVariation) GetUpdatedAt

func (c *CatalogObjectItemVariation) GetUpdatedAt() *string

func (*CatalogObjectItemVariation) GetVersion

func (c *CatalogObjectItemVariation) GetVersion() *int64

func (*CatalogObjectItemVariation) String

func (c *CatalogObjectItemVariation) String() string

func (*CatalogObjectItemVariation) UnmarshalJSON

func (c *CatalogObjectItemVariation) UnmarshalJSON(data []byte) error

type CatalogObjectMeasurementUnit

type CatalogObjectMeasurementUnit struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogMeasurementUnit`, set for CatalogObjects of type `MEASUREMENT_UNIT`.
	MeasurementUnitData *CatalogMeasurementUnit `json:"measurement_unit_data,omitempty" url:"measurement_unit_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectMeasurementUnit) GetAbsentAtLocationIDs

func (c *CatalogObjectMeasurementUnit) GetAbsentAtLocationIDs() []string

func (*CatalogObjectMeasurementUnit) GetCatalogV1IDs

func (c *CatalogObjectMeasurementUnit) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectMeasurementUnit) GetCustomAttributeValues

func (c *CatalogObjectMeasurementUnit) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectMeasurementUnit) GetExtraProperties

func (c *CatalogObjectMeasurementUnit) GetExtraProperties() map[string]interface{}

func (*CatalogObjectMeasurementUnit) GetID

func (*CatalogObjectMeasurementUnit) GetImageID

func (c *CatalogObjectMeasurementUnit) GetImageID() *string

func (*CatalogObjectMeasurementUnit) GetIsDeleted

func (c *CatalogObjectMeasurementUnit) GetIsDeleted() *bool

func (*CatalogObjectMeasurementUnit) GetMeasurementUnitData

func (c *CatalogObjectMeasurementUnit) GetMeasurementUnitData() *CatalogMeasurementUnit

func (*CatalogObjectMeasurementUnit) GetPresentAtAllLocations

func (c *CatalogObjectMeasurementUnit) GetPresentAtAllLocations() *bool

func (*CatalogObjectMeasurementUnit) GetPresentAtLocationIDs

func (c *CatalogObjectMeasurementUnit) GetPresentAtLocationIDs() []string

func (*CatalogObjectMeasurementUnit) GetUpdatedAt

func (c *CatalogObjectMeasurementUnit) GetUpdatedAt() *string

func (*CatalogObjectMeasurementUnit) GetVersion

func (c *CatalogObjectMeasurementUnit) GetVersion() *int64

func (*CatalogObjectMeasurementUnit) String

func (*CatalogObjectMeasurementUnit) UnmarshalJSON

func (c *CatalogObjectMeasurementUnit) UnmarshalJSON(data []byte) error

type CatalogObjectModifier

type CatalogObjectModifier struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogModifier`, set for CatalogObjects of type `MODIFIER`.
	ModifierData *CatalogModifier `json:"modifier_data,omitempty" url:"modifier_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectModifier) GetAbsentAtLocationIDs

func (c *CatalogObjectModifier) GetAbsentAtLocationIDs() []string

func (*CatalogObjectModifier) GetCatalogV1IDs

func (c *CatalogObjectModifier) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectModifier) GetCustomAttributeValues

func (c *CatalogObjectModifier) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectModifier) GetExtraProperties

func (c *CatalogObjectModifier) GetExtraProperties() map[string]interface{}

func (*CatalogObjectModifier) GetID

func (c *CatalogObjectModifier) GetID() string

func (*CatalogObjectModifier) GetImageID

func (c *CatalogObjectModifier) GetImageID() *string

func (*CatalogObjectModifier) GetIsDeleted

func (c *CatalogObjectModifier) GetIsDeleted() *bool

func (*CatalogObjectModifier) GetModifierData

func (c *CatalogObjectModifier) GetModifierData() *CatalogModifier

func (*CatalogObjectModifier) GetPresentAtAllLocations

func (c *CatalogObjectModifier) GetPresentAtAllLocations() *bool

func (*CatalogObjectModifier) GetPresentAtLocationIDs

func (c *CatalogObjectModifier) GetPresentAtLocationIDs() []string

func (*CatalogObjectModifier) GetUpdatedAt

func (c *CatalogObjectModifier) GetUpdatedAt() *string

func (*CatalogObjectModifier) GetVersion

func (c *CatalogObjectModifier) GetVersion() *int64

func (*CatalogObjectModifier) String

func (c *CatalogObjectModifier) String() string

func (*CatalogObjectModifier) UnmarshalJSON

func (c *CatalogObjectModifier) UnmarshalJSON(data []byte) error

type CatalogObjectModifierList

type CatalogObjectModifierList struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogModifierList`, set for CatalogObjects of type `MODIFIER_LIST`.
	ModifierListData *CatalogModifierList `json:"modifier_list_data,omitempty" url:"modifier_list_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectModifierList) GetAbsentAtLocationIDs

func (c *CatalogObjectModifierList) GetAbsentAtLocationIDs() []string

func (*CatalogObjectModifierList) GetCatalogV1IDs

func (c *CatalogObjectModifierList) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectModifierList) GetCustomAttributeValues

func (c *CatalogObjectModifierList) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectModifierList) GetExtraProperties

func (c *CatalogObjectModifierList) GetExtraProperties() map[string]interface{}

func (*CatalogObjectModifierList) GetID

func (c *CatalogObjectModifierList) GetID() string

func (*CatalogObjectModifierList) GetImageID

func (c *CatalogObjectModifierList) GetImageID() *string

func (*CatalogObjectModifierList) GetIsDeleted

func (c *CatalogObjectModifierList) GetIsDeleted() *bool

func (*CatalogObjectModifierList) GetModifierListData

func (c *CatalogObjectModifierList) GetModifierListData() *CatalogModifierList

func (*CatalogObjectModifierList) GetPresentAtAllLocations

func (c *CatalogObjectModifierList) GetPresentAtAllLocations() *bool

func (*CatalogObjectModifierList) GetPresentAtLocationIDs

func (c *CatalogObjectModifierList) GetPresentAtLocationIDs() []string

func (*CatalogObjectModifierList) GetUpdatedAt

func (c *CatalogObjectModifierList) GetUpdatedAt() *string

func (*CatalogObjectModifierList) GetVersion

func (c *CatalogObjectModifierList) GetVersion() *int64

func (*CatalogObjectModifierList) String

func (c *CatalogObjectModifierList) String() string

func (*CatalogObjectModifierList) UnmarshalJSON

func (c *CatalogObjectModifierList) UnmarshalJSON(data []byte) error

type CatalogObjectPricingRule

type CatalogObjectPricingRule struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// 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" url:"pricing_rule_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectPricingRule) GetAbsentAtLocationIDs

func (c *CatalogObjectPricingRule) GetAbsentAtLocationIDs() []string

func (*CatalogObjectPricingRule) GetCatalogV1IDs

func (c *CatalogObjectPricingRule) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectPricingRule) GetCustomAttributeValues

func (c *CatalogObjectPricingRule) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectPricingRule) GetExtraProperties

func (c *CatalogObjectPricingRule) GetExtraProperties() map[string]interface{}

func (*CatalogObjectPricingRule) GetID

func (c *CatalogObjectPricingRule) GetID() string

func (*CatalogObjectPricingRule) GetImageID

func (c *CatalogObjectPricingRule) GetImageID() *string

func (*CatalogObjectPricingRule) GetIsDeleted

func (c *CatalogObjectPricingRule) GetIsDeleted() *bool

func (*CatalogObjectPricingRule) GetPresentAtAllLocations

func (c *CatalogObjectPricingRule) GetPresentAtAllLocations() *bool

func (*CatalogObjectPricingRule) GetPresentAtLocationIDs

func (c *CatalogObjectPricingRule) GetPresentAtLocationIDs() []string

func (*CatalogObjectPricingRule) GetPricingRuleData

func (c *CatalogObjectPricingRule) GetPricingRuleData() *CatalogPricingRule

func (*CatalogObjectPricingRule) GetUpdatedAt

func (c *CatalogObjectPricingRule) GetUpdatedAt() *string

func (*CatalogObjectPricingRule) GetVersion

func (c *CatalogObjectPricingRule) GetVersion() *int64

func (*CatalogObjectPricingRule) String

func (c *CatalogObjectPricingRule) String() string

func (*CatalogObjectPricingRule) UnmarshalJSON

func (c *CatalogObjectPricingRule) UnmarshalJSON(data []byte) error

type CatalogObjectProductSet

type CatalogObjectProductSet struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogProductSet`, set for CatalogObjects of type `PRODUCT_SET`.
	ProductSetData *CatalogProductSet `json:"product_set_data,omitempty" url:"product_set_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectProductSet) GetAbsentAtLocationIDs

func (c *CatalogObjectProductSet) GetAbsentAtLocationIDs() []string

func (*CatalogObjectProductSet) GetCatalogV1IDs

func (c *CatalogObjectProductSet) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectProductSet) GetCustomAttributeValues

func (c *CatalogObjectProductSet) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectProductSet) GetExtraProperties

func (c *CatalogObjectProductSet) GetExtraProperties() map[string]interface{}

func (*CatalogObjectProductSet) GetID

func (c *CatalogObjectProductSet) GetID() string

func (*CatalogObjectProductSet) GetImageID

func (c *CatalogObjectProductSet) GetImageID() *string

func (*CatalogObjectProductSet) GetIsDeleted

func (c *CatalogObjectProductSet) GetIsDeleted() *bool

func (*CatalogObjectProductSet) GetPresentAtAllLocations

func (c *CatalogObjectProductSet) GetPresentAtAllLocations() *bool

func (*CatalogObjectProductSet) GetPresentAtLocationIDs

func (c *CatalogObjectProductSet) GetPresentAtLocationIDs() []string

func (*CatalogObjectProductSet) GetProductSetData

func (c *CatalogObjectProductSet) GetProductSetData() *CatalogProductSet

func (*CatalogObjectProductSet) GetUpdatedAt

func (c *CatalogObjectProductSet) GetUpdatedAt() *string

func (*CatalogObjectProductSet) GetVersion

func (c *CatalogObjectProductSet) GetVersion() *int64

func (*CatalogObjectProductSet) String

func (c *CatalogObjectProductSet) String() string

func (*CatalogObjectProductSet) UnmarshalJSON

func (c *CatalogObjectProductSet) UnmarshalJSON(data []byte) error

type CatalogObjectQuickAmountsSettings

type CatalogObjectQuickAmountsSettings struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogQuickAmountsSettings`, set for CatalogObjects of type `QUICK_AMOUNTS_SETTINGS`.
	QuickAmountsSettingsData *CatalogQuickAmountsSettings `json:"quick_amounts_settings_data,omitempty" url:"quick_amounts_settings_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectQuickAmountsSettings) GetAbsentAtLocationIDs

func (c *CatalogObjectQuickAmountsSettings) GetAbsentAtLocationIDs() []string

func (*CatalogObjectQuickAmountsSettings) GetCatalogV1IDs

func (c *CatalogObjectQuickAmountsSettings) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectQuickAmountsSettings) GetCustomAttributeValues

func (c *CatalogObjectQuickAmountsSettings) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectQuickAmountsSettings) GetExtraProperties

func (c *CatalogObjectQuickAmountsSettings) GetExtraProperties() map[string]interface{}

func (*CatalogObjectQuickAmountsSettings) GetID

func (*CatalogObjectQuickAmountsSettings) GetImageID

func (c *CatalogObjectQuickAmountsSettings) GetImageID() *string

func (*CatalogObjectQuickAmountsSettings) GetIsDeleted

func (c *CatalogObjectQuickAmountsSettings) GetIsDeleted() *bool

func (*CatalogObjectQuickAmountsSettings) GetPresentAtAllLocations

func (c *CatalogObjectQuickAmountsSettings) GetPresentAtAllLocations() *bool

func (*CatalogObjectQuickAmountsSettings) GetPresentAtLocationIDs

func (c *CatalogObjectQuickAmountsSettings) GetPresentAtLocationIDs() []string

func (*CatalogObjectQuickAmountsSettings) GetQuickAmountsSettingsData

func (c *CatalogObjectQuickAmountsSettings) GetQuickAmountsSettingsData() *CatalogQuickAmountsSettings

func (*CatalogObjectQuickAmountsSettings) GetUpdatedAt

func (c *CatalogObjectQuickAmountsSettings) GetUpdatedAt() *string

func (*CatalogObjectQuickAmountsSettings) GetVersion

func (c *CatalogObjectQuickAmountsSettings) GetVersion() *int64

func (*CatalogObjectQuickAmountsSettings) String

func (*CatalogObjectQuickAmountsSettings) UnmarshalJSON

func (c *CatalogObjectQuickAmountsSettings) UnmarshalJSON(data []byte) error

type CatalogObjectReference

type CatalogObjectReference struct {
	// The ID of the referenced object.
	ObjectID *string `json:"object_id,omitempty" url:"object_id,omitempty"`
	// The version of the object.
	CatalogVersion *int64 `json:"catalog_version,omitempty" url:"catalog_version,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*CatalogObjectReference) GetCatalogVersion

func (c *CatalogObjectReference) GetCatalogVersion() *int64

func (*CatalogObjectReference) GetExtraProperties

func (c *CatalogObjectReference) GetExtraProperties() map[string]interface{}

func (*CatalogObjectReference) GetObjectID

func (c *CatalogObjectReference) GetObjectID() *string

func (*CatalogObjectReference) String

func (c *CatalogObjectReference) String() string

func (*CatalogObjectReference) UnmarshalJSON

func (c *CatalogObjectReference) UnmarshalJSON(data []byte) error

type CatalogObjectResource

type CatalogObjectResource struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectResource) GetAbsentAtLocationIDs

func (c *CatalogObjectResource) GetAbsentAtLocationIDs() []string

func (*CatalogObjectResource) GetCatalogV1IDs

func (c *CatalogObjectResource) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectResource) GetCustomAttributeValues

func (c *CatalogObjectResource) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectResource) GetExtraProperties

func (c *CatalogObjectResource) GetExtraProperties() map[string]interface{}

func (*CatalogObjectResource) GetID

func (c *CatalogObjectResource) GetID() string

func (*CatalogObjectResource) GetImageID

func (c *CatalogObjectResource) GetImageID() *string

func (*CatalogObjectResource) GetIsDeleted

func (c *CatalogObjectResource) GetIsDeleted() *bool

func (*CatalogObjectResource) GetPresentAtAllLocations

func (c *CatalogObjectResource) GetPresentAtAllLocations() *bool

func (*CatalogObjectResource) GetPresentAtLocationIDs

func (c *CatalogObjectResource) GetPresentAtLocationIDs() []string

func (*CatalogObjectResource) GetUpdatedAt

func (c *CatalogObjectResource) GetUpdatedAt() *string

func (*CatalogObjectResource) GetVersion

func (c *CatalogObjectResource) GetVersion() *int64

func (*CatalogObjectResource) String

func (c *CatalogObjectResource) String() string

func (*CatalogObjectResource) UnmarshalJSON

func (c *CatalogObjectResource) UnmarshalJSON(data []byte) error

type CatalogObjectServiceCharge

type CatalogObjectServiceCharge struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectServiceCharge) GetAbsentAtLocationIDs

func (c *CatalogObjectServiceCharge) GetAbsentAtLocationIDs() []string

func (*CatalogObjectServiceCharge) GetCatalogV1IDs

func (c *CatalogObjectServiceCharge) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectServiceCharge) GetCustomAttributeValues

func (c *CatalogObjectServiceCharge) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectServiceCharge) GetExtraProperties

func (c *CatalogObjectServiceCharge) GetExtraProperties() map[string]interface{}

func (*CatalogObjectServiceCharge) GetID

func (*CatalogObjectServiceCharge) GetImageID

func (c *CatalogObjectServiceCharge) GetImageID() *string

func (*CatalogObjectServiceCharge) GetIsDeleted

func (c *CatalogObjectServiceCharge) GetIsDeleted() *bool

func (*CatalogObjectServiceCharge) GetPresentAtAllLocations

func (c *CatalogObjectServiceCharge) GetPresentAtAllLocations() *bool

func (*CatalogObjectServiceCharge) GetPresentAtLocationIDs

func (c *CatalogObjectServiceCharge) GetPresentAtLocationIDs() []string

func (*CatalogObjectServiceCharge) GetUpdatedAt

func (c *CatalogObjectServiceCharge) GetUpdatedAt() *string

func (*CatalogObjectServiceCharge) GetVersion

func (c *CatalogObjectServiceCharge) GetVersion() *int64

func (*CatalogObjectServiceCharge) String

func (c *CatalogObjectServiceCharge) String() string

func (*CatalogObjectServiceCharge) UnmarshalJSON

func (c *CatalogObjectServiceCharge) UnmarshalJSON(data []byte) error

type CatalogObjectSubscriptionPlan

type CatalogObjectSubscriptionPlan struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogSubscriptionPlan`, set for CatalogObjects of type `SUBSCRIPTION_PLAN`.
	SubscriptionPlanData *CatalogSubscriptionPlan `json:"subscription_plan_data,omitempty" url:"subscription_plan_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectSubscriptionPlan) GetAbsentAtLocationIDs

func (c *CatalogObjectSubscriptionPlan) GetAbsentAtLocationIDs() []string

func (*CatalogObjectSubscriptionPlan) GetCatalogV1IDs

func (c *CatalogObjectSubscriptionPlan) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectSubscriptionPlan) GetCustomAttributeValues

func (c *CatalogObjectSubscriptionPlan) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectSubscriptionPlan) GetExtraProperties

func (c *CatalogObjectSubscriptionPlan) GetExtraProperties() map[string]interface{}

func (*CatalogObjectSubscriptionPlan) GetID

func (*CatalogObjectSubscriptionPlan) GetImageID

func (c *CatalogObjectSubscriptionPlan) GetImageID() *string

func (*CatalogObjectSubscriptionPlan) GetIsDeleted

func (c *CatalogObjectSubscriptionPlan) GetIsDeleted() *bool

func (*CatalogObjectSubscriptionPlan) GetPresentAtAllLocations

func (c *CatalogObjectSubscriptionPlan) GetPresentAtAllLocations() *bool

func (*CatalogObjectSubscriptionPlan) GetPresentAtLocationIDs

func (c *CatalogObjectSubscriptionPlan) GetPresentAtLocationIDs() []string

func (*CatalogObjectSubscriptionPlan) GetSubscriptionPlanData

func (c *CatalogObjectSubscriptionPlan) GetSubscriptionPlanData() *CatalogSubscriptionPlan

func (*CatalogObjectSubscriptionPlan) GetUpdatedAt

func (c *CatalogObjectSubscriptionPlan) GetUpdatedAt() *string

func (*CatalogObjectSubscriptionPlan) GetVersion

func (c *CatalogObjectSubscriptionPlan) GetVersion() *int64

func (*CatalogObjectSubscriptionPlan) String

func (*CatalogObjectSubscriptionPlan) UnmarshalJSON

func (c *CatalogObjectSubscriptionPlan) UnmarshalJSON(data []byte) error

type CatalogObjectSubscriptionPlanVariation added in v1.4.0

type CatalogObjectSubscriptionPlanVariation struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogSubscriptionPlanVariation`, set for CatalogObjects of type `SUBSCRIPTION_PLAN_VARIATION`.
	SubscriptionPlanVariationData *CatalogSubscriptionPlanVariation `json:"subscription_plan_variation_data,omitempty" url:"subscription_plan_variation_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectSubscriptionPlanVariation) GetAbsentAtLocationIDs added in v1.4.0

func (c *CatalogObjectSubscriptionPlanVariation) GetAbsentAtLocationIDs() []string

func (*CatalogObjectSubscriptionPlanVariation) GetCatalogV1IDs added in v1.4.0

func (c *CatalogObjectSubscriptionPlanVariation) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectSubscriptionPlanVariation) GetCustomAttributeValues added in v1.4.0

func (*CatalogObjectSubscriptionPlanVariation) GetExtraProperties added in v1.4.0

func (c *CatalogObjectSubscriptionPlanVariation) GetExtraProperties() map[string]interface{}

func (*CatalogObjectSubscriptionPlanVariation) GetID added in v1.4.0

func (*CatalogObjectSubscriptionPlanVariation) GetImageID added in v1.4.0

func (*CatalogObjectSubscriptionPlanVariation) GetIsDeleted added in v1.4.0

func (c *CatalogObjectSubscriptionPlanVariation) GetIsDeleted() *bool

func (*CatalogObjectSubscriptionPlanVariation) GetPresentAtAllLocations added in v1.4.0

func (c *CatalogObjectSubscriptionPlanVariation) GetPresentAtAllLocations() *bool

func (*CatalogObjectSubscriptionPlanVariation) GetPresentAtLocationIDs added in v1.4.0

func (c *CatalogObjectSubscriptionPlanVariation) GetPresentAtLocationIDs() []string

func (*CatalogObjectSubscriptionPlanVariation) GetSubscriptionPlanVariationData added in v1.4.0

func (c *CatalogObjectSubscriptionPlanVariation) GetSubscriptionPlanVariationData() *CatalogSubscriptionPlanVariation

func (*CatalogObjectSubscriptionPlanVariation) GetUpdatedAt added in v1.4.0

func (*CatalogObjectSubscriptionPlanVariation) GetVersion added in v1.4.0

func (*CatalogObjectSubscriptionPlanVariation) String added in v1.4.0

func (*CatalogObjectSubscriptionPlanVariation) UnmarshalJSON added in v1.4.0

func (c *CatalogObjectSubscriptionPlanVariation) UnmarshalJSON(data []byte) error

type CatalogObjectSubscriptionProduct

type CatalogObjectSubscriptionProduct struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectSubscriptionProduct) GetAbsentAtLocationIDs

func (c *CatalogObjectSubscriptionProduct) GetAbsentAtLocationIDs() []string

func (*CatalogObjectSubscriptionProduct) GetCatalogV1IDs

func (c *CatalogObjectSubscriptionProduct) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectSubscriptionProduct) GetCustomAttributeValues

func (c *CatalogObjectSubscriptionProduct) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectSubscriptionProduct) GetExtraProperties

func (c *CatalogObjectSubscriptionProduct) GetExtraProperties() map[string]interface{}

func (*CatalogObjectSubscriptionProduct) GetID

func (*CatalogObjectSubscriptionProduct) GetImageID

func (c *CatalogObjectSubscriptionProduct) GetImageID() *string

func (*CatalogObjectSubscriptionProduct) GetIsDeleted

func (c *CatalogObjectSubscriptionProduct) GetIsDeleted() *bool

func (*CatalogObjectSubscriptionProduct) GetPresentAtAllLocations

func (c *CatalogObjectSubscriptionProduct) GetPresentAtAllLocations() *bool

func (*CatalogObjectSubscriptionProduct) GetPresentAtLocationIDs

func (c *CatalogObjectSubscriptionProduct) GetPresentAtLocationIDs() []string

func (*CatalogObjectSubscriptionProduct) GetUpdatedAt

func (c *CatalogObjectSubscriptionProduct) GetUpdatedAt() *string

func (*CatalogObjectSubscriptionProduct) GetVersion

func (c *CatalogObjectSubscriptionProduct) GetVersion() *int64

func (*CatalogObjectSubscriptionProduct) String

func (*CatalogObjectSubscriptionProduct) UnmarshalJSON

func (c *CatalogObjectSubscriptionProduct) UnmarshalJSON(data []byte) error

type CatalogObjectTax

type CatalogObjectTax struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogTax`, set for CatalogObjects of type `TAX`.
	TaxData *CatalogTax `json:"tax_data,omitempty" url:"tax_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectTax) GetAbsentAtLocationIDs

func (c *CatalogObjectTax) GetAbsentAtLocationIDs() []string

func (*CatalogObjectTax) GetCatalogV1IDs

func (c *CatalogObjectTax) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectTax) GetCustomAttributeValues

func (c *CatalogObjectTax) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectTax) GetExtraProperties

func (c *CatalogObjectTax) GetExtraProperties() map[string]interface{}

func (*CatalogObjectTax) GetID

func (c *CatalogObjectTax) GetID() string

func (*CatalogObjectTax) GetImageID

func (c *CatalogObjectTax) GetImageID() *string

func (*CatalogObjectTax) GetIsDeleted

func (c *CatalogObjectTax) GetIsDeleted() *bool

func (*CatalogObjectTax) GetPresentAtAllLocations

func (c *CatalogObjectTax) GetPresentAtAllLocations() *bool

func (*CatalogObjectTax) GetPresentAtLocationIDs

func (c *CatalogObjectTax) GetPresentAtLocationIDs() []string

func (*CatalogObjectTax) GetTaxData

func (c *CatalogObjectTax) GetTaxData() *CatalogTax

func (*CatalogObjectTax) GetUpdatedAt

func (c *CatalogObjectTax) GetUpdatedAt() *string

func (*CatalogObjectTax) GetVersion

func (c *CatalogObjectTax) GetVersion() *int64

func (*CatalogObjectTax) String

func (c *CatalogObjectTax) String() string

func (*CatalogObjectTax) UnmarshalJSON

func (c *CatalogObjectTax) UnmarshalJSON(data []byte) error

type CatalogObjectTaxExemption

type CatalogObjectTaxExemption struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectTaxExemption) GetAbsentAtLocationIDs

func (c *CatalogObjectTaxExemption) GetAbsentAtLocationIDs() []string

func (*CatalogObjectTaxExemption) GetCatalogV1IDs

func (c *CatalogObjectTaxExemption) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectTaxExemption) GetCustomAttributeValues

func (c *CatalogObjectTaxExemption) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectTaxExemption) GetExtraProperties

func (c *CatalogObjectTaxExemption) GetExtraProperties() map[string]interface{}

func (*CatalogObjectTaxExemption) GetID

func (c *CatalogObjectTaxExemption) GetID() string

func (*CatalogObjectTaxExemption) GetImageID

func (c *CatalogObjectTaxExemption) GetImageID() *string

func (*CatalogObjectTaxExemption) GetIsDeleted

func (c *CatalogObjectTaxExemption) GetIsDeleted() *bool

func (*CatalogObjectTaxExemption) GetPresentAtAllLocations

func (c *CatalogObjectTaxExemption) GetPresentAtAllLocations() *bool

func (*CatalogObjectTaxExemption) GetPresentAtLocationIDs

func (c *CatalogObjectTaxExemption) GetPresentAtLocationIDs() []string

func (*CatalogObjectTaxExemption) GetUpdatedAt

func (c *CatalogObjectTaxExemption) GetUpdatedAt() *string

func (*CatalogObjectTaxExemption) GetVersion

func (c *CatalogObjectTaxExemption) GetVersion() *int64

func (*CatalogObjectTaxExemption) String

func (c *CatalogObjectTaxExemption) String() string

func (*CatalogObjectTaxExemption) UnmarshalJSON

func (c *CatalogObjectTaxExemption) UnmarshalJSON(data []byte) error

type CatalogObjectTimePeriod

type CatalogObjectTimePeriod struct {
	// 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.
	ID string `json:"id" url:"id"`
	// 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" url:"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" url:"version,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" url:"is_deleted,omitempty"`
	// A map (key-value pairs) of application-defined custom attribute values. The value of a key-value pair
	// is a [CatalogCustomAttributeValue](entity:CatalogCustomAttributeValue) object. The key is the `key` attribute
	// value defined in the associated [CatalogCustomAttributeDefinition](entity: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 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" url:"custom_attribute_values,omitempty"`
	// 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,omitempty" url:"catalog_v1_ids,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" url:"present_at_all_locations,omitempty"`
	// A list of locations where the object is present, even if `present_at_all_locations` is `false`.
	// This can include locations that are deactivated.
	PresentAtLocationIDs []string `json:"present_at_location_ids,omitempty" url:"present_at_location_ids,omitempty"`
	// A list of locations where the object is not present, even if `present_at_all_locations` is `true`.
	// This can include locations that are deactivated.
	AbsentAtLocationIDs []string `json:"absent_at_location_ids,omitempty" url:"absent_at_location_ids,omitempty"`
	// Identifies the `CatalogImage` attached to this `CatalogObject`.
	ImageID *string `json:"image_id,omitempty" url:"image_id,omitempty"`
	// Structured data for a `CatalogTimePeriod`, set for CatalogObjects of type `TIME_PERIOD`.
	TimePeriodData *CatalogTimePeriod `json:"time_period_data,omitempty" url:"time_period_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CatalogObjectTimePeriod) GetAbsentAtLocationIDs

func (c *CatalogObjectTimePeriod) GetAbsentAtLocationIDs() []string

func (*CatalogObjectTimePeriod) GetCatalogV1IDs

func (c *CatalogObjectTimePeriod) GetCatalogV1IDs() []*CatalogV1ID

func (*CatalogObjectTimePeriod) GetCustomAttributeValues

func (c *CatalogObjectTimePeriod) GetCustomAttributeValues() map[string]*CatalogCustomAttributeValue

func (*CatalogObjectTimePeriod) GetExtraProperties

func (c *CatalogObjectTimePeriod) GetExtraProperties() map[string]interface{}

func (*CatalogObjectTimePeriod) GetID

func (c *CatalogObjectTimePeriod) GetID() string

func (*CatalogObjectTimePeriod) GetImageID

func (c *CatalogObjectTimePeriod) GetImageID() *string

func (*CatalogObjectTimePeriod) GetIsDeleted

func (c *CatalogObjectTimePeriod) GetIsDeleted() *bool

func (*CatalogObjectTimePeriod) GetPresentAtAllLocations

func (c *CatalogObjectTimePeriod) GetPresentAtAllLocations() *bool

func (*CatalogObjectTimePeriod) GetPresentAtLocationIDs

func (c *CatalogObjectTimePeriod) GetPresentAtLocationIDs() []string

func (*CatalogObjectTimePeriod) GetTimePeriodData

func (c *CatalogObjectTimePeriod) GetTimePeriodData() *CatalogTimePeriod

func (*CatalogObjectTimePeriod) GetUpdatedAt

func (c *CatalogObjectTimePeriod) GetUpdatedAt() *string

func (*CatalogObjectTimePeriod) GetVersion

func (c *CatalogObjectTimePeriod) GetVersion() *int64

func (*CatalogObjectTimePeriod) String

func (c *CatalogObjectTimePeriod) String() string

func (*CatalogObjectTimePeriod) UnmarshalJSON

func (c *CatalogObjectTimePeriod) UnmarshalJSON(data []byte) error

type CatalogObjectType

type CatalogObjectType string

Possible types of CatalogObjects returned from the catalog, each containing type-specific properties in the `*_data` field corresponding to the specified object type.

const (
	CatalogObjectTypeItem                      CatalogObjectType = "ITEM"
	CatalogObjectTypeImage                     CatalogObjectType = "IMAGE"
	CatalogObjectTypeCategory                  CatalogObjectType = "CATEGORY"
	CatalogObjectTypeItemVariation             CatalogObjectType = "ITEM_VARIATION"
	CatalogObjectTypeTax                       CatalogObjectType = "TAX"
	CatalogObjectTypeDiscount                  CatalogObjectType = "DISCOUNT"
	CatalogObjectTypeModifierList              CatalogObjectType = "MODIFIER_LIST"
	CatalogObjectTypeModifier                  CatalogObjectType = "MODIFIER"
	CatalogObjectTypePricingRule               CatalogObjectType = "PRICING_RULE"
	CatalogObjectTypeProductSet                CatalogObjectType = "PRODUCT_SET"
	CatalogObjectTypeTimePeriod                CatalogObjectType = "TIME_PERIOD"
	CatalogObjectTypeMeasurementUnit           CatalogObjectType = "MEASUREMENT_UNIT"
	CatalogObjectTypeSubscriptionPlanVariation CatalogObjectType = "SUBSCRIPTION_PLAN_VARIATION"
	CatalogObjectTypeItemOption                CatalogObjectType = "ITEM_OPTION"
	CatalogObjectTypeItemOptionVal             CatalogObjectType = "ITEM_OPTION_VAL"
	CatalogObjectTypeCustomAttributeDefinition CatalogObjectType = "CUSTOM_ATTRIBUTE_DEFINITION"
	CatalogObjectTypeQuickAmountsSettings      CatalogObjectType = "QUICK_AMOUNTS_SETTINGS"
	CatalogObjectTypeSubscriptionPlan          CatalogObjectType = "SUBSCRIPTION_PLAN"
	CatalogObjectTypeAvailabilityPeriod        CatalogObjectType = "AVAILABILITY_PERIOD"
)

func NewCatalogObjectTypeFromString

func NewCatalogObjectTypeFromString(s string) (CatalogObjectType, error)

func (CatalogObjectType) Ptr

type CatalogObjectVisitor

type CatalogObjectVisitor interface {
	VisitItem(*CatalogObjectItem) error
	VisitImage(*CatalogObjectImage) error
	VisitCategory(*CatalogObjectCategory) error
	VisitItemVariation(*CatalogObjectItemVariation) error
	VisitTax(*CatalogObjectTax) error
	VisitDiscount(*CatalogObjectDiscount) error
	VisitModifierList(*CatalogObjectModifierList) error
	VisitModifier(*CatalogObjectModifier) error
	VisitDiningOption(*CatalogObjectDiningOption) error
	VisitTaxExemption(*CatalogObjectTaxExemption) error
	VisitServiceCharge(*CatalogObjectServiceCharge) error
	VisitPricingRule(*CatalogObjectPricingRule) error
	VisitProductSet(*CatalogObjectProductSet) error
	VisitTimePeriod(*CatalogObjectTimePeriod) error
	VisitMeasurementUnit(*CatalogObjectMeasurementUnit) error
	VisitSubscriptionPlan(*CatalogObjectSubscriptionPlan) error
	VisitItemOption(*CatalogObjectItemOption) error
	VisitItemOptionVal(*CatalogObjectItemOptionValue) error
	VisitCustomAttributeDefinition(*CatalogObjectCustomAttributeDefinition) error
	VisitQuickAmountsSettings(*CatalogObjectQuickAmountsSettings) error
	VisitComponent(*CatalogObjectComponent) error
	VisitComposition(*CatalogObjectComposition) error
	VisitResource(*CatalogObjectResource) error
	VisitCheckoutLink(*CatalogObjectCheckoutLink) error
	VisitAddress(*CatalogObjectAddress) error
	VisitSubscriptionProduct(*CatalogObjectSubscriptionProduct) error
	VisitSubscriptionPlanVariation(*CatalogObjectSubscriptionPlanVariation) error
	VisitAvailabilityPeriod(*CatalogObjectAvailabilityPeriod) error
}

type CatalogPricingRule

type CatalogPricingRule struct {
	// User-defined name for the pricing rule. For example, "Buy one get one
	// free" or "10% off".
	Name *string `json:"name,omitempty" url:"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,omitempty" url:"time_period_ids,omitempty"`
	// Unique ID for the `CatalogDiscount` to take off
	// the price of all matched items.
	DiscountID *string `json:"discount_id,omitempty" url:"discount_id,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" url:"match_products_id,omitempty"`
	// __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" url:"apply_products_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" url:"exclude_products_id,omitempty"`
	// 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" url:"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" url:"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" url:"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" url:"valid_until_local_time,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 *ExcludeStrategy `json:"exclude_strategy,omitempty" url:"exclude_strategy,omitempty"`
	// The minimum order subtotal (before discounts or taxes are applied)
	// that must be met before this rule may be applied.
	MinimumOrderSubtotalMoney *Money `json:"minimum_order_subtotal_money,omitempty" url:"minimum_order_subtotal_money,omitempty"`
	// A list of IDs of customer groups, the members of which are eligible for discounts specified in this pricing rule.
	// Notice that a group ID is generated by the Customers API.
	// If this field is not set, the specified discount applies to matched products sold to anyone whether the buyer
	// has a customer profile created or not. If this `customer_group_ids_any` field is set, the specified discount
	// applies only to matched products sold to customers belonging to the specified customer groups.
	CustomerGroupIDsAny []string `json:"customer_group_ids_any,omitempty" url:"customer_group_ids_any,omitempty"`
	// contains filtered or unexported fields
}

Defines how discounts are automatically applied to a set of items that match the pricing rule during the active time period.

func (*CatalogPricingRule) GetApplyProductsID

func (c *CatalogPricingRule) GetApplyProductsID() *string

func (*CatalogPricingRule) GetCustomerGroupIDsAny

func (c *CatalogPricingRule) GetCustomerGroupIDsAny() []string

func (*CatalogPricingRule) GetDiscountID

func (c *CatalogPricingRule) GetDiscountID() *string

func (*CatalogPricingRule) GetExcludeProductsID

func (c *CatalogPricingRule) GetExcludeProductsID() *string

func (*CatalogPricingRule) GetExcludeStrategy

func (c *CatalogPricingRule) GetExcludeStrategy() *ExcludeStrategy

func (*CatalogPricingRule) GetExtraProperties

func (c *CatalogPricingRule) GetExtraProperties() map[string]interface{}

func (*CatalogPricingRule) GetMatchProductsID

func (c *CatalogPricingRule) GetMatchProductsID() *string

func (*CatalogPricingRule) GetMinimumOrderSubtotalMoney

func (c *CatalogPricingRule) GetMinimumOrderSubtotalMoney() *Money

func (*CatalogPricingRule) GetName

func (c *CatalogPricingRule) GetName() *string

func (*CatalogPricingRule) GetTimePeriodIDs

func (c *CatalogPricingRule) GetTimePeriodIDs() []string

func (*CatalogPricingRule) GetValidFromDate

func (c *CatalogPricingRule) GetValidFromDate() *string

func (*CatalogPricingRule) GetValidFromLocalTime

func (c *CatalogPricingRule) GetValidFromLocalTime() *string

func (*CatalogPricingRule) GetValidUntilDate

func (c *CatalogPricingRule) GetValidUntilDate() *string

func (*CatalogPricingRule) GetValidUntilLocalTime

func (c *CatalogPricingRule) GetValidUntilLocalTime() *string

func (*CatalogPricingRule) String

func (c *CatalogPricingRule) String() string

func (*CatalogPricingRule) UnmarshalJSON

func (c *CatalogPricingRule) UnmarshalJSON(data []byte) error

type CatalogPricingType

type CatalogPricingType string

Indicates whether the price of a CatalogItemVariation should be entered manually at the time of sale.

const (
	CatalogPricingTypeFixedPricing    CatalogPricingType = "FIXED_PRICING"
	CatalogPricingTypeVariablePricing CatalogPricingType = "VARIABLE_PRICING"
)

func NewCatalogPricingTypeFromString

func NewCatalogPricingTypeFromString(s string) (CatalogPricingType, error)

func (CatalogPricingType) Ptr

type CatalogProductSet

type CatalogProductSet struct {
	// User-defined name for the product set. For example, "Clearance Items"
	// or "Winter Sale Items".
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	//	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,omitempty" url:"product_ids_any,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,omitempty" url:"product_ids_all,omitempty"`
	// 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" url:"quantity_exact,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" url:"quantity_min,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" url:"quantity_max,omitempty"`
	// 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" url:"all_products,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*CatalogProductSet) GetAllProducts

func (c *CatalogProductSet) GetAllProducts() *bool

func (*CatalogProductSet) GetExtraProperties

func (c *CatalogProductSet) GetExtraProperties() map[string]interface{}

func (*CatalogProductSet) GetName

func (c *CatalogProductSet) GetName() *string

func (*CatalogProductSet) GetProductIDsAll

func (c *CatalogProductSet) GetProductIDsAll() []string

func (*CatalogProductSet) GetProductIDsAny

func (c *CatalogProductSet) GetProductIDsAny() []string

func (*CatalogProductSet) GetQuantityExact

func (c *CatalogProductSet) GetQuantityExact() *int64

func (*CatalogProductSet) GetQuantityMax

func (c *CatalogProductSet) GetQuantityMax() *int64

func (*CatalogProductSet) GetQuantityMin

func (c *CatalogProductSet) GetQuantityMin() *int64

func (*CatalogProductSet) String

func (c *CatalogProductSet) String() string

func (*CatalogProductSet) UnmarshalJSON

func (c *CatalogProductSet) UnmarshalJSON(data []byte) error

type CatalogQuery

type CatalogQuery struct {
	// A query expression to sort returned query result by the given attribute.
	SortedAttributeQuery *CatalogQuerySortedAttribute `json:"sorted_attribute_query,omitempty" url:"sorted_attribute_query,omitempty"`
	// 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" url:"exact_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" url:"set_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" url:"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" url:"range_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" url:"text_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" url:"items_for_tax_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" url:"items_for_modifier_list_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" url:"items_for_item_options_query,omitempty"`
	// A query expression to return item variations (of the [CatalogItemVariation](entity:CatalogItemVariation) type) that
	// contain all of the specified `CatalogItemOption` IDs.
	ItemVariationsForItemOptionValuesQuery *CatalogQueryItemVariationsForItemOptionValues `json:"item_variations_for_item_option_values_query,omitempty" url:"item_variations_for_item_option_values_query,omitempty"`
	// contains filtered or unexported fields
}

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](api-endpoint:Catalog-SearchCatalogObjects). Any combination of the following types may be used together: - [exact_query](entity:CatalogQueryExact) - [prefix_query](entity:CatalogQueryPrefix) - [range_query](entity:CatalogQueryRange) - [sorted_attribute_query](entity:CatalogQuerySortedAttribute) - [text_query](entity:CatalogQueryText)

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(entity:CatalogItem) objects by searchable attributes, you can use the `"name"`, `"description"`, or `"abbreviation"` attribute in an applicable query filter.

func (*CatalogQuery) GetExactQuery

func (c *CatalogQuery) GetExactQuery() *CatalogQueryExact

func (*CatalogQuery) GetExtraProperties

func (c *CatalogQuery) GetExtraProperties() map[string]interface{}

func (*CatalogQuery) GetItemVariationsForItemOptionValuesQuery

func (c *CatalogQuery) GetItemVariationsForItemOptionValuesQuery() *CatalogQueryItemVariationsForItemOptionValues

func (*CatalogQuery) GetItemsForItemOptionsQuery

func (c *CatalogQuery) GetItemsForItemOptionsQuery() *CatalogQueryItemsForItemOptions

func (*CatalogQuery) GetItemsForModifierListQuery

func (c *CatalogQuery) GetItemsForModifierListQuery() *CatalogQueryItemsForModifierList

func (*CatalogQuery) GetItemsForTaxQuery

func (c *CatalogQuery) GetItemsForTaxQuery() *CatalogQueryItemsForTax

func (*CatalogQuery) GetPrefixQuery

func (c *CatalogQuery) GetPrefixQuery() *CatalogQueryPrefix

func (*CatalogQuery) GetRangeQuery

func (c *CatalogQuery) GetRangeQuery() *CatalogQueryRange

func (*CatalogQuery) GetSetQuery

func (c *CatalogQuery) GetSetQuery() *CatalogQuerySet

func (*CatalogQuery) GetSortedAttributeQuery

func (c *CatalogQuery) GetSortedAttributeQuery() *CatalogQuerySortedAttribute

func (*CatalogQuery) GetTextQuery

func (c *CatalogQuery) GetTextQuery() *CatalogQueryText

func (*CatalogQuery) String

func (c *CatalogQuery) String() string

func (*CatalogQuery) UnmarshalJSON

func (c *CatalogQuery) UnmarshalJSON(data []byte) error

type CatalogQueryExact

type CatalogQueryExact struct {
	// The name of the attribute to be searched. Matching of the attribute name is exact.
	AttributeName string `json:"attribute_name" url:"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.
	AttributeValue string `json:"attribute_value" url:"attribute_value"`
	// contains filtered or unexported fields
}

The query filter to return the search result by exact match of the specified attribute name and value.

func (*CatalogQueryExact) GetAttributeName

func (c *CatalogQueryExact) GetAttributeName() string

func (*CatalogQueryExact) GetAttributeValue

func (c *CatalogQueryExact) GetAttributeValue() string

func (*CatalogQueryExact) GetExtraProperties

func (c *CatalogQueryExact) GetExtraProperties() map[string]interface{}

func (*CatalogQueryExact) String

func (c *CatalogQueryExact) String() string

func (*CatalogQueryExact) UnmarshalJSON

func (c *CatalogQueryExact) UnmarshalJSON(data []byte) error

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,omitempty" url:"item_option_value_ids,omitempty"`
	// contains filtered or unexported fields
}

The query filter to return the item variations containing the specified item option value IDs.

func (*CatalogQueryItemVariationsForItemOptionValues) GetExtraProperties

func (c *CatalogQueryItemVariationsForItemOptionValues) GetExtraProperties() map[string]interface{}

func (*CatalogQueryItemVariationsForItemOptionValues) GetItemOptionValueIDs

func (c *CatalogQueryItemVariationsForItemOptionValues) GetItemOptionValueIDs() []string

func (*CatalogQueryItemVariationsForItemOptionValues) String

func (*CatalogQueryItemVariationsForItemOptionValues) UnmarshalJSON

func (c *CatalogQueryItemVariationsForItemOptionValues) UnmarshalJSON(data []byte) error

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,omitempty" url:"item_option_ids,omitempty"`
	// contains filtered or unexported fields
}

The query filter to return the items containing the specified item option IDs.

func (*CatalogQueryItemsForItemOptions) GetExtraProperties

func (c *CatalogQueryItemsForItemOptions) GetExtraProperties() map[string]interface{}

func (*CatalogQueryItemsForItemOptions) GetItemOptionIDs

func (c *CatalogQueryItemsForItemOptions) GetItemOptionIDs() []string

func (*CatalogQueryItemsForItemOptions) String

func (*CatalogQueryItemsForItemOptions) UnmarshalJSON

func (c *CatalogQueryItemsForItemOptions) UnmarshalJSON(data []byte) error

type CatalogQueryItemsForModifierList

type CatalogQueryItemsForModifierList struct {
	// A set of `CatalogModifierList` IDs to be used to find associated `CatalogItem`s.
	ModifierListIDs []string `json:"modifier_list_ids,omitempty" url:"modifier_list_ids,omitempty"`
	// contains filtered or unexported fields
}

The query filter to return the items containing the specified modifier list IDs.

func (*CatalogQueryItemsForModifierList) GetExtraProperties

func (c *CatalogQueryItemsForModifierList) GetExtraProperties() map[string]interface{}

func (*CatalogQueryItemsForModifierList) GetModifierListIDs

func (c *CatalogQueryItemsForModifierList) GetModifierListIDs() []string

func (*CatalogQueryItemsForModifierList) String

func (*CatalogQueryItemsForModifierList) UnmarshalJSON

func (c *CatalogQueryItemsForModifierList) UnmarshalJSON(data []byte) error

type CatalogQueryItemsForTax

type CatalogQueryItemsForTax struct {
	// A set of `CatalogTax` IDs to be used to find associated `CatalogItem`s.
	TaxIDs []string `json:"tax_ids,omitempty" url:"tax_ids,omitempty"`
	// contains filtered or unexported fields
}

The query filter to return the items containing the specified tax IDs.

func (*CatalogQueryItemsForTax) GetExtraProperties

func (c *CatalogQueryItemsForTax) GetExtraProperties() map[string]interface{}

func (*CatalogQueryItemsForTax) GetTaxIDs

func (c *CatalogQueryItemsForTax) GetTaxIDs() []string

func (*CatalogQueryItemsForTax) String

func (c *CatalogQueryItemsForTax) String() string

func (*CatalogQueryItemsForTax) UnmarshalJSON

func (c *CatalogQueryItemsForTax) UnmarshalJSON(data []byte) error

type CatalogQueryPrefix

type CatalogQueryPrefix struct {
	// The name of the attribute to be searched.
	AttributeName string `json:"attribute_name" url:"attribute_name"`
	// The desired prefix of the search attribute value.
	AttributePrefix string `json:"attribute_prefix" url:"attribute_prefix"`
	// contains filtered or unexported fields
}

The query filter to return the search result whose named attribute values are prefixed by the specified attribute value.

func (*CatalogQueryPrefix) GetAttributeName

func (c *CatalogQueryPrefix) GetAttributeName() string

func (*CatalogQueryPrefix) GetAttributePrefix

func (c *CatalogQueryPrefix) GetAttributePrefix() string

func (*CatalogQueryPrefix) GetExtraProperties

func (c *CatalogQueryPrefix) GetExtraProperties() map[string]interface{}

func (*CatalogQueryPrefix) String

func (c *CatalogQueryPrefix) String() string

func (*CatalogQueryPrefix) UnmarshalJSON

func (c *CatalogQueryPrefix) UnmarshalJSON(data []byte) error

type CatalogQueryRange

type CatalogQueryRange struct {
	// The name of the attribute to be searched.
	AttributeName string `json:"attribute_name" url:"attribute_name"`
	// The desired minimum value for the search attribute (inclusive).
	AttributeMinValue *int64 `json:"attribute_min_value,omitempty" url:"attribute_min_value,omitempty"`
	// The desired maximum value for the search attribute (inclusive).
	AttributeMaxValue *int64 `json:"attribute_max_value,omitempty" url:"attribute_max_value,omitempty"`
	// contains filtered or unexported fields
}

The query filter to return the search result whose named attribute values fall between the specified range.

func (*CatalogQueryRange) GetAttributeMaxValue

func (c *CatalogQueryRange) GetAttributeMaxValue() *int64

func (*CatalogQueryRange) GetAttributeMinValue

func (c *CatalogQueryRange) GetAttributeMinValue() *int64

func (*CatalogQueryRange) GetAttributeName

func (c *CatalogQueryRange) GetAttributeName() string

func (*CatalogQueryRange) GetExtraProperties

func (c *CatalogQueryRange) GetExtraProperties() map[string]interface{}

func (*CatalogQueryRange) String

func (c *CatalogQueryRange) String() string

func (*CatalogQueryRange) UnmarshalJSON

func (c *CatalogQueryRange) UnmarshalJSON(data []byte) error

type CatalogQuerySet

type CatalogQuerySet struct {
	// The name of the attribute to be searched. Matching of the attribute name is exact.
	AttributeName string `json:"attribute_name" url:"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.
	AttributeValues []string `json:"attribute_values,omitempty" url:"attribute_values,omitempty"`
	// contains filtered or unexported fields
}

The query filter to return the search result(s) by exact match of the specified `attribute_name` and any of the `attribute_values`.

func (*CatalogQuerySet) GetAttributeName

func (c *CatalogQuerySet) GetAttributeName() string

func (*CatalogQuerySet) GetAttributeValues

func (c *CatalogQuerySet) GetAttributeValues() []string

func (*CatalogQuerySet) GetExtraProperties

func (c *CatalogQuerySet) GetExtraProperties() map[string]interface{}

func (*CatalogQuerySet) String

func (c *CatalogQuerySet) String() string

func (*CatalogQuerySet) UnmarshalJSON

func (c *CatalogQuerySet) UnmarshalJSON(data []byte) error

type CatalogQuerySortedAttribute

type CatalogQuerySortedAttribute struct {
	// The attribute whose value is used as the sort key.
	AttributeName string `json:"attribute_name" url:"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" url:"initial_attribute_value,omitempty"`
	// The desired sort order, `"ASC"` (ascending) or `"DESC"` (descending).
	// See [SortOrder](#type-sortorder) for possible values
	SortOrder *SortOrder `json:"sort_order,omitempty" url:"sort_order,omitempty"`
	// contains filtered or unexported fields
}

The query expression to specify the key to sort search results.

func (*CatalogQuerySortedAttribute) GetAttributeName

func (c *CatalogQuerySortedAttribute) GetAttributeName() string

func (*CatalogQuerySortedAttribute) GetExtraProperties

func (c *CatalogQuerySortedAttribute) GetExtraProperties() map[string]interface{}

func (*CatalogQuerySortedAttribute) GetInitialAttributeValue

func (c *CatalogQuerySortedAttribute) GetInitialAttributeValue() *string

func (*CatalogQuerySortedAttribute) GetSortOrder

func (c *CatalogQuerySortedAttribute) GetSortOrder() *SortOrder

func (*CatalogQuerySortedAttribute) String

func (c *CatalogQuerySortedAttribute) String() string

func (*CatalogQuerySortedAttribute) UnmarshalJSON

func (c *CatalogQuerySortedAttribute) UnmarshalJSON(data []byte) error

type CatalogQueryText

type CatalogQueryText struct {
	// A list of 1, 2, or 3 search keywords. Keywords with fewer than 3 alphanumeric characters are ignored.
	Keywords []string `json:"keywords,omitempty" url:"keywords,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*CatalogQueryText) GetExtraProperties

func (c *CatalogQueryText) GetExtraProperties() map[string]interface{}

func (*CatalogQueryText) GetKeywords

func (c *CatalogQueryText) GetKeywords() []string

func (*CatalogQueryText) String

func (c *CatalogQueryText) String() string

func (*CatalogQueryText) UnmarshalJSON

func (c *CatalogQueryText) UnmarshalJSON(data []byte) error

type CatalogQuickAmount

type CatalogQuickAmount struct {
	// Represents the type of the Quick Amount.
	// See [CatalogQuickAmountType](#type-catalogquickamounttype) for possible values
	Type CatalogQuickAmountType `json:"type" url:"type"`
	// Represents the actual amount of the Quick Amount with Money type.
	Amount *Money `json:"amount,omitempty" url:"amount,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" url:"score,omitempty"`
	// The order in which this Quick Amount should be displayed.
	Ordinal *int64 `json:"ordinal,omitempty" url:"ordinal,omitempty"`
	// contains filtered or unexported fields
}

Represents a Quick Amount in the Catalog.

func (*CatalogQuickAmount) GetAmount

func (c *CatalogQuickAmount) GetAmount() *Money

func (*CatalogQuickAmount) GetExtraProperties

func (c *CatalogQuickAmount) GetExtraProperties() map[string]interface{}

func (*CatalogQuickAmount) GetOrdinal

func (c *CatalogQuickAmount) GetOrdinal() *int64

func (*CatalogQuickAmount) GetScore

func (c *CatalogQuickAmount) GetScore() *int64

func (*CatalogQuickAmount) GetType

func (*CatalogQuickAmount) String

func (c *CatalogQuickAmount) String() string

func (*CatalogQuickAmount) UnmarshalJSON

func (c *CatalogQuickAmount) UnmarshalJSON(data []byte) error

type CatalogQuickAmountType

type CatalogQuickAmountType string

Determines the type of a specific Quick Amount.

const (
	CatalogQuickAmountTypeQuickAmountTypeManual CatalogQuickAmountType = "QUICK_AMOUNT_TYPE_MANUAL"
	CatalogQuickAmountTypeQuickAmountTypeAuto   CatalogQuickAmountType = "QUICK_AMOUNT_TYPE_AUTO"
)

func NewCatalogQuickAmountTypeFromString

func NewCatalogQuickAmountTypeFromString(s string) (CatalogQuickAmountType, error)

func (CatalogQuickAmountType) Ptr

type CatalogQuickAmountsSettings

type CatalogQuickAmountsSettings struct {
	// Represents the option seller currently uses on Quick Amounts.
	// See [CatalogQuickAmountsSettingsOption](#type-catalogquickamountssettingsoption) for possible values
	Option CatalogQuickAmountsSettingsOption `json:"option" url:"option"`
	// 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" url:"eligible_for_auto_amounts,omitempty"`
	// Represents a set of Quick Amounts at this location.
	Amounts []*CatalogQuickAmount `json:"amounts,omitempty" url:"amounts,omitempty"`
	// contains filtered or unexported fields
}

A parent Catalog Object model represents a set of Quick Amounts and the settings control the amounts.

func (*CatalogQuickAmountsSettings) GetAmounts

func (*CatalogQuickAmountsSettings) GetEligibleForAutoAmounts

func (c *CatalogQuickAmountsSettings) GetEligibleForAutoAmounts() *bool

func (*CatalogQuickAmountsSettings) GetExtraProperties

func (c *CatalogQuickAmountsSettings) GetExtraProperties() map[string]interface{}

func (*CatalogQuickAmountsSettings) GetOption

func (*CatalogQuickAmountsSettings) String

func (c *CatalogQuickAmountsSettings) String() string

func (*CatalogQuickAmountsSettings) UnmarshalJSON

func (c *CatalogQuickAmountsSettings) UnmarshalJSON(data []byte) error

type CatalogQuickAmountsSettingsOption

type CatalogQuickAmountsSettingsOption string

Determines a seller's option on Quick Amounts feature.

const (
	CatalogQuickAmountsSettingsOptionDisabled CatalogQuickAmountsSettingsOption = "DISABLED"
	CatalogQuickAmountsSettingsOptionManual   CatalogQuickAmountsSettingsOption = "MANUAL"
	CatalogQuickAmountsSettingsOptionAuto     CatalogQuickAmountsSettingsOption = "AUTO"
)

func NewCatalogQuickAmountsSettingsOptionFromString

func NewCatalogQuickAmountsSettingsOptionFromString(s string) (CatalogQuickAmountsSettingsOption, error)

func (CatalogQuickAmountsSettingsOption) Ptr

type CatalogStockConversion

type CatalogStockConversion struct {
	// References to the stockable [CatalogItemVariation](entity:CatalogItemVariation)
	// for this stock conversion. Selling, receiving or recounting the non-stockable `CatalogItemVariation`
	// defined with a stock conversion results in adjustments of this stockable `CatalogItemVariation`.
	// This immutable field must reference a stockable `CatalogItemVariation`
	// that shares the parent [CatalogItem](entity:CatalogItem) of the converted `CatalogItemVariation.`
	StockableItemVariationID string `json:"stockable_item_variation_id" url:"stockable_item_variation_id"`
	// The quantity of the stockable item variation (as identified by `stockable_item_variation_id`)
	// equivalent to the non-stockable item variation quantity (as specified in `nonstockable_quantity`)
	// as defined by this stock conversion.  It accepts a decimal number in a string format that can take
	// up to 10 digits before the decimal point and up to 5 digits after the decimal point.
	StockableQuantity string `json:"stockable_quantity" url:"stockable_quantity"`
	// The converted equivalent quantity of the non-stockable [CatalogItemVariation](entity:CatalogItemVariation)
	// in its measurement unit. The `stockable_quantity` value and this `nonstockable_quantity` value together
	// define the conversion ratio between stockable item variation and the non-stockable item variation.
	// It accepts a decimal number in a string format that can take up to 10 digits before the decimal point
	// and up to 5 digits after the decimal point.
	NonstockableQuantity string `json:"nonstockable_quantity" url:"nonstockable_quantity"`
	// contains filtered or unexported fields
}

Represents the rule of conversion between a stockable CatalogItemVariation(entity:CatalogItemVariation) and a non-stockable sell-by or receive-by `CatalogItemVariation` that share the same underlying stock.

func (*CatalogStockConversion) GetExtraProperties

func (c *CatalogStockConversion) GetExtraProperties() map[string]interface{}

func (*CatalogStockConversion) GetNonstockableQuantity

func (c *CatalogStockConversion) GetNonstockableQuantity() string

func (*CatalogStockConversion) GetStockableItemVariationID

func (c *CatalogStockConversion) GetStockableItemVariationID() string

func (*CatalogStockConversion) GetStockableQuantity

func (c *CatalogStockConversion) GetStockableQuantity() string

func (*CatalogStockConversion) String

func (c *CatalogStockConversion) String() string

func (*CatalogStockConversion) UnmarshalJSON

func (c *CatalogStockConversion) UnmarshalJSON(data []byte) error

type CatalogSubscriptionPlan

type CatalogSubscriptionPlan struct {
	// The name of the plan.
	Name string `json:"name" url:"name"`
	// A list of SubscriptionPhase containing the [SubscriptionPhase](entity:SubscriptionPhase) for this plan.
	// This field it required. Not including this field will throw a REQUIRED_FIELD_MISSING error
	Phases []*SubscriptionPhase `json:"phases,omitempty" url:"phases,omitempty"`
	// The list of subscription plan variations available for this product
	SubscriptionPlanVariations []*CatalogObject `json:"subscription_plan_variations,omitempty" url:"subscription_plan_variations,omitempty"`
	// The list of IDs of `CatalogItems` that are eligible for subscription by this SubscriptionPlan's variations.
	EligibleItemIDs []string `json:"eligible_item_ids,omitempty" url:"eligible_item_ids,omitempty"`
	// The list of IDs of `CatalogCategory` that are eligible for subscription by this SubscriptionPlan's variations.
	EligibleCategoryIDs []string `json:"eligible_category_ids,omitempty" url:"eligible_category_ids,omitempty"`
	// If true, all items in the merchant's catalog are subscribable by this SubscriptionPlan.
	AllItems *bool `json:"all_items,omitempty" url:"all_items,omitempty"`
	// contains filtered or unexported fields
}

Describes a subscription plan. A subscription plan represents what you want to sell in a subscription model, and includes references to each of the associated subscription plan variations. For more information, see [Subscription Plans and Variations](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations).

func (*CatalogSubscriptionPlan) GetAllItems

func (c *CatalogSubscriptionPlan) GetAllItems() *bool

func (*CatalogSubscriptionPlan) GetEligibleCategoryIDs

func (c *CatalogSubscriptionPlan) GetEligibleCategoryIDs() []string

func (*CatalogSubscriptionPlan) GetEligibleItemIDs

func (c *CatalogSubscriptionPlan) GetEligibleItemIDs() []string

func (*CatalogSubscriptionPlan) GetExtraProperties

func (c *CatalogSubscriptionPlan) GetExtraProperties() map[string]interface{}

func (*CatalogSubscriptionPlan) GetName

func (c *CatalogSubscriptionPlan) GetName() string

func (*CatalogSubscriptionPlan) GetPhases

func (c *CatalogSubscriptionPlan) GetPhases() []*SubscriptionPhase

func (*CatalogSubscriptionPlan) GetSubscriptionPlanVariations

func (c *CatalogSubscriptionPlan) GetSubscriptionPlanVariations() []*CatalogObject

func (*CatalogSubscriptionPlan) String

func (c *CatalogSubscriptionPlan) String() string

func (*CatalogSubscriptionPlan) UnmarshalJSON

func (c *CatalogSubscriptionPlan) UnmarshalJSON(data []byte) error

type CatalogSubscriptionPlanVariation added in v1.4.0

type CatalogSubscriptionPlanVariation struct {
	// The name of the plan variation.
	Name string `json:"name" url:"name"`
	// A list containing each [SubscriptionPhase](entity:SubscriptionPhase) for this plan variation.
	Phases []*SubscriptionPhase `json:"phases,omitempty" url:"phases,omitempty"`
	// The id of the subscription plan, if there is one.
	SubscriptionPlanID *string `json:"subscription_plan_id,omitempty" url:"subscription_plan_id,omitempty"`
	// The day of the month the billing period starts.
	MonthlyBillingAnchorDate *int64 `json:"monthly_billing_anchor_date,omitempty" url:"monthly_billing_anchor_date,omitempty"`
	// Whether bills for this plan variation can be split for proration.
	CanProrate *bool `json:"can_prorate,omitempty" url:"can_prorate,omitempty"`
	// The ID of a "successor" plan variation to this one. If the field is set, and this object is disabled at all
	// locations, it indicates that this variation is deprecated and the object identified by the successor ID be used in
	// its stead.
	SuccessorPlanVariationID *string `json:"successor_plan_variation_id,omitempty" url:"successor_plan_variation_id,omitempty"`
	// contains filtered or unexported fields
}

Describes a subscription plan variation. A subscription plan variation represents how the subscription for a product or service is sold. For more information, see [Subscription Plans and Variations](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations).

func (*CatalogSubscriptionPlanVariation) GetCanProrate added in v1.4.0

func (c *CatalogSubscriptionPlanVariation) GetCanProrate() *bool

func (*CatalogSubscriptionPlanVariation) GetExtraProperties added in v1.4.0

func (c *CatalogSubscriptionPlanVariation) GetExtraProperties() map[string]interface{}

func (*CatalogSubscriptionPlanVariation) GetMonthlyBillingAnchorDate added in v1.4.0

func (c *CatalogSubscriptionPlanVariation) GetMonthlyBillingAnchorDate() *int64

func (*CatalogSubscriptionPlanVariation) GetName added in v1.4.0

func (*CatalogSubscriptionPlanVariation) GetPhases added in v1.4.0

func (*CatalogSubscriptionPlanVariation) GetSubscriptionPlanID added in v1.4.0

func (c *CatalogSubscriptionPlanVariation) GetSubscriptionPlanID() *string

func (*CatalogSubscriptionPlanVariation) GetSuccessorPlanVariationID added in v1.4.0

func (c *CatalogSubscriptionPlanVariation) GetSuccessorPlanVariationID() *string

func (*CatalogSubscriptionPlanVariation) String added in v1.4.0

func (*CatalogSubscriptionPlanVariation) UnmarshalJSON added in v1.4.0

func (c *CatalogSubscriptionPlanVariation) UnmarshalJSON(data []byte) error

type CatalogTax

type CatalogTax struct {
	// The tax's name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Whether the tax is calculated based on a payment's subtotal or total.
	// See [TaxCalculationPhase](#type-taxcalculationphase) for possible values
	CalculationPhase *TaxCalculationPhase `json:"calculation_phase,omitempty" url:"calculation_phase,omitempty"`
	// Whether the tax is `ADDITIVE` or `INCLUSIVE`.
	// See [TaxInclusionType](#type-taxinclusiontype) for possible values
	InclusionType *TaxInclusionType `json:"inclusion_type,omitempty" url:"inclusion_type,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%. For a location-specific tax rate, contact the tax authority of the location or a tax consultant.
	Percentage *string `json:"percentage,omitempty" url:"percentage,omitempty"`
	// 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" url:"applies_to_custom_amounts,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" url:"enabled,omitempty"`
	// The ID of a `CatalogProductSet` object. If set, the tax is applicable to all products in the product set.
	AppliesToProductSetID *string `json:"applies_to_product_set_id,omitempty" url:"applies_to_product_set_id,omitempty"`
	// contains filtered or unexported fields
}

A tax applicable to an item.

func (*CatalogTax) GetAppliesToCustomAmounts

func (c *CatalogTax) GetAppliesToCustomAmounts() *bool

func (*CatalogTax) GetAppliesToProductSetID

func (c *CatalogTax) GetAppliesToProductSetID() *string

func (*CatalogTax) GetCalculationPhase

func (c *CatalogTax) GetCalculationPhase() *TaxCalculationPhase

func (*CatalogTax) GetEnabled

func (c *CatalogTax) GetEnabled() *bool

func (*CatalogTax) GetExtraProperties

func (c *CatalogTax) GetExtraProperties() map[string]interface{}

func (*CatalogTax) GetInclusionType

func (c *CatalogTax) GetInclusionType() *TaxInclusionType

func (*CatalogTax) GetName

func (c *CatalogTax) GetName() *string

func (*CatalogTax) GetPercentage

func (c *CatalogTax) GetPercentage() *string

func (*CatalogTax) String

func (c *CatalogTax) String() string

func (*CatalogTax) UnmarshalJSON

func (c *CatalogTax) UnmarshalJSON(data []byte) error

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" url:"event,omitempty"`
	// contains filtered or unexported fields
}

Represents a time period - either a single period or a repeating period.

func (*CatalogTimePeriod) GetEvent

func (c *CatalogTimePeriod) GetEvent() *string

func (*CatalogTimePeriod) GetExtraProperties

func (c *CatalogTimePeriod) GetExtraProperties() map[string]interface{}

func (*CatalogTimePeriod) String

func (c *CatalogTimePeriod) String() string

func (*CatalogTimePeriod) UnmarshalJSON

func (c *CatalogTimePeriod) UnmarshalJSON(data []byte) error

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" url:"catalog_v1_id,omitempty"`
	// The ID of the `Location` this Connect V1 ID is associated with.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// contains filtered or unexported fields
}

A Square API V1 identifier of an item, including the object ID and its associated location ID.

func (*CatalogV1ID) GetCatalogV1ID

func (c *CatalogV1ID) GetCatalogV1ID() *string

func (*CatalogV1ID) GetExtraProperties

func (c *CatalogV1ID) GetExtraProperties() map[string]interface{}

func (*CatalogV1ID) GetLocationID

func (c *CatalogV1ID) GetLocationID() *string

func (*CatalogV1ID) String

func (c *CatalogV1ID) String() string

func (*CatalogV1ID) UnmarshalJSON

func (c *CatalogV1ID) UnmarshalJSON(data []byte) error

type CategoryPathToRootNode

type CategoryPathToRootNode struct {
	// The category's ID.
	CategoryID *string `json:"category_id,omitempty" url:"category_id,omitempty"`
	// The category's name.
	CategoryName *string `json:"category_name,omitempty" url:"category_name,omitempty"`
	// contains filtered or unexported fields
}

A node in the path from a retrieved category to its root node.

func (*CategoryPathToRootNode) GetCategoryID

func (c *CategoryPathToRootNode) GetCategoryID() *string

func (*CategoryPathToRootNode) GetCategoryName

func (c *CategoryPathToRootNode) GetCategoryName() *string

func (*CategoryPathToRootNode) GetExtraProperties

func (c *CategoryPathToRootNode) GetExtraProperties() map[string]interface{}

func (*CategoryPathToRootNode) String

func (c *CategoryPathToRootNode) String() string

func (*CategoryPathToRootNode) UnmarshalJSON

func (c *CategoryPathToRootNode) UnmarshalJSON(data []byte) error

type ChangeBillingAnchorDateRequest

type ChangeBillingAnchorDateRequest struct {
	// The ID of the subscription to update the billing anchor date.
	SubscriptionID string `json:"-" url:"-"`
	// The anchor day for the billing cycle.
	MonthlyBillingAnchorDate *int `json:"monthly_billing_anchor_date,omitempty" url:"-"`
	// The `YYYY-MM-DD`-formatted date when the scheduled `BILLING_ANCHOR_CHANGE` action takes
	// place on the subscription.
	//
	// When this date is unspecified or falls within the current billing cycle, the billing anchor date
	// is changed immediately.
	EffectiveDate *string `json:"effective_date,omitempty" url:"-"`
}

type ChangeBillingAnchorDateResponse

type ChangeBillingAnchorDateResponse struct {
	// Errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The specified subscription for updating billing anchor date.
	Subscription *Subscription `json:"subscription,omitempty" url:"subscription,omitempty"`
	// A list of a single billing anchor date change for the subscription.
	Actions []*SubscriptionAction `json:"actions,omitempty" url:"actions,omitempty"`
	// contains filtered or unexported fields
}

Defines output parameters in a request to the [ChangeBillingAnchorDate](api-endpoint:Subscriptions-ChangeBillingAnchorDate) endpoint.

func (*ChangeBillingAnchorDateResponse) GetActions

func (*ChangeBillingAnchorDateResponse) GetErrors

func (c *ChangeBillingAnchorDateResponse) GetErrors() []*Error

func (*ChangeBillingAnchorDateResponse) GetExtraProperties

func (c *ChangeBillingAnchorDateResponse) GetExtraProperties() map[string]interface{}

func (*ChangeBillingAnchorDateResponse) GetSubscription

func (c *ChangeBillingAnchorDateResponse) GetSubscription() *Subscription

func (*ChangeBillingAnchorDateResponse) String

func (*ChangeBillingAnchorDateResponse) UnmarshalJSON

func (c *ChangeBillingAnchorDateResponse) UnmarshalJSON(data []byte) error

type ChangeTiming

type ChangeTiming string

Supported timings when a pending change, as an action, takes place to a subscription.

const (
	ChangeTimingImmediate         ChangeTiming = "IMMEDIATE"
	ChangeTimingEndOfBillingCycle ChangeTiming = "END_OF_BILLING_CYCLE"
)

func NewChangeTimingFromString

func NewChangeTimingFromString(s string) (ChangeTiming, error)

func (ChangeTiming) Ptr

func (c ChangeTiming) Ptr() *ChangeTiming

type ChangesInventoryRequest added in v1.2.0

type ChangesInventoryRequest struct {
	// ID of the [CatalogObject](entity:CatalogObject) to retrieve.
	CatalogObjectID string `json:"-" url:"-"`
	// The [Location](entity:Location) IDs to look up as a comma-separated
	// list. An empty list queries all locations.
	LocationIDs *string `json:"-" url:"location_ids,omitempty"`
	// 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:"-" url:"cursor,omitempty"`
}

type ChargeRequestAdditionalRecipient

type ChargeRequestAdditionalRecipient struct {
	// The location ID for a recipient (other than the merchant) receiving a portion of the tender.
	LocationID string `json:"location_id" url:"location_id"`
	// The description of the additional recipient.
	Description string `json:"description" url:"description"`
	// The amount of money distributed to the recipient.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// contains filtered or unexported fields
}

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

func (*ChargeRequestAdditionalRecipient) GetAmountMoney

func (c *ChargeRequestAdditionalRecipient) GetAmountMoney() *Money

func (*ChargeRequestAdditionalRecipient) GetDescription

func (c *ChargeRequestAdditionalRecipient) GetDescription() string

func (*ChargeRequestAdditionalRecipient) GetExtraProperties

func (c *ChargeRequestAdditionalRecipient) GetExtraProperties() map[string]interface{}

func (*ChargeRequestAdditionalRecipient) GetLocationID

func (c *ChargeRequestAdditionalRecipient) GetLocationID() string

func (*ChargeRequestAdditionalRecipient) String

func (*ChargeRequestAdditionalRecipient) UnmarshalJSON

func (c *ChargeRequestAdditionalRecipient) UnmarshalJSON(data []byte) error

type Checkout

type Checkout struct {
	// ID generated by Square Checkout when a new checkout is requested.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The URL that the buyer's browser should be redirected to after the
	// checkout is completed.
	CheckoutPageURL *string `json:"checkout_page_url,omitempty" url:"checkout_page_url,omitempty"`
	// 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" url:"ask_for_shipping_address,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" url:"merchant_support_email,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" url:"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" url:"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" url:"redirect_url,omitempty"`
	// Order to be checked out.
	Order *Order `json:"order,omitempty" url:"order,omitempty"`
	// The time when the checkout was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// 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,omitempty" url:"additional_recipients,omitempty"`
	// contains filtered or unexported fields
}

Square Checkout lets merchants accept online payments for supported payment types using a checkout workflow hosted on squareup.com.

func (*Checkout) GetAdditionalRecipients

func (c *Checkout) GetAdditionalRecipients() []*AdditionalRecipient

func (*Checkout) GetAskForShippingAddress

func (c *Checkout) GetAskForShippingAddress() *bool

func (*Checkout) GetCheckoutPageURL

func (c *Checkout) GetCheckoutPageURL() *string

func (*Checkout) GetCreatedAt

func (c *Checkout) GetCreatedAt() *string

func (*Checkout) GetExtraProperties

func (c *Checkout) GetExtraProperties() map[string]interface{}

func (*Checkout) GetID

func (c *Checkout) GetID() *string

func (*Checkout) GetMerchantSupportEmail

func (c *Checkout) GetMerchantSupportEmail() *string

func (*Checkout) GetOrder

func (c *Checkout) GetOrder() *Order

func (*Checkout) GetPrePopulateBuyerEmail

func (c *Checkout) GetPrePopulateBuyerEmail() *string

func (*Checkout) GetPrePopulateShippingAddress

func (c *Checkout) GetPrePopulateShippingAddress() *Address

func (*Checkout) GetRedirectURL

func (c *Checkout) GetRedirectURL() *string

func (*Checkout) String

func (c *Checkout) String() string

func (*Checkout) UnmarshalJSON

func (c *Checkout) UnmarshalJSON(data []byte) error

type CheckoutLocationSettings

type CheckoutLocationSettings struct {
	// The ID of the location that these settings apply to.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// Indicates whether customers are allowed to leave notes at checkout.
	CustomerNotesEnabled *bool `json:"customer_notes_enabled,omitempty" url:"customer_notes_enabled,omitempty"`
	// Policy information is displayed at the bottom of the checkout pages.
	// You can set a maximum of two policies.
	Policies []*CheckoutLocationSettingsPolicy `json:"policies,omitempty" url:"policies,omitempty"`
	// The branding settings for this location.
	Branding *CheckoutLocationSettingsBranding `json:"branding,omitempty" url:"branding,omitempty"`
	// The tip settings for this location.
	Tipping *CheckoutLocationSettingsTipping `json:"tipping,omitempty" url:"tipping,omitempty"`
	// The coupon settings for this location.
	Coupons *CheckoutLocationSettingsCoupons `json:"coupons,omitempty" url:"coupons,omitempty"`
	// The timestamp when the settings were last updated, in RFC 3339 format.
	// Examples for January 25th, 2020 6:25:34pm Pacific Standard Time:
	// UTC: 2020-01-26T02:25:34Z
	// Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckoutLocationSettings) GetBranding

func (*CheckoutLocationSettings) GetCoupons

func (*CheckoutLocationSettings) GetCustomerNotesEnabled

func (c *CheckoutLocationSettings) GetCustomerNotesEnabled() *bool

func (*CheckoutLocationSettings) GetExtraProperties

func (c *CheckoutLocationSettings) GetExtraProperties() map[string]interface{}

func (*CheckoutLocationSettings) GetLocationID

func (c *CheckoutLocationSettings) GetLocationID() *string

func (*CheckoutLocationSettings) GetPolicies

func (*CheckoutLocationSettings) GetTipping

func (*CheckoutLocationSettings) GetUpdatedAt

func (c *CheckoutLocationSettings) GetUpdatedAt() *string

func (*CheckoutLocationSettings) String

func (c *CheckoutLocationSettings) String() string

func (*CheckoutLocationSettings) UnmarshalJSON

func (c *CheckoutLocationSettings) UnmarshalJSON(data []byte) error

type CheckoutLocationSettingsBranding

type CheckoutLocationSettingsBranding struct {
	// Show the location logo on the checkout page.
	// See [HeaderType](#type-headertype) for possible values
	HeaderType *CheckoutLocationSettingsBrandingHeaderType `json:"header_type,omitempty" url:"header_type,omitempty"`
	// The HTML-supported hex color for the button on the checkout page (for example, "#FFFFFF").
	ButtonColor *string `json:"button_color,omitempty" url:"button_color,omitempty"`
	// The shape of the button on the checkout page.
	// See [ButtonShape](#type-buttonshape) for possible values
	ButtonShape *CheckoutLocationSettingsBrandingButtonShape `json:"button_shape,omitempty" url:"button_shape,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckoutLocationSettingsBranding) GetButtonColor

func (c *CheckoutLocationSettingsBranding) GetButtonColor() *string

func (*CheckoutLocationSettingsBranding) GetButtonShape

func (*CheckoutLocationSettingsBranding) GetExtraProperties

func (c *CheckoutLocationSettingsBranding) GetExtraProperties() map[string]interface{}

func (*CheckoutLocationSettingsBranding) GetHeaderType

func (*CheckoutLocationSettingsBranding) String

func (*CheckoutLocationSettingsBranding) UnmarshalJSON

func (c *CheckoutLocationSettingsBranding) UnmarshalJSON(data []byte) error

type CheckoutLocationSettingsBrandingButtonShape

type CheckoutLocationSettingsBrandingButtonShape string
const (
	CheckoutLocationSettingsBrandingButtonShapeSquared CheckoutLocationSettingsBrandingButtonShape = "SQUARED"
	CheckoutLocationSettingsBrandingButtonShapeRounded CheckoutLocationSettingsBrandingButtonShape = "ROUNDED"
	CheckoutLocationSettingsBrandingButtonShapePill    CheckoutLocationSettingsBrandingButtonShape = "PILL"
)

func NewCheckoutLocationSettingsBrandingButtonShapeFromString

func NewCheckoutLocationSettingsBrandingButtonShapeFromString(s string) (CheckoutLocationSettingsBrandingButtonShape, error)

func (CheckoutLocationSettingsBrandingButtonShape) Ptr

type CheckoutLocationSettingsBrandingHeaderType

type CheckoutLocationSettingsBrandingHeaderType string
const (
	CheckoutLocationSettingsBrandingHeaderTypeBusinessName  CheckoutLocationSettingsBrandingHeaderType = "BUSINESS_NAME"
)

func NewCheckoutLocationSettingsBrandingHeaderTypeFromString

func NewCheckoutLocationSettingsBrandingHeaderTypeFromString(s string) (CheckoutLocationSettingsBrandingHeaderType, error)

func (CheckoutLocationSettingsBrandingHeaderType) Ptr

type CheckoutLocationSettingsCoupons

type CheckoutLocationSettingsCoupons struct {
	// Indicates whether coupons are enabled for this location.
	Enabled *bool `json:"enabled,omitempty" url:"enabled,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckoutLocationSettingsCoupons) GetEnabled

func (c *CheckoutLocationSettingsCoupons) GetEnabled() *bool

func (*CheckoutLocationSettingsCoupons) GetExtraProperties

func (c *CheckoutLocationSettingsCoupons) GetExtraProperties() map[string]interface{}

func (*CheckoutLocationSettingsCoupons) String

func (*CheckoutLocationSettingsCoupons) UnmarshalJSON

func (c *CheckoutLocationSettingsCoupons) UnmarshalJSON(data []byte) error

type CheckoutLocationSettingsPolicy

type CheckoutLocationSettingsPolicy struct {
	// A unique ID to identify the policy when making changes. You must set the UID for policy updates, but it’s optional when setting new policies.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The title of the policy. This is required when setting the description, though you can update it in a different request.
	Title *string `json:"title,omitempty" url:"title,omitempty"`
	// The description of the policy.
	Description *string `json:"description,omitempty" url:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckoutLocationSettingsPolicy) GetDescription

func (c *CheckoutLocationSettingsPolicy) GetDescription() *string

func (*CheckoutLocationSettingsPolicy) GetExtraProperties

func (c *CheckoutLocationSettingsPolicy) GetExtraProperties() map[string]interface{}

func (*CheckoutLocationSettingsPolicy) GetTitle

func (c *CheckoutLocationSettingsPolicy) GetTitle() *string

func (*CheckoutLocationSettingsPolicy) GetUID

func (*CheckoutLocationSettingsPolicy) String

func (*CheckoutLocationSettingsPolicy) UnmarshalJSON

func (c *CheckoutLocationSettingsPolicy) UnmarshalJSON(data []byte) error

type CheckoutLocationSettingsTipping

type CheckoutLocationSettingsTipping struct {
	// Set three custom percentage amounts that buyers can select at checkout. If Smart Tip is enabled, this only applies to transactions totaling $10 or more.
	Percentages []int `json:"percentages,omitempty" url:"percentages,omitempty"`
	// Enables Smart Tip Amounts. If Smart Tip Amounts is enabled, tipping works as follows:
	// If a transaction is less than $10, the available tipping options include No Tip, $1, $2, or $3.
	// If a transaction is $10 or more, the available tipping options include No Tip, 15%, 20%, or 25%.
	// You can set custom percentage amounts with the `percentages` field.
	SmartTippingEnabled *bool `json:"smart_tipping_enabled,omitempty" url:"smart_tipping_enabled,omitempty"`
	// Set the pre-selected percentage amounts that appear at checkout. If Smart Tip is enabled, this only applies to transactions totaling $10 or more.
	DefaultPercent *int `json:"default_percent,omitempty" url:"default_percent,omitempty"`
	// Show the Smart Tip Amounts for this location.
	SmartTips []*Money `json:"smart_tips,omitempty" url:"smart_tips,omitempty"`
	// Set the pre-selected whole amount that appears at checkout when Smart Tip is enabled and the transaction amount is less than $10.
	DefaultSmartTip *Money `json:"default_smart_tip,omitempty" url:"default_smart_tip,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckoutLocationSettingsTipping) GetDefaultPercent

func (c *CheckoutLocationSettingsTipping) GetDefaultPercent() *int

func (*CheckoutLocationSettingsTipping) GetDefaultSmartTip

func (c *CheckoutLocationSettingsTipping) GetDefaultSmartTip() *Money

func (*CheckoutLocationSettingsTipping) GetExtraProperties

func (c *CheckoutLocationSettingsTipping) GetExtraProperties() map[string]interface{}

func (*CheckoutLocationSettingsTipping) GetPercentages

func (c *CheckoutLocationSettingsTipping) GetPercentages() []int

func (*CheckoutLocationSettingsTipping) GetSmartTippingEnabled

func (c *CheckoutLocationSettingsTipping) GetSmartTippingEnabled() *bool

func (*CheckoutLocationSettingsTipping) GetSmartTips

func (c *CheckoutLocationSettingsTipping) GetSmartTips() []*Money

func (*CheckoutLocationSettingsTipping) String

func (*CheckoutLocationSettingsTipping) UnmarshalJSON

func (c *CheckoutLocationSettingsTipping) UnmarshalJSON(data []byte) error

type CheckoutMerchantSettings

type CheckoutMerchantSettings struct {
	// The set of payment methods accepted for the merchant's account.
	PaymentMethods *CheckoutMerchantSettingsPaymentMethods `json:"payment_methods,omitempty" url:"payment_methods,omitempty"`
	// The timestamp when the settings were last updated, in RFC 3339 format.
	// Examples for January 25th, 2020 6:25:34pm Pacific Standard Time:
	// UTC: 2020-01-26T02:25:34Z
	// Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckoutMerchantSettings) GetExtraProperties

func (c *CheckoutMerchantSettings) GetExtraProperties() map[string]interface{}

func (*CheckoutMerchantSettings) GetPaymentMethods

func (*CheckoutMerchantSettings) GetUpdatedAt

func (c *CheckoutMerchantSettings) GetUpdatedAt() *string

func (*CheckoutMerchantSettings) String

func (c *CheckoutMerchantSettings) String() string

func (*CheckoutMerchantSettings) UnmarshalJSON

func (c *CheckoutMerchantSettings) UnmarshalJSON(data []byte) error

type CheckoutMerchantSettingsPaymentMethods

type CheckoutMerchantSettingsPaymentMethods struct {
	ApplePay         *CheckoutMerchantSettingsPaymentMethodsPaymentMethod    `json:"apple_pay,omitempty" url:"apple_pay,omitempty"`
	GooglePay        *CheckoutMerchantSettingsPaymentMethodsPaymentMethod    `json:"google_pay,omitempty" url:"google_pay,omitempty"`
	CashApp          *CheckoutMerchantSettingsPaymentMethodsPaymentMethod    `json:"cash_app,omitempty" url:"cash_app,omitempty"`
	AfterpayClearpay *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay `json:"afterpay_clearpay,omitempty" url:"afterpay_clearpay,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckoutMerchantSettingsPaymentMethods) GetAfterpayClearpay

func (*CheckoutMerchantSettingsPaymentMethods) GetApplePay

func (*CheckoutMerchantSettingsPaymentMethods) GetCashApp

func (*CheckoutMerchantSettingsPaymentMethods) GetExtraProperties

func (c *CheckoutMerchantSettingsPaymentMethods) GetExtraProperties() map[string]interface{}

func (*CheckoutMerchantSettingsPaymentMethods) GetGooglePay

func (*CheckoutMerchantSettingsPaymentMethods) String

func (*CheckoutMerchantSettingsPaymentMethods) UnmarshalJSON

func (c *CheckoutMerchantSettingsPaymentMethods) UnmarshalJSON(data []byte) error

type CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay

type CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay struct {
	// Afterpay is shown as an option for order totals falling within the configured range.
	OrderEligibilityRange *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange `json:"order_eligibility_range,omitempty" url:"order_eligibility_range,omitempty"`
	// Afterpay is shown as an option for item totals falling within the configured range.
	ItemEligibilityRange *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange `json:"item_eligibility_range,omitempty" url:"item_eligibility_range,omitempty"`
	// Indicates whether the payment method is enabled for the account.
	Enabled *bool `json:"enabled,omitempty" url:"enabled,omitempty"`
	// contains filtered or unexported fields
}

The settings allowed for AfterpayClearpay.

func (*CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay) GetEnabled

func (*CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay) GetExtraProperties

func (c *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay) GetExtraProperties() map[string]interface{}

func (*CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay) GetItemEligibilityRange

func (*CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay) GetOrderEligibilityRange

func (*CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay) String

func (*CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay) UnmarshalJSON

type CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange

type CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange struct {
	Min *Money `json:"min,omitempty" url:"min,omitempty"`
	Max *Money `json:"max,omitempty" url:"max,omitempty"`
	// contains filtered or unexported fields
}

A range of purchase price that qualifies.

func (*CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange) GetExtraProperties

func (*CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange) GetMax

func (*CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange) GetMin

func (*CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange) String

func (*CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange) UnmarshalJSON

type CheckoutMerchantSettingsPaymentMethodsPaymentMethod

type CheckoutMerchantSettingsPaymentMethodsPaymentMethod struct {
	// Indicates whether the payment method is enabled for the account.
	Enabled *bool `json:"enabled,omitempty" url:"enabled,omitempty"`
	// contains filtered or unexported fields
}

The settings allowed for a payment method.

func (*CheckoutMerchantSettingsPaymentMethodsPaymentMethod) GetEnabled

func (*CheckoutMerchantSettingsPaymentMethodsPaymentMethod) GetExtraProperties

func (c *CheckoutMerchantSettingsPaymentMethodsPaymentMethod) GetExtraProperties() map[string]interface{}

func (*CheckoutMerchantSettingsPaymentMethodsPaymentMethod) String

func (*CheckoutMerchantSettingsPaymentMethodsPaymentMethod) UnmarshalJSON

type CheckoutOptions

type CheckoutOptions struct {
	// Indicates whether the payment allows tipping.
	AllowTipping *bool `json:"allow_tipping,omitempty" url:"allow_tipping,omitempty"`
	// The custom fields requesting information from the buyer.
	CustomFields []*CustomField `json:"custom_fields,omitempty" url:"custom_fields,omitempty"`
	// The ID of the subscription plan for the buyer to pay and subscribe.
	// For more information, see [Subscription Plan Checkout](https://developer.squareup.com/docs/checkout-api/subscription-plan-checkout).
	SubscriptionPlanID *string `json:"subscription_plan_id,omitempty" url:"subscription_plan_id,omitempty"`
	// The confirmation page URL to redirect the buyer to after Square processes the payment.
	RedirectURL *string `json:"redirect_url,omitempty" url:"redirect_url,omitempty"`
	// The email address that buyers can use to contact the seller.
	MerchantSupportEmail *string `json:"merchant_support_email,omitempty" url:"merchant_support_email,omitempty"`
	// Indicates whether to include the address fields in the payment form.
	AskForShippingAddress *bool `json:"ask_for_shipping_address,omitempty" url:"ask_for_shipping_address,omitempty"`
	// The methods allowed for buyers during checkout.
	AcceptedPaymentMethods *AcceptedPaymentMethods `json:"accepted_payment_methods,omitempty" url:"accepted_payment_methods,omitempty"`
	// 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/common-data-types/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).
	//
	// To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required. For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/collect-fees/additional-considerations#permissions).
	AppFeeMoney *Money `json:"app_fee_money,omitempty" url:"app_fee_money,omitempty"`
	// The fee associated with shipping to be applied to the `Order` as a service charge.
	ShippingFee *ShippingFee `json:"shipping_fee,omitempty" url:"shipping_fee,omitempty"`
	// Indicates whether to include the `Add coupon` section for the buyer to provide a Square marketing coupon in the payment form.
	EnableCoupon *bool `json:"enable_coupon,omitempty" url:"enable_coupon,omitempty"`
	// Indicates whether to include the `REWARDS` section for the buyer to opt in to loyalty, redeem rewards in the payment form, or both.
	EnableLoyalty *bool `json:"enable_loyalty,omitempty" url:"enable_loyalty,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckoutOptions) GetAcceptedPaymentMethods

func (c *CheckoutOptions) GetAcceptedPaymentMethods() *AcceptedPaymentMethods

func (*CheckoutOptions) GetAllowTipping

func (c *CheckoutOptions) GetAllowTipping() *bool

func (*CheckoutOptions) GetAppFeeMoney

func (c *CheckoutOptions) GetAppFeeMoney() *Money

func (*CheckoutOptions) GetAskForShippingAddress

func (c *CheckoutOptions) GetAskForShippingAddress() *bool

func (*CheckoutOptions) GetCustomFields

func (c *CheckoutOptions) GetCustomFields() []*CustomField

func (*CheckoutOptions) GetEnableCoupon

func (c *CheckoutOptions) GetEnableCoupon() *bool

func (*CheckoutOptions) GetEnableLoyalty

func (c *CheckoutOptions) GetEnableLoyalty() *bool

func (*CheckoutOptions) GetExtraProperties

func (c *CheckoutOptions) GetExtraProperties() map[string]interface{}

func (*CheckoutOptions) GetMerchantSupportEmail

func (c *CheckoutOptions) GetMerchantSupportEmail() *string

func (*CheckoutOptions) GetRedirectURL

func (c *CheckoutOptions) GetRedirectURL() *string

func (*CheckoutOptions) GetShippingFee

func (c *CheckoutOptions) GetShippingFee() *ShippingFee

func (*CheckoutOptions) GetSubscriptionPlanID

func (c *CheckoutOptions) GetSubscriptionPlanID() *string

func (*CheckoutOptions) String

func (c *CheckoutOptions) String() string

func (*CheckoutOptions) UnmarshalJSON

func (c *CheckoutOptions) UnmarshalJSON(data []byte) error

type CheckoutOptionsPaymentType

type CheckoutOptionsPaymentType string
const (
	CheckoutOptionsPaymentTypeCardPresent               CheckoutOptionsPaymentType = "CARD_PRESENT"
	CheckoutOptionsPaymentTypeManualCardEntry           CheckoutOptionsPaymentType = "MANUAL_CARD_ENTRY"
	CheckoutOptionsPaymentTypeFelicaID                  CheckoutOptionsPaymentType = "FELICA_ID"
	CheckoutOptionsPaymentTypeFelicaQuicpay             CheckoutOptionsPaymentType = "FELICA_QUICPAY"
	CheckoutOptionsPaymentTypeFelicaTransportationGroup CheckoutOptionsPaymentType = "FELICA_TRANSPORTATION_GROUP"
	CheckoutOptionsPaymentTypeFelicaAll                 CheckoutOptionsPaymentType = "FELICA_ALL"
	CheckoutOptionsPaymentTypePaypay                    CheckoutOptionsPaymentType = "PAYPAY"
	CheckoutOptionsPaymentTypeQrCode                    CheckoutOptionsPaymentType = "QR_CODE"
)

func NewCheckoutOptionsPaymentTypeFromString

func NewCheckoutOptionsPaymentTypeFromString(s string) (CheckoutOptionsPaymentType, error)

func (CheckoutOptionsPaymentType) Ptr

type ClearpayDetails

type ClearpayDetails struct {
	// Email address on the buyer's Clearpay account.
	EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"`
	// contains filtered or unexported fields
}

Additional details about Clearpay payments.

func (*ClearpayDetails) GetEmailAddress

func (c *ClearpayDetails) GetEmailAddress() *string

func (*ClearpayDetails) GetExtraProperties

func (c *ClearpayDetails) GetExtraProperties() map[string]interface{}

func (*ClearpayDetails) String

func (c *ClearpayDetails) String() string

func (*ClearpayDetails) UnmarshalJSON

func (c *ClearpayDetails) UnmarshalJSON(data []byte) error

type CloneOrderRequest

type CloneOrderRequest struct {
	// The ID of the order to clone.
	OrderID string `json:"order_id" url:"-"`
	// An optional order version for concurrency protection.
	//
	// If a version is provided, it must match the latest stored version of the order to clone.
	// If a version is not provided, the API clones the latest version.
	Version *int `json:"version,omitempty" url:"-"`
	// A value you specify that uniquely identifies this clone request.
	//
	// If you are unsure whether a particular order was cloned successfully,
	// you can reattempt the call with the same idempotency key without
	// worrying about creating duplicate cloned orders.
	// The originally cloned order is returned.
	//
	// For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"`
}

type CloneOrderResponse

type CloneOrderResponse struct {
	// The cloned order.
	Order *Order `json:"order,omitempty" url:"order,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [CloneOrder](api-endpoint:Orders-CloneOrder) endpoint.

func (*CloneOrderResponse) GetErrors

func (c *CloneOrderResponse) GetErrors() []*Error

func (*CloneOrderResponse) GetExtraProperties

func (c *CloneOrderResponse) GetExtraProperties() map[string]interface{}

func (*CloneOrderResponse) GetOrder

func (c *CloneOrderResponse) GetOrder() *Order

func (*CloneOrderResponse) String

func (c *CloneOrderResponse) String() string

func (*CloneOrderResponse) UnmarshalJSON

func (c *CloneOrderResponse) UnmarshalJSON(data []byte) error

type CollectedData

type CollectedData struct {
	// The buyer's input text.
	InputText *string `json:"input_text,omitempty" url:"input_text,omitempty"`
	// contains filtered or unexported fields
}

func (*CollectedData) GetExtraProperties

func (c *CollectedData) GetExtraProperties() map[string]interface{}

func (*CollectedData) GetInputText

func (c *CollectedData) GetInputText() *string

func (*CollectedData) String

func (c *CollectedData) String() string

func (*CollectedData) UnmarshalJSON

func (c *CollectedData) UnmarshalJSON(data []byte) error

type CompletePaymentRequest

type CompletePaymentRequest struct {
	// The unique ID identifying the payment to be completed.
	PaymentID string `json:"-" url:"-"`
	// Used for optimistic concurrency. This opaque token identifies the current `Payment`
	// version that the caller expects. If the server has a different version of the Payment,
	// the update fails and a response with a VERSION_MISMATCH error is returned.
	VersionToken *string `json:"version_token,omitempty" url:"-"`
}

type CompletePaymentResponse

type CompletePaymentResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The successfully completed payment.
	Payment *Payment `json:"payment,omitempty" url:"payment,omitempty"`
	// contains filtered or unexported fields
}

Defines the response returned by[CompletePayment](api-endpoint:Payments-CompletePayment).

func (*CompletePaymentResponse) GetErrors

func (c *CompletePaymentResponse) GetErrors() []*Error

func (*CompletePaymentResponse) GetExtraProperties

func (c *CompletePaymentResponse) GetExtraProperties() map[string]interface{}

func (*CompletePaymentResponse) GetPayment

func (c *CompletePaymentResponse) GetPayment() *Payment

func (*CompletePaymentResponse) String

func (c *CompletePaymentResponse) String() string

func (*CompletePaymentResponse) UnmarshalJSON

func (c *CompletePaymentResponse) UnmarshalJSON(data []byte) error

type Component

type Component struct {
	// The type of this component. Each component type has expected properties expressed
	// in a structured format within its corresponding `*_details` field.
	// See [ComponentType](#type-componenttype) for possible values
	Type ComponentComponentType `json:"type" url:"type"`
	// Structured data for an `Application`, set for Components of type `APPLICATION`.
	ApplicationDetails *DeviceComponentDetailsApplicationDetails `json:"application_details,omitempty" url:"application_details,omitempty"`
	// Structured data for a `CardReader`, set for Components of type `CARD_READER`.
	CardReaderDetails *DeviceComponentDetailsCardReaderDetails `json:"card_reader_details,omitempty" url:"card_reader_details,omitempty"`
	// Structured data for a `Battery`, set for Components of type `BATTERY`.
	BatteryDetails *DeviceComponentDetailsBatteryDetails `json:"battery_details,omitempty" url:"battery_details,omitempty"`
	// Structured data for a `WiFi` interface, set for Components of type `WIFI`.
	WifiDetails *DeviceComponentDetailsWiFiDetails `json:"wifi_details,omitempty" url:"wifi_details,omitempty"`
	// Structured data for an `Ethernet` interface, set for Components of type `ETHERNET`.
	EthernetDetails *DeviceComponentDetailsEthernetDetails `json:"ethernet_details,omitempty" url:"ethernet_details,omitempty"`
	// contains filtered or unexported fields
}

The wrapper object for the component entries of a given component type.

func (*Component) GetApplicationDetails

func (c *Component) GetApplicationDetails() *DeviceComponentDetailsApplicationDetails

func (*Component) GetBatteryDetails

func (c *Component) GetBatteryDetails() *DeviceComponentDetailsBatteryDetails

func (*Component) GetCardReaderDetails

func (c *Component) GetCardReaderDetails() *DeviceComponentDetailsCardReaderDetails

func (*Component) GetEthernetDetails

func (c *Component) GetEthernetDetails() *DeviceComponentDetailsEthernetDetails

func (*Component) GetExtraProperties

func (c *Component) GetExtraProperties() map[string]interface{}

func (*Component) GetType

func (c *Component) GetType() ComponentComponentType

func (*Component) GetWifiDetails

func (c *Component) GetWifiDetails() *DeviceComponentDetailsWiFiDetails

func (*Component) String

func (c *Component) String() string

func (*Component) UnmarshalJSON

func (c *Component) UnmarshalJSON(data []byte) error

type ComponentComponentType

type ComponentComponentType string

An enum for ComponentType.

const (
	ComponentComponentTypeApplication ComponentComponentType = "APPLICATION"
	ComponentComponentTypeCardReader  ComponentComponentType = "CARD_READER"
	ComponentComponentTypeBattery     ComponentComponentType = "BATTERY"
	ComponentComponentTypeWifi        ComponentComponentType = "WIFI"
	ComponentComponentTypeEthernet    ComponentComponentType = "ETHERNET"
	ComponentComponentTypePrinter     ComponentComponentType = "PRINTER"
)

func NewComponentComponentTypeFromString

func NewComponentComponentTypeFromString(s string) (ComponentComponentType, error)

func (ComponentComponentType) Ptr

type ConfirmationDecision

type ConfirmationDecision struct {
	// The buyer's decision to the displayed terms.
	HasAgreed *bool `json:"has_agreed,omitempty" url:"has_agreed,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfirmationDecision) GetExtraProperties

func (c *ConfirmationDecision) GetExtraProperties() map[string]interface{}

func (*ConfirmationDecision) GetHasAgreed

func (c *ConfirmationDecision) GetHasAgreed() *bool

func (*ConfirmationDecision) String

func (c *ConfirmationDecision) String() string

func (*ConfirmationDecision) UnmarshalJSON

func (c *ConfirmationDecision) UnmarshalJSON(data []byte) error

type ConfirmationOptions

type ConfirmationOptions struct {
	// The title text to display in the confirmation screen flow on the Terminal.
	Title string `json:"title" url:"title"`
	// The agreement details to display in the confirmation flow on the Terminal.
	Body string `json:"body" url:"body"`
	// The button text to display indicating the customer agrees to the displayed terms.
	AgreeButtonText string `json:"agree_button_text" url:"agree_button_text"`
	// The button text to display indicating the customer does not agree to the displayed terms.
	DisagreeButtonText *string `json:"disagree_button_text,omitempty" url:"disagree_button_text,omitempty"`
	// The result of the buyer’s actions when presented with the confirmation screen.
	Decision *ConfirmationDecision `json:"decision,omitempty" url:"decision,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfirmationOptions) GetAgreeButtonText

func (c *ConfirmationOptions) GetAgreeButtonText() string

func (*ConfirmationOptions) GetBody

func (c *ConfirmationOptions) GetBody() string

func (*ConfirmationOptions) GetDecision

func (c *ConfirmationOptions) GetDecision() *ConfirmationDecision

func (*ConfirmationOptions) GetDisagreeButtonText

func (c *ConfirmationOptions) GetDisagreeButtonText() *string

func (*ConfirmationOptions) GetExtraProperties

func (c *ConfirmationOptions) GetExtraProperties() map[string]interface{}

func (*ConfirmationOptions) GetTitle

func (c *ConfirmationOptions) GetTitle() string

func (*ConfirmationOptions) String

func (c *ConfirmationOptions) String() string

func (*ConfirmationOptions) UnmarshalJSON

func (c *ConfirmationOptions) UnmarshalJSON(data []byte) error

type Coordinates

type Coordinates struct {
	// The latitude of the coordinate expressed in degrees.
	Latitude *float64 `json:"latitude,omitempty" url:"latitude,omitempty"`
	// The longitude of the coordinate expressed in degrees.
	Longitude *float64 `json:"longitude,omitempty" url:"longitude,omitempty"`
	// contains filtered or unexported fields
}

Latitude and longitude coordinates.

func (*Coordinates) GetExtraProperties

func (c *Coordinates) GetExtraProperties() map[string]interface{}

func (*Coordinates) GetLatitude

func (c *Coordinates) GetLatitude() *float64

func (*Coordinates) GetLongitude

func (c *Coordinates) GetLongitude() *float64

func (*Coordinates) String

func (c *Coordinates) String() string

func (*Coordinates) UnmarshalJSON

func (c *Coordinates) UnmarshalJSON(data []byte) error

type Country

type Country string

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).

const (
	CountryZz Country = "ZZ"
	CountryAd Country = "AD"
	CountryAe Country = "AE"
	CountryAf Country = "AF"
	CountryAg Country = "AG"
	CountryAi Country = "AI"
	CountryAl Country = "AL"
	CountryAm Country = "AM"
	CountryAo Country = "AO"
	CountryAq Country = "AQ"
	CountryAr Country = "AR"
	CountryAs Country = "AS"
	CountryAt Country = "AT"
	CountryAu Country = "AU"
	CountryAw Country = "AW"
	CountryAx Country = "AX"
	CountryAz Country = "AZ"
	CountryBa Country = "BA"
	CountryBb Country = "BB"
	CountryBd Country = "BD"
	CountryBe Country = "BE"
	CountryBf Country = "BF"
	CountryBg Country = "BG"
	CountryBh Country = "BH"
	CountryBi Country = "BI"
	CountryBj Country = "BJ"
	CountryBl Country = "BL"
	CountryBm Country = "BM"
	CountryBn Country = "BN"
	CountryBo Country = "BO"
	CountryBq Country = "BQ"
	CountryBr Country = "BR"
	CountryBs Country = "BS"
	CountryBt Country = "BT"
	CountryBv Country = "BV"
	CountryBw Country = "BW"
	CountryBy Country = "BY"
	CountryBz Country = "BZ"
	CountryCa Country = "CA"
	CountryCc Country = "CC"
	CountryCd Country = "CD"
	CountryCf Country = "CF"
	CountryCg Country = "CG"
	CountryCh Country = "CH"
	CountryCi Country = "CI"
	CountryCk Country = "CK"
	CountryCl Country = "CL"
	CountryCm Country = "CM"
	CountryCn Country = "CN"
	CountryCo Country = "CO"
	CountryCr Country = "CR"
	CountryCu Country = "CU"
	CountryCv Country = "CV"
	CountryCw Country = "CW"
	CountryCx Country = "CX"
	CountryCy Country = "CY"
	CountryCz Country = "CZ"
	CountryDe Country = "DE"
	CountryDj Country = "DJ"
	CountryDk Country = "DK"
	CountryDm Country = "DM"
	CountryDo Country = "DO"
	CountryDz Country = "DZ"
	CountryEc Country = "EC"
	CountryEe Country = "EE"
	CountryEg Country = "EG"
	CountryEh Country = "EH"
	CountryEr Country = "ER"
	CountryEs Country = "ES"
	CountryEt Country = "ET"
	CountryFi Country = "FI"
	CountryFj Country = "FJ"
	CountryFk Country = "FK"
	CountryFm Country = "FM"
	CountryFo Country = "FO"
	CountryFr Country = "FR"
	CountryGa Country = "GA"
	CountryGb Country = "GB"
	CountryGd Country = "GD"
	CountryGe Country = "GE"
	CountryGf Country = "GF"
	CountryGg Country = "GG"
	CountryGh Country = "GH"
	CountryGi Country = "GI"
	CountryGl Country = "GL"
	CountryGm Country = "GM"
	CountryGn Country = "GN"
	CountryGp Country = "GP"
	CountryGq Country = "GQ"
	CountryGr Country = "GR"
	CountryGs Country = "GS"
	CountryGt Country = "GT"
	CountryGu Country = "GU"
	CountryGw Country = "GW"
	CountryGy Country = "GY"
	CountryHk Country = "HK"
	CountryHm Country = "HM"
	CountryHn Country = "HN"
	CountryHr Country = "HR"
	CountryHt Country = "HT"
	CountryHu Country = "HU"
	CountryID Country = "ID"
	CountryIe Country = "IE"
	CountryIl Country = "IL"
	CountryIm Country = "IM"
	CountryIn Country = "IN"
	CountryIo Country = "IO"
	CountryIq Country = "IQ"
	CountryIr Country = "IR"
	CountryIs Country = "IS"
	CountryIt Country = "IT"
	CountryJe Country = "JE"
	CountryJm Country = "JM"
	CountryJo Country = "JO"
	CountryJp Country = "JP"
	CountryKe Country = "KE"
	CountryKg Country = "KG"
	CountryKh Country = "KH"
	CountryKi Country = "KI"
	CountryKm Country = "KM"
	CountryKn Country = "KN"
	CountryKp Country = "KP"
	CountryKr Country = "KR"
	CountryKw Country = "KW"
	CountryKy Country = "KY"
	CountryKz Country = "KZ"
	CountryLa Country = "LA"
	CountryLb Country = "LB"
	CountryLc Country = "LC"
	CountryLi Country = "LI"
	CountryLk Country = "LK"
	CountryLr Country = "LR"
	CountryLs Country = "LS"
	CountryLt Country = "LT"
	CountryLu Country = "LU"
	CountryLv Country = "LV"
	CountryLy Country = "LY"
	CountryMa Country = "MA"
	CountryMc Country = "MC"
	CountryMd Country = "MD"
	CountryMe Country = "ME"
	CountryMf Country = "MF"
	CountryMg Country = "MG"
	CountryMh Country = "MH"
	CountryMk Country = "MK"
	CountryMl Country = "ML"
	CountryMm Country = "MM"
	CountryMn Country = "MN"
	CountryMo Country = "MO"
	CountryMp Country = "MP"
	CountryMq Country = "MQ"
	CountryMr Country = "MR"
	CountryMs Country = "MS"
	CountryMt Country = "MT"
	CountryMu Country = "MU"
	CountryMv Country = "MV"
	CountryMw Country = "MW"
	CountryMx Country = "MX"
	CountryMy Country = "MY"
	CountryMz Country = "MZ"
	CountryNa Country = "NA"
	CountryNc Country = "NC"
	CountryNe Country = "NE"
	CountryNf Country = "NF"
	CountryNg Country = "NG"
	CountryNi Country = "NI"
	CountryNl Country = "NL"
	CountryNo Country = "NO"
	CountryNp Country = "NP"
	CountryNr Country = "NR"
	CountryNu Country = "NU"
	CountryNz Country = "NZ"
	CountryOm Country = "OM"
	CountryPa Country = "PA"
	CountryPe Country = "PE"
	CountryPf Country = "PF"
	CountryPg Country = "PG"
	CountryPh Country = "PH"
	CountryPk Country = "PK"
	CountryPl Country = "PL"
	CountryPm Country = "PM"
	CountryPn Country = "PN"
	CountryPr Country = "PR"
	CountryPs Country = "PS"
	CountryPt Country = "PT"
	CountryPw Country = "PW"
	CountryPy Country = "PY"
	CountryQa Country = "QA"
	CountryRe Country = "RE"
	CountryRo Country = "RO"
	CountryRs Country = "RS"
	CountryRu Country = "RU"
	CountryRw Country = "RW"
	CountrySa Country = "SA"
	CountrySb Country = "SB"
	CountrySc Country = "SC"
	CountrySd Country = "SD"
	CountrySe Country = "SE"
	CountrySg Country = "SG"
	CountrySh Country = "SH"
	CountrySi Country = "SI"
	CountrySj Country = "SJ"
	CountrySk Country = "SK"
	CountrySl Country = "SL"
	CountrySm Country = "SM"
	CountrySn Country = "SN"
	CountrySo Country = "SO"
	CountrySr Country = "SR"
	CountrySs Country = "SS"
	CountrySt Country = "ST"
	CountrySv Country = "SV"
	CountrySx Country = "SX"
	CountrySy Country = "SY"
	CountrySz Country = "SZ"
	CountryTc Country = "TC"
	CountryTd Country = "TD"
	CountryTf Country = "TF"
	CountryTg Country = "TG"
	CountryTh Country = "TH"
	CountryTj Country = "TJ"
	CountryTk Country = "TK"
	CountryTl Country = "TL"
	CountryTm Country = "TM"
	CountryTn Country = "TN"
	CountryTo Country = "TO"
	CountryTr Country = "TR"
	CountryTt Country = "TT"
	CountryTv Country = "TV"
	CountryTw Country = "TW"
	CountryTz Country = "TZ"
	CountryUa Country = "UA"
	CountryUg Country = "UG"
	CountryUm Country = "UM"
	CountryUs Country = "US"
	CountryUy Country = "UY"
	CountryUz Country = "UZ"
	CountryVa Country = "VA"
	CountryVc Country = "VC"
	CountryVe Country = "VE"
	CountryVg Country = "VG"
	CountryVi Country = "VI"
	CountryVn Country = "VN"
	CountryVu Country = "VU"
	CountryWf Country = "WF"
	CountryWs Country = "WS"
	CountryYe Country = "YE"
	CountryYt Country = "YT"
	CountryZa Country = "ZA"
	CountryZm Country = "ZM"
	CountryZw Country = "ZW"
)

func NewCountryFromString

func NewCountryFromString(s string) (Country, error)

func (Country) Ptr

func (c Country) Ptr() *Country

type CreateBookingCustomAttributeDefinitionResponse

type CreateBookingCustomAttributeDefinitionResponse struct {
	// The newly created custom attribute definition.
	CustomAttributeDefinition *CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"custom_attribute_definition,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [CreateBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-CreateBookingCustomAttributeDefinition) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*CreateBookingCustomAttributeDefinitionResponse) GetCustomAttributeDefinition

func (*CreateBookingCustomAttributeDefinitionResponse) GetErrors

func (*CreateBookingCustomAttributeDefinitionResponse) GetExtraProperties

func (c *CreateBookingCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*CreateBookingCustomAttributeDefinitionResponse) String

func (*CreateBookingCustomAttributeDefinitionResponse) UnmarshalJSON

type CreateBookingRequest

type CreateBookingRequest struct {
	// A unique key to make this request an idempotent operation.
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"`
	// The details of the booking to be created.
	Booking *Booking `json:"booking,omitempty" url:"-"`
}

type CreateBookingResponse

type CreateBookingResponse struct {
	// The booking that was created.
	Booking *Booking `json:"booking,omitempty" url:"booking,omitempty"`
	// Errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateBookingResponse) GetBooking

func (c *CreateBookingResponse) GetBooking() *Booking

func (*CreateBookingResponse) GetErrors

func (c *CreateBookingResponse) GetErrors() []*Error

func (*CreateBookingResponse) GetExtraProperties

func (c *CreateBookingResponse) GetExtraProperties() map[string]interface{}

func (*CreateBookingResponse) String

func (c *CreateBookingResponse) String() string

func (*CreateBookingResponse) UnmarshalJSON

func (c *CreateBookingResponse) UnmarshalJSON(data []byte) error

type CreateBreakTypeResponse

type CreateBreakTypeResponse struct {
	// The `BreakType` that was created by the request.
	BreakType *BreakType `json:"break_type,omitempty" url:"break_type,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response to the request to create a `BreakType`. The response contains the created `BreakType` object and might contain a set of `Error` objects if the request resulted in errors.

func (*CreateBreakTypeResponse) GetBreakType

func (c *CreateBreakTypeResponse) GetBreakType() *BreakType

func (*CreateBreakTypeResponse) GetErrors

func (c *CreateBreakTypeResponse) GetErrors() []*Error

func (*CreateBreakTypeResponse) GetExtraProperties

func (c *CreateBreakTypeResponse) GetExtraProperties() map[string]interface{}

func (*CreateBreakTypeResponse) String

func (c *CreateBreakTypeResponse) String() string

func (*CreateBreakTypeResponse) UnmarshalJSON

func (c *CreateBreakTypeResponse) UnmarshalJSON(data []byte) error

type CreateCardRequest

type CreateCardRequest struct {
	// A unique string that identifies this CreateCard request. Keys can be
	// any valid string and must be unique for every request.
	//
	// Max: 45 characters
	//
	// See [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more information.
	IdempotencyKey string `json:"idempotency_key" url:"-"`
	// The ID of the source which represents the card information to be stored. This can be a card nonce or a payment id.
	SourceID string `json:"source_id" url:"-"`
	// An identifying token generated by [Payments.verifyBuyer()](https://developer.squareup.com/reference/sdks/web/payments/objects/Payments#Payments.verifyBuyer).
	// Verification tokens encapsulate customer device information and 3-D Secure
	// challenge results to indicate that Square has verified the buyer identity.
	//
	// See the [SCA Overview](https://developer.squareup.com/docs/sca-overview).
	VerificationToken *string `json:"verification_token,omitempty" url:"-"`
	// Payment details associated with the card to be stored.
	Card *Card `json:"card,omitempty" url:"-"`
}

type CreateCardResponse

type CreateCardResponse struct {
	// Errors resulting from the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The card created by the request.
	Card *Card `json:"card,omitempty" url:"card,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [CreateCard](api-endpoint:Cards-CreateCard) endpoint.

Note: if there are errors processing the request, the card field will not be present.

func (*CreateCardResponse) GetCard

func (c *CreateCardResponse) GetCard() *Card

func (*CreateCardResponse) GetErrors

func (c *CreateCardResponse) GetErrors() []*Error

func (*CreateCardResponse) GetExtraProperties

func (c *CreateCardResponse) GetExtraProperties() map[string]interface{}

func (*CreateCardResponse) String

func (c *CreateCardResponse) String() string

func (*CreateCardResponse) UnmarshalJSON

func (c *CreateCardResponse) UnmarshalJSON(data []byte) error

type CreateCatalogImageRequest

type CreateCatalogImageRequest struct {
	// A unique string that identifies this CreateCatalogImage request.
	// Keys can be any valid string but must be unique for every CreateCatalogImage request.
	//
	// See [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more information.
	IdempotencyKey string `json:"idempotency_key" url:"idempotency_key"`
	// Unique ID of the `CatalogObject` to attach this `CatalogImage` object to. Leave this
	// field empty to create unattached images, for example if you are building an integration
	// where an image can be attached to catalog items at a later time.
	ObjectID *string `json:"object_id,omitempty" url:"object_id,omitempty"`
	// The new `CatalogObject` of the `IMAGE` type, namely, a `CatalogImage` object, to encapsulate the specified image file.
	Image *CatalogObject `json:"image,omitempty" url:"image,omitempty"`
	// If this is set to `true`, the image created will be the primary, or first image of the object referenced by `object_id`.
	// If the `CatalogObject` already has a primary `CatalogImage`, setting this field to `true` will replace the primary image.
	// If this is set to `false` and you use the Square API version 2021-12-15 or later, the image id will be appended to the list of `image_ids` on the object.
	//
	// With Square API version 2021-12-15 or later, the default value is `false`. Otherwise, the effective default value is `true`.
	IsPrimary *bool `json:"is_primary,omitempty" url:"is_primary,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateCatalogImageRequest) GetExtraProperties

func (c *CreateCatalogImageRequest) GetExtraProperties() map[string]interface{}

func (*CreateCatalogImageRequest) GetIdempotencyKey

func (c *CreateCatalogImageRequest) GetIdempotencyKey() string

func (*CreateCatalogImageRequest) GetImage

func (*CreateCatalogImageRequest) GetIsPrimary

func (c *CreateCatalogImageRequest) GetIsPrimary() *bool

func (*CreateCatalogImageRequest) GetObjectID

func (c *CreateCatalogImageRequest) GetObjectID() *string

func (*CreateCatalogImageRequest) String

func (c *CreateCatalogImageRequest) String() string

func (*CreateCatalogImageRequest) UnmarshalJSON

func (c *CreateCatalogImageRequest) UnmarshalJSON(data []byte) error

type CreateCatalogImageResponse

type CreateCatalogImageResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The newly created `CatalogImage` including a Square-generated
	// URL for the encapsulated image file.
	Image *CatalogObject `json:"image,omitempty" url:"image,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateCatalogImageResponse) GetErrors

func (c *CreateCatalogImageResponse) GetErrors() []*Error

func (*CreateCatalogImageResponse) GetExtraProperties

func (c *CreateCatalogImageResponse) GetExtraProperties() map[string]interface{}

func (*CreateCatalogImageResponse) GetImage

func (*CreateCatalogImageResponse) String

func (c *CreateCatalogImageResponse) String() string

func (*CreateCatalogImageResponse) UnmarshalJSON

func (c *CreateCatalogImageResponse) UnmarshalJSON(data []byte) error

type CreateCheckoutRequest

type CreateCheckoutRequest struct {
	// The ID of the business location to associate the checkout with.
	LocationID string `json:"-" url:"-"`
	// A unique string that identifies this checkout among others you have 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 are
	// unsure whether a particular checkout was created successfully, you can attempt it again with
	// the same idempotency key and all the same other parameters without worrying about creating duplicates.
	//
	// You should use a random number/string generator native to the language
	// you are working in to generate strings for your idempotency keys.
	//
	// For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).
	IdempotencyKey string `json:"idempotency_key" url:"-"`
	// The order including line items to be checked out.
	Order *CreateOrderRequest `json:"order,omitempty" url:"-"`
	// If `true`, Square Checkout collects shipping information on your behalf and stores
	// that information with the transaction information in the Square Seller Dashboard.
	//
	// Default: `false`.
	AskForShippingAddress *bool `json:"ask_for_shipping_address,omitempty" url:"-"`
	// The email address to display on the Square Checkout confirmation page
	// and confirmation email that the buyer can use to contact the seller.
	//
	// If this value is not set, the confirmation page and email display the
	// primary email address associated with the seller's Square account.
	//
	// Default: none; only exists if explicitly set.
	MerchantSupportEmail *string `json:"merchant_support_email,omitempty" url:"-"`
	// If provided, the buyer's email is prepopulated on the checkout page
	// as an editable text field.
	//
	// Default: none; only exists if explicitly set.
	PrePopulateBuyerEmail *string `json:"pre_populate_buyer_email,omitempty" url:"-"`
	// If provided, the buyer's shipping information is prepopulated on the
	// checkout page as editable text fields.
	//
	// Default: none; only exists if explicitly set.
	PrePopulateShippingAddress *Address `json:"pre_populate_shipping_address,omitempty" url:"-"`
	// The URL to redirect to after the checkout is completed with `checkoutId`,
	// `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:
	//
	// `http://www.example.com/order-complete?checkoutId=xxxxxx&amp;referenceId=xxxxxx&amp;transactionId=xxxxxx`
	//
	// If you do not provide a redirect URL, Square Checkout displays an order
	// confirmation page on your behalf; however, it is strongly recommended 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.
	RedirectURL *string `json:"redirect_url,omitempty" url:"-"`
	// The basic primitive of a 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` field
	// cannot be more than 90% of the `total_money` calculated by Square for your order.
	// The `location_id` must be a valid seller location where the checkout is occurring.
	//
	// This field requires `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission.
	//
	// This field is currently not supported in the Square Sandbox.
	AdditionalRecipients []*ChargeRequestAdditionalRecipient `json:"additional_recipients,omitempty" url:"-"`
	// An optional note to associate with the `checkout` object.
	//
	// This value cannot exceed 60 characters.
	Note *string `json:"note,omitempty" url:"-"`
}

type CreateCheckoutResponse

type CreateCheckoutResponse struct {
	// The newly created `checkout` object associated with the provided idempotency key.
	Checkout *Checkout `json:"checkout,omitempty" url:"checkout,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the `CreateCheckout` endpoint.

func (*CreateCheckoutResponse) GetCheckout

func (c *CreateCheckoutResponse) GetCheckout() *Checkout

func (*CreateCheckoutResponse) GetErrors

func (c *CreateCheckoutResponse) GetErrors() []*Error

func (*CreateCheckoutResponse) GetExtraProperties

func (c *CreateCheckoutResponse) GetExtraProperties() map[string]interface{}

func (*CreateCheckoutResponse) String

func (c *CreateCheckoutResponse) String() string

func (*CreateCheckoutResponse) UnmarshalJSON

func (c *CreateCheckoutResponse) UnmarshalJSON(data []byte) error

type CreateCustomerCardResponse

type CreateCustomerCardResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The created card on file.
	Card *Card `json:"card,omitempty" url:"card,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the `CreateCustomerCard` endpoint.

Either `errors` or `card` is present in a given response (never both).

func (*CreateCustomerCardResponse) GetCard

func (c *CreateCustomerCardResponse) GetCard() *Card

func (*CreateCustomerCardResponse) GetErrors

func (c *CreateCustomerCardResponse) GetErrors() []*Error

func (*CreateCustomerCardResponse) GetExtraProperties

func (c *CreateCustomerCardResponse) GetExtraProperties() map[string]interface{}

func (*CreateCustomerCardResponse) String

func (c *CreateCustomerCardResponse) String() string

func (*CreateCustomerCardResponse) UnmarshalJSON

func (c *CreateCustomerCardResponse) UnmarshalJSON(data []byte) error

type CreateCustomerCustomAttributeDefinitionResponse

type CreateCustomerCustomAttributeDefinitionResponse struct {
	// The new custom attribute definition.
	CustomAttributeDefinition *CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"custom_attribute_definition,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [CreateCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-CreateCustomerCustomAttributeDefinition) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*CreateCustomerCustomAttributeDefinitionResponse) GetCustomAttributeDefinition

func (*CreateCustomerCustomAttributeDefinitionResponse) GetErrors

func (*CreateCustomerCustomAttributeDefinitionResponse) GetExtraProperties

func (c *CreateCustomerCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*CreateCustomerCustomAttributeDefinitionResponse) String

func (*CreateCustomerCustomAttributeDefinitionResponse) UnmarshalJSON

type CreateCustomerGroupResponse

type CreateCustomerGroupResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The successfully created customer group.
	Group *CustomerGroup `json:"group,omitempty" url:"group,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [CreateCustomerGroup](api-endpoint:CustomerGroups-CreateCustomerGroup) endpoint.

Either `errors` or `group` is present in a given response (never both).

func (*CreateCustomerGroupResponse) GetErrors

func (c *CreateCustomerGroupResponse) GetErrors() []*Error

func (*CreateCustomerGroupResponse) GetExtraProperties

func (c *CreateCustomerGroupResponse) GetExtraProperties() map[string]interface{}

func (*CreateCustomerGroupResponse) GetGroup

func (*CreateCustomerGroupResponse) String

func (c *CreateCustomerGroupResponse) String() string

func (*CreateCustomerGroupResponse) UnmarshalJSON

func (c *CreateCustomerGroupResponse) UnmarshalJSON(data []byte) error

type CreateCustomerRequest

type CreateCustomerRequest struct {
	// The idempotency key for the request.	For more information, see
	// [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"`
	// The given name (that is, the first name) associated with the customer profile.
	//
	// The maximum length for this value is 300 characters.
	GivenName *string `json:"given_name,omitempty" url:"-"`
	// The family name (that is, the last name) associated with the customer profile.
	//
	// The maximum length for this value is 300 characters.
	FamilyName *string `json:"family_name,omitempty" url:"-"`
	// A business name associated with the customer profile.
	//
	// The maximum length for this value is 500 characters.
	CompanyName *string `json:"company_name,omitempty" url:"-"`
	// A nickname for the customer profile.
	//
	// The maximum length for this value is 100 characters.
	Nickname *string `json:"nickname,omitempty" url:"-"`
	// The email address associated with the customer profile.
	//
	// The maximum length for this value is 254 characters.
	EmailAddress *string `json:"email_address,omitempty" url:"-"`
	// The physical address associated with the customer profile. For maximum length constraints, see
	// [Customer addresses](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#address).
	// The `first_name` and `last_name` fields are ignored if they are present in the request.
	Address *Address `json:"address,omitempty" url:"-"`
	// The phone number associated with the customer profile. The phone number must be valid and can contain
	// 9–16 digits, with an optional `+` prefix and country code. For more information, see
	// [Customer phone numbers](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#phone-number).
	PhoneNumber *string `json:"phone_number,omitempty" url:"-"`
	// An optional second ID used to associate the customer profile with an
	// entity in another system.
	//
	// The maximum length for this value is 100 characters.
	ReferenceID *string `json:"reference_id,omitempty" url:"-"`
	// A custom note associated with the customer profile.
	Note *string `json:"note,omitempty" url:"-"`
	// The birthday associated with the customer profile, in `YYYY-MM-DD` or `MM-DD` format. For example,
	// specify `1998-09-21` for September 21, 1998, or `09-21` for September 21. Birthdays are returned in `YYYY-MM-DD`
	// format, where `YYYY` is the specified birth year or `0000` if a birth year is not specified.
	Birthday *string `json:"birthday,omitempty" url:"-"`
	// The tax ID associated with the customer profile. This field is available only for customers of sellers
	// in EU countries or the United Kingdom. For more information,
	// see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids).
	TaxIDs *CustomerTaxIDs `json:"tax_ids,omitempty" url:"-"`
}

type CreateCustomerResponse

type CreateCustomerResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The created customer.
	Customer *Customer `json:"customer,omitempty" url:"customer,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [CreateCustomer](api-endpoint:Customers-CreateCustomer) or [BulkCreateCustomers](api-endpoint:Customers-BulkCreateCustomers) endpoint.

Either `errors` or `customer` is present in a given response (never both).

func (*CreateCustomerResponse) GetCustomer

func (c *CreateCustomerResponse) GetCustomer() *Customer

func (*CreateCustomerResponse) GetErrors

func (c *CreateCustomerResponse) GetErrors() []*Error

func (*CreateCustomerResponse) GetExtraProperties

func (c *CreateCustomerResponse) GetExtraProperties() map[string]interface{}

func (*CreateCustomerResponse) String

func (c *CreateCustomerResponse) String() string

func (*CreateCustomerResponse) UnmarshalJSON

func (c *CreateCustomerResponse) UnmarshalJSON(data []byte) error

type CreateDeviceCodeResponse

type CreateDeviceCodeResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The created DeviceCode object containing the device code string.
	DeviceCode *DeviceCode `json:"device_code,omitempty" url:"device_code,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateDeviceCodeResponse) GetDeviceCode

func (c *CreateDeviceCodeResponse) GetDeviceCode() *DeviceCode

func (*CreateDeviceCodeResponse) GetErrors

func (c *CreateDeviceCodeResponse) GetErrors() []*Error

func (*CreateDeviceCodeResponse) GetExtraProperties

func (c *CreateDeviceCodeResponse) GetExtraProperties() map[string]interface{}

func (*CreateDeviceCodeResponse) String

func (c *CreateDeviceCodeResponse) String() string

func (*CreateDeviceCodeResponse) UnmarshalJSON

func (c *CreateDeviceCodeResponse) UnmarshalJSON(data []byte) error

type CreateDisputeEvidenceFileRequest

type CreateDisputeEvidenceFileRequest struct {
	// A unique key identifying the request. For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).
	IdempotencyKey string `json:"idempotency_key" url:"idempotency_key"`
	// The type of evidence you are uploading.
	// See [DisputeEvidenceType](#type-disputeevidencetype) for possible values
	EvidenceType *DisputeEvidenceType `json:"evidence_type,omitempty" url:"evidence_type,omitempty"`
	// The MIME type of the uploaded file.
	// The type can be image/heic, image/heif, image/jpeg, application/pdf, image/png, or image/tiff.
	ContentType *string `json:"content_type,omitempty" url:"content_type,omitempty"`
	// contains filtered or unexported fields
}

Defines the parameters for a `CreateDisputeEvidenceFile` request.

func (*CreateDisputeEvidenceFileRequest) GetContentType

func (c *CreateDisputeEvidenceFileRequest) GetContentType() *string

func (*CreateDisputeEvidenceFileRequest) GetEvidenceType

func (*CreateDisputeEvidenceFileRequest) GetExtraProperties

func (c *CreateDisputeEvidenceFileRequest) GetExtraProperties() map[string]interface{}

func (*CreateDisputeEvidenceFileRequest) GetIdempotencyKey

func (c *CreateDisputeEvidenceFileRequest) GetIdempotencyKey() string

func (*CreateDisputeEvidenceFileRequest) String

func (*CreateDisputeEvidenceFileRequest) UnmarshalJSON

func (c *CreateDisputeEvidenceFileRequest) UnmarshalJSON(data []byte) error

type CreateDisputeEvidenceFileResponse

type CreateDisputeEvidenceFileResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The metadata of the newly uploaded dispute evidence.
	Evidence *DisputeEvidence `json:"evidence,omitempty" url:"evidence,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields in a `CreateDisputeEvidenceFile` response.

func (*CreateDisputeEvidenceFileResponse) GetErrors

func (c *CreateDisputeEvidenceFileResponse) GetErrors() []*Error

func (*CreateDisputeEvidenceFileResponse) GetEvidence

func (*CreateDisputeEvidenceFileResponse) GetExtraProperties

func (c *CreateDisputeEvidenceFileResponse) GetExtraProperties() map[string]interface{}

func (*CreateDisputeEvidenceFileResponse) String

func (*CreateDisputeEvidenceFileResponse) UnmarshalJSON

func (c *CreateDisputeEvidenceFileResponse) UnmarshalJSON(data []byte) error

type CreateDisputeEvidenceTextRequest

type CreateDisputeEvidenceTextRequest struct {
	// The ID of the dispute for which you want to upload evidence.
	DisputeID string `json:"-" url:"-"`
	// A unique key identifying the request. For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).
	IdempotencyKey string `json:"idempotency_key" url:"-"`
	// The type of evidence you are uploading.
	// See [DisputeEvidenceType](#type-disputeevidencetype) for possible values
	EvidenceType *DisputeEvidenceType `json:"evidence_type,omitempty" url:"-"`
	// The evidence string.
	EvidenceText string `json:"evidence_text" url:"-"`
}

type CreateDisputeEvidenceTextResponse

type CreateDisputeEvidenceTextResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The newly uploaded dispute evidence metadata.
	Evidence *DisputeEvidence `json:"evidence,omitempty" url:"evidence,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields in a `CreateDisputeEvidenceText` response.

func (*CreateDisputeEvidenceTextResponse) GetErrors

func (c *CreateDisputeEvidenceTextResponse) GetErrors() []*Error

func (*CreateDisputeEvidenceTextResponse) GetEvidence

func (*CreateDisputeEvidenceTextResponse) GetExtraProperties

func (c *CreateDisputeEvidenceTextResponse) GetExtraProperties() map[string]interface{}

func (*CreateDisputeEvidenceTextResponse) String

func (*CreateDisputeEvidenceTextResponse) UnmarshalJSON

func (c *CreateDisputeEvidenceTextResponse) UnmarshalJSON(data []byte) error

type CreateEvidenceFileDisputesRequest added in v1.2.0

type CreateEvidenceFileDisputesRequest struct {
	// The ID of the dispute for which you want to upload evidence.
	DisputeID string                            `json:"-" url:"-"`
	ImageFile io.Reader                         `json:"-" url:"-"`
	Request   *CreateDisputeEvidenceFileRequest `json:"request,omitempty" url:"-"`
}

type CreateGiftCardActivityResponse

type CreateGiftCardActivityResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The gift card activity that was created.
	GiftCardActivity *GiftCardActivity `json:"gift_card_activity,omitempty" url:"gift_card_activity,omitempty"`
	// contains filtered or unexported fields
}

A response that contains a `GiftCardActivity` that was created. The response might contain a set of `Error` objects if the request resulted in errors.

func (*CreateGiftCardActivityResponse) GetErrors

func (c *CreateGiftCardActivityResponse) GetErrors() []*Error

func (*CreateGiftCardActivityResponse) GetExtraProperties

func (c *CreateGiftCardActivityResponse) GetExtraProperties() map[string]interface{}

func (*CreateGiftCardActivityResponse) GetGiftCardActivity

func (c *CreateGiftCardActivityResponse) GetGiftCardActivity() *GiftCardActivity

func (*CreateGiftCardActivityResponse) String

func (*CreateGiftCardActivityResponse) UnmarshalJSON

func (c *CreateGiftCardActivityResponse) UnmarshalJSON(data []byte) error

type CreateGiftCardRequest

type CreateGiftCardRequest struct {
	// A unique identifier for this request, used to ensure idempotency. For more information,
	// see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
	IdempotencyKey string `json:"idempotency_key" url:"-"`
	// The ID of the [location](entity:Location) where the gift card should be registered for
	// reporting purposes. Gift cards can be redeemed at any of the seller's locations.
	LocationID string `json:"location_id" url:"-"`
	// The gift card to create. The `type` field is required for this request. The `gan_source`
	// and `gan` fields are included as follows:
	//
	// To direct Square to generate a 16-digit GAN, omit `gan_source` and `gan`.
	//
	// To provide a custom GAN, include `gan_source` and `gan`.
	// - For `gan_source`, specify `OTHER`.
	// - For `gan`, provide a custom GAN containing 8 to 20 alphanumeric characters. The GAN must be
	// unique for the seller and cannot start with the same bank identification number (BIN) as major
	// credit cards. Do not use GANs that are easy to guess (such as 12345678) because they greatly
	// increase the risk of fraud. It is the responsibility of the developer to ensure the security
	// of their custom GANs. For more information, see
	// [Custom GANs](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api#custom-gans).
	//
	// To register an unused, physical gift card that the seller previously ordered from Square,
	// include `gan` and provide the GAN that is printed on the gift card.
	GiftCard *GiftCard `json:"gift_card,omitempty" url:"-"`
}

type CreateGiftCardResponse

type CreateGiftCardResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The new gift card.
	GiftCard *GiftCard `json:"gift_card,omitempty" url:"gift_card,omitempty"`
	// contains filtered or unexported fields
}

A response that contains a `GiftCard`. The response might contain a set of `Error` objects if the request resulted in errors.

func (*CreateGiftCardResponse) GetErrors

func (c *CreateGiftCardResponse) GetErrors() []*Error

func (*CreateGiftCardResponse) GetExtraProperties

func (c *CreateGiftCardResponse) GetExtraProperties() map[string]interface{}

func (*CreateGiftCardResponse) GetGiftCard

func (c *CreateGiftCardResponse) GetGiftCard() *GiftCard

func (*CreateGiftCardResponse) String

func (c *CreateGiftCardResponse) String() string

func (*CreateGiftCardResponse) UnmarshalJSON

func (c *CreateGiftCardResponse) UnmarshalJSON(data []byte) error

type CreateInvoiceAttachmentRequest

type CreateInvoiceAttachmentRequest struct {
	// The ID of the [invoice](entity:Invoice) to attach the file to.
	InvoiceID string      `json:"-" url:"-"`
	ImageFile io.Reader   `json:"-" url:"-"`
	Request   interface{} `json:"request,omitempty" url:"-"`
}

type CreateInvoiceAttachmentResponse

type CreateInvoiceAttachmentResponse struct {
	// Metadata about the attachment that was added to the invoice.
	Attachment *InvoiceAttachment `json:"attachment,omitempty" url:"attachment,omitempty"`
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [CreateInvoiceAttachment](api-endpoint:Invoices-CreateInvoiceAttachment) response.

func (*CreateInvoiceAttachmentResponse) GetAttachment

func (*CreateInvoiceAttachmentResponse) GetErrors

func (c *CreateInvoiceAttachmentResponse) GetErrors() []*Error

func (*CreateInvoiceAttachmentResponse) GetExtraProperties

func (c *CreateInvoiceAttachmentResponse) GetExtraProperties() map[string]interface{}

func (*CreateInvoiceAttachmentResponse) String

func (*CreateInvoiceAttachmentResponse) UnmarshalJSON

func (c *CreateInvoiceAttachmentResponse) UnmarshalJSON(data []byte) error

type CreateInvoiceRequest

type CreateInvoiceRequest struct {
	// The invoice to create.
	Invoice *Invoice `json:"invoice,omitempty" url:"-"`
	// 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/build-basics/common-api-patterns/idempotency).
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"`
}

type CreateInvoiceResponse

type CreateInvoiceResponse struct {
	// The newly created invoice.
	Invoice *Invoice `json:"invoice,omitempty" url:"invoice,omitempty"`
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response returned by the `CreateInvoice` request.

func (*CreateInvoiceResponse) GetErrors

func (c *CreateInvoiceResponse) GetErrors() []*Error

func (*CreateInvoiceResponse) GetExtraProperties

func (c *CreateInvoiceResponse) GetExtraProperties() map[string]interface{}

func (*CreateInvoiceResponse) GetInvoice

func (c *CreateInvoiceResponse) GetInvoice() *Invoice

func (*CreateInvoiceResponse) String

func (c *CreateInvoiceResponse) String() string

func (*CreateInvoiceResponse) UnmarshalJSON

func (c *CreateInvoiceResponse) UnmarshalJSON(data []byte) error

type CreateJobRequest added in v1.0.0

type CreateJobRequest struct {
	// The job to create. The `title` field is required and `is_tip_eligible` defaults to true.
	Job *Job `json:"job,omitempty" url:"-"`
	// A unique identifier for the `CreateJob` request. Keys can be any valid string,
	// but must be unique for each request. For more information, see
	// [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
	IdempotencyKey string `json:"idempotency_key" url:"-"`
}

type CreateJobResponse added in v1.0.0

type CreateJobResponse struct {
	// The new job.
	Job *Job `json:"job,omitempty" url:"job,omitempty"`
	// The errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [CreateJob](api-endpoint:Team-CreateJob) response. Either `job` or `errors` is present in the response.

func (*CreateJobResponse) GetErrors added in v1.0.0

func (c *CreateJobResponse) GetErrors() []*Error

func (*CreateJobResponse) GetExtraProperties added in v1.0.0

func (c *CreateJobResponse) GetExtraProperties() map[string]interface{}

func (*CreateJobResponse) GetJob added in v1.0.0

func (c *CreateJobResponse) GetJob() *Job

func (*CreateJobResponse) String added in v1.0.0

func (c *CreateJobResponse) String() string

func (*CreateJobResponse) UnmarshalJSON added in v1.0.0

func (c *CreateJobResponse) UnmarshalJSON(data []byte) error

type CreateLocationCustomAttributeDefinitionResponse

type CreateLocationCustomAttributeDefinitionResponse struct {
	// The new custom attribute definition.
	CustomAttributeDefinition *CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"custom_attribute_definition,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [CreateLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-CreateLocationCustomAttributeDefinition) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*CreateLocationCustomAttributeDefinitionResponse) GetCustomAttributeDefinition

func (*CreateLocationCustomAttributeDefinitionResponse) GetErrors

func (*CreateLocationCustomAttributeDefinitionResponse) GetExtraProperties

func (c *CreateLocationCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*CreateLocationCustomAttributeDefinitionResponse) String

func (*CreateLocationCustomAttributeDefinitionResponse) UnmarshalJSON

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, but any information you care about for the location should be included.
	// The remaining fields are automatically added based on the data from the [main location](https://developer.squareup.com/docs/locations-api#about-the-main-location).
	Location *Location `json:"location,omitempty" url:"-"`
}

type CreateLocationResponse

type CreateLocationResponse struct {
	// Information about [errors](https://developer.squareup.com/docs/build-basics/handling-errors) encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The newly created `Location` object.
	Location *Location `json:"location,omitempty" url:"location,omitempty"`
	// contains filtered or unexported fields
}

The response object returned by the [CreateLocation](api-endpoint:Locations-CreateLocation) endpoint.

func (*CreateLocationResponse) GetErrors

func (c *CreateLocationResponse) GetErrors() []*Error

func (*CreateLocationResponse) GetExtraProperties

func (c *CreateLocationResponse) GetExtraProperties() map[string]interface{}

func (*CreateLocationResponse) GetLocation

func (c *CreateLocationResponse) GetLocation() *Location

func (*CreateLocationResponse) String

func (c *CreateLocationResponse) String() string

func (*CreateLocationResponse) UnmarshalJSON

func (c *CreateLocationResponse) UnmarshalJSON(data []byte) error

type CreateLoyaltyAccountResponse

type CreateLoyaltyAccountResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The newly created loyalty account.
	LoyaltyAccount *LoyaltyAccount `json:"loyalty_account,omitempty" url:"loyalty_account,omitempty"`
	// contains filtered or unexported fields
}

A response that includes loyalty account created.

func (*CreateLoyaltyAccountResponse) GetErrors

func (c *CreateLoyaltyAccountResponse) GetErrors() []*Error

func (*CreateLoyaltyAccountResponse) GetExtraProperties

func (c *CreateLoyaltyAccountResponse) GetExtraProperties() map[string]interface{}

func (*CreateLoyaltyAccountResponse) GetLoyaltyAccount

func (c *CreateLoyaltyAccountResponse) GetLoyaltyAccount() *LoyaltyAccount

func (*CreateLoyaltyAccountResponse) String

func (*CreateLoyaltyAccountResponse) UnmarshalJSON

func (c *CreateLoyaltyAccountResponse) UnmarshalJSON(data []byte) error

type CreateLoyaltyPromotionResponse

type CreateLoyaltyPromotionResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The new loyalty promotion.
	LoyaltyPromotion *LoyaltyPromotion `json:"loyalty_promotion,omitempty" url:"loyalty_promotion,omitempty"`
	// contains filtered or unexported fields
}

Represents a [CreateLoyaltyPromotion](api-endpoint:Loyalty-CreateLoyaltyPromotion) response. Either `loyalty_promotion` or `errors` is present in the response.

func (*CreateLoyaltyPromotionResponse) GetErrors

func (c *CreateLoyaltyPromotionResponse) GetErrors() []*Error

func (*CreateLoyaltyPromotionResponse) GetExtraProperties

func (c *CreateLoyaltyPromotionResponse) GetExtraProperties() map[string]interface{}

func (*CreateLoyaltyPromotionResponse) GetLoyaltyPromotion

func (c *CreateLoyaltyPromotionResponse) GetLoyaltyPromotion() *LoyaltyPromotion

func (*CreateLoyaltyPromotionResponse) String

func (*CreateLoyaltyPromotionResponse) UnmarshalJSON

func (c *CreateLoyaltyPromotionResponse) UnmarshalJSON(data []byte) error

type CreateLoyaltyRewardResponse

type CreateLoyaltyRewardResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The loyalty reward created.
	Reward *LoyaltyReward `json:"reward,omitempty" url:"reward,omitempty"`
	// contains filtered or unexported fields
}

A response that includes the loyalty reward created.

func (*CreateLoyaltyRewardResponse) GetErrors

func (c *CreateLoyaltyRewardResponse) GetErrors() []*Error

func (*CreateLoyaltyRewardResponse) GetExtraProperties

func (c *CreateLoyaltyRewardResponse) GetExtraProperties() map[string]interface{}

func (*CreateLoyaltyRewardResponse) GetReward

func (*CreateLoyaltyRewardResponse) String

func (c *CreateLoyaltyRewardResponse) String() string

func (*CreateLoyaltyRewardResponse) UnmarshalJSON

func (c *CreateLoyaltyRewardResponse) UnmarshalJSON(data []byte) error

type CreateMerchantCustomAttributeDefinitionResponse

type CreateMerchantCustomAttributeDefinitionResponse struct {
	// The new custom attribute definition.
	CustomAttributeDefinition *CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"custom_attribute_definition,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [CreateMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-CreateMerchantCustomAttributeDefinition) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*CreateMerchantCustomAttributeDefinitionResponse) GetCustomAttributeDefinition

func (*CreateMerchantCustomAttributeDefinitionResponse) GetErrors

func (*CreateMerchantCustomAttributeDefinitionResponse) GetExtraProperties

func (c *CreateMerchantCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*CreateMerchantCustomAttributeDefinitionResponse) String

func (*CreateMerchantCustomAttributeDefinitionResponse) UnmarshalJSON

type CreateMobileAuthorizationCodeRequest

type CreateMobileAuthorizationCodeRequest struct {
	// The Square location ID that the authorization code should be tied to.
	LocationID *string `json:"location_id,omitempty" url:"-"`
}

type CreateMobileAuthorizationCodeResponse

type CreateMobileAuthorizationCodeResponse struct {
	// The generated authorization code that connects a mobile application instance
	// to a Square account.
	AuthorizationCode *string `json:"authorization_code,omitempty" url:"authorization_code,omitempty"`
	// The timestamp when `authorization_code` expires, in
	// [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, "2016-09-04T23:59:33.123Z").
	ExpiresAt *string `json:"expires_at,omitempty" url:"expires_at,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the `CreateMobileAuthorizationCode` endpoint.

func (*CreateMobileAuthorizationCodeResponse) GetAuthorizationCode

func (c *CreateMobileAuthorizationCodeResponse) GetAuthorizationCode() *string

func (*CreateMobileAuthorizationCodeResponse) GetErrors

func (c *CreateMobileAuthorizationCodeResponse) GetErrors() []*Error

func (*CreateMobileAuthorizationCodeResponse) GetExpiresAt

func (c *CreateMobileAuthorizationCodeResponse) GetExpiresAt() *string

func (*CreateMobileAuthorizationCodeResponse) GetExtraProperties

func (c *CreateMobileAuthorizationCodeResponse) GetExtraProperties() map[string]interface{}

func (*CreateMobileAuthorizationCodeResponse) String

func (*CreateMobileAuthorizationCodeResponse) UnmarshalJSON

func (c *CreateMobileAuthorizationCodeResponse) UnmarshalJSON(data []byte) error

type CreateOrderCustomAttributeDefinitionResponse

type CreateOrderCustomAttributeDefinitionResponse struct {
	// The new custom attribute definition.
	CustomAttributeDefinition *CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"custom_attribute_definition,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from creating an order custom attribute definition.

func (*CreateOrderCustomAttributeDefinitionResponse) GetCustomAttributeDefinition

func (*CreateOrderCustomAttributeDefinitionResponse) GetErrors

func (*CreateOrderCustomAttributeDefinitionResponse) GetExtraProperties

func (c *CreateOrderCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*CreateOrderCustomAttributeDefinitionResponse) String

func (*CreateOrderCustomAttributeDefinitionResponse) UnmarshalJSON

func (c *CreateOrderCustomAttributeDefinitionResponse) UnmarshalJSON(data []byte) error

type CreateOrderRequest

type CreateOrderRequest struct {
	// The order to create. If this field is set, the only other top-level field that can be
	// set is the `idempotency_key`.
	Order *Order `json:"order,omitempty" url:"order,omitempty"`
	// A value you specify that uniquely identifies this
	// order among orders you have created.
	//
	// If you are unsure whether a particular order was created successfully,
	// you can try it again with the same idempotency key without
	// worrying about creating duplicate orders.
	//
	// For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"idempotency_key,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateOrderRequest) GetExtraProperties

func (c *CreateOrderRequest) GetExtraProperties() map[string]interface{}

func (*CreateOrderRequest) GetIdempotencyKey

func (c *CreateOrderRequest) GetIdempotencyKey() *string

func (*CreateOrderRequest) GetOrder

func (c *CreateOrderRequest) GetOrder() *Order

func (*CreateOrderRequest) String

func (c *CreateOrderRequest) String() string

func (*CreateOrderRequest) UnmarshalJSON

func (c *CreateOrderRequest) UnmarshalJSON(data []byte) error

type CreateOrderResponse

type CreateOrderResponse struct {
	// The newly created order.
	Order *Order `json:"order,omitempty" url:"order,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the `CreateOrder` endpoint.

Either `errors` or `order` is present in a given response, but never both.

func (*CreateOrderResponse) GetErrors

func (c *CreateOrderResponse) GetErrors() []*Error

func (*CreateOrderResponse) GetExtraProperties

func (c *CreateOrderResponse) GetExtraProperties() map[string]interface{}

func (*CreateOrderResponse) GetOrder

func (c *CreateOrderResponse) GetOrder() *Order

func (*CreateOrderResponse) String

func (c *CreateOrderResponse) String() string

func (*CreateOrderResponse) UnmarshalJSON

func (c *CreateOrderResponse) UnmarshalJSON(data []byte) error

type CreatePaymentLinkResponse

type CreatePaymentLinkResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The created payment link.
	PaymentLink *PaymentLink `json:"payment_link,omitempty" url:"payment_link,omitempty"`
	// The list of related objects.
	RelatedResources *PaymentLinkRelatedResources `json:"related_resources,omitempty" url:"related_resources,omitempty"`
	// contains filtered or unexported fields
}

func (*CreatePaymentLinkResponse) GetErrors

func (c *CreatePaymentLinkResponse) GetErrors() []*Error

func (*CreatePaymentLinkResponse) GetExtraProperties

func (c *CreatePaymentLinkResponse) GetExtraProperties() map[string]interface{}
func (c *CreatePaymentLinkResponse) GetPaymentLink() *PaymentLink

func (*CreatePaymentLinkResponse) GetRelatedResources

func (c *CreatePaymentLinkResponse) GetRelatedResources() *PaymentLinkRelatedResources

func (*CreatePaymentLinkResponse) String

func (c *CreatePaymentLinkResponse) String() string

func (*CreatePaymentLinkResponse) UnmarshalJSON

func (c *CreatePaymentLinkResponse) UnmarshalJSON(data []byte) error

type CreatePaymentRequest

type CreatePaymentRequest struct {
	// The ID for the source of funds for this payment.
	// This could be a payment token generated by the Web Payments SDK for any of its
	// [supported methods](https://developer.squareup.com/docs/web-payments/overview#explore-payment-methods),
	// including cards, bank transfers, Afterpay or Cash App Pay. If recording a payment
	// that the seller received outside of Square, specify either "CASH" or "EXTERNAL".
	// For more information, see
	// [Take Payments](https://developer.squareup.com/docs/payments-api/take-payments).
	SourceID string `json:"source_id" url:"-"`
	// A unique string that identifies this `CreatePayment` request. Keys can be any valid string
	// but must be unique for every `CreatePayment` request.
	//
	// 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).
	IdempotencyKey string `json:"idempotency_key" url:"-"`
	// 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.
	AmountMoney *Money `json:"amount_money,omitempty" url:"-"`
	// 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" url:"-"`
	// 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).
	//
	// To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required.
	// For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions).
	AppFeeMoney *Money `json:"app_fee_money,omitempty" url:"-"`
	// The duration of time after the payment's creation when Square automatically
	// either completes or cancels the payment depending on the `delay_action` field value.
	// For more information, see
	// [Time threshold](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture#time-threshold).
	//
	// This parameter should be specified as a time duration, in RFC 3339 format.
	//
	// 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" url:"-"`
	// The action to be applied to the payment when the `delay_duration` has elapsed. The action must be
	// CANCEL or COMPLETE. For more information, see
	// [Time Threshold](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture#time-threshold).
	//
	// Default: CANCEL
	DelayAction *string `json:"delay_action,omitempty" url:"-"`
	// 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/card-payments#delayed-capture-of-a-card-payment).
	//
	// Default: true
	Autocomplete *bool `json:"autocomplete,omitempty" url:"-"`
	// Associates a previously created order with this payment.
	OrderID *string `json:"order_id,omitempty" url:"-"`
	// The [Customer](entity: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 Cards API.
	CustomerID *string `json:"customer_id,omitempty" url:"-"`
	// The location ID to associate with the payment. If not specified, the [main location](https://developer.squareup.com/docs/locations-api#about-the-main-location) is
	// used.
	LocationID *string `json:"location_id,omitempty" url:"-"`
	// An optional [TeamMember](entity:TeamMember) ID to associate with
	// this payment.
	TeamMemberID *string `json:"team_member_id,omitempty" url:"-"`
	// 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).
	ReferenceID *string `json:"reference_id,omitempty" url:"-"`
	// An identifying token generated by [payments.verifyBuyer()](https://developer.squareup.com/reference/sdks/web/payments/objects/Payments#Payments.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" url:"-"`
	// 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" url:"-"`
	// The buyer's email address.
	BuyerEmailAddress *string `json:"buyer_email_address,omitempty" url:"-"`
	// The buyer's phone number.
	// Must follow the following format:
	// 1. A leading + symbol (followed by a country code)
	// 2. The phone number can contain spaces and the special characters `(` , `)` , `-` , and `.`.
	// Alphabetical characters aren't allowed.
	// 3. The phone number must contain between 9 and 16 digits.
	BuyerPhoneNumber *string `json:"buyer_phone_number,omitempty" url:"-"`
	// The buyer's billing address.
	BillingAddress *Address `json:"billing_address,omitempty" url:"-"`
	// The buyer's shipping address.
	ShippingAddress *Address `json:"shipping_address,omitempty" url:"-"`
	// An optional note to be entered by the developer when creating a payment.
	Note *string `json:"note,omitempty" url:"-"`
	// 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.
	StatementDescriptionIdentifier *string `json:"statement_description_identifier,omitempty" url:"-"`
	// Additional details required when recording a cash payment (`source_id` is CASH).
	CashDetails *CashPaymentDetails `json:"cash_details,omitempty" url:"-"`
	// Additional details required when recording an external payment (`source_id` is EXTERNAL).
	ExternalDetails *ExternalPaymentDetails `json:"external_details,omitempty" url:"-"`
	// Details about the customer making the payment.
	CustomerDetails *CustomerDetails `json:"customer_details,omitempty" url:"-"`
	// An optional field for specifying the offline payment details. This is intended for
	// internal 1st-party callers only.
	OfflinePaymentDetails *OfflinePaymentDetails `json:"offline_payment_details,omitempty" url:"-"`
}

type CreatePaymentResponse

type CreatePaymentResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The newly created payment.
	Payment *Payment `json:"payment,omitempty" url:"payment,omitempty"`
	// contains filtered or unexported fields
}

Defines the response returned by [CreatePayment](api-endpoint:Payments-CreatePayment).

If there are errors processing the request, the `payment` field might not be present, or it might be present with a status of `FAILED`.

func (*CreatePaymentResponse) GetErrors

func (c *CreatePaymentResponse) GetErrors() []*Error

func (*CreatePaymentResponse) GetExtraProperties

func (c *CreatePaymentResponse) GetExtraProperties() map[string]interface{}

func (*CreatePaymentResponse) GetPayment

func (c *CreatePaymentResponse) GetPayment() *Payment

func (*CreatePaymentResponse) String

func (c *CreatePaymentResponse) String() string

func (*CreatePaymentResponse) UnmarshalJSON

func (c *CreatePaymentResponse) UnmarshalJSON(data []byte) error

type CreateShiftResponse

type CreateShiftResponse struct {
	// The `Shift` that was created on the request.
	Shift *Shift `json:"shift,omitempty" url:"shift,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response to a request to create a `Shift`. The response contains the created `Shift` object and might contain a set of `Error` objects if the request resulted in errors.

func (*CreateShiftResponse) GetErrors

func (c *CreateShiftResponse) GetErrors() []*Error

func (*CreateShiftResponse) GetExtraProperties

func (c *CreateShiftResponse) GetExtraProperties() map[string]interface{}

func (*CreateShiftResponse) GetShift

func (c *CreateShiftResponse) GetShift() *Shift

func (*CreateShiftResponse) String

func (c *CreateShiftResponse) String() string

func (*CreateShiftResponse) UnmarshalJSON

func (c *CreateShiftResponse) UnmarshalJSON(data []byte) error

type CreateSubscriptionRequest

type CreateSubscriptionRequest struct {
	// 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/build-basics/common-api-patterns/idempotency).
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"`
	// The ID of the location the subscription is associated with.
	LocationID string `json:"location_id" url:"-"`
	// The ID of the [subscription plan variation](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations#plan-variations) created using the Catalog API.
	PlanVariationID *string `json:"plan_variation_id,omitempty" url:"-"`
	// The ID of the [customer](entity:Customer) subscribing to the subscription plan variation.
	CustomerID string `json:"customer_id" url:"-"`
	// The `YYYY-MM-DD`-formatted date to start the subscription.
	// If it is unspecified, the subscription starts immediately.
	StartDate *string `json:"start_date,omitempty" url:"-"`
	// The `YYYY-MM-DD`-formatted date when the newly created subscription is scheduled for cancellation.
	//
	// This date overrides the cancellation date set in the plan variation configuration.
	// If the cancellation date is earlier than the end date of a subscription cycle, the subscription stops
	// at the canceled date and the subscriber is sent a prorated invoice at the beginning of the canceled cycle.
	//
	// When the subscription plan of the newly created subscription has a fixed number of cycles and the `canceled_date`
	// occurs before the subscription plan expires, the specified `canceled_date` sets the date when the subscription
	// stops through the end of the last cycle.
	CanceledDate *string `json:"canceled_date,omitempty" url:"-"`
	// 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%.
	TaxPercentage *string `json:"tax_percentage,omitempty" url:"-"`
	// A custom price which overrides the cost of a subscription plan variation with `STATIC` pricing.
	// This field does not affect itemized subscriptions with `RELATIVE` pricing. Instead,
	// you should edit the Subscription's [order template](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#phases-and-order-templates).
	PriceOverrideMoney *Money `json:"price_override_money,omitempty" url:"-"`
	// The ID of the [subscriber's](entity:Customer) [card](entity:Card) to charge.
	// If it is not specified, the subscriber receives an invoice via email with a link to pay for their subscription.
	CardID *string `json:"card_id,omitempty" url:"-"`
	// 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" url:"-"`
	// The origination details of the subscription.
	Source *SubscriptionSource `json:"source,omitempty" url:"-"`
	// The day-of-the-month to change the billing date to.
	MonthlyBillingAnchorDate *int `json:"monthly_billing_anchor_date,omitempty" url:"-"`
	// array of phases for this subscription
	Phases []*Phase `json:"phases,omitempty" url:"-"`
}

type CreateSubscriptionResponse

type CreateSubscriptionResponse struct {
	// Errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The newly created subscription.
	//
	// For more information, see
	// [Subscription object](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#subscription-object).
	Subscription *Subscription `json:"subscription,omitempty" url:"subscription,omitempty"`
	// contains filtered or unexported fields
}

Defines output parameters in a response from the [CreateSubscription](api-endpoint:Subscriptions-CreateSubscription) endpoint.

func (*CreateSubscriptionResponse) GetErrors

func (c *CreateSubscriptionResponse) GetErrors() []*Error

func (*CreateSubscriptionResponse) GetExtraProperties

func (c *CreateSubscriptionResponse) GetExtraProperties() map[string]interface{}

func (*CreateSubscriptionResponse) GetSubscription

func (c *CreateSubscriptionResponse) GetSubscription() *Subscription

func (*CreateSubscriptionResponse) String

func (c *CreateSubscriptionResponse) String() string

func (*CreateSubscriptionResponse) UnmarshalJSON

func (c *CreateSubscriptionResponse) UnmarshalJSON(data []byte) error

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.
	// For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
	//
	// The minimum length is 1 and the maximum length is 45.
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"idempotency_key,omitempty"`
	// **Required** The data used to create the `TeamMember` object. If you include `wage_setting`, you must provide
	// `job_id` for each job assignment. To get job IDs, call [ListJobs](api-endpoint:Team-ListJobs).
	TeamMember *TeamMember `json:"team_member,omitempty" url:"team_member,omitempty"`
	// contains filtered or unexported fields
}

Represents a create request for a `TeamMember` object.

func (*CreateTeamMemberRequest) GetExtraProperties

func (c *CreateTeamMemberRequest) GetExtraProperties() map[string]interface{}

func (*CreateTeamMemberRequest) GetIdempotencyKey

func (c *CreateTeamMemberRequest) GetIdempotencyKey() *string

func (*CreateTeamMemberRequest) GetTeamMember

func (c *CreateTeamMemberRequest) GetTeamMember() *TeamMember

func (*CreateTeamMemberRequest) String

func (c *CreateTeamMemberRequest) String() string

func (*CreateTeamMemberRequest) UnmarshalJSON

func (c *CreateTeamMemberRequest) UnmarshalJSON(data []byte) error

type CreateTeamMemberResponse

type CreateTeamMemberResponse struct {
	// The successfully created `TeamMember` object.
	TeamMember *TeamMember `json:"team_member,omitempty" url:"team_member,omitempty"`
	// The errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from a create request containing the created `TeamMember` object or error messages.

func (*CreateTeamMemberResponse) GetErrors

func (c *CreateTeamMemberResponse) GetErrors() []*Error

func (*CreateTeamMemberResponse) GetExtraProperties

func (c *CreateTeamMemberResponse) GetExtraProperties() map[string]interface{}

func (*CreateTeamMemberResponse) GetTeamMember

func (c *CreateTeamMemberResponse) GetTeamMember() *TeamMember

func (*CreateTeamMemberResponse) String

func (c *CreateTeamMemberResponse) String() string

func (*CreateTeamMemberResponse) UnmarshalJSON

func (c *CreateTeamMemberResponse) UnmarshalJSON(data []byte) error

type CreateTerminalActionResponse

type CreateTerminalActionResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The created `TerminalAction`
	Action *TerminalAction `json:"action,omitempty" url:"action,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTerminalActionResponse) GetAction

func (*CreateTerminalActionResponse) GetErrors

func (c *CreateTerminalActionResponse) GetErrors() []*Error

func (*CreateTerminalActionResponse) GetExtraProperties

func (c *CreateTerminalActionResponse) GetExtraProperties() map[string]interface{}

func (*CreateTerminalActionResponse) String

func (*CreateTerminalActionResponse) UnmarshalJSON

func (c *CreateTerminalActionResponse) UnmarshalJSON(data []byte) error

type CreateTerminalCheckoutResponse

type CreateTerminalCheckoutResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The created `TerminalCheckout`.
	Checkout *TerminalCheckout `json:"checkout,omitempty" url:"checkout,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTerminalCheckoutResponse) GetCheckout

func (*CreateTerminalCheckoutResponse) GetErrors

func (c *CreateTerminalCheckoutResponse) GetErrors() []*Error

func (*CreateTerminalCheckoutResponse) GetExtraProperties

func (c *CreateTerminalCheckoutResponse) GetExtraProperties() map[string]interface{}

func (*CreateTerminalCheckoutResponse) String

func (*CreateTerminalCheckoutResponse) UnmarshalJSON

func (c *CreateTerminalCheckoutResponse) UnmarshalJSON(data []byte) error

type CreateTerminalRefundResponse

type CreateTerminalRefundResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The created `TerminalRefund`.
	Refund *TerminalRefund `json:"refund,omitempty" url:"refund,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTerminalRefundResponse) GetErrors

func (c *CreateTerminalRefundResponse) GetErrors() []*Error

func (*CreateTerminalRefundResponse) GetExtraProperties

func (c *CreateTerminalRefundResponse) GetExtraProperties() map[string]interface{}

func (*CreateTerminalRefundResponse) GetRefund

func (*CreateTerminalRefundResponse) String

func (*CreateTerminalRefundResponse) UnmarshalJSON

func (c *CreateTerminalRefundResponse) UnmarshalJSON(data []byte) error

type CreateVendorRequest

type CreateVendorRequest struct {
	// A client-supplied, universally unique identifier (UUID) to make this [CreateVendor](api-endpoint:Vendors-CreateVendor) call idempotent.
	//
	// See [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) in the
	// [API Development 101](https://developer.squareup.com/docs/buildbasics) section for more
	// information.
	IdempotencyKey string `json:"idempotency_key" url:"-"`
	// The requested [Vendor](entity:Vendor) to be created.
	Vendor *Vendor `json:"vendor,omitempty" url:"-"`
}

type CreateVendorResponse

type CreateVendorResponse struct {
	// Errors encountered when the request fails.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The successfully created [Vendor](entity:Vendor) object.
	Vendor *Vendor `json:"vendor,omitempty" url:"vendor,omitempty"`
	// contains filtered or unexported fields
}

Represents an output from a call to [CreateVendor](api-endpoint:Vendors-CreateVendor).

func (*CreateVendorResponse) GetErrors

func (c *CreateVendorResponse) GetErrors() []*Error

func (*CreateVendorResponse) GetExtraProperties

func (c *CreateVendorResponse) GetExtraProperties() map[string]interface{}

func (*CreateVendorResponse) GetVendor

func (c *CreateVendorResponse) GetVendor() *Vendor

func (*CreateVendorResponse) String

func (c *CreateVendorResponse) String() string

func (*CreateVendorResponse) UnmarshalJSON

func (c *CreateVendorResponse) UnmarshalJSON(data []byte) error

type CreateWebhookSubscriptionResponse

type CreateWebhookSubscriptionResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The new [Subscription](entity:WebhookSubscription).
	Subscription *WebhookSubscription `json:"subscription,omitempty" url:"subscription,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [CreateWebhookSubscription](api-endpoint:WebhookSubscriptions-CreateWebhookSubscription) endpoint.

Note: if there are errors processing the request, the Subscription(entity:WebhookSubscription) will not be present.

func (*CreateWebhookSubscriptionResponse) GetErrors

func (c *CreateWebhookSubscriptionResponse) GetErrors() []*Error

func (*CreateWebhookSubscriptionResponse) GetExtraProperties

func (c *CreateWebhookSubscriptionResponse) GetExtraProperties() map[string]interface{}

func (*CreateWebhookSubscriptionResponse) GetSubscription

func (*CreateWebhookSubscriptionResponse) String

func (*CreateWebhookSubscriptionResponse) UnmarshalJSON

func (c *CreateWebhookSubscriptionResponse) UnmarshalJSON(data []byte) error

type Currency

type Currency string

Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://wikipedia.org/wiki/ISO_4217).

const (
	CurrencyUnknownCurrency Currency = "UNKNOWN_CURRENCY"
	CurrencyAed             Currency = "AED"
	CurrencyAfn             Currency = "AFN"
	CurrencyAll             Currency = "ALL"
	CurrencyAmd             Currency = "AMD"
	CurrencyAng             Currency = "ANG"
	CurrencyAoa             Currency = "AOA"
	CurrencyArs             Currency = "ARS"
	CurrencyAud             Currency = "AUD"
	CurrencyAwg             Currency = "AWG"
	CurrencyAzn             Currency = "AZN"
	CurrencyBam             Currency = "BAM"
	CurrencyBbd             Currency = "BBD"
	CurrencyBdt             Currency = "BDT"
	CurrencyBgn             Currency = "BGN"
	CurrencyBhd             Currency = "BHD"
	CurrencyBif             Currency = "BIF"
	CurrencyBmd             Currency = "BMD"
	CurrencyBnd             Currency = "BND"
	CurrencyBob             Currency = "BOB"
	CurrencyBov             Currency = "BOV"
	CurrencyBrl             Currency = "BRL"
	CurrencyBsd             Currency = "BSD"
	CurrencyBtn             Currency = "BTN"
	CurrencyBwp             Currency = "BWP"
	CurrencyByr             Currency = "BYR"
	CurrencyBzd             Currency = "BZD"
	CurrencyCad             Currency = "CAD"
	CurrencyCdf             Currency = "CDF"
	CurrencyChe             Currency = "CHE"
	CurrencyChf             Currency = "CHF"
	CurrencyChw             Currency = "CHW"
	CurrencyClf             Currency = "CLF"
	CurrencyClp             Currency = "CLP"
	CurrencyCny             Currency = "CNY"
	CurrencyCop             Currency = "COP"
	CurrencyCou             Currency = "COU"
	CurrencyCrc             Currency = "CRC"
	CurrencyCuc             Currency = "CUC"
	CurrencyCup             Currency = "CUP"
	CurrencyCve             Currency = "CVE"
	CurrencyCzk             Currency = "CZK"
	CurrencyDjf             Currency = "DJF"
	CurrencyDkk             Currency = "DKK"
	CurrencyDop             Currency = "DOP"
	CurrencyDzd             Currency = "DZD"
	CurrencyEgp             Currency = "EGP"
	CurrencyErn             Currency = "ERN"
	CurrencyEtb             Currency = "ETB"
	CurrencyEur             Currency = "EUR"
	CurrencyFjd             Currency = "FJD"
	CurrencyFkp             Currency = "FKP"
	CurrencyGbp             Currency = "GBP"
	CurrencyGel             Currency = "GEL"
	CurrencyGhs             Currency = "GHS"
	CurrencyGip             Currency = "GIP"
	CurrencyGmd             Currency = "GMD"
	CurrencyGnf             Currency = "GNF"
	CurrencyGtq             Currency = "GTQ"
	CurrencyGyd             Currency = "GYD"
	CurrencyHkd             Currency = "HKD"
	CurrencyHnl             Currency = "HNL"
	CurrencyHrk             Currency = "HRK"
	CurrencyHtg             Currency = "HTG"
	CurrencyHuf             Currency = "HUF"
	CurrencyIdr             Currency = "IDR"
	CurrencyIls             Currency = "ILS"
	CurrencyInr             Currency = "INR"
	CurrencyIqd             Currency = "IQD"
	CurrencyIrr             Currency = "IRR"
	CurrencyIsk             Currency = "ISK"
	CurrencyJmd             Currency = "JMD"
	CurrencyJod             Currency = "JOD"
	CurrencyJpy             Currency = "JPY"
	CurrencyKes             Currency = "KES"
	CurrencyKgs             Currency = "KGS"
	CurrencyKhr             Currency = "KHR"
	CurrencyKmf             Currency = "KMF"
	CurrencyKpw             Currency = "KPW"
	CurrencyKrw             Currency = "KRW"
	CurrencyKwd             Currency = "KWD"
	CurrencyKyd             Currency = "KYD"
	CurrencyKzt             Currency = "KZT"
	CurrencyLak             Currency = "LAK"
	CurrencyLbp             Currency = "LBP"
	CurrencyLkr             Currency = "LKR"
	CurrencyLrd             Currency = "LRD"
	CurrencyLsl             Currency = "LSL"
	CurrencyLtl             Currency = "LTL"
	CurrencyLvl             Currency = "LVL"
	CurrencyLyd             Currency = "LYD"
	CurrencyMad             Currency = "MAD"
	CurrencyMdl             Currency = "MDL"
	CurrencyMga             Currency = "MGA"
	CurrencyMkd             Currency = "MKD"
	CurrencyMmk             Currency = "MMK"
	CurrencyMnt             Currency = "MNT"
	CurrencyMop             Currency = "MOP"
	CurrencyMro             Currency = "MRO"
	CurrencyMur             Currency = "MUR"
	CurrencyMvr             Currency = "MVR"
	CurrencyMwk             Currency = "MWK"
	CurrencyMxn             Currency = "MXN"
	CurrencyMxv             Currency = "MXV"
	CurrencyMyr             Currency = "MYR"
	CurrencyMzn             Currency = "MZN"
	CurrencyNad             Currency = "NAD"
	CurrencyNgn             Currency = "NGN"
	CurrencyNio             Currency = "NIO"
	CurrencyNok             Currency = "NOK"
	CurrencyNpr             Currency = "NPR"
	CurrencyNzd             Currency = "NZD"
	CurrencyOmr             Currency = "OMR"
	CurrencyPab             Currency = "PAB"
	CurrencyPen             Currency = "PEN"
	CurrencyPgk             Currency = "PGK"
	CurrencyPhp             Currency = "PHP"
	CurrencyPkr             Currency = "PKR"
	CurrencyPln             Currency = "PLN"
	CurrencyPyg             Currency = "PYG"
	CurrencyQar             Currency = "QAR"
	CurrencyRon             Currency = "RON"
	CurrencyRsd             Currency = "RSD"
	CurrencyRub             Currency = "RUB"
	CurrencyRwf             Currency = "RWF"
	CurrencySar             Currency = "SAR"
	CurrencySbd             Currency = "SBD"
	CurrencyScr             Currency = "SCR"
	CurrencySdg             Currency = "SDG"
	CurrencySek             Currency = "SEK"
	CurrencySgd             Currency = "SGD"
	CurrencyShp             Currency = "SHP"
	CurrencySll             Currency = "SLL"
	CurrencySle             Currency = "SLE"
	CurrencySos             Currency = "SOS"
	CurrencySrd             Currency = "SRD"
	CurrencySsp             Currency = "SSP"
	CurrencyStd             Currency = "STD"
	CurrencySvc             Currency = "SVC"
	CurrencySyp             Currency = "SYP"
	CurrencySzl             Currency = "SZL"
	CurrencyThb             Currency = "THB"
	CurrencyTjs             Currency = "TJS"
	CurrencyTmt             Currency = "TMT"
	CurrencyTnd             Currency = "TND"
	CurrencyTop             Currency = "TOP"
	CurrencyTry             Currency = "TRY"
	CurrencyTtd             Currency = "TTD"
	CurrencyTwd             Currency = "TWD"
	CurrencyTzs             Currency = "TZS"
	CurrencyUah             Currency = "UAH"
	CurrencyUgx             Currency = "UGX"
	CurrencyUsd             Currency = "USD"
	CurrencyUsn             Currency = "USN"
	CurrencyUss             Currency = "USS"
	CurrencyUyi             Currency = "UYI"
	CurrencyUyu             Currency = "UYU"
	CurrencyUzs             Currency = "UZS"
	CurrencyVef             Currency = "VEF"
	CurrencyVnd             Currency = "VND"
	CurrencyVuv             Currency = "VUV"
	CurrencyWst             Currency = "WST"
	CurrencyXaf             Currency = "XAF"
	CurrencyXag             Currency = "XAG"
	CurrencyXau             Currency = "XAU"
	CurrencyXba             Currency = "XBA"
	CurrencyXbb             Currency = "XBB"
	CurrencyXbc             Currency = "XBC"
	CurrencyXbd             Currency = "XBD"
	CurrencyXcd             Currency = "XCD"
	CurrencyXdr             Currency = "XDR"
	CurrencyXof             Currency = "XOF"
	CurrencyXpd             Currency = "XPD"
	CurrencyXpf             Currency = "XPF"
	CurrencyXpt             Currency = "XPT"
	CurrencyXts             Currency = "XTS"
	CurrencyXxx             Currency = "XXX"
	CurrencyYer             Currency = "YER"
	CurrencyZar             Currency = "ZAR"
	CurrencyZmk             Currency = "ZMK"
	CurrencyZmw             Currency = "ZMW"
	CurrencyBtc             Currency = "BTC"
	CurrencyXus             Currency = "XUS"
)

func NewCurrencyFromString

func NewCurrencyFromString(s string) (Currency, error)

func (Currency) Ptr

func (c Currency) Ptr() *Currency

type CustomAttribute

type CustomAttribute struct {
	// The identifier
	// of the custom attribute definition and its corresponding custom attributes. This value
	// can be a simple key, which is the key that is provided when the custom attribute definition
	// is created, or a qualified key, if the requesting
	// application is not the definition owner. The qualified key consists of the application ID
	// of the custom attribute definition owner
	// followed by the simple key that was provided when the definition was created. It has the
	// format application_id:simple key.
	//
	// The value for a simple key can contain up to 60 alphanumeric characters, periods (.),
	// underscores (_), and hyphens (-).
	Key   *string     `json:"key,omitempty" url:"key,omitempty"`
	Value interface{} `json:"value,omitempty" url:"value,omitempty"`
	// Read only. The current version of the custom attribute. This field is incremented when the custom attribute is changed.
	// When updating an existing custom attribute value, you can provide this field
	// and specify the current version of the custom attribute to enable
	// [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency).
	// This field can also be used to enforce strong consistency for reads. For more information about strong consistency for reads,
	// see [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview).
	Version *int `json:"version,omitempty" url:"version,omitempty"`
	// A copy of the `visibility` field value for the associated custom attribute definition.
	// See [CustomAttributeDefinitionVisibility](#type-customattributedefinitionvisibility) for possible values
	Visibility *CustomAttributeDefinitionVisibility `json:"visibility,omitempty" url:"visibility,omitempty"`
	// A copy of the associated custom attribute definition object. This field is only set when
	// the optional field is specified on the request.
	Definition *CustomAttributeDefinition `json:"definition,omitempty" url:"definition,omitempty"`
	// The timestamp that indicates when the custom attribute was created or was most recently
	// updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The timestamp that indicates when the custom attribute was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// contains filtered or unexported fields
}

A custom attribute value. Each custom attribute value has a corresponding `CustomAttributeDefinition` object.

func (*CustomAttribute) GetCreatedAt

func (c *CustomAttribute) GetCreatedAt() *string

func (*CustomAttribute) GetDefinition

func (c *CustomAttribute) GetDefinition() *CustomAttributeDefinition

func (*CustomAttribute) GetExtraProperties

func (c *CustomAttribute) GetExtraProperties() map[string]interface{}

func (*CustomAttribute) GetKey

func (c *CustomAttribute) GetKey() *string

func (*CustomAttribute) GetUpdatedAt

func (c *CustomAttribute) GetUpdatedAt() *string

func (*CustomAttribute) GetValue

func (c *CustomAttribute) GetValue() interface{}

func (*CustomAttribute) GetVersion

func (c *CustomAttribute) GetVersion() *int

func (*CustomAttribute) GetVisibility

func (*CustomAttribute) String

func (c *CustomAttribute) String() string

func (*CustomAttribute) UnmarshalJSON

func (c *CustomAttribute) UnmarshalJSON(data []byte) error

type CustomAttributeDefinition

type CustomAttributeDefinition struct {
	// The identifier
	// of the custom attribute definition and its corresponding custom attributes. This value
	// can be a simple key, which is the key that is provided when the custom attribute definition
	// is created, or a qualified key, if the requesting
	// application is not the definition owner. The qualified key consists of the application ID
	// of the custom attribute definition owner
	// followed by the simple key that was provided when the definition was created. It has the
	// format application_id:simple key.
	//
	// The value for a simple key can contain up to 60 alphanumeric characters, periods (.),
	// underscores (_), and hyphens (-).
	//
	// This field can not be changed
	// after the custom attribute definition is created. This field is required when creating
	// a definition and must be unique per application, seller, and resource type.
	Key *string `json:"key,omitempty" url:"key,omitempty"`
	// The JSON schema for the custom attribute definition, which determines the data type of the corresponding custom attributes. For more information,
	// see [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview). This field is required when creating a definition.
	Schema map[string]interface{} `json:"schema,omitempty" url:"schema,omitempty"`
	// The name of the custom attribute definition for API and seller-facing UI purposes. The name must
	// be unique within the seller and application pair. This field is required if the
	// `visibility` field is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Seller-oriented description of the custom attribute definition, including any constraints
	// that the seller should observe. May be displayed as a tooltip in Square UIs. This field is
	// required if the `visibility` field is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.
	Description *string `json:"description,omitempty" url:"description,omitempty"`
	// Specifies how the custom attribute definition and its values should be shared with
	// the seller and other applications. If no value is specified, the value defaults to `VISIBILITY_HIDDEN`.
	// See [Visibility](#type-visibility) for possible values
	Visibility *CustomAttributeDefinitionVisibility `json:"visibility,omitempty" url:"visibility,omitempty"`
	// Read only. The current version of the custom attribute definition.
	// The value is incremented each time the custom attribute definition is updated.
	// When updating a custom attribute definition, you can provide this field
	// and specify the current version of the custom attribute definition to enable
	// [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency).
	//
	// On writes, this field must be set to the latest version. Stale writes are rejected.
	//
	// This field can also be used to enforce strong consistency for reads. For more information about strong consistency for reads,
	// see [Custom Attributes Overview](https://developer.squareup.com/docs/devtools/customattributes/overview).
	Version *int `json:"version,omitempty" url:"version,omitempty"`
	// The timestamp that indicates when the custom attribute definition was created or most recently updated,
	// in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The timestamp that indicates when the custom attribute definition was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Represents a definition for custom attribute values. A custom attribute definition specifies the key, visibility, schema, and other properties for a custom attribute.

func (*CustomAttributeDefinition) GetCreatedAt

func (c *CustomAttributeDefinition) GetCreatedAt() *string

func (*CustomAttributeDefinition) GetDescription

func (c *CustomAttributeDefinition) GetDescription() *string

func (*CustomAttributeDefinition) GetExtraProperties

func (c *CustomAttributeDefinition) GetExtraProperties() map[string]interface{}

func (*CustomAttributeDefinition) GetKey

func (c *CustomAttributeDefinition) GetKey() *string

func (*CustomAttributeDefinition) GetName

func (c *CustomAttributeDefinition) GetName() *string

func (*CustomAttributeDefinition) GetSchema

func (c *CustomAttributeDefinition) GetSchema() map[string]interface{}

func (*CustomAttributeDefinition) GetUpdatedAt

func (c *CustomAttributeDefinition) GetUpdatedAt() *string

func (*CustomAttributeDefinition) GetVersion

func (c *CustomAttributeDefinition) GetVersion() *int

func (*CustomAttributeDefinition) GetVisibility

func (*CustomAttributeDefinition) String

func (c *CustomAttributeDefinition) String() string

func (*CustomAttributeDefinition) UnmarshalJSON

func (c *CustomAttributeDefinition) UnmarshalJSON(data []byte) error

type CustomAttributeDefinitionVisibility

type CustomAttributeDefinitionVisibility string

The level of permission that a seller or other applications requires to view this custom attribute definition. The `Visibility` field controls who can read and write the custom attribute values and custom attribute definition.

const (
	CustomAttributeDefinitionVisibilityVisibilityHidden          CustomAttributeDefinitionVisibility = "VISIBILITY_HIDDEN"
	CustomAttributeDefinitionVisibilityVisibilityReadOnly        CustomAttributeDefinitionVisibility = "VISIBILITY_READ_ONLY"
	CustomAttributeDefinitionVisibilityVisibilityReadWriteValues CustomAttributeDefinitionVisibility = "VISIBILITY_READ_WRITE_VALUES"
)

func NewCustomAttributeDefinitionVisibilityFromString

func NewCustomAttributeDefinitionVisibilityFromString(s string) (CustomAttributeDefinitionVisibility, error)

func (CustomAttributeDefinitionVisibility) Ptr

type CustomAttributeFilter

type CustomAttributeFilter struct {
	// 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.
	// Exactly one of `custom_attribute_definition_id` or `key` must be specified.
	CustomAttributeDefinitionID *string `json:"custom_attribute_definition_id,omitempty" url:"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.
	// Exactly one of `custom_attribute_definition_id` or `key` must be specified.
	Key *string `json:"key,omitempty" url:"key,omitempty"`
	// A query expression to filter items or item variations by matching their custom attributes'
	// `string_value`  property value against the specified text.
	// Exactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified.
	StringFilter *string `json:"string_filter,omitempty" url:"string_filter,omitempty"`
	// A query expression to filter items or item variations with their custom attributes
	// containing a number value within the specified range.
	// Exactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified.
	NumberFilter *Range `json:"number_filter,omitempty" url:"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.
	// Exactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified.
	SelectionUIDsFilter []string `json:"selection_uids_filter,omitempty" url:"selection_uids_filter,omitempty"`
	// A query expression to filter items or item variations by matching their custom attributes'
	// `boolean_value` property values against the specified Boolean expression.
	// Exactly one of `string_filter`, `number_filter`, `selection_uids_filter`, or `bool_filter` must be specified.
	BoolFilter *bool `json:"bool_filter,omitempty" url:"bool_filter,omitempty"`
	// contains filtered or unexported fields
}

Supported custom attribute query expressions for calling the [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) endpoint to search for items or item variations.

func (*CustomAttributeFilter) GetBoolFilter

func (c *CustomAttributeFilter) GetBoolFilter() *bool

func (*CustomAttributeFilter) GetCustomAttributeDefinitionID

func (c *CustomAttributeFilter) GetCustomAttributeDefinitionID() *string

func (*CustomAttributeFilter) GetExtraProperties

func (c *CustomAttributeFilter) GetExtraProperties() map[string]interface{}

func (*CustomAttributeFilter) GetKey

func (c *CustomAttributeFilter) GetKey() *string

func (*CustomAttributeFilter) GetNumberFilter

func (c *CustomAttributeFilter) GetNumberFilter() *Range

func (*CustomAttributeFilter) GetSelectionUIDsFilter

func (c *CustomAttributeFilter) GetSelectionUIDsFilter() []string

func (*CustomAttributeFilter) GetStringFilter

func (c *CustomAttributeFilter) GetStringFilter() *string

func (*CustomAttributeFilter) String

func (c *CustomAttributeFilter) String() string

func (*CustomAttributeFilter) UnmarshalJSON

func (c *CustomAttributeFilter) UnmarshalJSON(data []byte) error

type CustomField

type CustomField struct {
	// The title of the custom field.
	Title string `json:"title" url:"title"`
	// contains filtered or unexported fields
}

Describes a custom form field to add to the checkout page to collect more information from buyers during checkout. For more information, see [Specify checkout options](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations#specify-checkout-options-1).

func (*CustomField) GetExtraProperties

func (c *CustomField) GetExtraProperties() map[string]interface{}

func (*CustomField) GetTitle

func (c *CustomField) GetTitle() string

func (*CustomField) String

func (c *CustomField) String() string

func (*CustomField) UnmarshalJSON

func (c *CustomField) UnmarshalJSON(data []byte) error

type Customer

type Customer struct {
	// A unique Square-assigned ID for the customer profile.
	//
	// If you need this ID for an API request, use the ID returned when you created the customer profile or call the [SearchCustomers](api-endpoint:Customers-SearchCustomers)
	// or [ListCustomers](api-endpoint:Customers-ListCustomers) endpoint.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The timestamp when the customer profile was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp when the customer profile was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The given name (that is, the first name) associated with the customer profile.
	GivenName *string `json:"given_name,omitempty" url:"given_name,omitempty"`
	// The family name (that is, the last name) associated with the customer profile.
	FamilyName *string `json:"family_name,omitempty" url:"family_name,omitempty"`
	// A nickname for the customer profile.
	Nickname *string `json:"nickname,omitempty" url:"nickname,omitempty"`
	// A business name associated with the customer profile.
	CompanyName *string `json:"company_name,omitempty" url:"company_name,omitempty"`
	// The email address associated with the customer profile.
	EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"`
	// The physical address associated with the customer profile.
	Address *Address `json:"address,omitempty" url:"address,omitempty"`
	// The phone number associated with the customer profile.
	PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"`
	// The birthday associated with the customer profile, in `YYYY-MM-DD` format. For example, `1998-09-21`
	// represents September 21, 1998, and `0000-09-21` represents September 21 (without a birth year).
	Birthday *string `json:"birthday,omitempty" url:"birthday,omitempty"`
	// An optional second ID used to associate the customer profile with an
	// entity in another system.
	ReferenceID *string `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// A custom note associated with the customer profile.
	Note *string `json:"note,omitempty" url:"note,omitempty"`
	// Represents general customer preferences.
	Preferences *CustomerPreferences `json:"preferences,omitempty" url:"preferences,omitempty"`
	// The method used to create the customer profile.
	// See [CustomerCreationSource](#type-customercreationsource) for possible values
	CreationSource *CustomerCreationSource `json:"creation_source,omitempty" url:"creation_source,omitempty"`
	// The IDs of [customer groups](entity:CustomerGroup) the customer belongs to.
	GroupIDs []string `json:"group_ids,omitempty" url:"group_ids,omitempty"`
	// The IDs of [customer segments](entity:CustomerSegment) the customer belongs to.
	SegmentIDs []string `json:"segment_ids,omitempty" url:"segment_ids,omitempty"`
	// The Square-assigned version number of the customer profile. The version number is incremented each time an update is committed to the customer profile, except for changes to customer segment membership.
	Version *int64 `json:"version,omitempty" url:"version,omitempty"`
	// The tax ID associated with the customer profile. This field is present only for customers of sellers in EU countries or the United Kingdom.
	// For more information, see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids).
	TaxIDs *CustomerTaxIDs `json:"tax_ids,omitempty" url:"tax_ids,omitempty"`
	// contains filtered or unexported fields
}

Represents a Square customer profile in the Customer Directory of a Square seller.

func (*Customer) GetAddress

func (c *Customer) GetAddress() *Address

func (*Customer) GetBirthday

func (c *Customer) GetBirthday() *string

func (*Customer) GetCompanyName

func (c *Customer) GetCompanyName() *string

func (*Customer) GetCreatedAt

func (c *Customer) GetCreatedAt() *string

func (*Customer) GetCreationSource

func (c *Customer) GetCreationSource() *CustomerCreationSource

func (*Customer) GetEmailAddress

func (c *Customer) GetEmailAddress() *string

func (*Customer) GetExtraProperties

func (c *Customer) GetExtraProperties() map[string]interface{}

func (*Customer) GetFamilyName

func (c *Customer) GetFamilyName() *string

func (*Customer) GetGivenName

func (c *Customer) GetGivenName() *string

func (*Customer) GetGroupIDs

func (c *Customer) GetGroupIDs() []string

func (*Customer) GetID

func (c *Customer) GetID() *string

func (*Customer) GetNickname

func (c *Customer) GetNickname() *string

func (*Customer) GetNote

func (c *Customer) GetNote() *string

func (*Customer) GetPhoneNumber

func (c *Customer) GetPhoneNumber() *string

func (*Customer) GetPreferences

func (c *Customer) GetPreferences() *CustomerPreferences

func (*Customer) GetReferenceID

func (c *Customer) GetReferenceID() *string

func (*Customer) GetSegmentIDs

func (c *Customer) GetSegmentIDs() []string

func (*Customer) GetTaxIDs

func (c *Customer) GetTaxIDs() *CustomerTaxIDs

func (*Customer) GetUpdatedAt

func (c *Customer) GetUpdatedAt() *string

func (*Customer) GetVersion

func (c *Customer) GetVersion() *int64

func (*Customer) String

func (c *Customer) String() string

func (*Customer) UnmarshalJSON

func (c *Customer) UnmarshalJSON(data []byte) error

type CustomerAddressFilter

type CustomerAddressFilter struct {
	// The postal code to search for. Only an `exact` match is supported.
	PostalCode *CustomerTextFilter `json:"postal_code,omitempty" url:"postal_code,omitempty"`
	// The country code to search for.
	// See [Country](#type-country) for possible values
	Country *Country `json:"country,omitempty" url:"country,omitempty"`
	// contains filtered or unexported fields
}

The customer address filter. This filter is used in a CustomerCustomAttributeFilterValue(entity:CustomerCustomAttributeFilterValue) filter when searching by an `Address`-type custom attribute.

func (*CustomerAddressFilter) GetCountry

func (c *CustomerAddressFilter) GetCountry() *Country

func (*CustomerAddressFilter) GetExtraProperties

func (c *CustomerAddressFilter) GetExtraProperties() map[string]interface{}

func (*CustomerAddressFilter) GetPostalCode

func (c *CustomerAddressFilter) GetPostalCode() *CustomerTextFilter

func (*CustomerAddressFilter) String

func (c *CustomerAddressFilter) String() string

func (*CustomerAddressFilter) UnmarshalJSON

func (c *CustomerAddressFilter) UnmarshalJSON(data []byte) error

type CustomerCreationSource

type CustomerCreationSource string

Indicates the method used to create the customer profile.

const (
	CustomerCreationSourceOther            CustomerCreationSource = "OTHER"
	CustomerCreationSourceAppointments     CustomerCreationSource = "APPOINTMENTS"
	CustomerCreationSourceCoupon           CustomerCreationSource = "COUPON"
	CustomerCreationSourceDeletionRecovery CustomerCreationSource = "DELETION_RECOVERY"
	CustomerCreationSourceDirectory        CustomerCreationSource = "DIRECTORY"
	CustomerCreationSourceEgifting         CustomerCreationSource = "EGIFTING"
	CustomerCreationSourceEmailCollection  CustomerCreationSource = "EMAIL_COLLECTION"
	CustomerCreationSourceFeedback         CustomerCreationSource = "FEEDBACK"
	CustomerCreationSourceImport           CustomerCreationSource = "IMPORT"
	CustomerCreationSourceInvoices         CustomerCreationSource = "INVOICES"
	CustomerCreationSourceLoyalty          CustomerCreationSource = "LOYALTY"
	CustomerCreationSourceMarketing        CustomerCreationSource = "MARKETING"
	CustomerCreationSourceMerge            CustomerCreationSource = "MERGE"
	CustomerCreationSourceOnlineStore      CustomerCreationSource = "ONLINE_STORE"
	CustomerCreationSourceInstantProfile   CustomerCreationSource = "INSTANT_PROFILE"
	CustomerCreationSourceTerminal         CustomerCreationSource = "TERMINAL"
	CustomerCreationSourceThirdParty       CustomerCreationSource = "THIRD_PARTY"
	CustomerCreationSourceThirdPartyImport CustomerCreationSource = "THIRD_PARTY_IMPORT"
	CustomerCreationSourceUnmergeRecovery  CustomerCreationSource = "UNMERGE_RECOVERY"
)

func NewCustomerCreationSourceFromString

func NewCustomerCreationSourceFromString(s string) (CustomerCreationSource, error)

func (CustomerCreationSource) Ptr

type CustomerCreationSourceFilter

type CustomerCreationSourceFilter struct {
	// The list of creation sources used as filtering criteria.
	// See [CustomerCreationSource](#type-customercreationsource) for possible values
	Values []CustomerCreationSource `json:"values,omitempty" url:"values,omitempty"`
	// 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 *CustomerInclusionExclusion `json:"rule,omitempty" url:"rule,omitempty"`
	// contains filtered or unexported fields
}

The 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.

func (*CustomerCreationSourceFilter) GetExtraProperties

func (c *CustomerCreationSourceFilter) GetExtraProperties() map[string]interface{}

func (*CustomerCreationSourceFilter) GetRule

func (*CustomerCreationSourceFilter) GetValues

func (*CustomerCreationSourceFilter) String

func (*CustomerCreationSourceFilter) UnmarshalJSON

func (c *CustomerCreationSourceFilter) UnmarshalJSON(data []byte) error

type CustomerCustomAttributeFilter

type CustomerCustomAttributeFilter struct {
	// The `key` of the [custom attribute](entity:CustomAttribute) to filter by. The key is the identifier of the custom attribute
	// (and the corresponding custom attribute definition) and can be retrieved using the [Customer Custom Attributes API](api:CustomerCustomAttributes).
	Key string `json:"key" url:"key"`
	// A filter that corresponds to the data type of the target custom attribute. For example, provide the `phone` filter to
	// search based on the value of a `PhoneNumber`-type custom attribute. The data type is specified by the schema field of the custom attribute definition,
	// which can be retrieved using the [Customer Custom Attributes API](api:CustomerCustomAttributes).
	//
	// You must provide this `filter` field, the `updated_at` field, or both.
	Filter *CustomerCustomAttributeFilterValue `json:"filter,omitempty" url:"filter,omitempty"`
	// The date range for when the custom attribute was last updated. The date range can include `start_at`, `end_at`, or
	// both. Range boundaries are inclusive. Dates are specified as RFC 3339 timestamps.
	//
	// You must provide this `updated_at` field, the `filter` field, or both.
	UpdatedAt *TimeRange `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

The custom attribute filter. Use this filter in a set of [custom attribute filters](entity:CustomerCustomAttributeFilters) to search based on the value or last updated date of a customer-related [custom attribute](entity:CustomAttribute).

func (*CustomerCustomAttributeFilter) GetExtraProperties

func (c *CustomerCustomAttributeFilter) GetExtraProperties() map[string]interface{}

func (*CustomerCustomAttributeFilter) GetFilter

func (*CustomerCustomAttributeFilter) GetKey

func (*CustomerCustomAttributeFilter) GetUpdatedAt

func (c *CustomerCustomAttributeFilter) GetUpdatedAt() *TimeRange

func (*CustomerCustomAttributeFilter) String

func (*CustomerCustomAttributeFilter) UnmarshalJSON

func (c *CustomerCustomAttributeFilter) UnmarshalJSON(data []byte) error

type CustomerCustomAttributeFilterValue

type CustomerCustomAttributeFilterValue struct {
	// A filter for a query based on the value of an `Email`-type custom attribute. This filter is case-insensitive and can
	// include `exact` or `fuzzy`, but not both.
	//
	// For an `exact` match, provide the complete email address.
	//
	// For a `fuzzy` match, provide a query expression containing one or more query tokens to match against the email address. Square removes
	// any punctuation (including periods (.), underscores (_), and the @ symbol) and tokenizes the email addresses on spaces. A match is found
	// if a tokenized email address contains all the tokens in the search query, irrespective of the token order. For example, `Steven gmail`
	// matches steven.jones@gmail.com and mygmail@stevensbakery.com.
	Email *CustomerTextFilter `json:"email,omitempty" url:"email,omitempty"`
	// A filter for a query based on the value of a `PhoneNumber`-type custom attribute. This filter is case-insensitive and
	// can include `exact` or `fuzzy`, but not both.
	//
	// For an `exact` match, provide the complete phone number. This is always an E.164-compliant phone number that starts
	// with the + sign followed by the country code and subscriber number. For example, the format for a US phone number is +12061112222.
	//
	// For a `fuzzy` match, provide a query expression containing one or more query tokens to match against the phone number.
	// Square removes any punctuation and tokenizes the expression on spaces. A match is found if a tokenized phone number contains
	// all the tokens in the search query, irrespective of the token order. For example, `415 123 45` is tokenized to `415`, `123`, and `45`,
	// which matches +14151234567 and +12345674158, but does not match +1234156780. Similarly, the expression `415` matches
	// +14151234567, +12345674158, and +1234156780.
	Phone *CustomerTextFilter `json:"phone,omitempty" url:"phone,omitempty"`
	// A filter for a query based on the value of a `String`-type custom attribute. This filter is case-insensitive and
	// can include `exact` or `fuzzy`, but not both.
	//
	// For an `exact` match, provide the complete string.
	//
	// For a `fuzzy` match, provide a query expression containing one or more query tokens in any order that contain complete words
	// to match against the string. Square tokenizes the expression using a grammar-based tokenizer. For example, the expressions `quick brown`,
	// `brown quick`, and `quick fox` match "The quick brown fox jumps over the lazy dog". However, `quick foxes` and `qui` do not match.
	Text *CustomerTextFilter `json:"text,omitempty" url:"text,omitempty"`
	// A filter for a query based on the display name for a `Selection`-type custom attribute value. This filter is case-sensitive
	// and can contain `any`, `all`, or both. The `none` condition is not supported.
	//
	// Provide the display name of each item that you want to search for. To find the display names for the selection, use the
	// [Customer Custom Attributes API](api:CustomerCustomAttributes) to retrieve the corresponding custom attribute definition
	// and then check the `schema.items.names` field. For more information, see
	// [Search based on selection](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#custom-attribute-value-filter-selection).
	//
	// Note that when a `Selection`-type custom attribute is assigned to a customer profile, the custom attribute value is a list of one
	// or more UUIDs (sourced from the `schema.items.enum` field) that map to the item names. These UUIDs are unique per seller.
	Selection *FilterValue `json:"selection,omitempty" url:"selection,omitempty"`
	// A filter for a query based on the value of a `Date`-type custom attribute.
	//
	// Provide a date range for this filter using `start_at`, `end_at`, or both. Range boundaries are inclusive. Dates can be specified
	// in `YYYY-MM-DD` format or as RFC 3339 timestamps.
	Date *TimeRange `json:"date,omitempty" url:"date,omitempty"`
	// A filter for a query based on the value of a `Number`-type custom attribute, which can be an integer or a decimal with up to
	// 5 digits of precision.
	//
	// Provide a numerical range for this filter using `start_at`, `end_at`, or both. Range boundaries are inclusive. Numbers are specified
	// as decimals or integers. The absolute value of range boundaries must not exceed `(2^63-1)/10^5`, or 92233720368547.
	Number *FloatNumberRange `json:"number,omitempty" url:"number,omitempty"`
	// A filter for a query based on the value of a `Boolean`-type custom attribute.
	Boolean *bool `json:"boolean,omitempty" url:"boolean,omitempty"`
	// A filter for a query based on the value of an `Address`-type custom attribute. The filter can include `postal_code`, `country`, or both.
	Address *CustomerAddressFilter `json:"address,omitempty" url:"address,omitempty"`
	// contains filtered or unexported fields
}

A type-specific filter used in a [custom attribute filter](entity:CustomerCustomAttributeFilter) to search based on the value of a customer-related [custom attribute](entity:CustomAttribute).

func (*CustomerCustomAttributeFilterValue) GetAddress

func (*CustomerCustomAttributeFilterValue) GetBoolean

func (c *CustomerCustomAttributeFilterValue) GetBoolean() *bool

func (*CustomerCustomAttributeFilterValue) GetDate

func (*CustomerCustomAttributeFilterValue) GetEmail

func (*CustomerCustomAttributeFilterValue) GetExtraProperties

func (c *CustomerCustomAttributeFilterValue) GetExtraProperties() map[string]interface{}

func (*CustomerCustomAttributeFilterValue) GetNumber

func (*CustomerCustomAttributeFilterValue) GetPhone

func (*CustomerCustomAttributeFilterValue) GetSelection

func (*CustomerCustomAttributeFilterValue) GetText

func (*CustomerCustomAttributeFilterValue) String

func (*CustomerCustomAttributeFilterValue) UnmarshalJSON

func (c *CustomerCustomAttributeFilterValue) UnmarshalJSON(data []byte) error

type CustomerCustomAttributeFilters

type CustomerCustomAttributeFilters struct {
	// The custom attribute filters. Each filter must specify `key` and include the `filter` field with a type-specific filter,
	// the `updated_at` field, or both. The provided keys must be unique within the list of custom attribute filters.
	Filters []*CustomerCustomAttributeFilter `json:"filters,omitempty" url:"filters,omitempty"`
	// contains filtered or unexported fields
}

The custom attribute filters in a set of [customer filters](entity:CustomerFilter) used in a search query. Use this filter to search based on [custom attributes](entity:CustomAttribute) that are assigned to customer profiles. For more information, see [Search by custom attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute).

func (*CustomerCustomAttributeFilters) GetExtraProperties

func (c *CustomerCustomAttributeFilters) GetExtraProperties() map[string]interface{}

func (*CustomerCustomAttributeFilters) GetFilters

func (*CustomerCustomAttributeFilters) String

func (*CustomerCustomAttributeFilters) UnmarshalJSON

func (c *CustomerCustomAttributeFilters) UnmarshalJSON(data []byte) error

type CustomerDetails

type CustomerDetails struct {
	// Indicates whether the customer initiated the payment.
	CustomerInitiated *bool `json:"customer_initiated,omitempty" url:"customer_initiated,omitempty"`
	// Indicates that the seller keyed in payment details on behalf of the customer.
	// This is used to flag a payment as Mail Order / Telephone Order (MOTO).
	SellerKeyedIn *bool `json:"seller_keyed_in,omitempty" url:"seller_keyed_in,omitempty"`
	// contains filtered or unexported fields
}

Details about the customer making the payment.

func (*CustomerDetails) GetCustomerInitiated

func (c *CustomerDetails) GetCustomerInitiated() *bool

func (*CustomerDetails) GetExtraProperties

func (c *CustomerDetails) GetExtraProperties() map[string]interface{}

func (*CustomerDetails) GetSellerKeyedIn

func (c *CustomerDetails) GetSellerKeyedIn() *bool

func (*CustomerDetails) String

func (c *CustomerDetails) String() string

func (*CustomerDetails) UnmarshalJSON

func (c *CustomerDetails) UnmarshalJSON(data []byte) error

type CustomerFilter

type CustomerFilter struct {
	// A filter to select customers based on their creation source.
	CreationSource *CustomerCreationSourceFilter `json:"creation_source,omitempty" url:"creation_source,omitempty"`
	// A filter to select customers based on when they were created.
	CreatedAt *TimeRange `json:"created_at,omitempty" url:"created_at,omitempty"`
	// A filter to select customers based on when they were last updated.
	UpdatedAt *TimeRange `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// A filter to [select customers by their email address](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-email-address)
	// visible to the seller.
	// This filter is case-insensitive.
	//
	// For [exact matching](https://developer.squareup.com/docs/customers-api/use-the-api/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/customers-api/use-the-api/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 is `steven.johnson@gmail.com`
	// or `mygmail@stevensbakery.com`. Square removes any punctuation (including periods (.),
	// underscores (_), and the @ symbol) and tokenizes the email addresses on spaces. 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" url:"email_address,omitempty"`
	// A filter to [select customers by their phone numbers](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-phone-number)
	// visible to the seller.
	//
	// For [exact matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-phone-number),
	// this filter returns 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.
	// For example, the standard E.164 form of a US phone number is `+12062223333` and an E.164-compliant variation is `+1 (206) 222-3333`.
	// To match the query expression, stored customer phone numbers are converted to the standard E.164 form.
	//
	// For [fuzzy matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#fuzzy-search-by-phone-number),
	// this filter returns customers whose phone number matches the token or tokens provided in the query expression. For example, with `415`
	// provided in a search query, the search returns customers with the phone numbers `+1-415-212-1200`, `+1-212-415-1234`, and `+1 (551) 234-1567`.
	// Similarly, a search query of `415 123` returns customers with the phone numbers `+1-212-415-1234` and `+1 (551) 234-1567` but not
	// `+1-212-415-1200`. A match is found if a tokenized phone number contains all the tokens in the search query, irrespective of the token order.
	PhoneNumber *CustomerTextFilter `json:"phone_number,omitempty" url:"phone_number,omitempty"`
	// A filter to [select customers by their reference IDs](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-reference-id).
	// This filter is case-insensitive.
	//
	// [Exact matching](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#exact-search-by-reference-id)
	// of a customer's reference ID against a query's reference ID is evaluated as an
	// exact match between two strings, character by character in the given order.
	//
	// [Fuzzy matching](https://developer.squareup.com/docs/customers-api/use-the-api/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` matches customer profiles with the `reference_id` value of `NYC_M_35_JOHNSON`
	// and `NYC_27_MURRAY`.
	ReferenceID *CustomerTextFilter `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// A filter to select customers based on the [groups](entity:CustomerGroup) they belong to.
	// Group membership is controlled by sellers and developers.
	//
	// The `group_ids` filter has the following syntax:
	// “`
	// "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 `any`, `all`, and `none` fields in the filter.
	// With `any`, the search returns customers in groups `a` or `b` or any other group specified in the list.
	// With `all`, the search returns customers in groups `1` and `2` and all other groups specified in the list.
	// With `none`, the search returns customers not in groups `i` or `ii` or any other group specified in 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 object (`{}`).
	GroupIDs *FilterValue `json:"group_ids,omitempty" url:"group_ids,omitempty"`
	// A filter to select customers based on one or more custom attributes.
	// This filter can contain up to 10 custom attribute filters. Each custom attribute filter specifies filtering criteria for a target custom
	// attribute. If multiple custom attribute filters are provided, they are combined as an `AND` operation.
	//
	// To be valid for a search, the custom attributes must be visible to the requesting application. For more information, including example queries,
	// see [Search by custom attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute).
	//
	// Square returns matching customer profiles, which do not contain custom attributes. To retrieve customer-related custom attributes,
	// use the [Customer Custom Attributes API](api:CustomerCustomAttributes). For example, you can call
	// [RetrieveCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttribute) using a customer ID from the result set.
	CustomAttribute *CustomerCustomAttributeFilters `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	//	A filter to select customers based on the [segments](entity:CustomerSegment) they belong to.
	//
	// Segment membership is dynamic and adjusts automatically based on whether customers meet the segment criteria.
	//
	// You can provide up to three segment IDs in the filter, using any combination of the `all`, `any`, and `none` fields.
	// For the following example, the results include customers who belong to both segment A and segment B but do not belong to segment C.
	//
	// “`
	// "segment_ids": {
	// "all":  ["{segment_A_id}", "{segment_B_id}"],
	// "none":  ["{segment_C_id}"]
	// }
	// “`
	//
	// If an invalid or non-existent segment ID is provided in the filter, Square stops processing the request
	// and returns a `400 BAD_REQUEST` error that includes the segment ID.
	SegmentIDs *FilterValue `json:"segment_ids,omitempty" url:"segment_ids,omitempty"`
	// contains filtered or unexported fields
}

Represents the filtering criteria in a [search query](entity:CustomerQuery) that defines how to filter customer profiles returned in [SearchCustomers](api-endpoint:Customers-SearchCustomers) results.

func (*CustomerFilter) GetCreatedAt

func (c *CustomerFilter) GetCreatedAt() *TimeRange

func (*CustomerFilter) GetCreationSource

func (c *CustomerFilter) GetCreationSource() *CustomerCreationSourceFilter

func (*CustomerFilter) GetCustomAttribute

func (c *CustomerFilter) GetCustomAttribute() *CustomerCustomAttributeFilters

func (*CustomerFilter) GetEmailAddress

func (c *CustomerFilter) GetEmailAddress() *CustomerTextFilter

func (*CustomerFilter) GetExtraProperties

func (c *CustomerFilter) GetExtraProperties() map[string]interface{}

func (*CustomerFilter) GetGroupIDs

func (c *CustomerFilter) GetGroupIDs() *FilterValue

func (*CustomerFilter) GetPhoneNumber

func (c *CustomerFilter) GetPhoneNumber() *CustomerTextFilter

func (*CustomerFilter) GetReferenceID

func (c *CustomerFilter) GetReferenceID() *CustomerTextFilter

func (*CustomerFilter) GetSegmentIDs

func (c *CustomerFilter) GetSegmentIDs() *FilterValue

func (*CustomerFilter) GetUpdatedAt

func (c *CustomerFilter) GetUpdatedAt() *TimeRange

func (*CustomerFilter) String

func (c *CustomerFilter) String() string

func (*CustomerFilter) UnmarshalJSON

func (c *CustomerFilter) UnmarshalJSON(data []byte) error

type CustomerGroup

type CustomerGroup struct {
	// A unique Square-generated ID for the customer group.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The name of the customer group.
	Name string `json:"name" url:"name"`
	// The timestamp when the customer group was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp when the customer group was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Represents a group of customer profiles.

Customer groups can be created, be modified, and have their membership defined using the Customers API or within the Customer Directory in the Square Seller Dashboard or Point of Sale.

func (*CustomerGroup) GetCreatedAt

func (c *CustomerGroup) GetCreatedAt() *string

func (*CustomerGroup) GetExtraProperties

func (c *CustomerGroup) GetExtraProperties() map[string]interface{}

func (*CustomerGroup) GetID

func (c *CustomerGroup) GetID() *string

func (*CustomerGroup) GetName

func (c *CustomerGroup) GetName() string

func (*CustomerGroup) GetUpdatedAt

func (c *CustomerGroup) GetUpdatedAt() *string

func (*CustomerGroup) String

func (c *CustomerGroup) String() string

func (*CustomerGroup) UnmarshalJSON

func (c *CustomerGroup) UnmarshalJSON(data []byte) error

type CustomerInclusionExclusion

type CustomerInclusionExclusion string

Indicates whether customers should be included in, or excluded from, the result set when they match the filtering criteria.

const (
	CustomerInclusionExclusionInclude CustomerInclusionExclusion = "INCLUDE"
	CustomerInclusionExclusionExclude CustomerInclusionExclusion = "EXCLUDE"
)

func NewCustomerInclusionExclusionFromString

func NewCustomerInclusionExclusionFromString(s string) (CustomerInclusionExclusion, error)

func (CustomerInclusionExclusion) Ptr

type CustomerPreferences

type CustomerPreferences struct {
	// Indicates whether the customer has unsubscribed from marketing campaign emails. A value of `true` means that the customer chose to opt out of email marketing from the current Square seller or from all Square sellers. This value is read-only from the Customers API.
	EmailUnsubscribed *bool `json:"email_unsubscribed,omitempty" url:"email_unsubscribed,omitempty"`
	// contains filtered or unexported fields
}

Represents communication preferences for the customer profile.

func (*CustomerPreferences) GetEmailUnsubscribed

func (c *CustomerPreferences) GetEmailUnsubscribed() *bool

func (*CustomerPreferences) GetExtraProperties

func (c *CustomerPreferences) GetExtraProperties() map[string]interface{}

func (*CustomerPreferences) String

func (c *CustomerPreferences) String() string

func (*CustomerPreferences) UnmarshalJSON

func (c *CustomerPreferences) UnmarshalJSON(data []byte) error

type CustomerQuery

type CustomerQuery struct {
	// The filtering criteria for the search query. A query can contain multiple filters in any combination.
	// Multiple filters are combined as `AND` statements.
	//
	// __Note:__ Combining multiple filters as `OR` statements is not supported. Instead, send multiple single-filter
	// searches and join the result sets.
	Filter *CustomerFilter `json:"filter,omitempty" url:"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" url:"sort,omitempty"`
	// contains filtered or unexported fields
}

Represents filtering and sorting criteria for a [SearchCustomers](api-endpoint:Customers-SearchCustomers) request.

func (*CustomerQuery) GetExtraProperties

func (c *CustomerQuery) GetExtraProperties() map[string]interface{}

func (*CustomerQuery) GetFilter

func (c *CustomerQuery) GetFilter() *CustomerFilter

func (*CustomerQuery) GetSort

func (c *CustomerQuery) GetSort() *CustomerSort

func (*CustomerQuery) String

func (c *CustomerQuery) String() string

func (*CustomerQuery) UnmarshalJSON

func (c *CustomerQuery) UnmarshalJSON(data []byte) error

type CustomerSegment

type CustomerSegment struct {
	// A unique Square-generated ID for the segment.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The name of the segment.
	Name string `json:"name" url:"name"`
	// The timestamp when the segment was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp when the segment was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

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 the Customer Directory in the Square Seller Dashboard or Point of Sale.

func (*CustomerSegment) GetCreatedAt

func (c *CustomerSegment) GetCreatedAt() *string

func (*CustomerSegment) GetExtraProperties

func (c *CustomerSegment) GetExtraProperties() map[string]interface{}

func (*CustomerSegment) GetID

func (c *CustomerSegment) GetID() *string

func (*CustomerSegment) GetName

func (c *CustomerSegment) GetName() string

func (*CustomerSegment) GetUpdatedAt

func (c *CustomerSegment) GetUpdatedAt() *string

func (*CustomerSegment) String

func (c *CustomerSegment) String() string

func (*CustomerSegment) UnmarshalJSON

func (c *CustomerSegment) UnmarshalJSON(data []byte) error

type CustomerSort

type CustomerSort struct {
	// Indicates the fields to use as the sort key, which is either the default set of fields or `created_at`.
	//
	// The default value is `DEFAULT`.
	// See [CustomerSortField](#type-customersortfield) for possible values
	Field *CustomerSortField `json:"field,omitempty" url:"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.
	//
	// The default value is `ASC`.
	// See [SortOrder](#type-sortorder) for possible values
	Order *SortOrder `json:"order,omitempty" url:"order,omitempty"`
	// contains filtered or unexported fields
}

Represents the sorting criteria in a [search query](entity:CustomerQuery) that defines how to sort customer profiles returned in [SearchCustomers](api-endpoint:Customers-SearchCustomers) results.

func (*CustomerSort) GetExtraProperties

func (c *CustomerSort) GetExtraProperties() map[string]interface{}

func (*CustomerSort) GetField

func (c *CustomerSort) GetField() *CustomerSortField

func (*CustomerSort) GetOrder

func (c *CustomerSort) GetOrder() *SortOrder

func (*CustomerSort) String

func (c *CustomerSort) String() string

func (*CustomerSort) UnmarshalJSON

func (c *CustomerSort) UnmarshalJSON(data []byte) error

type CustomerSortField

type CustomerSortField string

Specifies customer attributes as the sort key to customer profiles returned from a search.

const (
	CustomerSortFieldDefault   CustomerSortField = "DEFAULT"
	CustomerSortFieldCreatedAt CustomerSortField = "CREATED_AT"
)

func NewCustomerSortFieldFromString

func NewCustomerSortFieldFromString(s string) (CustomerSortField, error)

func (CustomerSortField) Ptr

type CustomerTaxIDs

type CustomerTaxIDs struct {
	// The EU VAT identification number for the customer. For example, `IE3426675K`. The ID can contain alphanumeric characters only.
	EuVat *string `json:"eu_vat,omitempty" url:"eu_vat,omitempty"`
	// contains filtered or unexported fields
}

Represents the tax ID associated with a [customer profile](entity:Customer). The corresponding `tax_ids` field is available only for customers of sellers in EU countries or the United Kingdom. For more information, see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids).

func (*CustomerTaxIDs) GetEuVat

func (c *CustomerTaxIDs) GetEuVat() *string

func (*CustomerTaxIDs) GetExtraProperties

func (c *CustomerTaxIDs) GetExtraProperties() map[string]interface{}

func (*CustomerTaxIDs) String

func (c *CustomerTaxIDs) String() string

func (*CustomerTaxIDs) UnmarshalJSON

func (c *CustomerTaxIDs) UnmarshalJSON(data []byte) error

type CustomerTextFilter

type CustomerTextFilter struct {
	// Use the exact filter to select customers whose attributes match exactly the specified query.
	Exact *string `json:"exact,omitempty" url:"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" url:"fuzzy,omitempty"`
	// contains filtered or unexported fields
}

A filter to select customers based on exact or fuzzy matching of customer attributes against a specified query. Depending on the customer attributes, the filter can be case-sensitive. This filter can be exact or fuzzy, but it cannot be both.

func (*CustomerTextFilter) GetExact

func (c *CustomerTextFilter) GetExact() *string

func (*CustomerTextFilter) GetExtraProperties

func (c *CustomerTextFilter) GetExtraProperties() map[string]interface{}

func (*CustomerTextFilter) GetFuzzy

func (c *CustomerTextFilter) GetFuzzy() *string

func (*CustomerTextFilter) String

func (c *CustomerTextFilter) String() string

func (*CustomerTextFilter) UnmarshalJSON

func (c *CustomerTextFilter) UnmarshalJSON(data []byte) error

type CustomersDeleteRequest

type CustomersDeleteRequest = DeleteCustomersRequest

CustomersDeleteRequest is an alias for DeleteCustomersRequest.

type CustomersGetRequest

type CustomersGetRequest = GetCustomersRequest

CustomersGetRequest is an alias for GetCustomersRequest.

type CustomersListRequest

type CustomersListRequest = ListCustomersRequest

CustomersListRequest is an alias for ListCustomersRequest.

type DataCollectionOptions

type DataCollectionOptions struct {
	// The title text to display in the data collection flow on the Terminal.
	Title string `json:"title" url:"title"`
	// The body text to display under the title in the data collection screen flow on the
	// Terminal.
	Body string `json:"body" url:"body"`
	// Represents the type of the input text.
	// See [InputType](#type-inputtype) for possible values
	InputType DataCollectionOptionsInputType `json:"input_type" url:"input_type"`
	// The buyer’s input text from the data collection screen.
	CollectedData *CollectedData `json:"collected_data,omitempty" url:"collected_data,omitempty"`
	// contains filtered or unexported fields
}

func (*DataCollectionOptions) GetBody

func (d *DataCollectionOptions) GetBody() string

func (*DataCollectionOptions) GetCollectedData

func (d *DataCollectionOptions) GetCollectedData() *CollectedData

func (*DataCollectionOptions) GetExtraProperties

func (d *DataCollectionOptions) GetExtraProperties() map[string]interface{}

func (*DataCollectionOptions) GetInputType

func (*DataCollectionOptions) GetTitle

func (d *DataCollectionOptions) GetTitle() string

func (*DataCollectionOptions) String

func (d *DataCollectionOptions) String() string

func (*DataCollectionOptions) UnmarshalJSON

func (d *DataCollectionOptions) UnmarshalJSON(data []byte) error

type DataCollectionOptionsInputType

type DataCollectionOptionsInputType string

Describes the input type of the data.

const (
	DataCollectionOptionsInputTypeEmail       DataCollectionOptionsInputType = "EMAIL"
	DataCollectionOptionsInputTypePhoneNumber DataCollectionOptionsInputType = "PHONE_NUMBER"
)

func NewDataCollectionOptionsInputTypeFromString

func NewDataCollectionOptionsInputTypeFromString(s string) (DataCollectionOptionsInputType, error)

func (DataCollectionOptionsInputType) Ptr

type DateRange

type DateRange struct {
	// A string in `YYYY-MM-DD` format, such as `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" url:"start_date,omitempty"`
	// A string in `YYYY-MM-DD` format, such as `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" url:"end_date,omitempty"`
	// contains filtered or unexported fields
}

A range defined by two dates. Used for filtering a query for Connect v2 objects that have date properties.

func (*DateRange) GetEndDate

func (d *DateRange) GetEndDate() *string

func (*DateRange) GetExtraProperties

func (d *DateRange) GetExtraProperties() map[string]interface{}

func (*DateRange) GetStartDate

func (d *DateRange) GetStartDate() *string

func (*DateRange) String

func (d *DateRange) String() string

func (*DateRange) UnmarshalJSON

func (d *DateRange) UnmarshalJSON(data []byte) error

type DayOfWeek

type DayOfWeek string

Indicates the specific day of the week.

const (
	DayOfWeekSun DayOfWeek = "SUN"
	DayOfWeekMon DayOfWeek = "MON"
	DayOfWeekTue DayOfWeek = "TUE"
	DayOfWeekWed DayOfWeek = "WED"
	DayOfWeekThu DayOfWeek = "THU"
	DayOfWeekFri DayOfWeek = "FRI"
	DayOfWeekSat DayOfWeek = "SAT"
)

func NewDayOfWeekFromString

func NewDayOfWeekFromString(s string) (DayOfWeek, error)

func (DayOfWeek) Ptr

func (d DayOfWeek) Ptr() *DayOfWeek

type DeleteActionSubscriptionsRequest added in v1.2.0

type DeleteActionSubscriptionsRequest struct {
	// The ID of the subscription the targeted action is to act upon.
	SubscriptionID string `json:"-" url:"-"`
	// The ID of the targeted action to be deleted.
	ActionID string `json:"-" url:"-"`
}

type DeleteBookingCustomAttributeDefinitionResponse

type DeleteBookingCustomAttributeDefinitionResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [DeleteBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttributeDefinition) response containing error messages when errors occurred during the request. The successful response does not contain any payload.

func (*DeleteBookingCustomAttributeDefinitionResponse) GetErrors

func (*DeleteBookingCustomAttributeDefinitionResponse) GetExtraProperties

func (d *DeleteBookingCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*DeleteBookingCustomAttributeDefinitionResponse) String

func (*DeleteBookingCustomAttributeDefinitionResponse) UnmarshalJSON

type DeleteBookingCustomAttributeResponse

type DeleteBookingCustomAttributeResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [DeleteBookingCustomAttribute](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttribute) response. Either an empty object `{}` (for a successful deletion) or `errors` is present in the response.

func (*DeleteBookingCustomAttributeResponse) GetErrors

func (d *DeleteBookingCustomAttributeResponse) GetErrors() []*Error

func (*DeleteBookingCustomAttributeResponse) GetExtraProperties

func (d *DeleteBookingCustomAttributeResponse) GetExtraProperties() map[string]interface{}

func (*DeleteBookingCustomAttributeResponse) String

func (*DeleteBookingCustomAttributeResponse) UnmarshalJSON

func (d *DeleteBookingCustomAttributeResponse) UnmarshalJSON(data []byte) error

type DeleteBreakTypeResponse

type DeleteBreakTypeResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response to a request to delete a `BreakType`. The response might contain a set of `Error` objects if the request resulted in errors.

func (*DeleteBreakTypeResponse) GetErrors

func (d *DeleteBreakTypeResponse) GetErrors() []*Error

func (*DeleteBreakTypeResponse) GetExtraProperties

func (d *DeleteBreakTypeResponse) GetExtraProperties() map[string]interface{}

func (*DeleteBreakTypeResponse) String

func (d *DeleteBreakTypeResponse) String() string

func (*DeleteBreakTypeResponse) UnmarshalJSON

func (d *DeleteBreakTypeResponse) UnmarshalJSON(data []byte) error

type DeleteCatalogObjectResponse

type DeleteCatalogObjectResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,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,omitempty" url:"deleted_object_ids,omitempty"`
	// 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" url:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteCatalogObjectResponse) GetDeletedAt

func (d *DeleteCatalogObjectResponse) GetDeletedAt() *string

func (*DeleteCatalogObjectResponse) GetDeletedObjectIDs

func (d *DeleteCatalogObjectResponse) GetDeletedObjectIDs() []string

func (*DeleteCatalogObjectResponse) GetErrors

func (d *DeleteCatalogObjectResponse) GetErrors() []*Error

func (*DeleteCatalogObjectResponse) GetExtraProperties

func (d *DeleteCatalogObjectResponse) GetExtraProperties() map[string]interface{}

func (*DeleteCatalogObjectResponse) String

func (d *DeleteCatalogObjectResponse) String() string

func (*DeleteCatalogObjectResponse) UnmarshalJSON

func (d *DeleteCatalogObjectResponse) UnmarshalJSON(data []byte) error

type DeleteCustomerCardResponse

type DeleteCustomerCardResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the `DeleteCustomerCard` endpoint.

func (*DeleteCustomerCardResponse) GetErrors

func (d *DeleteCustomerCardResponse) GetErrors() []*Error

func (*DeleteCustomerCardResponse) GetExtraProperties

func (d *DeleteCustomerCardResponse) GetExtraProperties() map[string]interface{}

func (*DeleteCustomerCardResponse) String

func (d *DeleteCustomerCardResponse) String() string

func (*DeleteCustomerCardResponse) UnmarshalJSON

func (d *DeleteCustomerCardResponse) UnmarshalJSON(data []byte) error

type DeleteCustomerCustomAttributeDefinitionResponse

type DeleteCustomerCustomAttributeDefinitionResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from a delete request containing error messages if there are any.

func (*DeleteCustomerCustomAttributeDefinitionResponse) GetErrors

func (*DeleteCustomerCustomAttributeDefinitionResponse) GetExtraProperties

func (d *DeleteCustomerCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*DeleteCustomerCustomAttributeDefinitionResponse) String

func (*DeleteCustomerCustomAttributeDefinitionResponse) UnmarshalJSON

type DeleteCustomerCustomAttributeResponse

type DeleteCustomerCustomAttributeResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [DeleteCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-DeleteCustomerCustomAttribute) response. Either an empty object `{}` (for a successful deletion) or `errors` is present in the response.

func (*DeleteCustomerCustomAttributeResponse) GetErrors

func (d *DeleteCustomerCustomAttributeResponse) GetErrors() []*Error

func (*DeleteCustomerCustomAttributeResponse) GetExtraProperties

func (d *DeleteCustomerCustomAttributeResponse) GetExtraProperties() map[string]interface{}

func (*DeleteCustomerCustomAttributeResponse) String

func (*DeleteCustomerCustomAttributeResponse) UnmarshalJSON

func (d *DeleteCustomerCustomAttributeResponse) UnmarshalJSON(data []byte) error

type DeleteCustomerGroupResponse

type DeleteCustomerGroupResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [DeleteCustomerGroup](api-endpoint:CustomerGroups-DeleteCustomerGroup) endpoint.

func (*DeleteCustomerGroupResponse) GetErrors

func (d *DeleteCustomerGroupResponse) GetErrors() []*Error

func (*DeleteCustomerGroupResponse) GetExtraProperties

func (d *DeleteCustomerGroupResponse) GetExtraProperties() map[string]interface{}

func (*DeleteCustomerGroupResponse) String

func (d *DeleteCustomerGroupResponse) String() string

func (*DeleteCustomerGroupResponse) UnmarshalJSON

func (d *DeleteCustomerGroupResponse) UnmarshalJSON(data []byte) error

type DeleteCustomerResponse

type DeleteCustomerResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the `DeleteCustomer` endpoint.

func (*DeleteCustomerResponse) GetErrors

func (d *DeleteCustomerResponse) GetErrors() []*Error

func (*DeleteCustomerResponse) GetExtraProperties

func (d *DeleteCustomerResponse) GetExtraProperties() map[string]interface{}

func (*DeleteCustomerResponse) String

func (d *DeleteCustomerResponse) String() string

func (*DeleteCustomerResponse) UnmarshalJSON

func (d *DeleteCustomerResponse) UnmarshalJSON(data []byte) error

type DeleteCustomersRequest added in v1.2.0

type DeleteCustomersRequest struct {
	// The ID of the customer to delete.
	CustomerID string `json:"-" url:"-"`
	// The current version of the customer profile.
	//
	// As a best practice, you should include this parameter to enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) control.  For more information, see [Delete a customer profile](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#delete-customer-profile).
	Version *int64 `json:"-" url:"version,omitempty"`
}

type DeleteDisputeEvidenceResponse

type DeleteDisputeEvidenceResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields in a `DeleteDisputeEvidence` response.

func (*DeleteDisputeEvidenceResponse) GetErrors

func (d *DeleteDisputeEvidenceResponse) GetErrors() []*Error

func (*DeleteDisputeEvidenceResponse) GetExtraProperties

func (d *DeleteDisputeEvidenceResponse) GetExtraProperties() map[string]interface{}

func (*DeleteDisputeEvidenceResponse) String

func (*DeleteDisputeEvidenceResponse) UnmarshalJSON

func (d *DeleteDisputeEvidenceResponse) UnmarshalJSON(data []byte) error

type DeleteInvoiceAttachmentRequest

type DeleteInvoiceAttachmentRequest struct {
	// The ID of the [invoice](entity:Invoice) to delete the attachment from.
	InvoiceID string `json:"-" url:"-"`
	// The ID of the [attachment](entity:InvoiceAttachment) to delete.
	AttachmentID string `json:"-" url:"-"`
}

type DeleteInvoiceAttachmentResponse

type DeleteInvoiceAttachmentResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [DeleteInvoiceAttachment](api-endpoint:Invoices-DeleteInvoiceAttachment) response.

func (*DeleteInvoiceAttachmentResponse) GetErrors

func (d *DeleteInvoiceAttachmentResponse) GetErrors() []*Error

func (*DeleteInvoiceAttachmentResponse) GetExtraProperties

func (d *DeleteInvoiceAttachmentResponse) GetExtraProperties() map[string]interface{}

func (*DeleteInvoiceAttachmentResponse) String

func (*DeleteInvoiceAttachmentResponse) UnmarshalJSON

func (d *DeleteInvoiceAttachmentResponse) UnmarshalJSON(data []byte) error

type DeleteInvoiceResponse

type DeleteInvoiceResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Describes a `DeleteInvoice` response.

func (*DeleteInvoiceResponse) GetErrors

func (d *DeleteInvoiceResponse) GetErrors() []*Error

func (*DeleteInvoiceResponse) GetExtraProperties

func (d *DeleteInvoiceResponse) GetExtraProperties() map[string]interface{}

func (*DeleteInvoiceResponse) String

func (d *DeleteInvoiceResponse) String() string

func (*DeleteInvoiceResponse) UnmarshalJSON

func (d *DeleteInvoiceResponse) UnmarshalJSON(data []byte) error

type DeleteInvoicesRequest added in v1.2.0

type DeleteInvoicesRequest struct {
	// The ID of the invoice to delete.
	InvoiceID string `json:"-" url:"-"`
	// The version of the [invoice](entity:Invoice) to delete.
	// If you do not know the version, you can call [GetInvoice](api-endpoint:Invoices-GetInvoice) or
	// [ListInvoices](api-endpoint:Invoices-ListInvoices).
	Version *int `json:"-" url:"version,omitempty"`
}

type DeleteLocationCustomAttributeDefinitionResponse

type DeleteLocationCustomAttributeDefinitionResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from a delete request containing error messages if there are any.

func (*DeleteLocationCustomAttributeDefinitionResponse) GetErrors

func (*DeleteLocationCustomAttributeDefinitionResponse) GetExtraProperties

func (d *DeleteLocationCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*DeleteLocationCustomAttributeDefinitionResponse) String

func (*DeleteLocationCustomAttributeDefinitionResponse) UnmarshalJSON

type DeleteLocationCustomAttributeResponse

type DeleteLocationCustomAttributeResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [DeleteLocationCustomAttribute](api-endpoint:LocationCustomAttributes-DeleteLocationCustomAttribute) response. Either an empty object `{}` (for a successful deletion) or `errors` is present in the response.

func (*DeleteLocationCustomAttributeResponse) GetErrors

func (d *DeleteLocationCustomAttributeResponse) GetErrors() []*Error

func (*DeleteLocationCustomAttributeResponse) GetExtraProperties

func (d *DeleteLocationCustomAttributeResponse) GetExtraProperties() map[string]interface{}

func (*DeleteLocationCustomAttributeResponse) String

func (*DeleteLocationCustomAttributeResponse) UnmarshalJSON

func (d *DeleteLocationCustomAttributeResponse) UnmarshalJSON(data []byte) error

type DeleteLoyaltyRewardResponse

type DeleteLoyaltyRewardResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

A response returned by the API call.

func (*DeleteLoyaltyRewardResponse) GetErrors

func (d *DeleteLoyaltyRewardResponse) GetErrors() []*Error

func (*DeleteLoyaltyRewardResponse) GetExtraProperties

func (d *DeleteLoyaltyRewardResponse) GetExtraProperties() map[string]interface{}

func (*DeleteLoyaltyRewardResponse) String

func (d *DeleteLoyaltyRewardResponse) String() string

func (*DeleteLoyaltyRewardResponse) UnmarshalJSON

func (d *DeleteLoyaltyRewardResponse) UnmarshalJSON(data []byte) error

type DeleteMerchantCustomAttributeDefinitionResponse

type DeleteMerchantCustomAttributeDefinitionResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from a delete request containing error messages if there are any.

func (*DeleteMerchantCustomAttributeDefinitionResponse) GetErrors

func (*DeleteMerchantCustomAttributeDefinitionResponse) GetExtraProperties

func (d *DeleteMerchantCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*DeleteMerchantCustomAttributeDefinitionResponse) String

func (*DeleteMerchantCustomAttributeDefinitionResponse) UnmarshalJSON

type DeleteMerchantCustomAttributeResponse

type DeleteMerchantCustomAttributeResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [DeleteMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-DeleteMerchantCustomAttribute) response. Either an empty object `{}` (for a successful deletion) or `errors` is present in the response.

func (*DeleteMerchantCustomAttributeResponse) GetErrors

func (d *DeleteMerchantCustomAttributeResponse) GetErrors() []*Error

func (*DeleteMerchantCustomAttributeResponse) GetExtraProperties

func (d *DeleteMerchantCustomAttributeResponse) GetExtraProperties() map[string]interface{}

func (*DeleteMerchantCustomAttributeResponse) String

func (*DeleteMerchantCustomAttributeResponse) UnmarshalJSON

func (d *DeleteMerchantCustomAttributeResponse) UnmarshalJSON(data []byte) error

type DeleteOrderCustomAttributeDefinitionResponse

type DeleteOrderCustomAttributeDefinitionResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from deleting an order custom attribute definition.

func (*DeleteOrderCustomAttributeDefinitionResponse) GetErrors

func (*DeleteOrderCustomAttributeDefinitionResponse) GetExtraProperties

func (d *DeleteOrderCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*DeleteOrderCustomAttributeDefinitionResponse) String

func (*DeleteOrderCustomAttributeDefinitionResponse) UnmarshalJSON

func (d *DeleteOrderCustomAttributeDefinitionResponse) UnmarshalJSON(data []byte) error

type DeleteOrderCustomAttributeResponse

type DeleteOrderCustomAttributeResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from deleting an order custom attribute.

func (*DeleteOrderCustomAttributeResponse) GetErrors

func (d *DeleteOrderCustomAttributeResponse) GetErrors() []*Error

func (*DeleteOrderCustomAttributeResponse) GetExtraProperties

func (d *DeleteOrderCustomAttributeResponse) GetExtraProperties() map[string]interface{}

func (*DeleteOrderCustomAttributeResponse) String

func (*DeleteOrderCustomAttributeResponse) UnmarshalJSON

func (d *DeleteOrderCustomAttributeResponse) UnmarshalJSON(data []byte) error

type DeletePaymentLinkResponse

type DeletePaymentLinkResponse struct {
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The ID of the link that is deleted.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The ID of the order that is canceled. When a payment link is deleted, Square updates the
	// the `state` (of the order that the checkout link created) to CANCELED.
	CancelledOrderID *string `json:"cancelled_order_id,omitempty" url:"cancelled_order_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeletePaymentLinkResponse) GetCancelledOrderID

func (d *DeletePaymentLinkResponse) GetCancelledOrderID() *string

func (*DeletePaymentLinkResponse) GetErrors

func (d *DeletePaymentLinkResponse) GetErrors() []*Error

func (*DeletePaymentLinkResponse) GetExtraProperties

func (d *DeletePaymentLinkResponse) GetExtraProperties() map[string]interface{}

func (*DeletePaymentLinkResponse) GetID

func (d *DeletePaymentLinkResponse) GetID() *string

func (*DeletePaymentLinkResponse) String

func (d *DeletePaymentLinkResponse) String() string

func (*DeletePaymentLinkResponse) UnmarshalJSON

func (d *DeletePaymentLinkResponse) UnmarshalJSON(data []byte) error

type DeleteShiftResponse

type DeleteShiftResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response to a request to delete a `Shift`. The response might contain a set of `Error` objects if the request resulted in errors.

func (*DeleteShiftResponse) GetErrors

func (d *DeleteShiftResponse) GetErrors() []*Error

func (*DeleteShiftResponse) GetExtraProperties

func (d *DeleteShiftResponse) GetExtraProperties() map[string]interface{}

func (*DeleteShiftResponse) String

func (d *DeleteShiftResponse) String() string

func (*DeleteShiftResponse) UnmarshalJSON

func (d *DeleteShiftResponse) UnmarshalJSON(data []byte) error

type DeleteSnippetResponse

type DeleteSnippetResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a `DeleteSnippet` response.

func (*DeleteSnippetResponse) GetErrors

func (d *DeleteSnippetResponse) GetErrors() []*Error

func (*DeleteSnippetResponse) GetExtraProperties

func (d *DeleteSnippetResponse) GetExtraProperties() map[string]interface{}

func (*DeleteSnippetResponse) String

func (d *DeleteSnippetResponse) String() string

func (*DeleteSnippetResponse) UnmarshalJSON

func (d *DeleteSnippetResponse) UnmarshalJSON(data []byte) error

type DeleteSnippetsRequest added in v1.2.0

type DeleteSnippetsRequest struct {
	// The ID of the site that contains the snippet.
	SiteID string `json:"-" url:"-"`
}

type DeleteSubscriptionActionResponse

type DeleteSubscriptionActionResponse struct {
	// Errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The subscription that has the specified action deleted.
	Subscription *Subscription `json:"subscription,omitempty" url:"subscription,omitempty"`
	// contains filtered or unexported fields
}

Defines output parameters in a response of the [DeleteSubscriptionAction](api-endpoint:Subscriptions-DeleteSubscriptionAction) endpoint.

func (*DeleteSubscriptionActionResponse) GetErrors

func (d *DeleteSubscriptionActionResponse) GetErrors() []*Error

func (*DeleteSubscriptionActionResponse) GetExtraProperties

func (d *DeleteSubscriptionActionResponse) GetExtraProperties() map[string]interface{}

func (*DeleteSubscriptionActionResponse) GetSubscription

func (d *DeleteSubscriptionActionResponse) GetSubscription() *Subscription

func (*DeleteSubscriptionActionResponse) String

func (*DeleteSubscriptionActionResponse) UnmarshalJSON

func (d *DeleteSubscriptionActionResponse) UnmarshalJSON(data []byte) error

type DeleteWebhookSubscriptionResponse

type DeleteWebhookSubscriptionResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [DeleteWebhookSubscription](api-endpoint:WebhookSubscriptions-DeleteWebhookSubscription) endpoint.

func (*DeleteWebhookSubscriptionResponse) GetErrors

func (d *DeleteWebhookSubscriptionResponse) GetErrors() []*Error

func (*DeleteWebhookSubscriptionResponse) GetExtraProperties

func (d *DeleteWebhookSubscriptionResponse) GetExtraProperties() map[string]interface{}

func (*DeleteWebhookSubscriptionResponse) String

func (*DeleteWebhookSubscriptionResponse) UnmarshalJSON

func (d *DeleteWebhookSubscriptionResponse) UnmarshalJSON(data []byte) error

type DeprecatedGetAdjustmentInventoryRequest added in v1.2.0

type DeprecatedGetAdjustmentInventoryRequest struct {
	// ID of the [InventoryAdjustment](entity:InventoryAdjustment) to retrieve.
	AdjustmentID string `json:"-" url:"-"`
}

type DeprecatedGetPhysicalCountInventoryRequest added in v1.2.0

type DeprecatedGetPhysicalCountInventoryRequest struct {
	// ID of the
	// [InventoryPhysicalCount](entity:InventoryPhysicalCount) to retrieve.
	PhysicalCountID string `json:"-" url:"-"`
}

type Destination

type Destination struct {
	// Type of the destination such as a bank account or debit card.
	// See [DestinationType](#type-destinationtype) for possible values
	Type *DestinationType `json:"type,omitempty" url:"type,omitempty"`
	// Square issued unique ID (also known as the instrument ID) associated with this destination.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// contains filtered or unexported fields
}

Information about the destination against which the payout was made.

func (*Destination) GetExtraProperties

func (d *Destination) GetExtraProperties() map[string]interface{}

func (*Destination) GetID

func (d *Destination) GetID() *string

func (*Destination) GetType

func (d *Destination) GetType() *DestinationType

func (*Destination) String

func (d *Destination) String() string

func (*Destination) UnmarshalJSON

func (d *Destination) UnmarshalJSON(data []byte) error

type DestinationDetails

type DestinationDetails struct {
	// Details about a card refund. Only populated if the destination_type is `CARD`.
	CardDetails *DestinationDetailsCardRefundDetails `json:"card_details,omitempty" url:"card_details,omitempty"`
	// Details about a cash refund. Only populated if the destination_type is `CASH`.
	CashDetails *DestinationDetailsCashRefundDetails `json:"cash_details,omitempty" url:"cash_details,omitempty"`
	// Details about an external refund. Only populated if the destination_type is `EXTERNAL`.
	ExternalDetails *DestinationDetailsExternalRefundDetails `json:"external_details,omitempty" url:"external_details,omitempty"`
	// contains filtered or unexported fields
}

Details about a refund's destination.

func (*DestinationDetails) GetCardDetails

func (*DestinationDetails) GetCashDetails

func (*DestinationDetails) GetExternalDetails

func (*DestinationDetails) GetExtraProperties

func (d *DestinationDetails) GetExtraProperties() map[string]interface{}

func (*DestinationDetails) String

func (d *DestinationDetails) String() string

func (*DestinationDetails) UnmarshalJSON

func (d *DestinationDetails) UnmarshalJSON(data []byte) error

type DestinationDetailsCardRefundDetails

type DestinationDetailsCardRefundDetails struct {
	// The card's non-confidential details.
	Card *Card `json:"card,omitempty" url:"card,omitempty"`
	// The method used to enter the card's details for the refund. The method can be
	// `KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`.
	EntryMethod *string `json:"entry_method,omitempty" url:"entry_method,omitempty"`
	// The authorization code provided by the issuer when a refund is approved.
	AuthResultCode *string `json:"auth_result_code,omitempty" url:"auth_result_code,omitempty"`
	// contains filtered or unexported fields
}

func (*DestinationDetailsCardRefundDetails) GetAuthResultCode

func (d *DestinationDetailsCardRefundDetails) GetAuthResultCode() *string

func (*DestinationDetailsCardRefundDetails) GetCard

func (*DestinationDetailsCardRefundDetails) GetEntryMethod

func (d *DestinationDetailsCardRefundDetails) GetEntryMethod() *string

func (*DestinationDetailsCardRefundDetails) GetExtraProperties

func (d *DestinationDetailsCardRefundDetails) GetExtraProperties() map[string]interface{}

func (*DestinationDetailsCardRefundDetails) String

func (*DestinationDetailsCardRefundDetails) UnmarshalJSON

func (d *DestinationDetailsCardRefundDetails) UnmarshalJSON(data []byte) error

type DestinationDetailsCashRefundDetails

type DestinationDetailsCashRefundDetails struct {
	// The amount and currency of the money supplied by the seller.
	SellerSuppliedMoney *Money `json:"seller_supplied_money,omitempty" url:"seller_supplied_money,omitempty"`
	// The amount of change due back to the seller.
	// This read-only field is calculated
	// from the `amount_money` and `seller_supplied_money` fields.
	ChangeBackMoney *Money `json:"change_back_money,omitempty" url:"change_back_money,omitempty"`
	// contains filtered or unexported fields
}

Stores details about a cash refund. Contains only non-confidential information.

func (*DestinationDetailsCashRefundDetails) GetChangeBackMoney

func (d *DestinationDetailsCashRefundDetails) GetChangeBackMoney() *Money

func (*DestinationDetailsCashRefundDetails) GetExtraProperties

func (d *DestinationDetailsCashRefundDetails) GetExtraProperties() map[string]interface{}

func (*DestinationDetailsCashRefundDetails) GetSellerSuppliedMoney

func (d *DestinationDetailsCashRefundDetails) GetSellerSuppliedMoney() *Money

func (*DestinationDetailsCashRefundDetails) String

func (*DestinationDetailsCashRefundDetails) UnmarshalJSON

func (d *DestinationDetailsCashRefundDetails) UnmarshalJSON(data []byte) error

type DestinationDetailsExternalRefundDetails

type DestinationDetailsExternalRefundDetails struct {
	// The type of external refund the seller paid to the buyer. It can be one of the
	// following:
	// - CHECK - Refunded using a physical check.
	// - BANK_TRANSFER - Refunded using external bank transfer.
	// - OTHER\_GIFT\_CARD - Refunded using a non-Square gift card.
	// - CRYPTO - Refunded using a crypto currency.
	// - SQUARE_CASH - Refunded using Square Cash App.
	// - SOCIAL - Refunded using peer-to-peer payment applications.
	// - EXTERNAL - A third-party application gathered this refund outside of Square.
	// - EMONEY - Refunded using an E-money provider.
	// - CARD - A credit or debit card that Square does not support.
	// - STORED_BALANCE - Use for house accounts, store credit, and so forth.
	// - FOOD_VOUCHER - Restaurant voucher provided by employers to employees to pay for meals
	// - OTHER - A type not listed here.
	Type string `json:"type" url:"type"`
	// A description of the external refund source. For example,
	// "Food Delivery Service".
	Source string `json:"source" url:"source"`
	// An ID to associate the refund to its originating source.
	SourceID *string `json:"source_id,omitempty" url:"source_id,omitempty"`
	// contains filtered or unexported fields
}

Stores details about an external refund. Contains only non-confidential information.

func (*DestinationDetailsExternalRefundDetails) GetExtraProperties

func (d *DestinationDetailsExternalRefundDetails) GetExtraProperties() map[string]interface{}

func (*DestinationDetailsExternalRefundDetails) GetSource

func (*DestinationDetailsExternalRefundDetails) GetSourceID

func (*DestinationDetailsExternalRefundDetails) GetType

func (*DestinationDetailsExternalRefundDetails) String

func (*DestinationDetailsExternalRefundDetails) UnmarshalJSON

func (d *DestinationDetailsExternalRefundDetails) UnmarshalJSON(data []byte) error

type DestinationType

type DestinationType string

List of possible destinations against which a payout can be made.

const (
	DestinationTypeBankAccount         DestinationType = "BANK_ACCOUNT"
	DestinationTypeCard                DestinationType = "CARD"
	DestinationTypeSquareBalance       DestinationType = "SQUARE_BALANCE"
	DestinationTypeSquareStoredBalance DestinationType = "SQUARE_STORED_BALANCE"
)

func NewDestinationTypeFromString

func NewDestinationTypeFromString(s string) (DestinationType, error)

func (DestinationType) Ptr

type Device

type Device struct {
	// A synthetic identifier for the device. The identifier includes a standardized prefix and
	// is otherwise an opaque id generated from key device fields.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// A collection of DeviceAttributes representing the device.
	Attributes *DeviceAttributes `json:"attributes,omitempty" url:"attributes,omitempty"`
	// A list of components applicable to the device.
	Components []*Component `json:"components,omitempty" url:"components,omitempty"`
	// The current status of the device.
	Status *DeviceStatus `json:"status,omitempty" url:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*Device) GetAttributes

func (d *Device) GetAttributes() *DeviceAttributes

func (*Device) GetComponents

func (d *Device) GetComponents() []*Component

func (*Device) GetExtraProperties

func (d *Device) GetExtraProperties() map[string]interface{}

func (*Device) GetID

func (d *Device) GetID() *string

func (*Device) GetStatus

func (d *Device) GetStatus() *DeviceStatus

func (*Device) String

func (d *Device) String() string

func (*Device) UnmarshalJSON

func (d *Device) UnmarshalJSON(data []byte) error

type DeviceAttributes

type DeviceAttributes struct {
	// The device type.
	// See [DeviceType](#type-devicetype) for possible values
	Type DeviceAttributesDeviceType `json:"type,omitempty" url:"type,omitempty"`
	// The maker of the device.
	Manufacturer string `json:"manufacturer" url:"manufacturer"`
	// The specific model of the device.
	Model *string `json:"model,omitempty" url:"model,omitempty"`
	// A seller-specified name for the device.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The manufacturer-supplied identifier for the device (where available). In many cases,
	// this identifier will be a serial number.
	ManufacturersID *string `json:"manufacturers_id,omitempty" url:"manufacturers_id,omitempty"`
	// The RFC 3339-formatted value of the most recent update to the device information.
	// (Could represent any field update on the device.)
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The current version of software installed on the device.
	Version *string `json:"version,omitempty" url:"version,omitempty"`
	// The merchant_token identifying the merchant controlling the device.
	MerchantToken *string `json:"merchant_token,omitempty" url:"merchant_token,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceAttributes) GetExtraProperties

func (d *DeviceAttributes) GetExtraProperties() map[string]interface{}

func (*DeviceAttributes) GetManufacturer

func (d *DeviceAttributes) GetManufacturer() string

func (*DeviceAttributes) GetManufacturersID

func (d *DeviceAttributes) GetManufacturersID() *string

func (*DeviceAttributes) GetMerchantToken

func (d *DeviceAttributes) GetMerchantToken() *string

func (*DeviceAttributes) GetModel

func (d *DeviceAttributes) GetModel() *string

func (*DeviceAttributes) GetName

func (d *DeviceAttributes) GetName() *string

func (*DeviceAttributes) GetUpdatedAt

func (d *DeviceAttributes) GetUpdatedAt() *string

func (*DeviceAttributes) GetVersion

func (d *DeviceAttributes) GetVersion() *string

func (*DeviceAttributes) String

func (d *DeviceAttributes) String() string

func (*DeviceAttributes) UnmarshalJSON

func (d *DeviceAttributes) UnmarshalJSON(data []byte) error

type DeviceAttributesDeviceType

type DeviceAttributesDeviceType = string

An enum identifier of the device type.

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.
	DeviceID string `json:"device_id" url:"device_id"`
	// Instructs the device to skip the receipt screen. Defaults to false.
	SkipReceiptScreen *bool `json:"skip_receipt_screen,omitempty" url:"skip_receipt_screen,omitempty"`
	// Indicates that signature collection is desired during checkout. Defaults to false.
	CollectSignature *bool `json:"collect_signature,omitempty" url:"collect_signature,omitempty"`
	// Tip-specific settings.
	TipSettings *TipSettings `json:"tip_settings,omitempty" url:"tip_settings,omitempty"`
	// Show the itemization screen prior to taking a payment. This field is only meaningful when the
	// checkout includes an order ID. Defaults to true.
	ShowItemizedCart *bool `json:"show_itemized_cart,omitempty" url:"show_itemized_cart,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceCheckoutOptions) GetCollectSignature

func (d *DeviceCheckoutOptions) GetCollectSignature() *bool

func (*DeviceCheckoutOptions) GetDeviceID

func (d *DeviceCheckoutOptions) GetDeviceID() string

func (*DeviceCheckoutOptions) GetExtraProperties

func (d *DeviceCheckoutOptions) GetExtraProperties() map[string]interface{}

func (*DeviceCheckoutOptions) GetShowItemizedCart

func (d *DeviceCheckoutOptions) GetShowItemizedCart() *bool

func (*DeviceCheckoutOptions) GetSkipReceiptScreen

func (d *DeviceCheckoutOptions) GetSkipReceiptScreen() *bool

func (*DeviceCheckoutOptions) GetTipSettings

func (d *DeviceCheckoutOptions) GetTipSettings() *TipSettings

func (*DeviceCheckoutOptions) String

func (d *DeviceCheckoutOptions) String() string

func (*DeviceCheckoutOptions) UnmarshalJSON

func (d *DeviceCheckoutOptions) UnmarshalJSON(data []byte) error

type DeviceCode

type DeviceCode struct {
	// The unique id for this device code.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// An optional user-defined name for the device code.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The unique code that can be used to login.
	Code *string `json:"code,omitempty" url:"code,omitempty"`
	// The unique id of the device that used this code. Populated when the device is paired up.
	DeviceID *string `json:"device_id,omitempty" url:"device_id,omitempty"`
	// The targeting product type of the device code.
	ProductType ProductType `json:"product_type,omitempty" url:"product_type,omitempty"`
	// The location assigned to this code.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The pairing status of the device code.
	// See [DeviceCodeStatus](#type-devicecodestatus) for possible values
	Status *DeviceCodeStatus `json:"status,omitempty" url:"status,omitempty"`
	// When this DeviceCode will expire and no longer login. Timestamp in RFC 3339 format.
	PairBy *string `json:"pair_by,omitempty" url:"pair_by,omitempty"`
	// When this DeviceCode was created. Timestamp in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// When this DeviceCode's status was last changed. Timestamp in RFC 3339 format.
	StatusChangedAt *string `json:"status_changed_at,omitempty" url:"status_changed_at,omitempty"`
	// When this DeviceCode was paired. Timestamp in RFC 3339 format.
	PairedAt *string `json:"paired_at,omitempty" url:"paired_at,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceCode) GetCode

func (d *DeviceCode) GetCode() *string

func (*DeviceCode) GetCreatedAt

func (d *DeviceCode) GetCreatedAt() *string

func (*DeviceCode) GetDeviceID

func (d *DeviceCode) GetDeviceID() *string

func (*DeviceCode) GetExtraProperties

func (d *DeviceCode) GetExtraProperties() map[string]interface{}

func (*DeviceCode) GetID

func (d *DeviceCode) GetID() *string

func (*DeviceCode) GetLocationID

func (d *DeviceCode) GetLocationID() *string

func (*DeviceCode) GetName

func (d *DeviceCode) GetName() *string

func (*DeviceCode) GetPairBy

func (d *DeviceCode) GetPairBy() *string

func (*DeviceCode) GetPairedAt

func (d *DeviceCode) GetPairedAt() *string

func (*DeviceCode) GetStatus

func (d *DeviceCode) GetStatus() *DeviceCodeStatus

func (*DeviceCode) GetStatusChangedAt

func (d *DeviceCode) GetStatusChangedAt() *string

func (*DeviceCode) String

func (d *DeviceCode) String() string

func (*DeviceCode) UnmarshalJSON

func (d *DeviceCode) UnmarshalJSON(data []byte) error

type DeviceCodeStatus

type DeviceCodeStatus string

DeviceCode.Status enum.

const (
	DeviceCodeStatusUnknown  DeviceCodeStatus = "UNKNOWN"
	DeviceCodeStatusUnpaired DeviceCodeStatus = "UNPAIRED"
	DeviceCodeStatusPaired   DeviceCodeStatus = "PAIRED"
	DeviceCodeStatusExpired  DeviceCodeStatus = "EXPIRED"
)

func NewDeviceCodeStatusFromString

func NewDeviceCodeStatusFromString(s string) (DeviceCodeStatus, error)

func (DeviceCodeStatus) Ptr

type DeviceComponentDetailsApplicationDetails

type DeviceComponentDetailsApplicationDetails struct {
	// The type of application.
	// See [ApplicationType](#type-applicationtype) for possible values
	ApplicationType *ApplicationType `json:"application_type,omitempty" url:"application_type,omitempty"`
	// The version of the application.
	Version *string `json:"version,omitempty" url:"version,omitempty"`
	// The location_id of the session for the application.
	SessionLocation *string `json:"session_location,omitempty" url:"session_location,omitempty"`
	// The id of the device code that was used to log in to the device.
	DeviceCodeID *string `json:"device_code_id,omitempty" url:"device_code_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceComponentDetailsApplicationDetails) GetDeviceCodeID

func (d *DeviceComponentDetailsApplicationDetails) GetDeviceCodeID() *string

func (*DeviceComponentDetailsApplicationDetails) GetExtraProperties

func (d *DeviceComponentDetailsApplicationDetails) GetExtraProperties() map[string]interface{}

func (*DeviceComponentDetailsApplicationDetails) GetSessionLocation

func (d *DeviceComponentDetailsApplicationDetails) GetSessionLocation() *string

func (*DeviceComponentDetailsApplicationDetails) GetVersion

func (*DeviceComponentDetailsApplicationDetails) String

func (*DeviceComponentDetailsApplicationDetails) UnmarshalJSON

func (d *DeviceComponentDetailsApplicationDetails) UnmarshalJSON(data []byte) error

type DeviceComponentDetailsBatteryDetails

type DeviceComponentDetailsBatteryDetails struct {
	// The battery charge percentage as displayed on the device.
	VisiblePercent *int `json:"visible_percent,omitempty" url:"visible_percent,omitempty"`
	// The status of external_power.
	// See [ExternalPower](#type-externalpower) for possible values
	ExternalPower *DeviceComponentDetailsExternalPower `json:"external_power,omitempty" url:"external_power,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceComponentDetailsBatteryDetails) GetExternalPower

func (*DeviceComponentDetailsBatteryDetails) GetExtraProperties

func (d *DeviceComponentDetailsBatteryDetails) GetExtraProperties() map[string]interface{}

func (*DeviceComponentDetailsBatteryDetails) GetVisiblePercent

func (d *DeviceComponentDetailsBatteryDetails) GetVisiblePercent() *int

func (*DeviceComponentDetailsBatteryDetails) String

func (*DeviceComponentDetailsBatteryDetails) UnmarshalJSON

func (d *DeviceComponentDetailsBatteryDetails) UnmarshalJSON(data []byte) error

type DeviceComponentDetailsCardReaderDetails

type DeviceComponentDetailsCardReaderDetails struct {
	// The version of the card reader.
	Version *string `json:"version,omitempty" url:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceComponentDetailsCardReaderDetails) GetExtraProperties

func (d *DeviceComponentDetailsCardReaderDetails) GetExtraProperties() map[string]interface{}

func (*DeviceComponentDetailsCardReaderDetails) GetVersion

func (*DeviceComponentDetailsCardReaderDetails) String

func (*DeviceComponentDetailsCardReaderDetails) UnmarshalJSON

func (d *DeviceComponentDetailsCardReaderDetails) UnmarshalJSON(data []byte) error

type DeviceComponentDetailsEthernetDetails

type DeviceComponentDetailsEthernetDetails struct {
	// A boolean to represent whether the Ethernet interface is currently active.
	Active *bool `json:"active,omitempty" url:"active,omitempty"`
	// The string representation of the device’s IPv4 address.
	IPAddressV4 *string `json:"ip_address_v4,omitempty" url:"ip_address_v4,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceComponentDetailsEthernetDetails) GetActive

func (*DeviceComponentDetailsEthernetDetails) GetExtraProperties

func (d *DeviceComponentDetailsEthernetDetails) GetExtraProperties() map[string]interface{}

func (*DeviceComponentDetailsEthernetDetails) GetIPAddressV4

func (d *DeviceComponentDetailsEthernetDetails) GetIPAddressV4() *string

func (*DeviceComponentDetailsEthernetDetails) String

func (*DeviceComponentDetailsEthernetDetails) UnmarshalJSON

func (d *DeviceComponentDetailsEthernetDetails) UnmarshalJSON(data []byte) error

type DeviceComponentDetailsExternalPower

type DeviceComponentDetailsExternalPower string

An enum for ExternalPower.

const (
	DeviceComponentDetailsExternalPowerAvailableCharging     DeviceComponentDetailsExternalPower = "AVAILABLE_CHARGING"
	DeviceComponentDetailsExternalPowerAvailableNotInUse     DeviceComponentDetailsExternalPower = "AVAILABLE_NOT_IN_USE"
	DeviceComponentDetailsExternalPowerUnavailable           DeviceComponentDetailsExternalPower = "UNAVAILABLE"
	DeviceComponentDetailsExternalPowerAvailableInsufficient DeviceComponentDetailsExternalPower = "AVAILABLE_INSUFFICIENT"
)

func NewDeviceComponentDetailsExternalPowerFromString

func NewDeviceComponentDetailsExternalPowerFromString(s string) (DeviceComponentDetailsExternalPower, error)

func (DeviceComponentDetailsExternalPower) Ptr

type DeviceComponentDetailsMeasurement

type DeviceComponentDetailsMeasurement struct {
	Value *int `json:"value,omitempty" url:"value,omitempty"`
	// contains filtered or unexported fields
}

A value qualified by unit of measure.

func (*DeviceComponentDetailsMeasurement) GetExtraProperties

func (d *DeviceComponentDetailsMeasurement) GetExtraProperties() map[string]interface{}

func (*DeviceComponentDetailsMeasurement) GetValue

func (d *DeviceComponentDetailsMeasurement) GetValue() *int

func (*DeviceComponentDetailsMeasurement) String

func (*DeviceComponentDetailsMeasurement) UnmarshalJSON

func (d *DeviceComponentDetailsMeasurement) UnmarshalJSON(data []byte) error

type DeviceComponentDetailsWiFiDetails

type DeviceComponentDetailsWiFiDetails struct {
	// A boolean to represent whether the WiFI interface is currently active.
	Active *bool `json:"active,omitempty" url:"active,omitempty"`
	// The name of the connected WIFI network.
	Ssid *string `json:"ssid,omitempty" url:"ssid,omitempty"`
	// The string representation of the device’s IPv4 address.
	IPAddressV4 *string `json:"ip_address_v4,omitempty" url:"ip_address_v4,omitempty"`
	// The security protocol for a secure connection (e.g. WPA2). None provided if the connection
	// is unsecured.
	SecureConnection *string `json:"secure_connection,omitempty" url:"secure_connection,omitempty"`
	// A representation of signal strength of the WIFI network connection.
	SignalStrength *DeviceComponentDetailsMeasurement `json:"signal_strength,omitempty" url:"signal_strength,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceComponentDetailsWiFiDetails) GetActive

func (d *DeviceComponentDetailsWiFiDetails) GetActive() *bool

func (*DeviceComponentDetailsWiFiDetails) GetExtraProperties

func (d *DeviceComponentDetailsWiFiDetails) GetExtraProperties() map[string]interface{}

func (*DeviceComponentDetailsWiFiDetails) GetIPAddressV4

func (d *DeviceComponentDetailsWiFiDetails) GetIPAddressV4() *string

func (*DeviceComponentDetailsWiFiDetails) GetSecureConnection

func (d *DeviceComponentDetailsWiFiDetails) GetSecureConnection() *string

func (*DeviceComponentDetailsWiFiDetails) GetSignalStrength

func (*DeviceComponentDetailsWiFiDetails) GetSsid

func (*DeviceComponentDetailsWiFiDetails) String

func (*DeviceComponentDetailsWiFiDetails) UnmarshalJSON

func (d *DeviceComponentDetailsWiFiDetails) UnmarshalJSON(data []byte) error

type DeviceDetails

type DeviceDetails struct {
	// The Square-issued ID of the device.
	DeviceID *string `json:"device_id,omitempty" url:"device_id,omitempty"`
	// The Square-issued installation ID for the device.
	DeviceInstallationID *string `json:"device_installation_id,omitempty" url:"device_installation_id,omitempty"`
	// The name of the device set by the seller.
	DeviceName *string `json:"device_name,omitempty" url:"device_name,omitempty"`
	// contains filtered or unexported fields
}

Details about the device that took the payment.

func (*DeviceDetails) GetDeviceID

func (d *DeviceDetails) GetDeviceID() *string

func (*DeviceDetails) GetDeviceInstallationID

func (d *DeviceDetails) GetDeviceInstallationID() *string

func (*DeviceDetails) GetDeviceName

func (d *DeviceDetails) GetDeviceName() *string

func (*DeviceDetails) GetExtraProperties

func (d *DeviceDetails) GetExtraProperties() map[string]interface{}

func (*DeviceDetails) String

func (d *DeviceDetails) String() string

func (*DeviceDetails) UnmarshalJSON

func (d *DeviceDetails) UnmarshalJSON(data []byte) error

type DeviceMetadata

type DeviceMetadata struct {
	// The Terminal’s remaining battery percentage, between 1-100.
	BatteryPercentage *string `json:"battery_percentage,omitempty" url:"battery_percentage,omitempty"`
	// The current charging state of the Terminal.
	// Options: `CHARGING`, `NOT_CHARGING`
	ChargingState *string `json:"charging_state,omitempty" url:"charging_state,omitempty"`
	// The ID of the Square seller business location associated with the Terminal.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The ID of the Square merchant account that is currently signed-in to the Terminal.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The Terminal’s current network connection type.
	// Options: `WIFI`, `ETHERNET`
	NetworkConnectionType *string `json:"network_connection_type,omitempty" url:"network_connection_type,omitempty"`
	// The country in which the Terminal is authorized to take payments.
	PaymentRegion *string `json:"payment_region,omitempty" url:"payment_region,omitempty"`
	// The unique identifier assigned to the Terminal, which can be found on the lower back
	// of the device.
	SerialNumber *string `json:"serial_number,omitempty" url:"serial_number,omitempty"`
	// The current version of the Terminal’s operating system.
	OsVersion *string `json:"os_version,omitempty" url:"os_version,omitempty"`
	// The current version of the application running on the Terminal.
	AppVersion *string `json:"app_version,omitempty" url:"app_version,omitempty"`
	// The name of the Wi-Fi network to which the Terminal is connected.
	WifiNetworkName *string `json:"wifi_network_name,omitempty" url:"wifi_network_name,omitempty"`
	// The signal strength of the Wi-FI network connection.
	// Options: `POOR`, `FAIR`, `GOOD`, `EXCELLENT`
	WifiNetworkStrength *string `json:"wifi_network_strength,omitempty" url:"wifi_network_strength,omitempty"`
	// The IP address of the Terminal.
	IPAddress *string `json:"ip_address,omitempty" url:"ip_address,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceMetadata) GetAppVersion

func (d *DeviceMetadata) GetAppVersion() *string

func (*DeviceMetadata) GetBatteryPercentage

func (d *DeviceMetadata) GetBatteryPercentage() *string

func (*DeviceMetadata) GetChargingState

func (d *DeviceMetadata) GetChargingState() *string

func (*DeviceMetadata) GetExtraProperties

func (d *DeviceMetadata) GetExtraProperties() map[string]interface{}

func (*DeviceMetadata) GetIPAddress

func (d *DeviceMetadata) GetIPAddress() *string

func (*DeviceMetadata) GetLocationID

func (d *DeviceMetadata) GetLocationID() *string

func (*DeviceMetadata) GetMerchantID

func (d *DeviceMetadata) GetMerchantID() *string

func (*DeviceMetadata) GetNetworkConnectionType

func (d *DeviceMetadata) GetNetworkConnectionType() *string

func (*DeviceMetadata) GetOsVersion

func (d *DeviceMetadata) GetOsVersion() *string

func (*DeviceMetadata) GetPaymentRegion

func (d *DeviceMetadata) GetPaymentRegion() *string

func (*DeviceMetadata) GetSerialNumber

func (d *DeviceMetadata) GetSerialNumber() *string

func (*DeviceMetadata) GetWifiNetworkName

func (d *DeviceMetadata) GetWifiNetworkName() *string

func (*DeviceMetadata) GetWifiNetworkStrength

func (d *DeviceMetadata) GetWifiNetworkStrength() *string

func (*DeviceMetadata) String

func (d *DeviceMetadata) String() string

func (*DeviceMetadata) UnmarshalJSON

func (d *DeviceMetadata) UnmarshalJSON(data []byte) error

type DeviceStatus

type DeviceStatus struct {
	// See [Category](#type-category) for possible values
	Category *DeviceStatusCategory `json:"category,omitempty" url:"category,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceStatus) GetCategory

func (d *DeviceStatus) GetCategory() *DeviceStatusCategory

func (*DeviceStatus) GetExtraProperties

func (d *DeviceStatus) GetExtraProperties() map[string]interface{}

func (*DeviceStatus) String

func (d *DeviceStatus) String() string

func (*DeviceStatus) UnmarshalJSON

func (d *DeviceStatus) UnmarshalJSON(data []byte) error

type DeviceStatusCategory

type DeviceStatusCategory string
const (
	DeviceStatusCategoryAvailable      DeviceStatusCategory = "AVAILABLE"
	DeviceStatusCategoryNeedsAttention DeviceStatusCategory = "NEEDS_ATTENTION"
	DeviceStatusCategoryOffline        DeviceStatusCategory = "OFFLINE"
)

func NewDeviceStatusCategoryFromString

func NewDeviceStatusCategoryFromString(s string) (DeviceStatusCategory, error)

func (DeviceStatusCategory) Ptr

type DevicesGetRequest

type DevicesGetRequest = GetDevicesRequest

DevicesGetRequest is an alias for GetDevicesRequest.

type DevicesListRequest

type DevicesListRequest = ListDevicesRequest

DevicesListRequest is an alias for ListDevicesRequest.

type DigitalWalletDetails

type DigitalWalletDetails struct {
	// The status of the `WALLET` payment. The status can be `AUTHORIZED`, `CAPTURED`, `VOIDED`, or
	// `FAILED`.
	Status *string `json:"status,omitempty" url:"status,omitempty"`
	// The brand used for the `WALLET` payment. The brand can be `CASH_APP`, `PAYPAY`, `ALIPAY`,
	// `RAKUTEN_PAY`, `AU_PAY`, `D_BARAI`, `MERPAY`, `WECHAT_PAY` or `UNKNOWN`.
	Brand *string `json:"brand,omitempty" url:"brand,omitempty"`
	// Brand-specific details for payments with the `brand` of `CASH_APP`.
	CashAppDetails *CashAppDetails `json:"cash_app_details,omitempty" url:"cash_app_details,omitempty"`
	// contains filtered or unexported fields
}

Additional details about `WALLET` type payments. Contains only non-confidential information.

func (*DigitalWalletDetails) GetBrand

func (d *DigitalWalletDetails) GetBrand() *string

func (*DigitalWalletDetails) GetCashAppDetails

func (d *DigitalWalletDetails) GetCashAppDetails() *CashAppDetails

func (*DigitalWalletDetails) GetExtraProperties

func (d *DigitalWalletDetails) GetExtraProperties() map[string]interface{}

func (*DigitalWalletDetails) GetStatus

func (d *DigitalWalletDetails) GetStatus() *string

func (*DigitalWalletDetails) String

func (d *DigitalWalletDetails) String() string

func (*DigitalWalletDetails) UnmarshalJSON

func (d *DigitalWalletDetails) UnmarshalJSON(data []byte) error

type DisableCardResponse

type DisableCardResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The retrieved card.
	Card *Card `json:"card,omitempty" url:"card,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [DisableCard](api-endpoint:Cards-DisableCard) endpoint.

Note: if there are errors processing the request, the card field will not be present.

func (*DisableCardResponse) GetCard

func (d *DisableCardResponse) GetCard() *Card

func (*DisableCardResponse) GetErrors

func (d *DisableCardResponse) GetErrors() []*Error

func (*DisableCardResponse) GetExtraProperties

func (d *DisableCardResponse) GetExtraProperties() map[string]interface{}

func (*DisableCardResponse) String

func (d *DisableCardResponse) String() string

func (*DisableCardResponse) UnmarshalJSON

func (d *DisableCardResponse) UnmarshalJSON(data []byte) error

type DisableCardsRequest added in v1.2.0

type DisableCardsRequest struct {
	// Unique ID for the desired Card.
	CardID string `json:"-" url:"-"`
}

type DisableEventsResponse

type DisableEventsResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [DisableEvents](api-endpoint:Events-DisableEvents) endpoint.

Note: if there are errors processing the request, the events field will not be present.

func (*DisableEventsResponse) GetErrors

func (d *DisableEventsResponse) GetErrors() []*Error

func (*DisableEventsResponse) GetExtraProperties

func (d *DisableEventsResponse) GetExtraProperties() map[string]interface{}

func (*DisableEventsResponse) String

func (d *DisableEventsResponse) String() string

func (*DisableEventsResponse) UnmarshalJSON

func (d *DisableEventsResponse) UnmarshalJSON(data []byte) error

type DismissTerminalActionRequest

type DismissTerminalActionRequest struct {
	// Unique ID for the `TerminalAction` associated with the action to be dismissed.
	ActionID string `json:"-" url:"-"`
}

type DismissTerminalActionResponse

type DismissTerminalActionResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// Current state of the action to be dismissed.
	Action *TerminalAction `json:"action,omitempty" url:"action,omitempty"`
	// contains filtered or unexported fields
}

func (*DismissTerminalActionResponse) GetAction

func (*DismissTerminalActionResponse) GetErrors

func (d *DismissTerminalActionResponse) GetErrors() []*Error

func (*DismissTerminalActionResponse) GetExtraProperties

func (d *DismissTerminalActionResponse) GetExtraProperties() map[string]interface{}

func (*DismissTerminalActionResponse) String

func (*DismissTerminalActionResponse) UnmarshalJSON

func (d *DismissTerminalActionResponse) UnmarshalJSON(data []byte) error

type DismissTerminalCheckoutRequest

type DismissTerminalCheckoutRequest struct {
	// Unique ID for the `TerminalCheckout` associated with the checkout to be dismissed.
	CheckoutID string `json:"-" url:"-"`
}

type DismissTerminalCheckoutResponse

type DismissTerminalCheckoutResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// Current state of the checkout to be dismissed.
	Checkout *TerminalCheckout `json:"checkout,omitempty" url:"checkout,omitempty"`
	// contains filtered or unexported fields
}

func (*DismissTerminalCheckoutResponse) GetCheckout

func (*DismissTerminalCheckoutResponse) GetErrors

func (d *DismissTerminalCheckoutResponse) GetErrors() []*Error

func (*DismissTerminalCheckoutResponse) GetExtraProperties

func (d *DismissTerminalCheckoutResponse) GetExtraProperties() map[string]interface{}

func (*DismissTerminalCheckoutResponse) String

func (*DismissTerminalCheckoutResponse) UnmarshalJSON

func (d *DismissTerminalCheckoutResponse) UnmarshalJSON(data []byte) error

type DismissTerminalRefundRequest

type DismissTerminalRefundRequest struct {
	// Unique ID for the `TerminalRefund` associated with the refund to be dismissed.
	TerminalRefundID string `json:"-" url:"-"`
}

type DismissTerminalRefundResponse

type DismissTerminalRefundResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// Current state of the refund to be dismissed.
	Refund *TerminalRefund `json:"refund,omitempty" url:"refund,omitempty"`
	// contains filtered or unexported fields
}

func (*DismissTerminalRefundResponse) GetErrors

func (d *DismissTerminalRefundResponse) GetErrors() []*Error

func (*DismissTerminalRefundResponse) GetExtraProperties

func (d *DismissTerminalRefundResponse) GetExtraProperties() map[string]interface{}

func (*DismissTerminalRefundResponse) GetRefund

func (*DismissTerminalRefundResponse) String

func (*DismissTerminalRefundResponse) UnmarshalJSON

func (d *DismissTerminalRefundResponse) UnmarshalJSON(data []byte) error

type Dispute

type Dispute struct {
	// The unique ID for this `Dispute`, generated by Square.
	DisputeID *string `json:"dispute_id,omitempty" url:"dispute_id,omitempty"`
	// The unique ID for this `Dispute`, generated by Square.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The disputed amount, which can be less than the total transaction amount.
	// For instance, if multiple items were purchased but the cardholder only initiates a dispute over some of the items.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// The reason why the cardholder initiated the dispute.
	// See [DisputeReason](#type-disputereason) for possible values
	Reason *DisputeReason `json:"reason,omitempty" url:"reason,omitempty"`
	// The current state of this dispute.
	// See [DisputeState](#type-disputestate) for possible values
	State *DisputeState `json:"state,omitempty" url:"state,omitempty"`
	// The deadline by which the seller must respond to the dispute, in [RFC 3339 format](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-dates).
	DueAt *string `json:"due_at,omitempty" url:"due_at,omitempty"`
	// The payment challenged in this dispute.
	DisputedPayment *DisputedPayment `json:"disputed_payment,omitempty" url:"disputed_payment,omitempty"`
	// The IDs of the evidence associated with the dispute.
	EvidenceIDs []string `json:"evidence_ids,omitempty" url:"evidence_ids,omitempty"`
	// The card brand used in the disputed payment.
	// See [CardBrand](#type-cardbrand) for possible values
	CardBrand *CardBrand `json:"card_brand,omitempty" url:"card_brand,omitempty"`
	// The timestamp when the dispute was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp when the dispute was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The ID of the dispute in the card brand system, generated by the card brand.
	BrandDisputeID *string `json:"brand_dispute_id,omitempty" url:"brand_dispute_id,omitempty"`
	// The timestamp when the dispute was reported, in RFC 3339 format.
	ReportedDate *string `json:"reported_date,omitempty" url:"reported_date,omitempty"`
	// The timestamp when the dispute was reported, in RFC 3339 format.
	ReportedAt *string `json:"reported_at,omitempty" url:"reported_at,omitempty"`
	// The current version of the `Dispute`.
	Version *int `json:"version,omitempty" url:"version,omitempty"`
	// The ID of the location where the dispute originated.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// contains filtered or unexported fields
}

Represents a [dispute](https://developer.squareup.com/docs/disputes-api/overview) a cardholder initiated with their bank.

func (*Dispute) GetAmountMoney

func (d *Dispute) GetAmountMoney() *Money

func (*Dispute) GetBrandDisputeID

func (d *Dispute) GetBrandDisputeID() *string

func (*Dispute) GetCardBrand

func (d *Dispute) GetCardBrand() *CardBrand

func (*Dispute) GetCreatedAt

func (d *Dispute) GetCreatedAt() *string

func (*Dispute) GetDisputeID

func (d *Dispute) GetDisputeID() *string

func (*Dispute) GetDisputedPayment

func (d *Dispute) GetDisputedPayment() *DisputedPayment

func (*Dispute) GetDueAt

func (d *Dispute) GetDueAt() *string

func (*Dispute) GetEvidenceIDs

func (d *Dispute) GetEvidenceIDs() []string

func (*Dispute) GetExtraProperties

func (d *Dispute) GetExtraProperties() map[string]interface{}

func (*Dispute) GetID

func (d *Dispute) GetID() *string

func (*Dispute) GetLocationID

func (d *Dispute) GetLocationID() *string

func (*Dispute) GetReason

func (d *Dispute) GetReason() *DisputeReason

func (*Dispute) GetReportedAt

func (d *Dispute) GetReportedAt() *string

func (*Dispute) GetReportedDate

func (d *Dispute) GetReportedDate() *string

func (*Dispute) GetState

func (d *Dispute) GetState() *DisputeState

func (*Dispute) GetUpdatedAt

func (d *Dispute) GetUpdatedAt() *string

func (*Dispute) GetVersion

func (d *Dispute) GetVersion() *int

func (*Dispute) String

func (d *Dispute) String() string

func (*Dispute) UnmarshalJSON

func (d *Dispute) UnmarshalJSON(data []byte) error

type DisputeEvidence

type DisputeEvidence struct {
	// The Square-generated ID of the evidence.
	EvidenceID *string `json:"evidence_id,omitempty" url:"evidence_id,omitempty"`
	// The Square-generated ID of the evidence.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The ID of the dispute the evidence is associated with.
	DisputeID *string `json:"dispute_id,omitempty" url:"dispute_id,omitempty"`
	// Image, PDF, TXT
	EvidenceFile *DisputeEvidenceFile `json:"evidence_file,omitempty" url:"evidence_file,omitempty"`
	// Raw text
	EvidenceText *string `json:"evidence_text,omitempty" url:"evidence_text,omitempty"`
	// The time when the evidence was uploaded, in RFC 3339 format.
	UploadedAt *string `json:"uploaded_at,omitempty" url:"uploaded_at,omitempty"`
	// The type of the evidence.
	// See [DisputeEvidenceType](#type-disputeevidencetype) for possible values
	EvidenceType *DisputeEvidenceType `json:"evidence_type,omitempty" url:"evidence_type,omitempty"`
	// contains filtered or unexported fields
}

func (*DisputeEvidence) GetDisputeID

func (d *DisputeEvidence) GetDisputeID() *string

func (*DisputeEvidence) GetEvidenceFile

func (d *DisputeEvidence) GetEvidenceFile() *DisputeEvidenceFile

func (*DisputeEvidence) GetEvidenceID

func (d *DisputeEvidence) GetEvidenceID() *string

func (*DisputeEvidence) GetEvidenceText

func (d *DisputeEvidence) GetEvidenceText() *string

func (*DisputeEvidence) GetEvidenceType

func (d *DisputeEvidence) GetEvidenceType() *DisputeEvidenceType

func (*DisputeEvidence) GetExtraProperties

func (d *DisputeEvidence) GetExtraProperties() map[string]interface{}

func (*DisputeEvidence) GetID

func (d *DisputeEvidence) GetID() *string

func (*DisputeEvidence) GetUploadedAt

func (d *DisputeEvidence) GetUploadedAt() *string

func (*DisputeEvidence) String

func (d *DisputeEvidence) String() string

func (*DisputeEvidence) UnmarshalJSON

func (d *DisputeEvidence) UnmarshalJSON(data []byte) error

type DisputeEvidenceFile

type DisputeEvidenceFile struct {
	// The file name including the file extension. For example: "receipt.tiff".
	Filename *string `json:"filename,omitempty" url:"filename,omitempty"`
	// Dispute evidence files must be application/pdf, image/heic, image/heif, image/jpeg, image/png, or image/tiff formats.
	Filetype *string `json:"filetype,omitempty" url:"filetype,omitempty"`
	// contains filtered or unexported fields
}

A file to be uploaded as dispute evidence.

func (*DisputeEvidenceFile) GetExtraProperties

func (d *DisputeEvidenceFile) GetExtraProperties() map[string]interface{}

func (*DisputeEvidenceFile) GetFilename

func (d *DisputeEvidenceFile) GetFilename() *string

func (*DisputeEvidenceFile) GetFiletype

func (d *DisputeEvidenceFile) GetFiletype() *string

func (*DisputeEvidenceFile) String

func (d *DisputeEvidenceFile) String() string

func (*DisputeEvidenceFile) UnmarshalJSON

func (d *DisputeEvidenceFile) UnmarshalJSON(data []byte) error

type DisputeEvidenceType

type DisputeEvidenceType string

The type of the dispute evidence.

const (
	DisputeEvidenceTypeGenericEvidence                   DisputeEvidenceType = "GENERIC_EVIDENCE"
	DisputeEvidenceTypeOnlineOrAppAccessLog              DisputeEvidenceType = "ONLINE_OR_APP_ACCESS_LOG"
	DisputeEvidenceTypeAuthorizationDocumentation        DisputeEvidenceType = "AUTHORIZATION_DOCUMENTATION"
	DisputeEvidenceTypeCancellationOrRefundDocumentation DisputeEvidenceType = "CANCELLATION_OR_REFUND_DOCUMENTATION"
	DisputeEvidenceTypeCardholderCommunication           DisputeEvidenceType = "CARDHOLDER_COMMUNICATION"
	DisputeEvidenceTypeCardholderInformation             DisputeEvidenceType = "CARDHOLDER_INFORMATION"
	DisputeEvidenceTypePurchaseAcknowledgement           DisputeEvidenceType = "PURCHASE_ACKNOWLEDGEMENT"
	DisputeEvidenceTypeDuplicateChargeDocumentation      DisputeEvidenceType = "DUPLICATE_CHARGE_DOCUMENTATION"
	DisputeEvidenceTypeProductOrServiceDescription       DisputeEvidenceType = "PRODUCT_OR_SERVICE_DESCRIPTION"
	DisputeEvidenceTypeReceipt                           DisputeEvidenceType = "RECEIPT"
	DisputeEvidenceTypeServiceReceivedDocumentation      DisputeEvidenceType = "SERVICE_RECEIVED_DOCUMENTATION"
	DisputeEvidenceTypeProofOfDeliveryDocumentation      DisputeEvidenceType = "PROOF_OF_DELIVERY_DOCUMENTATION"
	DisputeEvidenceTypeRelatedTransactionDocumentation   DisputeEvidenceType = "RELATED_TRANSACTION_DOCUMENTATION"
	DisputeEvidenceTypeRebuttalExplanation               DisputeEvidenceType = "REBUTTAL_EXPLANATION"
	DisputeEvidenceTypeTrackingNumber                    DisputeEvidenceType = "TRACKING_NUMBER"
)

func NewDisputeEvidenceTypeFromString

func NewDisputeEvidenceTypeFromString(s string) (DisputeEvidenceType, error)

func (DisputeEvidenceType) Ptr

type DisputeReason

type DisputeReason string

The list of possible reasons why a cardholder might initiate a dispute with their bank.

const (
	DisputeReasonAmountDiffers          DisputeReason = "AMOUNT_DIFFERS"
	DisputeReasonCancelled              DisputeReason = "CANCELLED"
	DisputeReasonDuplicate              DisputeReason = "DUPLICATE"
	DisputeReasonNoKnowledge            DisputeReason = "NO_KNOWLEDGE"
	DisputeReasonNotAsDescribed         DisputeReason = "NOT_AS_DESCRIBED"
	DisputeReasonNotReceived            DisputeReason = "NOT_RECEIVED"
	DisputeReasonPaidByOtherMeans       DisputeReason = "PAID_BY_OTHER_MEANS"
	DisputeReasonCustomerRequestsCredit DisputeReason = "CUSTOMER_REQUESTS_CREDIT"
	DisputeReasonEmvLiabilityShift      DisputeReason = "EMV_LIABILITY_SHIFT"
)

func NewDisputeReasonFromString

func NewDisputeReasonFromString(s string) (DisputeReason, error)

func (DisputeReason) Ptr

func (d DisputeReason) Ptr() *DisputeReason

type DisputeState

type DisputeState string

The list of possible dispute states.

const (
	DisputeStateInquiryEvidenceRequired DisputeState = "INQUIRY_EVIDENCE_REQUIRED"
	DisputeStateInquiryProcessing       DisputeState = "INQUIRY_PROCESSING"
	DisputeStateInquiryClosed           DisputeState = "INQUIRY_CLOSED"
	DisputeStateEvidenceRequired        DisputeState = "EVIDENCE_REQUIRED"
	DisputeStateProcessing              DisputeState = "PROCESSING"
	DisputeStateWon                     DisputeState = "WON"
	DisputeStateLost                    DisputeState = "LOST"
	DisputeStateAccepted                DisputeState = "ACCEPTED"
)

func NewDisputeStateFromString

func NewDisputeStateFromString(s string) (DisputeState, error)

func (DisputeState) Ptr

func (d DisputeState) Ptr() *DisputeState

type DisputedPayment

type DisputedPayment struct {
	// Square-generated unique ID of the payment being disputed.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

The payment the cardholder disputed.

func (*DisputedPayment) GetExtraProperties

func (d *DisputedPayment) GetExtraProperties() map[string]interface{}

func (*DisputedPayment) GetPaymentID

func (d *DisputedPayment) GetPaymentID() *string

func (*DisputedPayment) String

func (d *DisputedPayment) String() string

func (*DisputedPayment) UnmarshalJSON

func (d *DisputedPayment) UnmarshalJSON(data []byte) error

type DisputesAcceptRequest

type DisputesAcceptRequest = AcceptDisputesRequest

DisputesAcceptRequest is an alias for AcceptDisputesRequest.

type DisputesCreateEvidenceFileRequest

type DisputesCreateEvidenceFileRequest = CreateEvidenceFileDisputesRequest

DisputesCreateEvidenceFileRequest is an alias for CreateEvidenceFilesRequest.

type DisputesGetRequest

type DisputesGetRequest = GetDisputesRequest

DisputesGetRequest is an alias for GetDisputesRequest.

type DisputesListRequest

type DisputesListRequest = ListDisputesRequest

DisputesListRequest is an alias for ListDisputesRequest.

type DisputesSubmitEvidenceRequest

type DisputesSubmitEvidenceRequest = SubmitEvidenceDisputesRequest

DisputesSubmitEvidenceRequest is an alias for SubmitEvidenceRequest.

type Employee

type Employee struct {
	// UUID for this object.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The employee's first name.
	FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"`
	// The employee's last name.
	LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"`
	// The employee's email address
	Email *string `json:"email,omitempty" url:"email,omitempty"`
	// The employee's phone number in E.164 format, i.e. "+12125554250"
	PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"`
	// A list of location IDs where this employee has access to.
	LocationIDs []string `json:"location_ids,omitempty" url:"location_ids,omitempty"`
	// Specifies the status of the employees being fetched.
	// See [EmployeeStatus](#type-employeestatus) for possible values
	Status *EmployeeStatus `json:"status,omitempty" url:"status,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" url:"is_owner,omitempty"`
	// A read-only timestamp in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// A read-only timestamp in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

An employee object that is used by the external API.

DEPRECATED at version 2020-08-26. Replaced by TeamMember(entity:TeamMember).

func (*Employee) GetCreatedAt

func (e *Employee) GetCreatedAt() *string

func (*Employee) GetEmail

func (e *Employee) GetEmail() *string

func (*Employee) GetExtraProperties

func (e *Employee) GetExtraProperties() map[string]interface{}

func (*Employee) GetFirstName

func (e *Employee) GetFirstName() *string

func (*Employee) GetID

func (e *Employee) GetID() *string

func (*Employee) GetIsOwner

func (e *Employee) GetIsOwner() *bool

func (*Employee) GetLastName

func (e *Employee) GetLastName() *string

func (*Employee) GetLocationIDs

func (e *Employee) GetLocationIDs() []string

func (*Employee) GetPhoneNumber

func (e *Employee) GetPhoneNumber() *string

func (*Employee) GetStatus

func (e *Employee) GetStatus() *EmployeeStatus

func (*Employee) GetUpdatedAt

func (e *Employee) GetUpdatedAt() *string

func (*Employee) String

func (e *Employee) String() string

func (*Employee) UnmarshalJSON

func (e *Employee) UnmarshalJSON(data []byte) error

type EmployeeStatus

type EmployeeStatus string

The status of the Employee being retrieved.

DEPRECATED at version 2020-08-26. Replaced by TeamMemberStatus(entity:TeamMemberStatus).

const (
	EmployeeStatusActive   EmployeeStatus = "ACTIVE"
	EmployeeStatusInactive EmployeeStatus = "INACTIVE"
)

func NewEmployeeStatusFromString

func NewEmployeeStatusFromString(s string) (EmployeeStatus, error)

func (EmployeeStatus) Ptr

func (e EmployeeStatus) Ptr() *EmployeeStatus

type EmployeeWage

type EmployeeWage struct {
	// The UUID for this object.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The `Employee` that this wage is assigned to.
	EmployeeID *string `json:"employee_id,omitempty" url:"employee_id,omitempty"`
	// The job title that this wage relates to.
	Title *string `json:"title,omitempty" url:"title,omitempty"`
	// Can be a custom-set hourly wage or the calculated effective hourly
	// wage based on the annual wage and hours worked per week.
	HourlyRate *Money `json:"hourly_rate,omitempty" url:"hourly_rate,omitempty"`
	// contains filtered or unexported fields
}

The hourly wage rate that an employee earns on a `Shift` for doing the job specified by the `title` property of this object. Deprecated at version 2020-08-26. Use TeamMemberWage(entity:TeamMemberWage).

func (*EmployeeWage) GetEmployeeID

func (e *EmployeeWage) GetEmployeeID() *string

func (*EmployeeWage) GetExtraProperties

func (e *EmployeeWage) GetExtraProperties() map[string]interface{}

func (*EmployeeWage) GetHourlyRate

func (e *EmployeeWage) GetHourlyRate() *Money

func (*EmployeeWage) GetID

func (e *EmployeeWage) GetID() *string

func (*EmployeeWage) GetTitle

func (e *EmployeeWage) GetTitle() *string

func (*EmployeeWage) String

func (e *EmployeeWage) String() string

func (*EmployeeWage) UnmarshalJSON

func (e *EmployeeWage) UnmarshalJSON(data []byte) error

type EmployeesGetRequest

type EmployeesGetRequest = GetEmployeesRequest

EmployeesGetRequest is an alias for GetEmployeesRequest.

type EmployeesListRequest

type EmployeesListRequest = ListEmployeesRequest

EmployeesListRequest is an alias for ListEmployeesRequest.

type EnableEventsResponse

type EnableEventsResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [EnableEvents](api-endpoint:Events-EnableEvents) endpoint.

Note: if there are errors processing the request, the events field will not be present.

func (*EnableEventsResponse) GetErrors

func (e *EnableEventsResponse) GetErrors() []*Error

func (*EnableEventsResponse) GetExtraProperties

func (e *EnableEventsResponse) GetExtraProperties() map[string]interface{}

func (*EnableEventsResponse) String

func (e *EnableEventsResponse) String() string

func (*EnableEventsResponse) UnmarshalJSON

func (e *EnableEventsResponse) UnmarshalJSON(data []byte) error

type Error

type Error struct {
	// The high-level category for the error.
	// See [ErrorCategory](#type-errorcategory) for possible values
	Category ErrorCategory `json:"category" url:"category"`
	// The specific code of the error.
	// See [ErrorCode](#type-errorcode) for possible values
	Code ErrorCode `json:"code" url:"code"`
	// A human-readable description of the error for debugging purposes.
	Detail *string `json:"detail,omitempty" url:"detail,omitempty"`
	// The name of the field provided in the original request (if any) that
	// the error pertains to.
	Field *string `json:"field,omitempty" url:"field,omitempty"`
	// contains filtered or unexported fields
}

Represents an error encountered during a request to the Connect API.

See [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information.

func (*Error) GetCategory

func (e *Error) GetCategory() ErrorCategory

func (*Error) GetCode

func (e *Error) GetCode() ErrorCode

func (*Error) GetDetail

func (e *Error) GetDetail() *string

func (*Error) GetExtraProperties

func (e *Error) GetExtraProperties() map[string]interface{}

func (*Error) GetField

func (e *Error) GetField() *string

func (*Error) String

func (e *Error) String() string

func (*Error) UnmarshalJSON

func (e *Error) UnmarshalJSON(data []byte) error

type ErrorCategory

type ErrorCategory string

Indicates which high-level category of error has occurred during a request to the Connect API.

const (
	ErrorCategoryAPIError                  ErrorCategory = "API_ERROR"
	ErrorCategoryAuthenticationError       ErrorCategory = "AUTHENTICATION_ERROR"
	ErrorCategoryInvalidRequestError       ErrorCategory = "INVALID_REQUEST_ERROR"
	ErrorCategoryRateLimitError            ErrorCategory = "RATE_LIMIT_ERROR"
	ErrorCategoryPaymentMethodError        ErrorCategory = "PAYMENT_METHOD_ERROR"
	ErrorCategoryRefundError               ErrorCategory = "REFUND_ERROR"
	ErrorCategoryMerchantSubscriptionError ErrorCategory = "MERCHANT_SUBSCRIPTION_ERROR"
	ErrorCategoryExternalVendorError       ErrorCategory = "EXTERNAL_VENDOR_ERROR"
)

func NewErrorCategoryFromString

func NewErrorCategoryFromString(s string) (ErrorCategory, error)

func (ErrorCategory) Ptr

func (e ErrorCategory) Ptr() *ErrorCategory

type ErrorCode

type ErrorCode string

Indicates the specific error that occurred during a request to a Square API.

const (
	ErrorCodeInternalServerError                           ErrorCode = "INTERNAL_SERVER_ERROR"
	ErrorCodeUnauthorized                                  ErrorCode = "UNAUTHORIZED"
	ErrorCodeAccessTokenExpired                            ErrorCode = "ACCESS_TOKEN_EXPIRED"
	ErrorCodeAccessTokenRevoked                            ErrorCode = "ACCESS_TOKEN_REVOKED"
	ErrorCodeClientDisabled                                ErrorCode = "CLIENT_DISABLED"
	ErrorCodeForbidden                                     ErrorCode = "FORBIDDEN"
	ErrorCodeInsufficientScopes                            ErrorCode = "INSUFFICIENT_SCOPES"
	ErrorCodeApplicationDisabled                           ErrorCode = "APPLICATION_DISABLED"
	ErrorCodeV1Application                                 ErrorCode = "V1_APPLICATION"
	ErrorCodeV1AccessToken                                 ErrorCode = "V1_ACCESS_TOKEN"
	ErrorCodeCardProcessingNotEnabled                      ErrorCode = "CARD_PROCESSING_NOT_ENABLED"
	ErrorCodeMerchantSubscriptionNotFound                  ErrorCode = "MERCHANT_SUBSCRIPTION_NOT_FOUND"
	ErrorCodeBadRequest                                    ErrorCode = "BAD_REQUEST"
	ErrorCodeMissingRequiredParameter                      ErrorCode = "MISSING_REQUIRED_PARAMETER"
	ErrorCodeIncorrectType                                 ErrorCode = "INCORRECT_TYPE"
	ErrorCodeInvalidTime                                   ErrorCode = "INVALID_TIME"
	ErrorCodeInvalidTimeRange                              ErrorCode = "INVALID_TIME_RANGE"
	ErrorCodeInvalidValue                                  ErrorCode = "INVALID_VALUE"
	ErrorCodeInvalidCursor                                 ErrorCode = "INVALID_CURSOR"
	ErrorCodeUnknownQueryParameter                         ErrorCode = "UNKNOWN_QUERY_PARAMETER"
	ErrorCodeConflictingParameters                         ErrorCode = "CONFLICTING_PARAMETERS"
	ErrorCodeExpectedJSONBody                              ErrorCode = "EXPECTED_JSON_BODY"
	ErrorCodeInvalidSortOrder                              ErrorCode = "INVALID_SORT_ORDER"
	ErrorCodeValueRegexMismatch                            ErrorCode = "VALUE_REGEX_MISMATCH"
	ErrorCodeValueTooShort                                 ErrorCode = "VALUE_TOO_SHORT"
	ErrorCodeValueTooLong                                  ErrorCode = "VALUE_TOO_LONG"
	ErrorCodeValueTooLow                                   ErrorCode = "VALUE_TOO_LOW"
	ErrorCodeValueTooHigh                                  ErrorCode = "VALUE_TOO_HIGH"
	ErrorCodeValueEmpty                                    ErrorCode = "VALUE_EMPTY"
	ErrorCodeArrayLengthTooLong                            ErrorCode = "ARRAY_LENGTH_TOO_LONG"
	ErrorCodeArrayLengthTooShort                           ErrorCode = "ARRAY_LENGTH_TOO_SHORT"
	ErrorCodeArrayEmpty                                    ErrorCode = "ARRAY_EMPTY"
	ErrorCodeExpectedBoolean                               ErrorCode = "EXPECTED_BOOLEAN"
	ErrorCodeExpectedInteger                               ErrorCode = "EXPECTED_INTEGER"
	ErrorCodeExpectedFloat                                 ErrorCode = "EXPECTED_FLOAT"
	ErrorCodeExpectedString                                ErrorCode = "EXPECTED_STRING"
	ErrorCodeExpectedObject                                ErrorCode = "EXPECTED_OBJECT"
	ErrorCodeExpectedArray                                 ErrorCode = "EXPECTED_ARRAY"
	ErrorCodeExpectedMap                                   ErrorCode = "EXPECTED_MAP"
	ErrorCodeExpectedBase64EncodedByteArray                ErrorCode = "EXPECTED_BASE64_ENCODED_BYTE_ARRAY"
	ErrorCodeInvalidArrayValue                             ErrorCode = "INVALID_ARRAY_VALUE"
	ErrorCodeInvalidEnumValue                              ErrorCode = "INVALID_ENUM_VALUE"
	ErrorCodeInvalidContentType                            ErrorCode = "INVALID_CONTENT_TYPE"
	ErrorCodeInvalidFormValue                              ErrorCode = "INVALID_FORM_VALUE"
	ErrorCodeCustomerNotFound                              ErrorCode = "CUSTOMER_NOT_FOUND"
	ErrorCodeOneInstrumentExpected                         ErrorCode = "ONE_INSTRUMENT_EXPECTED"
	ErrorCodeNoFieldsSet                                   ErrorCode = "NO_FIELDS_SET"
	ErrorCodeTooManyMapEntries                             ErrorCode = "TOO_MANY_MAP_ENTRIES"
	ErrorCodeMapKeyLengthTooShort                          ErrorCode = "MAP_KEY_LENGTH_TOO_SHORT"
	ErrorCodeMapKeyLengthTooLong                           ErrorCode = "MAP_KEY_LENGTH_TOO_LONG"
	ErrorCodeCustomerMissingName                           ErrorCode = "CUSTOMER_MISSING_NAME"
	ErrorCodeCustomerMissingEmail                          ErrorCode = "CUSTOMER_MISSING_EMAIL"
	ErrorCodeInvalidPauseLength                            ErrorCode = "INVALID_PAUSE_LENGTH"
	ErrorCodeInvalidDate                                   ErrorCode = "INVALID_DATE"
	ErrorCodeUnsupportedCountry                            ErrorCode = "UNSUPPORTED_COUNTRY"
	ErrorCodeUnsupportedCurrency                           ErrorCode = "UNSUPPORTED_CURRENCY"
	ErrorCodeAppleTtpPinToken                              ErrorCode = "APPLE_TTP_PIN_TOKEN"
	ErrorCodeCardExpired                                   ErrorCode = "CARD_EXPIRED"
	ErrorCodeInvalidExpiration                             ErrorCode = "INVALID_EXPIRATION"
	ErrorCodeInvalidExpirationYear                         ErrorCode = "INVALID_EXPIRATION_YEAR"
	ErrorCodeInvalidExpirationDate                         ErrorCode = "INVALID_EXPIRATION_DATE"
	ErrorCodeUnsupportedCardBrand                          ErrorCode = "UNSUPPORTED_CARD_BRAND"
	ErrorCodeUnsupportedEntryMethod                        ErrorCode = "UNSUPPORTED_ENTRY_METHOD"
	ErrorCodeInvalidEncryptedCard                          ErrorCode = "INVALID_ENCRYPTED_CARD"
	ErrorCodeInvalidCard                                   ErrorCode = "INVALID_CARD"
	ErrorCodePaymentAmountMismatch                         ErrorCode = "PAYMENT_AMOUNT_MISMATCH"
	ErrorCodeGenericDecline                                ErrorCode = "GENERIC_DECLINE"
	ErrorCodeCvvFailure                                    ErrorCode = "CVV_FAILURE"
	ErrorCodeAddressVerificationFailure                    ErrorCode = "ADDRESS_VERIFICATION_FAILURE"
	ErrorCodeInvalidAccount                                ErrorCode = "INVALID_ACCOUNT"
	ErrorCodeCurrencyMismatch                              ErrorCode = "CURRENCY_MISMATCH"
	ErrorCodeInsufficientFunds                             ErrorCode = "INSUFFICIENT_FUNDS"
	ErrorCodeInsufficientPermissions                       ErrorCode = "INSUFFICIENT_PERMISSIONS"
	ErrorCodeCardholderInsufficientPermissions             ErrorCode = "CARDHOLDER_INSUFFICIENT_PERMISSIONS"
	ErrorCodeInvalidLocation                               ErrorCode = "INVALID_LOCATION"
	ErrorCodeTransactionLimit                              ErrorCode = "TRANSACTION_LIMIT"
	ErrorCodeVoiceFailure                                  ErrorCode = "VOICE_FAILURE"
	ErrorCodePanFailure                                    ErrorCode = "PAN_FAILURE"
	ErrorCodeExpirationFailure                             ErrorCode = "EXPIRATION_FAILURE"
	ErrorCodeCardNotSupported                              ErrorCode = "CARD_NOT_SUPPORTED"
	ErrorCodeReaderDeclined                                ErrorCode = "READER_DECLINED"
	ErrorCodeInvalidPin                                    ErrorCode = "INVALID_PIN"
	ErrorCodeMissingPin                                    ErrorCode = "MISSING_PIN"
	ErrorCodeMissingAccountType                            ErrorCode = "MISSING_ACCOUNT_TYPE"
	ErrorCodeInvalidPostalCode                             ErrorCode = "INVALID_POSTAL_CODE"
	ErrorCodeInvalidFees                                   ErrorCode = "INVALID_FEES"
	ErrorCodeManuallyEnteredPaymentNotSupported            ErrorCode = "MANUALLY_ENTERED_PAYMENT_NOT_SUPPORTED"
	ErrorCodePaymentLimitExceeded                          ErrorCode = "PAYMENT_LIMIT_EXCEEDED"
	ErrorCodeGiftCardAvailableAmount                       ErrorCode = "GIFT_CARD_AVAILABLE_AMOUNT"
	ErrorCodeAccountUnusable                               ErrorCode = "ACCOUNT_UNUSABLE"
	ErrorCodeBuyerRefusedPayment                           ErrorCode = "BUYER_REFUSED_PAYMENT"
	ErrorCodeDelayedTransactionExpired                     ErrorCode = "DELAYED_TRANSACTION_EXPIRED"
	ErrorCodeDelayedTransactionCanceled                    ErrorCode = "DELAYED_TRANSACTION_CANCELED"
	ErrorCodeDelayedTransactionCaptured                    ErrorCode = "DELAYED_TRANSACTION_CAPTURED"
	ErrorCodeDelayedTransactionFailed                      ErrorCode = "DELAYED_TRANSACTION_FAILED"
	ErrorCodeCardTokenExpired                              ErrorCode = "CARD_TOKEN_EXPIRED"
	ErrorCodeCardTokenUsed                                 ErrorCode = "CARD_TOKEN_USED"
	ErrorCodeAmountTooHigh                                 ErrorCode = "AMOUNT_TOO_HIGH"
	ErrorCodeUnsupportedInstrumentType                     ErrorCode = "UNSUPPORTED_INSTRUMENT_TYPE"
	ErrorCodeRefundAmountInvalid                           ErrorCode = "REFUND_AMOUNT_INVALID"
	ErrorCodeRefundAlreadyPending                          ErrorCode = "REFUND_ALREADY_PENDING"
	ErrorCodePaymentNotRefundable                          ErrorCode = "PAYMENT_NOT_REFUNDABLE"
	ErrorCodePaymentNotRefundableDueToDispute              ErrorCode = "PAYMENT_NOT_REFUNDABLE_DUE_TO_DISPUTE"
	ErrorCodeRefundErrorPaymentNeedsCompletion             ErrorCode = "REFUND_ERROR_PAYMENT_NEEDS_COMPLETION"
	ErrorCodeRefundDeclined                                ErrorCode = "REFUND_DECLINED"
	ErrorCodeInsufficientPermissionsForRefund              ErrorCode = "INSUFFICIENT_PERMISSIONS_FOR_REFUND"
	ErrorCodeInvalidCardData                               ErrorCode = "INVALID_CARD_DATA"
	ErrorCodeSourceUsed                                    ErrorCode = "SOURCE_USED"
	ErrorCodeSourceExpired                                 ErrorCode = "SOURCE_EXPIRED"
	ErrorCodeUnsupportedLoyaltyRewardTier                  ErrorCode = "UNSUPPORTED_LOYALTY_REWARD_TIER"
	ErrorCodeLocationMismatch                              ErrorCode = "LOCATION_MISMATCH"
	ErrorCodeOrderUnpaidNotReturnable                      ErrorCode = "ORDER_UNPAID_NOT_RETURNABLE"
	ErrorCodeIdempotencyKeyReused                          ErrorCode = "IDEMPOTENCY_KEY_REUSED"
	ErrorCodeUnexpectedValue                               ErrorCode = "UNEXPECTED_VALUE"
	ErrorCodeSandboxNotSupported                           ErrorCode = "SANDBOX_NOT_SUPPORTED"
	ErrorCodeInvalidEmailAddress                           ErrorCode = "INVALID_EMAIL_ADDRESS"
	ErrorCodeInvalidPhoneNumber                            ErrorCode = "INVALID_PHONE_NUMBER"
	ErrorCodeCheckoutExpired                               ErrorCode = "CHECKOUT_EXPIRED"
	ErrorCodeBadCertificate                                ErrorCode = "BAD_CERTIFICATE"
	ErrorCodeInvalidSquareVersionFormat                    ErrorCode = "INVALID_SQUARE_VERSION_FORMAT"
	ErrorCodeAPIVersionIncompatible                        ErrorCode = "API_VERSION_INCOMPATIBLE"
	ErrorCodeCardPresenceRequired                          ErrorCode = "CARD_PRESENCE_REQUIRED"
	ErrorCodeUnsupportedSourceType                         ErrorCode = "UNSUPPORTED_SOURCE_TYPE"
	ErrorCodeCardMismatch                                  ErrorCode = "CARD_MISMATCH"
	ErrorCodePlaidError                                    ErrorCode = "PLAID_ERROR"
	ErrorCodePlaidErrorItemLoginRequired                   ErrorCode = "PLAID_ERROR_ITEM_LOGIN_REQUIRED"
	ErrorCodePlaidErrorRateLimit                           ErrorCode = "PLAID_ERROR_RATE_LIMIT"
	ErrorCodeCardDeclined                                  ErrorCode = "CARD_DECLINED"
	ErrorCodeVerifyCvvFailure                              ErrorCode = "VERIFY_CVV_FAILURE"
	ErrorCodeVerifyAvsFailure                              ErrorCode = "VERIFY_AVS_FAILURE"
	ErrorCodeCardDeclinedCallIssuer                        ErrorCode = "CARD_DECLINED_CALL_ISSUER"
	ErrorCodeCardDeclinedVerificationRequired              ErrorCode = "CARD_DECLINED_VERIFICATION_REQUIRED"
	ErrorCodeBadExpiration                                 ErrorCode = "BAD_EXPIRATION"
	ErrorCodeChipInsertionRequired                         ErrorCode = "CHIP_INSERTION_REQUIRED"
	ErrorCodeAllowablePinTriesExceeded                     ErrorCode = "ALLOWABLE_PIN_TRIES_EXCEEDED"
	ErrorCodeReservationDeclined                           ErrorCode = "RESERVATION_DECLINED"
	ErrorCodeUnknownBodyParameter                          ErrorCode = "UNKNOWN_BODY_PARAMETER"
	ErrorCodeNotFound                                      ErrorCode = "NOT_FOUND"
	ErrorCodeApplePaymentProcessingCertificateHashNotFound ErrorCode = "APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND"
	ErrorCodeMethodNotAllowed                              ErrorCode = "METHOD_NOT_ALLOWED"
	ErrorCodeNotAcceptable                                 ErrorCode = "NOT_ACCEPTABLE"
	ErrorCodeRequestTimeout                                ErrorCode = "REQUEST_TIMEOUT"
	ErrorCodeConflict                                      ErrorCode = "CONFLICT"
	ErrorCodeGone                                          ErrorCode = "GONE"
	ErrorCodeRequestEntityTooLarge                         ErrorCode = "REQUEST_ENTITY_TOO_LARGE"
	ErrorCodeUnsupportedMediaType                          ErrorCode = "UNSUPPORTED_MEDIA_TYPE"
	ErrorCodeUnprocessableEntity                           ErrorCode = "UNPROCESSABLE_ENTITY"
	ErrorCodeRateLimited                                   ErrorCode = "RATE_LIMITED"
	ErrorCodeNotImplemented                                ErrorCode = "NOT_IMPLEMENTED"
	ErrorCodeBadGateway                                    ErrorCode = "BAD_GATEWAY"
	ErrorCodeServiceUnavailable                            ErrorCode = "SERVICE_UNAVAILABLE"
	ErrorCodeTemporaryError                                ErrorCode = "TEMPORARY_ERROR"
	ErrorCodeGatewayTimeout                                ErrorCode = "GATEWAY_TIMEOUT"
)

func NewErrorCodeFromString

func NewErrorCodeFromString(s string) (ErrorCode, error)

func (ErrorCode) Ptr

func (e ErrorCode) Ptr() *ErrorCode

type Event

type Event struct {
	// The ID of the target merchant associated with the event.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The ID of the target location associated with the event.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The type of event this represents.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// A unique ID for the event.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// Timestamp of when the event was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The data associated with the event.
	Data *EventData `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Event) GetCreatedAt

func (e *Event) GetCreatedAt() *string

func (*Event) GetData

func (e *Event) GetData() *EventData

func (*Event) GetEventID

func (e *Event) GetEventID() *string

func (*Event) GetExtraProperties

func (e *Event) GetExtraProperties() map[string]interface{}

func (*Event) GetLocationID

func (e *Event) GetLocationID() *string

func (*Event) GetMerchantID

func (e *Event) GetMerchantID() *string

func (*Event) GetType

func (e *Event) GetType() *string

func (*Event) String

func (e *Event) String() string

func (*Event) UnmarshalJSON

func (e *Event) UnmarshalJSON(data []byte) error

type EventData

type EventData struct {
	// The name of the affected object’s type.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// The ID of the affected object.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// This is true if the affected object has been deleted; otherwise, it's absent.
	Deleted *bool `json:"deleted,omitempty" url:"deleted,omitempty"`
	// An object containing fields and values relevant to the event. It is absent if the affected object has been deleted.
	Object map[string]interface{} `json:"object,omitempty" url:"object,omitempty"`
	// contains filtered or unexported fields
}

func (*EventData) GetDeleted

func (e *EventData) GetDeleted() *bool

func (*EventData) GetExtraProperties

func (e *EventData) GetExtraProperties() map[string]interface{}

func (*EventData) GetID

func (e *EventData) GetID() *string

func (*EventData) GetObject

func (e *EventData) GetObject() map[string]interface{}

func (*EventData) GetType

func (e *EventData) GetType() *string

func (*EventData) String

func (e *EventData) String() string

func (*EventData) UnmarshalJSON

func (e *EventData) UnmarshalJSON(data []byte) error

type EventMetadata

type EventMetadata struct {
	// A unique ID for the event.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// The API version of the event. This corresponds to the default API version of the developer application at the time when the event was created.
	APIVersion *string `json:"api_version,omitempty" url:"api_version,omitempty"`
	// contains filtered or unexported fields
}

Contains metadata about a particular Event(entity:Event).

func (*EventMetadata) GetAPIVersion

func (e *EventMetadata) GetAPIVersion() *string

func (*EventMetadata) GetEventID

func (e *EventMetadata) GetEventID() *string

func (*EventMetadata) GetExtraProperties

func (e *EventMetadata) GetExtraProperties() map[string]interface{}

func (*EventMetadata) String

func (e *EventMetadata) String() string

func (*EventMetadata) UnmarshalJSON

func (e *EventMetadata) UnmarshalJSON(data []byte) error

type EventTypeMetadata

type EventTypeMetadata struct {
	// The event type.
	EventType *string `json:"event_type,omitempty" url:"event_type,omitempty"`
	// The API version at which the event type was introduced.
	APIVersionIntroduced *string `json:"api_version_introduced,omitempty" url:"api_version_introduced,omitempty"`
	// The release status of the event type.
	ReleaseStatus *string `json:"release_status,omitempty" url:"release_status,omitempty"`
	// contains filtered or unexported fields
}

Contains the metadata of a webhook event type.

func (*EventTypeMetadata) GetAPIVersionIntroduced

func (e *EventTypeMetadata) GetAPIVersionIntroduced() *string

func (*EventTypeMetadata) GetEventType

func (e *EventTypeMetadata) GetEventType() *string

func (*EventTypeMetadata) GetExtraProperties

func (e *EventTypeMetadata) GetExtraProperties() map[string]interface{}

func (*EventTypeMetadata) GetReleaseStatus

func (e *EventTypeMetadata) GetReleaseStatus() *string

func (*EventTypeMetadata) String

func (e *EventTypeMetadata) String() string

func (*EventTypeMetadata) UnmarshalJSON

func (e *EventTypeMetadata) UnmarshalJSON(data []byte) error

type ExcludeStrategy

type ExcludeStrategy string

Indicates which products matched by a CatalogPricingRule will be excluded if the pricing rule uses an exclude set.

const (
	ExcludeStrategyLeastExpensive ExcludeStrategy = "LEAST_EXPENSIVE"
	ExcludeStrategyMostExpensive  ExcludeStrategy = "MOST_EXPENSIVE"
)

func NewExcludeStrategyFromString

func NewExcludeStrategyFromString(s string) (ExcludeStrategy, error)

func (ExcludeStrategy) Ptr

type ExternalPaymentDetails

type ExternalPaymentDetails struct {
	// The type of external payment the seller received. It can be one of the following:
	// - CHECK - Paid using a physical check.
	// - BANK_TRANSFER - Paid using external bank transfer.
	// - OTHER\_GIFT\_CARD - Paid using a non-Square gift card.
	// - CRYPTO - Paid using a crypto currency.
	// - SQUARE_CASH - Paid using Square Cash App.
	// - SOCIAL - Paid using peer-to-peer payment applications.
	// - EXTERNAL - A third-party application gathered this payment outside of Square.
	// - EMONEY - Paid using an E-money provider.
	// - CARD - A credit or debit card that Square does not support.
	// - STORED_BALANCE - Use for house accounts, store credit, and so forth.
	// - FOOD_VOUCHER - Restaurant voucher provided by employers to employees to pay for meals
	// - OTHER - A type not listed here.
	Type string `json:"type" url:"type"`
	// A description of the external payment source. For example,
	// "Food Delivery Service".
	Source string `json:"source" url:"source"`
	// An ID to associate the payment to its originating source.
	SourceID *string `json:"source_id,omitempty" url:"source_id,omitempty"`
	// The fees paid to the source. The `amount_money` minus this field is
	// the net amount seller receives.
	SourceFeeMoney *Money `json:"source_fee_money,omitempty" url:"source_fee_money,omitempty"`
	// contains filtered or unexported fields
}

Stores details about an external payment. Contains only non-confidential information. For more information, see [Take External Payments](https://developer.squareup.com/docs/payments-api/take-payments/external-payments).

func (*ExternalPaymentDetails) GetExtraProperties

func (e *ExternalPaymentDetails) GetExtraProperties() map[string]interface{}

func (*ExternalPaymentDetails) GetSource

func (e *ExternalPaymentDetails) GetSource() string

func (*ExternalPaymentDetails) GetSourceFeeMoney

func (e *ExternalPaymentDetails) GetSourceFeeMoney() *Money

func (*ExternalPaymentDetails) GetSourceID

func (e *ExternalPaymentDetails) GetSourceID() *string

func (*ExternalPaymentDetails) GetType

func (e *ExternalPaymentDetails) GetType() string

func (*ExternalPaymentDetails) String

func (e *ExternalPaymentDetails) String() string

func (*ExternalPaymentDetails) UnmarshalJSON

func (e *ExternalPaymentDetails) UnmarshalJSON(data []byte) error

type FileParam

type FileParam struct {
	io.Reader
	// contains filtered or unexported fields
}

FileParam is a file type suitable for multipart/form-data uploads.

func NewFileParam

func NewFileParam(
	reader io.Reader,
	filename string,
	contentType string,
	opts ...FileParamOption,
) *FileParam

NewFileParam returns a *FileParam type suitable for multipart/form-data uploads. All file upload endpoints accept a simple io.Reader, which is usually created by opening a file via os.Open.

However, some endpoints require additional metadata about the file such as a specific Content-Type or custom filename. FileParam makes it easier to create the correct type signature for these endpoints.

func (*FileParam) ContentType

func (f *FileParam) ContentType() string

func (*FileParam) Name

func (f *FileParam) Name() string

type FileParamOption

type FileParamOption interface {
	// contains filtered or unexported methods
}

FileParamOption adapts the behavior of the FileParam. No options are implemented yet, but this interface allows for future extensibility.

type FilterValue

type FilterValue struct {
	// A list of terms that must be present on the field of the resource.
	All []string `json:"all,omitempty" url:"all,omitempty"`
	// A list of terms where at least one of them must be present on the
	// field of the resource.
	Any []string `json:"any,omitempty" url:"any,omitempty"`
	// A list of terms that must not be present on the field the resource
	None []string `json:"none,omitempty" url:"none,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*FilterValue) GetAll

func (f *FilterValue) GetAll() []string

func (*FilterValue) GetAny

func (f *FilterValue) GetAny() []string

func (*FilterValue) GetExtraProperties

func (f *FilterValue) GetExtraProperties() map[string]interface{}

func (*FilterValue) GetNone

func (f *FilterValue) GetNone() []string

func (*FilterValue) String

func (f *FilterValue) String() string

func (*FilterValue) UnmarshalJSON

func (f *FilterValue) UnmarshalJSON(data []byte) error

type FloatNumberRange

type FloatNumberRange struct {
	// A decimal value indicating where the range starts.
	StartAt *string `json:"start_at,omitempty" url:"start_at,omitempty"`
	// A decimal value indicating where the range ends.
	EndAt *string `json:"end_at,omitempty" url:"end_at,omitempty"`
	// contains filtered or unexported fields
}

Specifies a decimal number range.

func (*FloatNumberRange) GetEndAt

func (f *FloatNumberRange) GetEndAt() *string

func (*FloatNumberRange) GetExtraProperties

func (f *FloatNumberRange) GetExtraProperties() map[string]interface{}

func (*FloatNumberRange) GetStartAt

func (f *FloatNumberRange) GetStartAt() *string

func (*FloatNumberRange) String

func (f *FloatNumberRange) String() string

func (*FloatNumberRange) UnmarshalJSON

func (f *FloatNumberRange) UnmarshalJSON(data []byte) error

type Fulfillment

type Fulfillment struct {
	// A unique ID that identifies the fulfillment only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The type of the fulfillment.
	// See [FulfillmentType](#type-fulfillmenttype) for possible values
	Type *FulfillmentType `json:"type,omitempty" url:"type,omitempty"`
	// The state of the fulfillment.
	// See [FulfillmentState](#type-fulfillmentstate) for possible values
	State *FulfillmentState `json:"state,omitempty" url:"state,omitempty"`
	// Describes what order line items this fulfillment applies to.
	// It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment entries.
	// See [FulfillmentFulfillmentLineItemApplication](#type-fulfillmentfulfillmentlineitemapplication) for possible values
	LineItemApplication *FulfillmentFulfillmentLineItemApplication `json:"line_item_application,omitempty" url:"line_item_application,omitempty"`
	// A list of entries pertaining to the fulfillment of an order. Each entry must reference
	// a valid `uid` for an order line item in the `line_item_uid` field, as well as a `quantity` to
	// fulfill.
	//
	// Multiple entries can reference the same line item `uid`, as long as the total quantity among
	// all fulfillment entries referencing a single line item does not exceed the quantity of the
	// order's line item itself.
	//
	// An order cannot be marked as `COMPLETED` before all fulfillments are `COMPLETED`,
	// `CANCELED`, or `FAILED`. Fulfillments can be created and completed independently
	// before order completion.
	Entries []*FulfillmentFulfillmentEntry `json:"entries,omitempty" url:"entries,omitempty"`
	// 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 (such as personally
	// identifiable information or card details).
	//
	// Keys written by applications must be 60 characters or less and must be in the character set
	// `[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
	// with a namespace, separated from the key with a ':' character.
	//
	// Values have a maximum length of 255 characters.
	//
	// An application can 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.
	//
	// For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).
	Metadata map[string]*string `json:"metadata,omitempty" url:"metadata,omitempty"`
	// Contains details for a pickup fulfillment. These details are required when the fulfillment
	// type is `PICKUP`.
	PickupDetails *FulfillmentPickupDetails `json:"pickup_details,omitempty" url:"pickup_details,omitempty"`
	// Contains details for a shipment fulfillment. These details are required when the fulfillment type
	// is `SHIPMENT`.
	//
	// A shipment fulfillment's relationship to fulfillment `state`:
	// `PROPOSED`: A shipment is requested.
	// `RESERVED`: Fulfillment in progress. Shipment processing.
	// `PREPARED`: Shipment packaged. Shipping label created.
	// `COMPLETED`: Package has been shipped.
	// `CANCELED`: Shipment has been canceled.
	// `FAILED`: Shipment has failed.
	ShipmentDetails *FulfillmentShipmentDetails `json:"shipment_details,omitempty" url:"shipment_details,omitempty"`
	// Describes delivery details of an order fulfillment.
	DeliveryDetails *FulfillmentDeliveryDetails `json:"delivery_details,omitempty" url:"delivery_details,omitempty"`
	// contains filtered or unexported fields
}

Contains details about how to fulfill this order. Orders can only be created with at most one fulfillment using the API. However, orders returned by the Orders API might contain multiple fulfillments because sellers can create multiple fulfillments using Square products such as Square Online.

func (*Fulfillment) GetDeliveryDetails

func (f *Fulfillment) GetDeliveryDetails() *FulfillmentDeliveryDetails

func (*Fulfillment) GetEntries

func (f *Fulfillment) GetEntries() []*FulfillmentFulfillmentEntry

func (*Fulfillment) GetExtraProperties

func (f *Fulfillment) GetExtraProperties() map[string]interface{}

func (*Fulfillment) GetLineItemApplication

func (f *Fulfillment) GetLineItemApplication() *FulfillmentFulfillmentLineItemApplication

func (*Fulfillment) GetMetadata

func (f *Fulfillment) GetMetadata() map[string]*string

func (*Fulfillment) GetPickupDetails

func (f *Fulfillment) GetPickupDetails() *FulfillmentPickupDetails

func (*Fulfillment) GetShipmentDetails

func (f *Fulfillment) GetShipmentDetails() *FulfillmentShipmentDetails

func (*Fulfillment) GetState

func (f *Fulfillment) GetState() *FulfillmentState

func (*Fulfillment) GetType

func (f *Fulfillment) GetType() *FulfillmentType

func (*Fulfillment) GetUID

func (f *Fulfillment) GetUID() *string

func (*Fulfillment) String

func (f *Fulfillment) String() string

func (*Fulfillment) UnmarshalJSON

func (f *Fulfillment) UnmarshalJSON(data []byte) error

type FulfillmentDeliveryDetails

type FulfillmentDeliveryDetails struct {
	// The contact information for the person to receive the fulfillment.
	Recipient *FulfillmentRecipient `json:"recipient,omitempty" url:"recipient,omitempty"`
	// Indicates the fulfillment delivery schedule type. If `SCHEDULED`, then
	// `deliver_at` is required. If `ASAP`, then `prep_time_duration` is required. The default is `SCHEDULED`.
	// See [OrderFulfillmentDeliveryDetailsScheduleType](#type-orderfulfillmentdeliverydetailsscheduletype) for possible values
	ScheduleType *FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType `json:"schedule_type,omitempty" url:"schedule_type,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when the fulfillment was placed.
	// The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
	//
	// Must be in RFC 3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z".
	PlacedAt *string `json:"placed_at,omitempty" url:"placed_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// that represents the start of the delivery period.
	// When the fulfillment `schedule_type` is `ASAP`, the field is automatically
	// set to the current time plus the `prep_time_duration`.
	// Otherwise, the application can set this field while the fulfillment `state` is
	// `PROPOSED`, `RESERVED`, or `PREPARED` (any time before the
	// terminal state such as `COMPLETED`, `CANCELED`, and `FAILED`).
	//
	// The timestamp must be in RFC 3339 format
	// (for example, "2016-09-04T23:59:33.123Z").
	DeliverAt *string `json:"deliver_at,omitempty" url:"deliver_at,omitempty"`
	// The duration of time it takes to prepare and deliver this fulfillment.
	// The duration must be in RFC 3339 format (for example, "P1W3D").
	PrepTimeDuration *string `json:"prep_time_duration,omitempty" url:"prep_time_duration,omitempty"`
	// The time period after `deliver_at` in which to deliver the order.
	// Applications can set this field when the fulfillment `state` is
	// `PROPOSED`, `RESERVED`, or `PREPARED` (any time before the terminal state
	// such as `COMPLETED`, `CANCELED`, and `FAILED`).
	//
	// The duration must be in RFC 3339 format (for example, "P1W3D").
	DeliveryWindowDuration *string `json:"delivery_window_duration,omitempty" url:"delivery_window_duration,omitempty"`
	// Provides additional instructions about the delivery fulfillment.
	// It is displayed in the Square Point of Sale application and set by the API.
	Note *string `json:"note,omitempty" url:"note,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicates when the seller completed the fulfillment.
	// This field is automatically set when  fulfillment `state` changes to `COMPLETED`.
	// The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
	CompletedAt *string `json:"completed_at,omitempty" url:"completed_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicates when the seller started processing the fulfillment.
	// This field is automatically set when the fulfillment `state` changes to `RESERVED`.
	// The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
	InProgressAt *string `json:"in_progress_at,omitempty" url:"in_progress_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when the fulfillment was rejected. This field is
	// automatically set when the fulfillment `state` changes to `FAILED`.
	// The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
	RejectedAt *string `json:"rejected_at,omitempty" url:"rejected_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when the seller marked the fulfillment as ready for
	// courier pickup. This field is automatically set when the fulfillment `state` changes
	// to PREPARED.
	// The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
	ReadyAt *string `json:"ready_at,omitempty" url:"ready_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when the fulfillment was delivered to the recipient.
	// The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
	DeliveredAt *string `json:"delivered_at,omitempty" url:"delivered_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when the fulfillment was canceled. This field is automatically
	// set when the fulfillment `state` changes to `CANCELED`.
	//
	// The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
	CanceledAt *string `json:"canceled_at,omitempty" url:"canceled_at,omitempty"`
	// The delivery cancellation reason. Max length: 100 characters.
	CancelReason *string `json:"cancel_reason,omitempty" url:"cancel_reason,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when an order can be picked up by the courier for delivery.
	// The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
	CourierPickupAt *string `json:"courier_pickup_at,omitempty" url:"courier_pickup_at,omitempty"`
	// The time period after `courier_pickup_at` in which the courier should pick up the order.
	// The duration must be in RFC 3339 format (for example, "P1W3D").
	CourierPickupWindowDuration *string `json:"courier_pickup_window_duration,omitempty" url:"courier_pickup_window_duration,omitempty"`
	// Whether the delivery is preferred to be no contact.
	IsNoContactDelivery *bool `json:"is_no_contact_delivery,omitempty" url:"is_no_contact_delivery,omitempty"`
	// A note to provide additional instructions about how to deliver the order.
	DropoffNotes *string `json:"dropoff_notes,omitempty" url:"dropoff_notes,omitempty"`
	// The name of the courier provider.
	CourierProviderName *string `json:"courier_provider_name,omitempty" url:"courier_provider_name,omitempty"`
	// The support phone number of the courier.
	CourierSupportPhoneNumber *string `json:"courier_support_phone_number,omitempty" url:"courier_support_phone_number,omitempty"`
	// The identifier for the delivery created by Square.
	SquareDeliveryID *string `json:"square_delivery_id,omitempty" url:"square_delivery_id,omitempty"`
	// The identifier for the delivery created by the third-party courier service.
	ExternalDeliveryID *string `json:"external_delivery_id,omitempty" url:"external_delivery_id,omitempty"`
	// The flag to indicate the delivery is managed by a third party (ie DoorDash), which means
	// we may not receive all recipient information for PII purposes.
	ManagedDelivery *bool `json:"managed_delivery,omitempty" url:"managed_delivery,omitempty"`
	// contains filtered or unexported fields
}

Describes delivery details of an order fulfillment.

func (*FulfillmentDeliveryDetails) GetCancelReason

func (f *FulfillmentDeliveryDetails) GetCancelReason() *string

func (*FulfillmentDeliveryDetails) GetCanceledAt

func (f *FulfillmentDeliveryDetails) GetCanceledAt() *string

func (*FulfillmentDeliveryDetails) GetCompletedAt

func (f *FulfillmentDeliveryDetails) GetCompletedAt() *string

func (*FulfillmentDeliveryDetails) GetCourierPickupAt

func (f *FulfillmentDeliveryDetails) GetCourierPickupAt() *string

func (*FulfillmentDeliveryDetails) GetCourierPickupWindowDuration

func (f *FulfillmentDeliveryDetails) GetCourierPickupWindowDuration() *string

func (*FulfillmentDeliveryDetails) GetCourierProviderName

func (f *FulfillmentDeliveryDetails) GetCourierProviderName() *string

func (*FulfillmentDeliveryDetails) GetCourierSupportPhoneNumber

func (f *FulfillmentDeliveryDetails) GetCourierSupportPhoneNumber() *string

func (*FulfillmentDeliveryDetails) GetDeliverAt

func (f *FulfillmentDeliveryDetails) GetDeliverAt() *string

func (*FulfillmentDeliveryDetails) GetDeliveredAt

func (f *FulfillmentDeliveryDetails) GetDeliveredAt() *string

func (*FulfillmentDeliveryDetails) GetDeliveryWindowDuration

func (f *FulfillmentDeliveryDetails) GetDeliveryWindowDuration() *string

func (*FulfillmentDeliveryDetails) GetDropoffNotes

func (f *FulfillmentDeliveryDetails) GetDropoffNotes() *string

func (*FulfillmentDeliveryDetails) GetExternalDeliveryID

func (f *FulfillmentDeliveryDetails) GetExternalDeliveryID() *string

func (*FulfillmentDeliveryDetails) GetExtraProperties

func (f *FulfillmentDeliveryDetails) GetExtraProperties() map[string]interface{}

func (*FulfillmentDeliveryDetails) GetInProgressAt

func (f *FulfillmentDeliveryDetails) GetInProgressAt() *string

func (*FulfillmentDeliveryDetails) GetIsNoContactDelivery

func (f *FulfillmentDeliveryDetails) GetIsNoContactDelivery() *bool

func (*FulfillmentDeliveryDetails) GetManagedDelivery

func (f *FulfillmentDeliveryDetails) GetManagedDelivery() *bool

func (*FulfillmentDeliveryDetails) GetNote

func (f *FulfillmentDeliveryDetails) GetNote() *string

func (*FulfillmentDeliveryDetails) GetPlacedAt

func (f *FulfillmentDeliveryDetails) GetPlacedAt() *string

func (*FulfillmentDeliveryDetails) GetPrepTimeDuration

func (f *FulfillmentDeliveryDetails) GetPrepTimeDuration() *string

func (*FulfillmentDeliveryDetails) GetReadyAt

func (f *FulfillmentDeliveryDetails) GetReadyAt() *string

func (*FulfillmentDeliveryDetails) GetRecipient

func (*FulfillmentDeliveryDetails) GetRejectedAt

func (f *FulfillmentDeliveryDetails) GetRejectedAt() *string

func (*FulfillmentDeliveryDetails) GetSquareDeliveryID

func (f *FulfillmentDeliveryDetails) GetSquareDeliveryID() *string

func (*FulfillmentDeliveryDetails) String

func (f *FulfillmentDeliveryDetails) String() string

func (*FulfillmentDeliveryDetails) UnmarshalJSON

func (f *FulfillmentDeliveryDetails) UnmarshalJSON(data []byte) error

type FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType

type FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType string

The schedule type of the delivery fulfillment.

const (
	FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleTypeScheduled FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType = "SCHEDULED"
	FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleTypeAsap      FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType = "ASAP"
)

func (FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType) Ptr

type FulfillmentFulfillmentEntry

type FulfillmentFulfillmentEntry struct {
	// A unique ID that identifies the fulfillment entry only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The `uid` from the order line item.
	LineItemUID string `json:"line_item_uid" url:"line_item_uid"`
	// The quantity of the line item being fulfilled, formatted as a decimal number.
	// For example, `"3"`.
	//
	// Fulfillments for line items with a `quantity_unit` can have non-integer quantities.
	// For example, `"1.70000"`.
	Quantity string `json:"quantity" url:"quantity"`
	// Application-defined data attached to this fulfillment entry. 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 (such as personally
	// identifiable information or card details).
	//
	// Keys written by applications must be 60 characters or less and must be in the character set
	// `[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
	// with a namespace, separated from the key with a ':' character.
	//
	// Values have a maximum length of 255 characters.
	//
	// An application can 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.
	//
	// For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).
	Metadata map[string]*string `json:"metadata,omitempty" url:"metadata,omitempty"`
	// contains filtered or unexported fields
}

Links an order line item to a fulfillment. Each entry must reference a valid `uid` for an order line item in the `line_item_uid` field, as well as a `quantity` to fulfill.

func (*FulfillmentFulfillmentEntry) GetExtraProperties

func (f *FulfillmentFulfillmentEntry) GetExtraProperties() map[string]interface{}

func (*FulfillmentFulfillmentEntry) GetLineItemUID

func (f *FulfillmentFulfillmentEntry) GetLineItemUID() string

func (*FulfillmentFulfillmentEntry) GetMetadata

func (f *FulfillmentFulfillmentEntry) GetMetadata() map[string]*string

func (*FulfillmentFulfillmentEntry) GetQuantity

func (f *FulfillmentFulfillmentEntry) GetQuantity() string

func (*FulfillmentFulfillmentEntry) GetUID

func (f *FulfillmentFulfillmentEntry) GetUID() *string

func (*FulfillmentFulfillmentEntry) String

func (f *FulfillmentFulfillmentEntry) String() string

func (*FulfillmentFulfillmentEntry) UnmarshalJSON

func (f *FulfillmentFulfillmentEntry) UnmarshalJSON(data []byte) error

type FulfillmentFulfillmentLineItemApplication

type FulfillmentFulfillmentLineItemApplication string

The `line_item_application` describes what order line items this fulfillment applies to. It can be `ALL` or `ENTRY_LIST` with a supplied list of fulfillment entries.

const (
	FulfillmentFulfillmentLineItemApplicationAll       FulfillmentFulfillmentLineItemApplication = "ALL"
	FulfillmentFulfillmentLineItemApplicationEntryList FulfillmentFulfillmentLineItemApplication = "ENTRY_LIST"
)

func NewFulfillmentFulfillmentLineItemApplicationFromString

func NewFulfillmentFulfillmentLineItemApplicationFromString(s string) (FulfillmentFulfillmentLineItemApplication, error)

func (FulfillmentFulfillmentLineItemApplication) Ptr

type FulfillmentPickupDetails

type FulfillmentPickupDetails struct {
	// Information about the person to pick up this fulfillment from a physical
	// location.
	Recipient *FulfillmentRecipient `json:"recipient,omitempty" url:"recipient,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when this fulfillment expires if it is not marked in progress. The timestamp must be
	// in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). The expiration time can only be set
	// up to 7 days in the future. If `expires_at` is not set, any new payments attached to the order
	// are automatically completed.
	ExpiresAt *string `json:"expires_at,omitempty" url:"expires_at,omitempty"`
	// The duration of time after which an in progress pickup fulfillment is automatically moved
	// to the `COMPLETED` state. The duration must be in RFC 3339 format (for example, "P1W3D").
	//
	// If not set, this pickup fulfillment remains in progress until it is canceled or completed.
	AutoCompleteDuration *string `json:"auto_complete_duration,omitempty" url:"auto_complete_duration,omitempty"`
	// The schedule type of the pickup fulfillment. Defaults to `SCHEDULED`.
	// See [FulfillmentPickupDetailsScheduleType](#type-fulfillmentpickupdetailsscheduletype) for possible values
	ScheduleType *FulfillmentPickupDetailsScheduleType `json:"schedule_type,omitempty" url:"schedule_type,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// that represents the start of the pickup window. Must be in RFC 3339 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" url:"pickup_at,omitempty"`
	// The window of time in which the order should be picked up after the `pickup_at` timestamp.
	// Must be in RFC 3339 duration format, e.g., "P1W3D". Can be used as an
	// informational guideline for merchants.
	PickupWindowDuration *string `json:"pickup_window_duration,omitempty" url:"pickup_window_duration,omitempty"`
	// The duration of time it takes to prepare this fulfillment.
	// The duration must be in RFC 3339 format (for example, "P1W3D").
	PrepTimeDuration *string `json:"prep_time_duration,omitempty" url:"prep_time_duration,omitempty"`
	// A note to provide additional instructions about the pickup
	// fulfillment displayed in the Square Point of Sale application and set by the API.
	Note *string `json:"note,omitempty" url:"note,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when the fulfillment was placed. The timestamp must be in RFC 3339 format
	// (for example, "2016-09-04T23:59:33.123Z").
	PlacedAt *string `json:"placed_at,omitempty" url:"placed_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when the fulfillment was marked in progress. The timestamp must be in RFC 3339 format
	// (for example, "2016-09-04T23:59:33.123Z").
	AcceptedAt *string `json:"accepted_at,omitempty" url:"accepted_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when the fulfillment was rejected. The timestamp must be in RFC 3339 format
	// (for example, "2016-09-04T23:59:33.123Z").
	RejectedAt *string `json:"rejected_at,omitempty" url:"rejected_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when the fulfillment is marked as ready for pickup. The timestamp must be in RFC 3339 format
	// (for example, "2016-09-04T23:59:33.123Z").
	ReadyAt *string `json:"ready_at,omitempty" url:"ready_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when the fulfillment expired. The timestamp must be in RFC 3339 format
	// (for example, "2016-09-04T23:59:33.123Z").
	ExpiredAt *string `json:"expired_at,omitempty" url:"expired_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when the fulfillment was picked up by the recipient. The timestamp must be in RFC 3339 format
	// (for example, "2016-09-04T23:59:33.123Z").
	PickedUpAt *string `json:"picked_up_at,omitempty" url:"picked_up_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when the fulfillment was canceled. The timestamp must be in RFC 3339 format
	// (for example, "2016-09-04T23:59:33.123Z").
	CanceledAt *string `json:"canceled_at,omitempty" url:"canceled_at,omitempty"`
	// A description of why the pickup was canceled. The maximum length: 100 characters.
	CancelReason *string `json:"cancel_reason,omitempty" url:"cancel_reason,omitempty"`
	// If set to `true`, indicates that this pickup order is for curbside pickup, not in-store pickup.
	IsCurbsidePickup *bool `json:"is_curbside_pickup,omitempty" url:"is_curbside_pickup,omitempty"`
	// Specific details for curbside pickup. These details can only be populated if `is_curbside_pickup` is set to `true`.
	CurbsidePickupDetails *FulfillmentPickupDetailsCurbsidePickupDetails `json:"curbside_pickup_details,omitempty" url:"curbside_pickup_details,omitempty"`
	// contains filtered or unexported fields
}

Contains details necessary to fulfill a pickup order.

func (*FulfillmentPickupDetails) GetAcceptedAt

func (f *FulfillmentPickupDetails) GetAcceptedAt() *string

func (*FulfillmentPickupDetails) GetAutoCompleteDuration

func (f *FulfillmentPickupDetails) GetAutoCompleteDuration() *string

func (*FulfillmentPickupDetails) GetCancelReason

func (f *FulfillmentPickupDetails) GetCancelReason() *string

func (*FulfillmentPickupDetails) GetCanceledAt

func (f *FulfillmentPickupDetails) GetCanceledAt() *string

func (*FulfillmentPickupDetails) GetCurbsidePickupDetails

func (*FulfillmentPickupDetails) GetExpiredAt

func (f *FulfillmentPickupDetails) GetExpiredAt() *string

func (*FulfillmentPickupDetails) GetExpiresAt

func (f *FulfillmentPickupDetails) GetExpiresAt() *string

func (*FulfillmentPickupDetails) GetExtraProperties

func (f *FulfillmentPickupDetails) GetExtraProperties() map[string]interface{}

func (*FulfillmentPickupDetails) GetIsCurbsidePickup

func (f *FulfillmentPickupDetails) GetIsCurbsidePickup() *bool

func (*FulfillmentPickupDetails) GetNote

func (f *FulfillmentPickupDetails) GetNote() *string

func (*FulfillmentPickupDetails) GetPickedUpAt

func (f *FulfillmentPickupDetails) GetPickedUpAt() *string

func (*FulfillmentPickupDetails) GetPickupAt

func (f *FulfillmentPickupDetails) GetPickupAt() *string

func (*FulfillmentPickupDetails) GetPickupWindowDuration

func (f *FulfillmentPickupDetails) GetPickupWindowDuration() *string

func (*FulfillmentPickupDetails) GetPlacedAt

func (f *FulfillmentPickupDetails) GetPlacedAt() *string

func (*FulfillmentPickupDetails) GetPrepTimeDuration

func (f *FulfillmentPickupDetails) GetPrepTimeDuration() *string

func (*FulfillmentPickupDetails) GetReadyAt

func (f *FulfillmentPickupDetails) GetReadyAt() *string

func (*FulfillmentPickupDetails) GetRecipient

func (*FulfillmentPickupDetails) GetRejectedAt

func (f *FulfillmentPickupDetails) GetRejectedAt() *string

func (*FulfillmentPickupDetails) GetScheduleType

func (*FulfillmentPickupDetails) String

func (f *FulfillmentPickupDetails) String() string

func (*FulfillmentPickupDetails) UnmarshalJSON

func (f *FulfillmentPickupDetails) UnmarshalJSON(data []byte) error

type FulfillmentPickupDetailsCurbsidePickupDetails

type FulfillmentPickupDetailsCurbsidePickupDetails struct {
	// Specific details for curbside pickup, such as parking number and vehicle model.
	CurbsideDetails *string `json:"curbside_details,omitempty" url:"curbside_details,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when the buyer arrived and is waiting for pickup. The timestamp must be in RFC 3339 format
	// (for example, "2016-09-04T23:59:33.123Z").
	BuyerArrivedAt *string `json:"buyer_arrived_at,omitempty" url:"buyer_arrived_at,omitempty"`
	// contains filtered or unexported fields
}

Specific details for curbside pickup.

func (*FulfillmentPickupDetailsCurbsidePickupDetails) GetBuyerArrivedAt

func (f *FulfillmentPickupDetailsCurbsidePickupDetails) GetBuyerArrivedAt() *string

func (*FulfillmentPickupDetailsCurbsidePickupDetails) GetCurbsideDetails

func (f *FulfillmentPickupDetailsCurbsidePickupDetails) GetCurbsideDetails() *string

func (*FulfillmentPickupDetailsCurbsidePickupDetails) GetExtraProperties

func (f *FulfillmentPickupDetailsCurbsidePickupDetails) GetExtraProperties() map[string]interface{}

func (*FulfillmentPickupDetailsCurbsidePickupDetails) String

func (*FulfillmentPickupDetailsCurbsidePickupDetails) UnmarshalJSON

func (f *FulfillmentPickupDetailsCurbsidePickupDetails) UnmarshalJSON(data []byte) error

type FulfillmentPickupDetailsScheduleType

type FulfillmentPickupDetailsScheduleType string

The schedule type of the pickup fulfillment.

const (
	FulfillmentPickupDetailsScheduleTypeScheduled FulfillmentPickupDetailsScheduleType = "SCHEDULED"
	FulfillmentPickupDetailsScheduleTypeAsap      FulfillmentPickupDetailsScheduleType = "ASAP"
)

func NewFulfillmentPickupDetailsScheduleTypeFromString

func NewFulfillmentPickupDetailsScheduleTypeFromString(s string) (FulfillmentPickupDetailsScheduleType, error)

func (FulfillmentPickupDetailsScheduleType) Ptr

type FulfillmentRecipient

type FulfillmentRecipient struct {
	// The 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 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 results in an error.
	CustomerID *string `json:"customer_id,omitempty" url:"customer_id,omitempty"`
	// The display name of the fulfillment recipient. This field is required.
	//
	// If provided, the display name overrides the corresponding customer profile value
	// indicated by `customer_id`.
	DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"`
	// The email address of the fulfillment recipient.
	//
	// If provided, the email address overrides the corresponding customer profile value
	// indicated by `customer_id`.
	EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"`
	// The phone number of the fulfillment recipient. This field is required.
	//
	// If provided, the phone number overrides the corresponding customer profile value
	// indicated by `customer_id`.
	PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"`
	// The address of the fulfillment recipient. This field is required.
	//
	// If provided, the address overrides the corresponding customer profile value
	// indicated by `customer_id`.
	Address *Address `json:"address,omitempty" url:"address,omitempty"`
	// contains filtered or unexported fields
}

Information about the fulfillment recipient.

func (*FulfillmentRecipient) GetAddress

func (f *FulfillmentRecipient) GetAddress() *Address

func (*FulfillmentRecipient) GetCustomerID

func (f *FulfillmentRecipient) GetCustomerID() *string

func (*FulfillmentRecipient) GetDisplayName

func (f *FulfillmentRecipient) GetDisplayName() *string

func (*FulfillmentRecipient) GetEmailAddress

func (f *FulfillmentRecipient) GetEmailAddress() *string

func (*FulfillmentRecipient) GetExtraProperties

func (f *FulfillmentRecipient) GetExtraProperties() map[string]interface{}

func (*FulfillmentRecipient) GetPhoneNumber

func (f *FulfillmentRecipient) GetPhoneNumber() *string

func (*FulfillmentRecipient) String

func (f *FulfillmentRecipient) String() string

func (*FulfillmentRecipient) UnmarshalJSON

func (f *FulfillmentRecipient) UnmarshalJSON(data []byte) error

type FulfillmentShipmentDetails

type FulfillmentShipmentDetails struct {
	// Information about the person to receive this shipment fulfillment.
	Recipient *FulfillmentRecipient `json:"recipient,omitempty" url:"recipient,omitempty"`
	// The shipping carrier being used to ship this fulfillment (such as UPS, FedEx, or USPS).
	Carrier *string `json:"carrier,omitempty" url:"carrier,omitempty"`
	// A note with additional information for the shipping carrier.
	ShippingNote *string `json:"shipping_note,omitempty" url:"shipping_note,omitempty"`
	// A description of the type of shipping product purchased from the carrier
	// (such as First Class, Priority, or Express).
	ShippingType *string `json:"shipping_type,omitempty" url:"shipping_type,omitempty"`
	// The reference number provided by the carrier to track the shipment's progress.
	TrackingNumber *string `json:"tracking_number,omitempty" url:"tracking_number,omitempty"`
	// A link to the tracking webpage on the carrier's website.
	TrackingURL *string `json:"tracking_url,omitempty" url:"tracking_url,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when the shipment was requested. The timestamp must be in RFC 3339 format
	// (for example, "2016-09-04T23:59:33.123Z").
	PlacedAt *string `json:"placed_at,omitempty" url:"placed_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when this fulfillment was moved to the `RESERVED` state, which  indicates that preparation
	// of this shipment has begun. The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
	InProgressAt *string `json:"in_progress_at,omitempty" url:"in_progress_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when this fulfillment was moved to the `PREPARED` state, which indicates that the
	// fulfillment is packaged. The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
	PackagedAt *string `json:"packaged_at,omitempty" url:"packaged_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when the shipment is expected to be delivered to the shipping carrier.
	// The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
	ExpectedShippedAt *string `json:"expected_shipped_at,omitempty" url:"expected_shipped_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when this fulfillment was moved to the `COMPLETED` state, which indicates that
	// the fulfillment has been given to the shipping carrier. The timestamp must be in RFC 3339 format
	// (for example, "2016-09-04T23:59:33.123Z").
	ShippedAt *string `json:"shipped_at,omitempty" url:"shipped_at,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating the shipment was canceled.
	// The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
	CanceledAt *string `json:"canceled_at,omitempty" url:"canceled_at,omitempty"`
	// A description of why the shipment was canceled.
	CancelReason *string `json:"cancel_reason,omitempty" url:"cancel_reason,omitempty"`
	// The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
	// indicating when the shipment failed to be completed. The timestamp must be in RFC 3339 format
	// (for example, "2016-09-04T23:59:33.123Z").
	FailedAt *string `json:"failed_at,omitempty" url:"failed_at,omitempty"`
	// A description of why the shipment failed to be completed.
	FailureReason *string `json:"failure_reason,omitempty" url:"failure_reason,omitempty"`
	// contains filtered or unexported fields
}

Contains the details necessary to fulfill a shipment order.

func (*FulfillmentShipmentDetails) GetCancelReason

func (f *FulfillmentShipmentDetails) GetCancelReason() *string

func (*FulfillmentShipmentDetails) GetCanceledAt

func (f *FulfillmentShipmentDetails) GetCanceledAt() *string

func (*FulfillmentShipmentDetails) GetCarrier

func (f *FulfillmentShipmentDetails) GetCarrier() *string

func (*FulfillmentShipmentDetails) GetExpectedShippedAt

func (f *FulfillmentShipmentDetails) GetExpectedShippedAt() *string

func (*FulfillmentShipmentDetails) GetExtraProperties

func (f *FulfillmentShipmentDetails) GetExtraProperties() map[string]interface{}

func (*FulfillmentShipmentDetails) GetFailedAt

func (f *FulfillmentShipmentDetails) GetFailedAt() *string

func (*FulfillmentShipmentDetails) GetFailureReason

func (f *FulfillmentShipmentDetails) GetFailureReason() *string

func (*FulfillmentShipmentDetails) GetInProgressAt

func (f *FulfillmentShipmentDetails) GetInProgressAt() *string

func (*FulfillmentShipmentDetails) GetPackagedAt

func (f *FulfillmentShipmentDetails) GetPackagedAt() *string

func (*FulfillmentShipmentDetails) GetPlacedAt

func (f *FulfillmentShipmentDetails) GetPlacedAt() *string

func (*FulfillmentShipmentDetails) GetRecipient

func (*FulfillmentShipmentDetails) GetShippedAt

func (f *FulfillmentShipmentDetails) GetShippedAt() *string

func (*FulfillmentShipmentDetails) GetShippingNote

func (f *FulfillmentShipmentDetails) GetShippingNote() *string

func (*FulfillmentShipmentDetails) GetShippingType

func (f *FulfillmentShipmentDetails) GetShippingType() *string

func (*FulfillmentShipmentDetails) GetTrackingNumber

func (f *FulfillmentShipmentDetails) GetTrackingNumber() *string

func (*FulfillmentShipmentDetails) GetTrackingURL

func (f *FulfillmentShipmentDetails) GetTrackingURL() *string

func (*FulfillmentShipmentDetails) String

func (f *FulfillmentShipmentDetails) String() string

func (*FulfillmentShipmentDetails) UnmarshalJSON

func (f *FulfillmentShipmentDetails) UnmarshalJSON(data []byte) error

type FulfillmentState

type FulfillmentState string

The current state of this fulfillment.

const (
	FulfillmentStateProposed  FulfillmentState = "PROPOSED"
	FulfillmentStateReserved  FulfillmentState = "RESERVED"
	FulfillmentStatePrepared  FulfillmentState = "PREPARED"
	FulfillmentStateCompleted FulfillmentState = "COMPLETED"
	FulfillmentStateCanceled  FulfillmentState = "CANCELED"
	FulfillmentStateFailed    FulfillmentState = "FAILED"
)

func NewFulfillmentStateFromString

func NewFulfillmentStateFromString(s string) (FulfillmentState, error)

func (FulfillmentState) Ptr

type FulfillmentType

type FulfillmentType string

The type of fulfillment.

const (
	FulfillmentTypePickup   FulfillmentType = "PICKUP"
	FulfillmentTypeShipment FulfillmentType = "SHIPMENT"
	FulfillmentTypeDelivery FulfillmentType = "DELIVERY"
)

func NewFulfillmentTypeFromString

func NewFulfillmentTypeFromString(s string) (FulfillmentType, error)

func (FulfillmentType) Ptr

type GetAdjustmentInventoryRequest added in v1.2.0

type GetAdjustmentInventoryRequest struct {
	// ID of the [InventoryAdjustment](entity:InventoryAdjustment) to retrieve.
	AdjustmentID string `json:"-" url:"-"`
}

type GetBankAccountByV1IDResponse

type GetBankAccountByV1IDResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested `BankAccount` object.
	BankAccount *BankAccount `json:"bank_account,omitempty" url:"bank_account,omitempty"`
	// contains filtered or unexported fields
}

Response object returned by GetBankAccountByV1Id.

func (*GetBankAccountByV1IDResponse) GetBankAccount

func (g *GetBankAccountByV1IDResponse) GetBankAccount() *BankAccount

func (*GetBankAccountByV1IDResponse) GetErrors

func (g *GetBankAccountByV1IDResponse) GetErrors() []*Error

func (*GetBankAccountByV1IDResponse) GetExtraProperties

func (g *GetBankAccountByV1IDResponse) GetExtraProperties() map[string]interface{}

func (*GetBankAccountByV1IDResponse) String

func (*GetBankAccountByV1IDResponse) UnmarshalJSON

func (g *GetBankAccountByV1IDResponse) UnmarshalJSON(data []byte) error

type GetBankAccountResponse

type GetBankAccountResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested `BankAccount` object.
	BankAccount *BankAccount `json:"bank_account,omitempty" url:"bank_account,omitempty"`
	// contains filtered or unexported fields
}

Response object returned by `GetBankAccount`.

func (*GetBankAccountResponse) GetBankAccount

func (g *GetBankAccountResponse) GetBankAccount() *BankAccount

func (*GetBankAccountResponse) GetErrors

func (g *GetBankAccountResponse) GetErrors() []*Error

func (*GetBankAccountResponse) GetExtraProperties

func (g *GetBankAccountResponse) GetExtraProperties() map[string]interface{}

func (*GetBankAccountResponse) String

func (g *GetBankAccountResponse) String() string

func (*GetBankAccountResponse) UnmarshalJSON

func (g *GetBankAccountResponse) UnmarshalJSON(data []byte) error

type GetBankAccountsRequest added in v1.2.0

type GetBankAccountsRequest struct {
	// Square-issued ID of the desired `BankAccount`.
	BankAccountID string `json:"-" url:"-"`
}

type GetBookingResponse

type GetBookingResponse struct {
	// The booking that was requested.
	Booking *Booking `json:"booking,omitempty" url:"booking,omitempty"`
	// Errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*GetBookingResponse) GetBooking

func (g *GetBookingResponse) GetBooking() *Booking

func (*GetBookingResponse) GetErrors

func (g *GetBookingResponse) GetErrors() []*Error

func (*GetBookingResponse) GetExtraProperties

func (g *GetBookingResponse) GetExtraProperties() map[string]interface{}

func (*GetBookingResponse) String

func (g *GetBookingResponse) String() string

func (*GetBookingResponse) UnmarshalJSON

func (g *GetBookingResponse) UnmarshalJSON(data []byte) error

type GetBookingsRequest added in v1.2.0

type GetBookingsRequest struct {
	// The ID of the [Booking](entity:Booking) object representing the to-be-retrieved booking.
	BookingID string `json:"-" url:"-"`
}

type GetBreakTypeResponse

type GetBreakTypeResponse struct {
	// The response object.
	BreakType *BreakType `json:"break_type,omitempty" url:"break_type,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response to a request to get a `BreakType`. The response contains the requested `BreakType` objects and might contain a set of `Error` objects if the request resulted in errors.

func (*GetBreakTypeResponse) GetBreakType

func (g *GetBreakTypeResponse) GetBreakType() *BreakType

func (*GetBreakTypeResponse) GetErrors

func (g *GetBreakTypeResponse) GetErrors() []*Error

func (*GetBreakTypeResponse) GetExtraProperties

func (g *GetBreakTypeResponse) GetExtraProperties() map[string]interface{}

func (*GetBreakTypeResponse) String

func (g *GetBreakTypeResponse) String() string

func (*GetBreakTypeResponse) UnmarshalJSON

func (g *GetBreakTypeResponse) UnmarshalJSON(data []byte) error

type GetBusinessBookingProfileResponse

type GetBusinessBookingProfileResponse struct {
	// The seller's booking profile.
	BusinessBookingProfile *BusinessBookingProfile `json:"business_booking_profile,omitempty" url:"business_booking_profile,omitempty"`
	// Errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*GetBusinessBookingProfileResponse) GetBusinessBookingProfile

func (g *GetBusinessBookingProfileResponse) GetBusinessBookingProfile() *BusinessBookingProfile

func (*GetBusinessBookingProfileResponse) GetErrors

func (g *GetBusinessBookingProfileResponse) GetErrors() []*Error

func (*GetBusinessBookingProfileResponse) GetExtraProperties

func (g *GetBusinessBookingProfileResponse) GetExtraProperties() map[string]interface{}

func (*GetBusinessBookingProfileResponse) String

func (*GetBusinessBookingProfileResponse) UnmarshalJSON

func (g *GetBusinessBookingProfileResponse) UnmarshalJSON(data []byte) error

type GetByV1IDBankAccountsRequest added in v1.2.0

type GetByV1IDBankAccountsRequest struct {
	// Connect V1 ID of the desired `BankAccount`. For more information, see
	// [Retrieve a bank account by using an ID issued by V1 Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api#retrieve-a-bank-account-by-using-an-id-issued-by-v1-bank-accounts-api).
	V1BankAccountID string `json:"-" url:"-"`
}

type GetCardResponse

type GetCardResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The retrieved card.
	Card *Card `json:"card,omitempty" url:"card,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [RetrieveCard](api-endpoint:Cards-RetrieveCard) endpoint.

Note: if there are errors processing the request, the card field will not be present.

func (*GetCardResponse) GetCard

func (g *GetCardResponse) GetCard() *Card

func (*GetCardResponse) GetErrors

func (g *GetCardResponse) GetErrors() []*Error

func (*GetCardResponse) GetExtraProperties

func (g *GetCardResponse) GetExtraProperties() map[string]interface{}

func (*GetCardResponse) String

func (g *GetCardResponse) String() string

func (*GetCardResponse) UnmarshalJSON

func (g *GetCardResponse) UnmarshalJSON(data []byte) error

type GetCardsRequest added in v1.2.0

type GetCardsRequest struct {
	// Unique ID for the desired Card.
	CardID string `json:"-" url:"-"`
}

type GetCashDrawerShiftResponse

type GetCashDrawerShiftResponse struct {
	// The cash drawer shift queried for.
	CashDrawerShift *CashDrawerShift `json:"cash_drawer_shift,omitempty" url:"cash_drawer_shift,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCashDrawerShiftResponse) GetCashDrawerShift

func (g *GetCashDrawerShiftResponse) GetCashDrawerShift() *CashDrawerShift

func (*GetCashDrawerShiftResponse) GetErrors

func (g *GetCashDrawerShiftResponse) GetErrors() []*Error

func (*GetCashDrawerShiftResponse) GetExtraProperties

func (g *GetCashDrawerShiftResponse) GetExtraProperties() map[string]interface{}

func (*GetCashDrawerShiftResponse) String

func (g *GetCashDrawerShiftResponse) String() string

func (*GetCashDrawerShiftResponse) UnmarshalJSON

func (g *GetCashDrawerShiftResponse) UnmarshalJSON(data []byte) error

type GetCatalogObjectResponse

type GetCatalogObjectResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The `CatalogObject`s returned.
	Object *CatalogObject `json:"object,omitempty" url:"object,omitempty"`
	// A list of `CatalogObject`s referenced by the object in the `object` field.
	RelatedObjects []*CatalogObject `json:"related_objects,omitempty" url:"related_objects,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCatalogObjectResponse) GetErrors

func (g *GetCatalogObjectResponse) GetErrors() []*Error

func (*GetCatalogObjectResponse) GetExtraProperties

func (g *GetCatalogObjectResponse) GetExtraProperties() map[string]interface{}

func (*GetCatalogObjectResponse) GetObject

func (g *GetCatalogObjectResponse) GetObject() *CatalogObject

func (*GetCatalogObjectResponse) GetRelatedObjects

func (g *GetCatalogObjectResponse) GetRelatedObjects() []*CatalogObject

func (*GetCatalogObjectResponse) String

func (g *GetCatalogObjectResponse) String() string

func (*GetCatalogObjectResponse) UnmarshalJSON

func (g *GetCatalogObjectResponse) UnmarshalJSON(data []byte) error

type GetCustomerCustomAttributeDefinitionResponse

type GetCustomerCustomAttributeDefinitionResponse struct {
	// The retrieved custom attribute definition.
	CustomAttributeDefinition *CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"custom_attribute_definition,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [RetrieveCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttributeDefinition) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*GetCustomerCustomAttributeDefinitionResponse) GetCustomAttributeDefinition

func (*GetCustomerCustomAttributeDefinitionResponse) GetErrors

func (*GetCustomerCustomAttributeDefinitionResponse) GetExtraProperties

func (g *GetCustomerCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*GetCustomerCustomAttributeDefinitionResponse) String

func (*GetCustomerCustomAttributeDefinitionResponse) UnmarshalJSON

func (g *GetCustomerCustomAttributeDefinitionResponse) UnmarshalJSON(data []byte) error

type GetCustomerCustomAttributeResponse

type GetCustomerCustomAttributeResponse struct {
	// The retrieved custom attribute. If `with_definition` was set to `true` in the request,
	// the custom attribute definition is returned in the `definition` field.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [RetrieveCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-RetrieveCustomerCustomAttribute) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*GetCustomerCustomAttributeResponse) GetCustomAttribute

func (g *GetCustomerCustomAttributeResponse) GetCustomAttribute() *CustomAttribute

func (*GetCustomerCustomAttributeResponse) GetErrors

func (g *GetCustomerCustomAttributeResponse) GetErrors() []*Error

func (*GetCustomerCustomAttributeResponse) GetExtraProperties

func (g *GetCustomerCustomAttributeResponse) GetExtraProperties() map[string]interface{}

func (*GetCustomerCustomAttributeResponse) String

func (*GetCustomerCustomAttributeResponse) UnmarshalJSON

func (g *GetCustomerCustomAttributeResponse) UnmarshalJSON(data []byte) error

type GetCustomerGroupResponse

type GetCustomerGroupResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The retrieved customer group.
	Group *CustomerGroup `json:"group,omitempty" url:"group,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [RetrieveCustomerGroup](api-endpoint:CustomerGroups-RetrieveCustomerGroup) endpoint.

Either `errors` or `group` is present in a given response (never both).

func (*GetCustomerGroupResponse) GetErrors

func (g *GetCustomerGroupResponse) GetErrors() []*Error

func (*GetCustomerGroupResponse) GetExtraProperties

func (g *GetCustomerGroupResponse) GetExtraProperties() map[string]interface{}

func (*GetCustomerGroupResponse) GetGroup

func (g *GetCustomerGroupResponse) GetGroup() *CustomerGroup

func (*GetCustomerGroupResponse) String

func (g *GetCustomerGroupResponse) String() string

func (*GetCustomerGroupResponse) UnmarshalJSON

func (g *GetCustomerGroupResponse) UnmarshalJSON(data []byte) error

type GetCustomerResponse

type GetCustomerResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested customer.
	Customer *Customer `json:"customer,omitempty" url:"customer,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the `RetrieveCustomer` endpoint.

Either `errors` or `customer` is present in a given response (never both).

func (*GetCustomerResponse) GetCustomer

func (g *GetCustomerResponse) GetCustomer() *Customer

func (*GetCustomerResponse) GetErrors

func (g *GetCustomerResponse) GetErrors() []*Error

func (*GetCustomerResponse) GetExtraProperties

func (g *GetCustomerResponse) GetExtraProperties() map[string]interface{}

func (*GetCustomerResponse) String

func (g *GetCustomerResponse) String() string

func (*GetCustomerResponse) UnmarshalJSON

func (g *GetCustomerResponse) UnmarshalJSON(data []byte) error

type GetCustomerSegmentResponse

type GetCustomerSegmentResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The retrieved customer segment.
	Segment *CustomerSegment `json:"segment,omitempty" url:"segment,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body for requests to the `RetrieveCustomerSegment` endpoint.

Either `errors` or `segment` is present in a given response (never both).

func (*GetCustomerSegmentResponse) GetErrors

func (g *GetCustomerSegmentResponse) GetErrors() []*Error

func (*GetCustomerSegmentResponse) GetExtraProperties

func (g *GetCustomerSegmentResponse) GetExtraProperties() map[string]interface{}

func (*GetCustomerSegmentResponse) GetSegment

func (*GetCustomerSegmentResponse) String

func (g *GetCustomerSegmentResponse) String() string

func (*GetCustomerSegmentResponse) UnmarshalJSON

func (g *GetCustomerSegmentResponse) UnmarshalJSON(data []byte) error

type GetCustomersRequest added in v1.2.0

type GetCustomersRequest struct {
	// The ID of the customer to retrieve.
	CustomerID string `json:"-" url:"-"`
}

type GetDeviceCodeResponse

type GetDeviceCodeResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The queried DeviceCode.
	DeviceCode *DeviceCode `json:"device_code,omitempty" url:"device_code,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDeviceCodeResponse) GetDeviceCode

func (g *GetDeviceCodeResponse) GetDeviceCode() *DeviceCode

func (*GetDeviceCodeResponse) GetErrors

func (g *GetDeviceCodeResponse) GetErrors() []*Error

func (*GetDeviceCodeResponse) GetExtraProperties

func (g *GetDeviceCodeResponse) GetExtraProperties() map[string]interface{}

func (*GetDeviceCodeResponse) String

func (g *GetDeviceCodeResponse) String() string

func (*GetDeviceCodeResponse) UnmarshalJSON

func (g *GetDeviceCodeResponse) UnmarshalJSON(data []byte) error

type GetDeviceResponse

type GetDeviceResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested `Device`.
	Device *Device `json:"device,omitempty" url:"device,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDeviceResponse) GetDevice

func (g *GetDeviceResponse) GetDevice() *Device

func (*GetDeviceResponse) GetErrors

func (g *GetDeviceResponse) GetErrors() []*Error

func (*GetDeviceResponse) GetExtraProperties

func (g *GetDeviceResponse) GetExtraProperties() map[string]interface{}

func (*GetDeviceResponse) String

func (g *GetDeviceResponse) String() string

func (*GetDeviceResponse) UnmarshalJSON

func (g *GetDeviceResponse) UnmarshalJSON(data []byte) error

type GetDevicesRequest added in v1.2.0

type GetDevicesRequest struct {
	// The unique ID for the desired `Device`.
	DeviceID string `json:"-" url:"-"`
}

type GetDisputeEvidenceResponse

type GetDisputeEvidenceResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// Metadata about the dispute evidence file.
	Evidence *DisputeEvidence `json:"evidence,omitempty" url:"evidence,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields in a `RetrieveDisputeEvidence` response.

func (*GetDisputeEvidenceResponse) GetErrors

func (g *GetDisputeEvidenceResponse) GetErrors() []*Error

func (*GetDisputeEvidenceResponse) GetEvidence

func (g *GetDisputeEvidenceResponse) GetEvidence() *DisputeEvidence

func (*GetDisputeEvidenceResponse) GetExtraProperties

func (g *GetDisputeEvidenceResponse) GetExtraProperties() map[string]interface{}

func (*GetDisputeEvidenceResponse) String

func (g *GetDisputeEvidenceResponse) String() string

func (*GetDisputeEvidenceResponse) UnmarshalJSON

func (g *GetDisputeEvidenceResponse) UnmarshalJSON(data []byte) error

type GetDisputeResponse

type GetDisputeResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// Details about the requested `Dispute`.
	Dispute *Dispute `json:"dispute,omitempty" url:"dispute,omitempty"`
	// contains filtered or unexported fields
}

Defines fields in a `RetrieveDispute` response.

func (*GetDisputeResponse) GetDispute

func (g *GetDisputeResponse) GetDispute() *Dispute

func (*GetDisputeResponse) GetErrors

func (g *GetDisputeResponse) GetErrors() []*Error

func (*GetDisputeResponse) GetExtraProperties

func (g *GetDisputeResponse) GetExtraProperties() map[string]interface{}

func (*GetDisputeResponse) String

func (g *GetDisputeResponse) String() string

func (*GetDisputeResponse) UnmarshalJSON

func (g *GetDisputeResponse) UnmarshalJSON(data []byte) error

type GetDisputesRequest added in v1.2.0

type GetDisputesRequest struct {
	// The ID of the dispute you want more details about.
	DisputeID string `json:"-" url:"-"`
}

type GetEmployeeResponse

type GetEmployeeResponse struct {
	Employee *Employee `json:"employee,omitempty" url:"employee,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*GetEmployeeResponse) GetEmployee

func (g *GetEmployeeResponse) GetEmployee() *Employee

func (*GetEmployeeResponse) GetErrors

func (g *GetEmployeeResponse) GetErrors() []*Error

func (*GetEmployeeResponse) GetExtraProperties

func (g *GetEmployeeResponse) GetExtraProperties() map[string]interface{}

func (*GetEmployeeResponse) String

func (g *GetEmployeeResponse) String() string

func (*GetEmployeeResponse) UnmarshalJSON

func (g *GetEmployeeResponse) UnmarshalJSON(data []byte) error

type GetEmployeeWageResponse

type GetEmployeeWageResponse struct {
	// The requested `EmployeeWage` object.
	EmployeeWage *EmployeeWage `json:"employee_wage,omitempty" url:"employee_wage,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

A response to a request to get an `EmployeeWage`. The response contains the requested `EmployeeWage` objects and might contain a set of `Error` objects if the request resulted in errors.

func (*GetEmployeeWageResponse) GetEmployeeWage

func (g *GetEmployeeWageResponse) GetEmployeeWage() *EmployeeWage

func (*GetEmployeeWageResponse) GetErrors

func (g *GetEmployeeWageResponse) GetErrors() []*Error

func (*GetEmployeeWageResponse) GetExtraProperties

func (g *GetEmployeeWageResponse) GetExtraProperties() map[string]interface{}

func (*GetEmployeeWageResponse) String

func (g *GetEmployeeWageResponse) String() string

func (*GetEmployeeWageResponse) UnmarshalJSON

func (g *GetEmployeeWageResponse) UnmarshalJSON(data []byte) error

type GetEmployeesRequest added in v1.2.0

type GetEmployeesRequest struct {
	// UUID for the employee that was requested.
	ID string `json:"-" url:"-"`
}

type GetGiftCardFromGanRequest

type GetGiftCardFromGanRequest struct {
	// The gift card account number (GAN) of the gift card to retrieve.
	// The maximum length of a GAN is 255 digits to account for third-party GANs that have been imported.
	// Square-issued gift cards have 16-digit GANs.
	Gan string `json:"gan" url:"-"`
}

type GetGiftCardFromGanResponse

type GetGiftCardFromGanResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// A gift card that was fetched, if present. It returns empty if an error occurred.
	GiftCard *GiftCard `json:"gift_card,omitempty" url:"gift_card,omitempty"`
	// contains filtered or unexported fields
}

A response that contains a `GiftCard`. This response might contain a set of `Error` objects if the request resulted in errors.

func (*GetGiftCardFromGanResponse) GetErrors

func (g *GetGiftCardFromGanResponse) GetErrors() []*Error

func (*GetGiftCardFromGanResponse) GetExtraProperties

func (g *GetGiftCardFromGanResponse) GetExtraProperties() map[string]interface{}

func (*GetGiftCardFromGanResponse) GetGiftCard

func (g *GetGiftCardFromGanResponse) GetGiftCard() *GiftCard

func (*GetGiftCardFromGanResponse) String

func (g *GetGiftCardFromGanResponse) String() string

func (*GetGiftCardFromGanResponse) UnmarshalJSON

func (g *GetGiftCardFromGanResponse) UnmarshalJSON(data []byte) error

type GetGiftCardFromNonceRequest

type GetGiftCardFromNonceRequest struct {
	// The payment token of the gift card to retrieve. Payment tokens are generated by the
	// Web Payments SDK or In-App Payments SDK.
	Nonce string `json:"nonce" url:"-"`
}

type GetGiftCardFromNonceResponse

type GetGiftCardFromNonceResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The retrieved gift card.
	GiftCard *GiftCard `json:"gift_card,omitempty" url:"gift_card,omitempty"`
	// contains filtered or unexported fields
}

A response that contains a `GiftCard` object. If the request resulted in errors, the response contains a set of `Error` objects.

func (*GetGiftCardFromNonceResponse) GetErrors

func (g *GetGiftCardFromNonceResponse) GetErrors() []*Error

func (*GetGiftCardFromNonceResponse) GetExtraProperties

func (g *GetGiftCardFromNonceResponse) GetExtraProperties() map[string]interface{}

func (*GetGiftCardFromNonceResponse) GetGiftCard

func (g *GetGiftCardFromNonceResponse) GetGiftCard() *GiftCard

func (*GetGiftCardFromNonceResponse) String

func (*GetGiftCardFromNonceResponse) UnmarshalJSON

func (g *GetGiftCardFromNonceResponse) UnmarshalJSON(data []byte) error

type GetGiftCardResponse

type GetGiftCardResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The gift card retrieved.
	GiftCard *GiftCard `json:"gift_card,omitempty" url:"gift_card,omitempty"`
	// contains filtered or unexported fields
}

A response that contains a `GiftCard`. The response might contain a set of `Error` objects if the request resulted in errors.

func (*GetGiftCardResponse) GetErrors

func (g *GetGiftCardResponse) GetErrors() []*Error

func (*GetGiftCardResponse) GetExtraProperties

func (g *GetGiftCardResponse) GetExtraProperties() map[string]interface{}

func (*GetGiftCardResponse) GetGiftCard

func (g *GetGiftCardResponse) GetGiftCard() *GiftCard

func (*GetGiftCardResponse) String

func (g *GetGiftCardResponse) String() string

func (*GetGiftCardResponse) UnmarshalJSON

func (g *GetGiftCardResponse) UnmarshalJSON(data []byte) error

type GetGiftCardsRequest added in v1.2.0

type GetGiftCardsRequest struct {
	// The ID of the gift card to retrieve.
	ID string `json:"-" url:"-"`
}

type GetInventoryAdjustmentResponse

type GetInventoryAdjustmentResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested [InventoryAdjustment](entity:InventoryAdjustment).
	Adjustment *InventoryAdjustment `json:"adjustment,omitempty" url:"adjustment,omitempty"`
	// contains filtered or unexported fields
}

func (*GetInventoryAdjustmentResponse) GetAdjustment

func (*GetInventoryAdjustmentResponse) GetErrors

func (g *GetInventoryAdjustmentResponse) GetErrors() []*Error

func (*GetInventoryAdjustmentResponse) GetExtraProperties

func (g *GetInventoryAdjustmentResponse) GetExtraProperties() map[string]interface{}

func (*GetInventoryAdjustmentResponse) String

func (*GetInventoryAdjustmentResponse) UnmarshalJSON

func (g *GetInventoryAdjustmentResponse) UnmarshalJSON(data []byte) error

type GetInventoryChangesResponse

type GetInventoryChangesResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The set of inventory changes for the requested object and locations.
	Changes []*InventoryChange `json:"changes,omitempty" url:"changes,omitempty"`
	// 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" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

func (*GetInventoryChangesResponse) GetChanges

func (g *GetInventoryChangesResponse) GetChanges() []*InventoryChange

func (*GetInventoryChangesResponse) GetCursor

func (g *GetInventoryChangesResponse) GetCursor() *string

func (*GetInventoryChangesResponse) GetErrors

func (g *GetInventoryChangesResponse) GetErrors() []*Error

func (*GetInventoryChangesResponse) GetExtraProperties

func (g *GetInventoryChangesResponse) GetExtraProperties() map[string]interface{}

func (*GetInventoryChangesResponse) String

func (g *GetInventoryChangesResponse) String() string

func (*GetInventoryChangesResponse) UnmarshalJSON

func (g *GetInventoryChangesResponse) UnmarshalJSON(data []byte) error

type GetInventoryCountResponse

type GetInventoryCountResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The current calculated inventory counts for the requested object and
	// locations.
	Counts []*InventoryCount `json:"counts,omitempty" url:"counts,omitempty"`
	// 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" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

func (*GetInventoryCountResponse) GetCounts

func (g *GetInventoryCountResponse) GetCounts() []*InventoryCount

func (*GetInventoryCountResponse) GetCursor

func (g *GetInventoryCountResponse) GetCursor() *string

func (*GetInventoryCountResponse) GetErrors

func (g *GetInventoryCountResponse) GetErrors() []*Error

func (*GetInventoryCountResponse) GetExtraProperties

func (g *GetInventoryCountResponse) GetExtraProperties() map[string]interface{}

func (*GetInventoryCountResponse) String

func (g *GetInventoryCountResponse) String() string

func (*GetInventoryCountResponse) UnmarshalJSON

func (g *GetInventoryCountResponse) UnmarshalJSON(data []byte) error

type GetInventoryPhysicalCountResponse

type GetInventoryPhysicalCountResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested [InventoryPhysicalCount](entity:InventoryPhysicalCount).
	Count *InventoryPhysicalCount `json:"count,omitempty" url:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*GetInventoryPhysicalCountResponse) GetCount

func (*GetInventoryPhysicalCountResponse) GetErrors

func (g *GetInventoryPhysicalCountResponse) GetErrors() []*Error

func (*GetInventoryPhysicalCountResponse) GetExtraProperties

func (g *GetInventoryPhysicalCountResponse) GetExtraProperties() map[string]interface{}

func (*GetInventoryPhysicalCountResponse) String

func (*GetInventoryPhysicalCountResponse) UnmarshalJSON

func (g *GetInventoryPhysicalCountResponse) UnmarshalJSON(data []byte) error

type GetInventoryRequest added in v1.2.0

type GetInventoryRequest struct {
	// ID of the [CatalogObject](entity:CatalogObject) to retrieve.
	CatalogObjectID string `json:"-" url:"-"`
	// The [Location](entity:Location) IDs to look up as a comma-separated
	// list. An empty list queries all locations.
	LocationIDs *string `json:"-" url:"location_ids,omitempty"`
	// 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:"-" url:"cursor,omitempty"`
}

type GetInventoryTransferResponse

type GetInventoryTransferResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested [InventoryTransfer](entity:InventoryTransfer).
	Transfer *InventoryTransfer `json:"transfer,omitempty" url:"transfer,omitempty"`
	// contains filtered or unexported fields
}

func (*GetInventoryTransferResponse) GetErrors

func (g *GetInventoryTransferResponse) GetErrors() []*Error

func (*GetInventoryTransferResponse) GetExtraProperties

func (g *GetInventoryTransferResponse) GetExtraProperties() map[string]interface{}

func (*GetInventoryTransferResponse) GetTransfer

func (*GetInventoryTransferResponse) String

func (*GetInventoryTransferResponse) UnmarshalJSON

func (g *GetInventoryTransferResponse) UnmarshalJSON(data []byte) error

type GetInvoiceResponse

type GetInvoiceResponse struct {
	// The invoice requested.
	Invoice *Invoice `json:"invoice,omitempty" url:"invoice,omitempty"`
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Describes a `GetInvoice` response.

func (*GetInvoiceResponse) GetErrors

func (g *GetInvoiceResponse) GetErrors() []*Error

func (*GetInvoiceResponse) GetExtraProperties

func (g *GetInvoiceResponse) GetExtraProperties() map[string]interface{}

func (*GetInvoiceResponse) GetInvoice

func (g *GetInvoiceResponse) GetInvoice() *Invoice

func (*GetInvoiceResponse) String

func (g *GetInvoiceResponse) String() string

func (*GetInvoiceResponse) UnmarshalJSON

func (g *GetInvoiceResponse) UnmarshalJSON(data []byte) error

type GetInvoicesRequest added in v1.2.0

type GetInvoicesRequest struct {
	// The ID of the invoice to retrieve.
	InvoiceID string `json:"-" url:"-"`
}

type GetLocationResponse

type GetLocationResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested location.
	Location *Location `json:"location,omitempty" url:"location,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that the [RetrieveLocation](api-endpoint:Locations-RetrieveLocation) endpoint returns in a response.

func (*GetLocationResponse) GetErrors

func (g *GetLocationResponse) GetErrors() []*Error

func (*GetLocationResponse) GetExtraProperties

func (g *GetLocationResponse) GetExtraProperties() map[string]interface{}

func (*GetLocationResponse) GetLocation

func (g *GetLocationResponse) GetLocation() *Location

func (*GetLocationResponse) String

func (g *GetLocationResponse) String() string

func (*GetLocationResponse) UnmarshalJSON

func (g *GetLocationResponse) UnmarshalJSON(data []byte) error

type GetLocationsRequest added in v1.2.0

type GetLocationsRequest struct {
	// The ID of the location to retrieve. Specify the string
	// "main" to return the main location.
	LocationID string `json:"-" url:"-"`
}

type GetLoyaltyAccountResponse

type GetLoyaltyAccountResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The loyalty account.
	LoyaltyAccount *LoyaltyAccount `json:"loyalty_account,omitempty" url:"loyalty_account,omitempty"`
	// contains filtered or unexported fields
}

A response that includes the loyalty account.

func (*GetLoyaltyAccountResponse) GetErrors

func (g *GetLoyaltyAccountResponse) GetErrors() []*Error

func (*GetLoyaltyAccountResponse) GetExtraProperties

func (g *GetLoyaltyAccountResponse) GetExtraProperties() map[string]interface{}

func (*GetLoyaltyAccountResponse) GetLoyaltyAccount

func (g *GetLoyaltyAccountResponse) GetLoyaltyAccount() *LoyaltyAccount

func (*GetLoyaltyAccountResponse) String

func (g *GetLoyaltyAccountResponse) String() string

func (*GetLoyaltyAccountResponse) UnmarshalJSON

func (g *GetLoyaltyAccountResponse) UnmarshalJSON(data []byte) error

type GetLoyaltyProgramResponse

type GetLoyaltyProgramResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The loyalty program that was requested.
	Program *LoyaltyProgram `json:"program,omitempty" url:"program,omitempty"`
	// contains filtered or unexported fields
}

A response that contains the loyalty program.

func (*GetLoyaltyProgramResponse) GetErrors

func (g *GetLoyaltyProgramResponse) GetErrors() []*Error

func (*GetLoyaltyProgramResponse) GetExtraProperties

func (g *GetLoyaltyProgramResponse) GetExtraProperties() map[string]interface{}

func (*GetLoyaltyProgramResponse) GetProgram

func (g *GetLoyaltyProgramResponse) GetProgram() *LoyaltyProgram

func (*GetLoyaltyProgramResponse) String

func (g *GetLoyaltyProgramResponse) String() string

func (*GetLoyaltyProgramResponse) UnmarshalJSON

func (g *GetLoyaltyProgramResponse) UnmarshalJSON(data []byte) error

type GetLoyaltyPromotionResponse

type GetLoyaltyPromotionResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The retrieved loyalty promotion.
	LoyaltyPromotion *LoyaltyPromotion `json:"loyalty_promotion,omitempty" url:"loyalty_promotion,omitempty"`
	// contains filtered or unexported fields
}

Represents a [RetrieveLoyaltyPromotionPromotions](api-endpoint:Loyalty-RetrieveLoyaltyPromotion) response.

func (*GetLoyaltyPromotionResponse) GetErrors

func (g *GetLoyaltyPromotionResponse) GetErrors() []*Error

func (*GetLoyaltyPromotionResponse) GetExtraProperties

func (g *GetLoyaltyPromotionResponse) GetExtraProperties() map[string]interface{}

func (*GetLoyaltyPromotionResponse) GetLoyaltyPromotion

func (g *GetLoyaltyPromotionResponse) GetLoyaltyPromotion() *LoyaltyPromotion

func (*GetLoyaltyPromotionResponse) String

func (g *GetLoyaltyPromotionResponse) String() string

func (*GetLoyaltyPromotionResponse) UnmarshalJSON

func (g *GetLoyaltyPromotionResponse) UnmarshalJSON(data []byte) error

type GetLoyaltyRewardResponse

type GetLoyaltyRewardResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The loyalty reward retrieved.
	Reward *LoyaltyReward `json:"reward,omitempty" url:"reward,omitempty"`
	// contains filtered or unexported fields
}

A response that includes the loyalty reward.

func (*GetLoyaltyRewardResponse) GetErrors

func (g *GetLoyaltyRewardResponse) GetErrors() []*Error

func (*GetLoyaltyRewardResponse) GetExtraProperties

func (g *GetLoyaltyRewardResponse) GetExtraProperties() map[string]interface{}

func (*GetLoyaltyRewardResponse) GetReward

func (g *GetLoyaltyRewardResponse) GetReward() *LoyaltyReward

func (*GetLoyaltyRewardResponse) String

func (g *GetLoyaltyRewardResponse) String() string

func (*GetLoyaltyRewardResponse) UnmarshalJSON

func (g *GetLoyaltyRewardResponse) UnmarshalJSON(data []byte) error

type GetMerchantResponse

type GetMerchantResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested `Merchant` object.
	Merchant *Merchant `json:"merchant,omitempty" url:"merchant,omitempty"`
	// contains filtered or unexported fields
}

The response object returned by the [RetrieveMerchant](api-endpoint:Merchants-RetrieveMerchant) endpoint.

func (*GetMerchantResponse) GetErrors

func (g *GetMerchantResponse) GetErrors() []*Error

func (*GetMerchantResponse) GetExtraProperties

func (g *GetMerchantResponse) GetExtraProperties() map[string]interface{}

func (*GetMerchantResponse) GetMerchant

func (g *GetMerchantResponse) GetMerchant() *Merchant

func (*GetMerchantResponse) String

func (g *GetMerchantResponse) String() string

func (*GetMerchantResponse) UnmarshalJSON

func (g *GetMerchantResponse) UnmarshalJSON(data []byte) error

type GetMerchantsRequest added in v1.2.0

type GetMerchantsRequest struct {
	// The ID of the merchant to retrieve. If the string "me" is supplied as the ID,
	// then retrieve the merchant that is currently accessible to this call.
	MerchantID string `json:"-" url:"-"`
}

type GetOrderResponse

type GetOrderResponse struct {
	// The requested order.
	Order *Order `json:"order,omitempty" url:"order,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*GetOrderResponse) GetErrors

func (g *GetOrderResponse) GetErrors() []*Error

func (*GetOrderResponse) GetExtraProperties

func (g *GetOrderResponse) GetExtraProperties() map[string]interface{}

func (*GetOrderResponse) GetOrder

func (g *GetOrderResponse) GetOrder() *Order

func (*GetOrderResponse) String

func (g *GetOrderResponse) String() string

func (*GetOrderResponse) UnmarshalJSON

func (g *GetOrderResponse) UnmarshalJSON(data []byte) error

type GetOrdersRequest added in v1.2.0

type GetOrdersRequest struct {
	// The ID of the order to retrieve.
	OrderID string `json:"-" url:"-"`
}

type GetPaymentLinkResponse

type GetPaymentLinkResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The payment link that is retrieved.
	PaymentLink *PaymentLink `json:"payment_link,omitempty" url:"payment_link,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPaymentLinkResponse) GetErrors

func (g *GetPaymentLinkResponse) GetErrors() []*Error

func (*GetPaymentLinkResponse) GetExtraProperties

func (g *GetPaymentLinkResponse) GetExtraProperties() map[string]interface{}
func (g *GetPaymentLinkResponse) GetPaymentLink() *PaymentLink

func (*GetPaymentLinkResponse) String

func (g *GetPaymentLinkResponse) String() string

func (*GetPaymentLinkResponse) UnmarshalJSON

func (g *GetPaymentLinkResponse) UnmarshalJSON(data []byte) error

type GetPaymentRefundResponse

type GetPaymentRefundResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested `PaymentRefund`.
	Refund *PaymentRefund `json:"refund,omitempty" url:"refund,omitempty"`
	// contains filtered or unexported fields
}

Defines the response returned by [GetRefund](api-endpoint:Refunds-GetPaymentRefund).

Note: If there are errors processing the request, the refund field might not be present or it might be present in a FAILED state.

func (*GetPaymentRefundResponse) GetErrors

func (g *GetPaymentRefundResponse) GetErrors() []*Error

func (*GetPaymentRefundResponse) GetExtraProperties

func (g *GetPaymentRefundResponse) GetExtraProperties() map[string]interface{}

func (*GetPaymentRefundResponse) GetRefund

func (g *GetPaymentRefundResponse) GetRefund() *PaymentRefund

func (*GetPaymentRefundResponse) String

func (g *GetPaymentRefundResponse) String() string

func (*GetPaymentRefundResponse) UnmarshalJSON

func (g *GetPaymentRefundResponse) UnmarshalJSON(data []byte) error

type GetPaymentResponse

type GetPaymentResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested `Payment`.
	Payment *Payment `json:"payment,omitempty" url:"payment,omitempty"`
	// contains filtered or unexported fields
}

Defines the response returned by [GetPayment](api-endpoint:Payments-GetPayment).

func (*GetPaymentResponse) GetErrors

func (g *GetPaymentResponse) GetErrors() []*Error

func (*GetPaymentResponse) GetExtraProperties

func (g *GetPaymentResponse) GetExtraProperties() map[string]interface{}

func (*GetPaymentResponse) GetPayment

func (g *GetPaymentResponse) GetPayment() *Payment

func (*GetPaymentResponse) String

func (g *GetPaymentResponse) String() string

func (*GetPaymentResponse) UnmarshalJSON

func (g *GetPaymentResponse) UnmarshalJSON(data []byte) error

type GetPaymentsRequest added in v1.2.0

type GetPaymentsRequest struct {
	// A unique ID for the desired payment.
	PaymentID string `json:"-" url:"-"`
}

type GetPayoutResponse

type GetPayoutResponse struct {
	// The requested payout.
	Payout *Payout `json:"payout,omitempty" url:"payout,omitempty"`
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPayoutResponse) GetErrors

func (g *GetPayoutResponse) GetErrors() []*Error

func (*GetPayoutResponse) GetExtraProperties

func (g *GetPayoutResponse) GetExtraProperties() map[string]interface{}

func (*GetPayoutResponse) GetPayout

func (g *GetPayoutResponse) GetPayout() *Payout

func (*GetPayoutResponse) String

func (g *GetPayoutResponse) String() string

func (*GetPayoutResponse) UnmarshalJSON

func (g *GetPayoutResponse) UnmarshalJSON(data []byte) error

type GetPayoutsRequest added in v1.2.0

type GetPayoutsRequest struct {
	// The ID of the payout to retrieve the information for.
	PayoutID string `json:"-" url:"-"`
}

type GetPhysicalCountInventoryRequest added in v1.2.0

type GetPhysicalCountInventoryRequest struct {
	// ID of the
	// [InventoryPhysicalCount](entity:InventoryPhysicalCount) to retrieve.
	PhysicalCountID string `json:"-" url:"-"`
}

type GetRefundsRequest added in v1.2.0

type GetRefundsRequest struct {
	// The unique ID for the desired `PaymentRefund`.
	RefundID string `json:"-" url:"-"`
}

type GetShiftResponse

type GetShiftResponse struct {
	// The requested `Shift`.
	Shift *Shift `json:"shift,omitempty" url:"shift,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

A response to a request to get a `Shift`. The response contains the requested `Shift` object and might contain a set of `Error` objects if the request resulted in errors.

func (*GetShiftResponse) GetErrors

func (g *GetShiftResponse) GetErrors() []*Error

func (*GetShiftResponse) GetExtraProperties

func (g *GetShiftResponse) GetExtraProperties() map[string]interface{}

func (*GetShiftResponse) GetShift

func (g *GetShiftResponse) GetShift() *Shift

func (*GetShiftResponse) String

func (g *GetShiftResponse) String() string

func (*GetShiftResponse) UnmarshalJSON

func (g *GetShiftResponse) UnmarshalJSON(data []byte) error

type GetSnippetResponse

type GetSnippetResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The retrieved snippet.
	Snippet *Snippet `json:"snippet,omitempty" url:"snippet,omitempty"`
	// contains filtered or unexported fields
}

Represents a `RetrieveSnippet` response. The response can include either `snippet` or `errors`.

func (*GetSnippetResponse) GetErrors

func (g *GetSnippetResponse) GetErrors() []*Error

func (*GetSnippetResponse) GetExtraProperties

func (g *GetSnippetResponse) GetExtraProperties() map[string]interface{}

func (*GetSnippetResponse) GetSnippet

func (g *GetSnippetResponse) GetSnippet() *Snippet

func (*GetSnippetResponse) String

func (g *GetSnippetResponse) String() string

func (*GetSnippetResponse) UnmarshalJSON

func (g *GetSnippetResponse) UnmarshalJSON(data []byte) error

type GetSnippetsRequest added in v1.2.0

type GetSnippetsRequest struct {
	// The ID of the site that contains the snippet.
	SiteID string `json:"-" url:"-"`
}

type GetSubscriptionResponse

type GetSubscriptionResponse struct {
	// Errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The subscription retrieved.
	Subscription *Subscription `json:"subscription,omitempty" url:"subscription,omitempty"`
	// contains filtered or unexported fields
}

Defines output parameters in a response from the [RetrieveSubscription](api-endpoint:Subscriptions-RetrieveSubscription) endpoint.

func (*GetSubscriptionResponse) GetErrors

func (g *GetSubscriptionResponse) GetErrors() []*Error

func (*GetSubscriptionResponse) GetExtraProperties

func (g *GetSubscriptionResponse) GetExtraProperties() map[string]interface{}

func (*GetSubscriptionResponse) GetSubscription

func (g *GetSubscriptionResponse) GetSubscription() *Subscription

func (*GetSubscriptionResponse) String

func (g *GetSubscriptionResponse) String() string

func (*GetSubscriptionResponse) UnmarshalJSON

func (g *GetSubscriptionResponse) UnmarshalJSON(data []byte) error

type GetSubscriptionsRequest added in v1.2.0

type GetSubscriptionsRequest struct {
	// The ID of the subscription to retrieve.
	SubscriptionID string `json:"-" url:"-"`
	// A query parameter to specify related information to be included in the response.
	//
	// The supported query parameter values are:
	//
	// - `actions`: to include scheduled actions on the targeted subscription.
	Include *string `json:"-" url:"include,omitempty"`
}

type GetTeamMemberBookingProfileResponse

type GetTeamMemberBookingProfileResponse struct {
	// The returned team member booking profile.
	TeamMemberBookingProfile *TeamMemberBookingProfile `json:"team_member_booking_profile,omitempty" url:"team_member_booking_profile,omitempty"`
	// Errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTeamMemberBookingProfileResponse) GetErrors

func (g *GetTeamMemberBookingProfileResponse) GetErrors() []*Error

func (*GetTeamMemberBookingProfileResponse) GetExtraProperties

func (g *GetTeamMemberBookingProfileResponse) GetExtraProperties() map[string]interface{}

func (*GetTeamMemberBookingProfileResponse) GetTeamMemberBookingProfile

func (g *GetTeamMemberBookingProfileResponse) GetTeamMemberBookingProfile() *TeamMemberBookingProfile

func (*GetTeamMemberBookingProfileResponse) String

func (*GetTeamMemberBookingProfileResponse) UnmarshalJSON

func (g *GetTeamMemberBookingProfileResponse) UnmarshalJSON(data []byte) error

type GetTeamMemberResponse

type GetTeamMemberResponse struct {
	// The successfully retrieved `TeamMember` object.
	TeamMember *TeamMember `json:"team_member,omitempty" url:"team_member,omitempty"`
	// The errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from a retrieve request containing a `TeamMember` object or error messages.

func (*GetTeamMemberResponse) GetErrors

func (g *GetTeamMemberResponse) GetErrors() []*Error

func (*GetTeamMemberResponse) GetExtraProperties

func (g *GetTeamMemberResponse) GetExtraProperties() map[string]interface{}

func (*GetTeamMemberResponse) GetTeamMember

func (g *GetTeamMemberResponse) GetTeamMember() *TeamMember

func (*GetTeamMemberResponse) String

func (g *GetTeamMemberResponse) String() string

func (*GetTeamMemberResponse) UnmarshalJSON

func (g *GetTeamMemberResponse) UnmarshalJSON(data []byte) error

type GetTeamMemberWageResponse

type GetTeamMemberWageResponse struct {
	// The requested `TeamMemberWage` object.
	TeamMemberWage *TeamMemberWage `json:"team_member_wage,omitempty" url:"team_member_wage,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

A response to a request to get a `TeamMemberWage`. The response contains the requested `TeamMemberWage` objects and might contain a set of `Error` objects if the request resulted in errors.

func (*GetTeamMemberWageResponse) GetErrors

func (g *GetTeamMemberWageResponse) GetErrors() []*Error

func (*GetTeamMemberWageResponse) GetExtraProperties

func (g *GetTeamMemberWageResponse) GetExtraProperties() map[string]interface{}

func (*GetTeamMemberWageResponse) GetTeamMemberWage

func (g *GetTeamMemberWageResponse) GetTeamMemberWage() *TeamMemberWage

func (*GetTeamMemberWageResponse) String

func (g *GetTeamMemberWageResponse) String() string

func (*GetTeamMemberWageResponse) UnmarshalJSON

func (g *GetTeamMemberWageResponse) UnmarshalJSON(data []byte) error

type GetTeamMembersRequest added in v1.2.0

type GetTeamMembersRequest struct {
	// The ID of the team member to retrieve.
	TeamMemberID string `json:"-" url:"-"`
}

type GetTerminalActionResponse

type GetTerminalActionResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested `TerminalAction`
	Action *TerminalAction `json:"action,omitempty" url:"action,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTerminalActionResponse) GetAction

func (g *GetTerminalActionResponse) GetAction() *TerminalAction

func (*GetTerminalActionResponse) GetErrors

func (g *GetTerminalActionResponse) GetErrors() []*Error

func (*GetTerminalActionResponse) GetExtraProperties

func (g *GetTerminalActionResponse) GetExtraProperties() map[string]interface{}

func (*GetTerminalActionResponse) String

func (g *GetTerminalActionResponse) String() string

func (*GetTerminalActionResponse) UnmarshalJSON

func (g *GetTerminalActionResponse) UnmarshalJSON(data []byte) error

type GetTerminalCheckoutResponse

type GetTerminalCheckoutResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested `TerminalCheckout`.
	Checkout *TerminalCheckout `json:"checkout,omitempty" url:"checkout,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTerminalCheckoutResponse) GetCheckout

func (*GetTerminalCheckoutResponse) GetErrors

func (g *GetTerminalCheckoutResponse) GetErrors() []*Error

func (*GetTerminalCheckoutResponse) GetExtraProperties

func (g *GetTerminalCheckoutResponse) GetExtraProperties() map[string]interface{}

func (*GetTerminalCheckoutResponse) String

func (g *GetTerminalCheckoutResponse) String() string

func (*GetTerminalCheckoutResponse) UnmarshalJSON

func (g *GetTerminalCheckoutResponse) UnmarshalJSON(data []byte) error

type GetTerminalRefundResponse

type GetTerminalRefundResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested `Refund`.
	Refund *TerminalRefund `json:"refund,omitempty" url:"refund,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTerminalRefundResponse) GetErrors

func (g *GetTerminalRefundResponse) GetErrors() []*Error

func (*GetTerminalRefundResponse) GetExtraProperties

func (g *GetTerminalRefundResponse) GetExtraProperties() map[string]interface{}

func (*GetTerminalRefundResponse) GetRefund

func (g *GetTerminalRefundResponse) GetRefund() *TerminalRefund

func (*GetTerminalRefundResponse) String

func (g *GetTerminalRefundResponse) String() string

func (*GetTerminalRefundResponse) UnmarshalJSON

func (g *GetTerminalRefundResponse) UnmarshalJSON(data []byte) error

type GetTransactionResponse

type GetTransactionResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested transaction.
	Transaction *Transaction `json:"transaction,omitempty" url:"transaction,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [RetrieveTransaction](api-endpoint:Transactions-RetrieveTransaction) endpoint.

One of `errors` or `transaction` is present in a given response (never both).

func (*GetTransactionResponse) GetErrors

func (g *GetTransactionResponse) GetErrors() []*Error

func (*GetTransactionResponse) GetExtraProperties

func (g *GetTransactionResponse) GetExtraProperties() map[string]interface{}

func (*GetTransactionResponse) GetTransaction

func (g *GetTransactionResponse) GetTransaction() *Transaction

func (*GetTransactionResponse) String

func (g *GetTransactionResponse) String() string

func (*GetTransactionResponse) UnmarshalJSON

func (g *GetTransactionResponse) UnmarshalJSON(data []byte) error

type GetTransferInventoryRequest added in v1.2.0

type GetTransferInventoryRequest struct {
	// ID of the [InventoryTransfer](entity:InventoryTransfer) to retrieve.
	TransferID string `json:"-" url:"-"`
}

type GetVendorResponse

type GetVendorResponse struct {
	// Errors encountered when the request fails.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The successfully retrieved [Vendor](entity:Vendor) object.
	Vendor *Vendor `json:"vendor,omitempty" url:"vendor,omitempty"`
	// contains filtered or unexported fields
}

Represents an output from a call to [RetrieveVendor](api-endpoint:Vendors-RetrieveVendor).

func (*GetVendorResponse) GetErrors

func (g *GetVendorResponse) GetErrors() []*Error

func (*GetVendorResponse) GetExtraProperties

func (g *GetVendorResponse) GetExtraProperties() map[string]interface{}

func (*GetVendorResponse) GetVendor

func (g *GetVendorResponse) GetVendor() *Vendor

func (*GetVendorResponse) String

func (g *GetVendorResponse) String() string

func (*GetVendorResponse) UnmarshalJSON

func (g *GetVendorResponse) UnmarshalJSON(data []byte) error

type GetVendorsRequest added in v1.2.0

type GetVendorsRequest struct {
	// ID of the [Vendor](entity:Vendor) to retrieve.
	VendorID string `json:"-" url:"-"`
}

type GetWageSettingResponse

type GetWageSettingResponse struct {
	// The successfully retrieved `WageSetting` object.
	WageSetting *WageSetting `json:"wage_setting,omitempty" url:"wage_setting,omitempty"`
	// The errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from a retrieve request containing the specified `WageSetting` object or error messages.

func (*GetWageSettingResponse) GetErrors

func (g *GetWageSettingResponse) GetErrors() []*Error

func (*GetWageSettingResponse) GetExtraProperties

func (g *GetWageSettingResponse) GetExtraProperties() map[string]interface{}

func (*GetWageSettingResponse) GetWageSetting

func (g *GetWageSettingResponse) GetWageSetting() *WageSetting

func (*GetWageSettingResponse) String

func (g *GetWageSettingResponse) String() string

func (*GetWageSettingResponse) UnmarshalJSON

func (g *GetWageSettingResponse) UnmarshalJSON(data []byte) error

type GetWebhookSubscriptionResponse

type GetWebhookSubscriptionResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested [Subscription](entity:WebhookSubscription).
	Subscription *WebhookSubscription `json:"subscription,omitempty" url:"subscription,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [RetrieveWebhookSubscription](api-endpoint:WebhookSubscriptions-RetrieveWebhookSubscription) endpoint.

Note: if there are errors processing the request, the Subscription(entity:WebhookSubscription) will not be present.

func (*GetWebhookSubscriptionResponse) GetErrors

func (g *GetWebhookSubscriptionResponse) GetErrors() []*Error

func (*GetWebhookSubscriptionResponse) GetExtraProperties

func (g *GetWebhookSubscriptionResponse) GetExtraProperties() map[string]interface{}

func (*GetWebhookSubscriptionResponse) GetSubscription

func (*GetWebhookSubscriptionResponse) String

func (*GetWebhookSubscriptionResponse) UnmarshalJSON

func (g *GetWebhookSubscriptionResponse) UnmarshalJSON(data []byte) error

type GiftCard

type GiftCard struct {
	// The Square-assigned ID of the gift card.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The gift card type.
	// See [Type](#type-type) for possible values
	Type GiftCardType `json:"type" url:"type"`
	// The source that generated the gift card account number (GAN). The default value is `SQUARE`.
	// See [GANSource](#type-gansource) for possible values
	GanSource *GiftCardGanSource `json:"gan_source,omitempty" url:"gan_source,omitempty"`
	// The current gift card state.
	// See [Status](#type-status) for possible values
	State *GiftCardStatus `json:"state,omitempty" url:"state,omitempty"`
	// The current gift card balance. This balance is always greater than or equal to zero.
	BalanceMoney *Money `json:"balance_money,omitempty" url:"balance_money,omitempty"`
	// The gift card account number (GAN). Buyers can use the GAN to make purchases or check
	// the gift card balance.
	Gan *string `json:"gan,omitempty" url:"gan,omitempty"`
	// The timestamp when the gift card was created, in RFC 3339 format.
	// In the case of a digital gift card, it is the time when you create a card
	// (using the Square Point of Sale application, Seller Dashboard, or Gift Cards API).
	// In the case of a plastic gift card, it is the time when Square associates the card with the
	// seller at the time of activation.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The IDs of the [customer profiles](entity:Customer) to whom this gift card is linked.
	CustomerIDs []string `json:"customer_ids,omitempty" url:"customer_ids,omitempty"`
	// contains filtered or unexported fields
}

Represents a Square gift card.

func (*GiftCard) GetBalanceMoney

func (g *GiftCard) GetBalanceMoney() *Money

func (*GiftCard) GetCreatedAt

func (g *GiftCard) GetCreatedAt() *string

func (*GiftCard) GetCustomerIDs

func (g *GiftCard) GetCustomerIDs() []string

func (*GiftCard) GetExtraProperties

func (g *GiftCard) GetExtraProperties() map[string]interface{}

func (*GiftCard) GetGan

func (g *GiftCard) GetGan() *string

func (*GiftCard) GetGanSource

func (g *GiftCard) GetGanSource() *GiftCardGanSource

func (*GiftCard) GetID

func (g *GiftCard) GetID() *string

func (*GiftCard) GetState

func (g *GiftCard) GetState() *GiftCardStatus

func (*GiftCard) GetType

func (g *GiftCard) GetType() GiftCardType

func (*GiftCard) String

func (g *GiftCard) String() string

func (*GiftCard) UnmarshalJSON

func (g *GiftCard) UnmarshalJSON(data []byte) error

type GiftCardActivity

type GiftCardActivity struct {
	// The Square-assigned ID of the gift card activity.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The type of gift card activity.
	// See [Type](#type-type) for possible values
	Type GiftCardActivityType `json:"type" url:"type"`
	// The ID of the [business location](entity:Location) where the activity occurred.
	LocationID string `json:"location_id" url:"location_id"`
	// The timestamp when the gift card activity was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The gift card ID. When creating a gift card activity, `gift_card_id` is not required if
	// `gift_card_gan` is specified.
	GiftCardID *string `json:"gift_card_id,omitempty" url:"gift_card_id,omitempty"`
	// The gift card account number (GAN). When creating a gift card activity, `gift_card_gan`
	// is not required if `gift_card_id` is specified.
	GiftCardGan *string `json:"gift_card_gan,omitempty" url:"gift_card_gan,omitempty"`
	// The final balance on the gift card after the action is completed.
	GiftCardBalanceMoney *Money `json:"gift_card_balance_money,omitempty" url:"gift_card_balance_money,omitempty"`
	// Additional details about a `LOAD` activity, which is used to reload money onto a gift card.
	LoadActivityDetails *GiftCardActivityLoad `json:"load_activity_details,omitempty" url:"load_activity_details,omitempty"`
	// Additional details about an `ACTIVATE` activity, which is used to activate a gift card with
	// an initial balance.
	ActivateActivityDetails *GiftCardActivityActivate `json:"activate_activity_details,omitempty" url:"activate_activity_details,omitempty"`
	// Additional details about a `REDEEM` activity, which is used to redeem a gift card for a purchase.
	//
	// For applications that process payments using the Square Payments API, Square creates a `REDEEM` activity that
	// updates the gift card balance after the corresponding [CreatePayment](api-endpoint:Payments-CreatePayment)
	// request is completed. Applications that use a custom payment processing system must call
	// [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) to create the `REDEEM` activity.
	RedeemActivityDetails *GiftCardActivityRedeem `json:"redeem_activity_details,omitempty" url:"redeem_activity_details,omitempty"`
	// Additional details about a `CLEAR_BALANCE` activity, which is used to set the balance of a gift card to zero.
	ClearBalanceActivityDetails *GiftCardActivityClearBalance `json:"clear_balance_activity_details,omitempty" url:"clear_balance_activity_details,omitempty"`
	// Additional details about a `DEACTIVATE` activity, which is used to deactivate a gift card.
	DeactivateActivityDetails *GiftCardActivityDeactivate `json:"deactivate_activity_details,omitempty" url:"deactivate_activity_details,omitempty"`
	// Additional details about an `ADJUST_INCREMENT` activity, which is used to add money to a gift card
	// outside of a typical `ACTIVATE`, `LOAD`, or `REFUND` activity flow.
	AdjustIncrementActivityDetails *GiftCardActivityAdjustIncrement `json:"adjust_increment_activity_details,omitempty" url:"adjust_increment_activity_details,omitempty"`
	// Additional details about an `ADJUST_DECREMENT` activity, which is used to deduct money from a gift
	// card outside of a typical `REDEEM` activity flow.
	AdjustDecrementActivityDetails *GiftCardActivityAdjustDecrement `json:"adjust_decrement_activity_details,omitempty" url:"adjust_decrement_activity_details,omitempty"`
	// Additional details about a `REFUND` activity, which is used to add money to a gift card when
	// refunding a payment.
	//
	// For applications that refund payments to a gift card using the Square Refunds API, Square automatically
	// creates a `REFUND` activity that updates the gift card balance after a [RefundPayment](api-endpoint:Refunds-RefundPayment)
	// request is completed. Applications that use a custom processing system must call
	// [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) to create the `REFUND` activity.
	RefundActivityDetails *GiftCardActivityRefund `json:"refund_activity_details,omitempty" url:"refund_activity_details,omitempty"`
	// Additional details about an `UNLINKED_ACTIVITY_REFUND` activity. This activity is used to add money
	// to a gift card when refunding a payment that was processed using a custom payment processing system
	// and not linked to the gift card.
	UnlinkedActivityRefundActivityDetails *GiftCardActivityUnlinkedActivityRefund `json:"unlinked_activity_refund_activity_details,omitempty" url:"unlinked_activity_refund_activity_details,omitempty"`
	// Additional details about an `IMPORT` activity, which Square uses to import a third-party
	// gift card with a balance.
	ImportActivityDetails *GiftCardActivityImport `json:"import_activity_details,omitempty" url:"import_activity_details,omitempty"`
	// Additional details about a `BLOCK` activity, which Square uses to temporarily block a gift card.
	BlockActivityDetails *GiftCardActivityBlock `json:"block_activity_details,omitempty" url:"block_activity_details,omitempty"`
	// Additional details about an `UNBLOCK` activity, which Square uses to unblock a gift card.
	UnblockActivityDetails *GiftCardActivityUnblock `json:"unblock_activity_details,omitempty" url:"unblock_activity_details,omitempty"`
	// Additional details about an `IMPORT_REVERSAL` activity, which Square uses to reverse the
	// import of a third-party gift card.
	ImportReversalActivityDetails *GiftCardActivityImportReversal `json:"import_reversal_activity_details,omitempty" url:"import_reversal_activity_details,omitempty"`
	// Additional details about a `TRANSFER_BALANCE_TO` activity, which Square uses to add money to
	// a gift card as the result of a transfer from another gift card.
	TransferBalanceToActivityDetails *GiftCardActivityTransferBalanceTo `json:"transfer_balance_to_activity_details,omitempty" url:"transfer_balance_to_activity_details,omitempty"`
	// Additional details about a `TRANSFER_BALANCE_FROM` activity, which Square uses to deduct money from
	// a gift as the result of a transfer to another gift card.
	TransferBalanceFromActivityDetails *GiftCardActivityTransferBalanceFrom `json:"transfer_balance_from_activity_details,omitempty" url:"transfer_balance_from_activity_details,omitempty"`
	// contains filtered or unexported fields
}

Represents an action performed on a [gift card](entity:GiftCard) that affects its state or balance. A gift card activity contains information about a specific activity type. For example, a `REDEEM` activity includes a `redeem_activity_details` field that contains information about the redemption.

func (*GiftCardActivity) GetActivateActivityDetails

func (g *GiftCardActivity) GetActivateActivityDetails() *GiftCardActivityActivate

func (*GiftCardActivity) GetAdjustDecrementActivityDetails

func (g *GiftCardActivity) GetAdjustDecrementActivityDetails() *GiftCardActivityAdjustDecrement

func (*GiftCardActivity) GetAdjustIncrementActivityDetails

func (g *GiftCardActivity) GetAdjustIncrementActivityDetails() *GiftCardActivityAdjustIncrement

func (*GiftCardActivity) GetBlockActivityDetails

func (g *GiftCardActivity) GetBlockActivityDetails() *GiftCardActivityBlock

func (*GiftCardActivity) GetClearBalanceActivityDetails

func (g *GiftCardActivity) GetClearBalanceActivityDetails() *GiftCardActivityClearBalance

func (*GiftCardActivity) GetCreatedAt

func (g *GiftCardActivity) GetCreatedAt() *string

func (*GiftCardActivity) GetDeactivateActivityDetails

func (g *GiftCardActivity) GetDeactivateActivityDetails() *GiftCardActivityDeactivate

func (*GiftCardActivity) GetExtraProperties

func (g *GiftCardActivity) GetExtraProperties() map[string]interface{}

func (*GiftCardActivity) GetGiftCardBalanceMoney

func (g *GiftCardActivity) GetGiftCardBalanceMoney() *Money

func (*GiftCardActivity) GetGiftCardGan

func (g *GiftCardActivity) GetGiftCardGan() *string

func (*GiftCardActivity) GetGiftCardID

func (g *GiftCardActivity) GetGiftCardID() *string

func (*GiftCardActivity) GetID

func (g *GiftCardActivity) GetID() *string

func (*GiftCardActivity) GetImportActivityDetails

func (g *GiftCardActivity) GetImportActivityDetails() *GiftCardActivityImport

func (*GiftCardActivity) GetImportReversalActivityDetails

func (g *GiftCardActivity) GetImportReversalActivityDetails() *GiftCardActivityImportReversal

func (*GiftCardActivity) GetLoadActivityDetails

func (g *GiftCardActivity) GetLoadActivityDetails() *GiftCardActivityLoad

func (*GiftCardActivity) GetLocationID

func (g *GiftCardActivity) GetLocationID() string

func (*GiftCardActivity) GetRedeemActivityDetails

func (g *GiftCardActivity) GetRedeemActivityDetails() *GiftCardActivityRedeem

func (*GiftCardActivity) GetRefundActivityDetails

func (g *GiftCardActivity) GetRefundActivityDetails() *GiftCardActivityRefund

func (*GiftCardActivity) GetTransferBalanceFromActivityDetails

func (g *GiftCardActivity) GetTransferBalanceFromActivityDetails() *GiftCardActivityTransferBalanceFrom

func (*GiftCardActivity) GetTransferBalanceToActivityDetails

func (g *GiftCardActivity) GetTransferBalanceToActivityDetails() *GiftCardActivityTransferBalanceTo

func (*GiftCardActivity) GetType

func (*GiftCardActivity) GetUnblockActivityDetails

func (g *GiftCardActivity) GetUnblockActivityDetails() *GiftCardActivityUnblock

func (*GiftCardActivity) GetUnlinkedActivityRefundActivityDetails

func (g *GiftCardActivity) GetUnlinkedActivityRefundActivityDetails() *GiftCardActivityUnlinkedActivityRefund

func (*GiftCardActivity) String

func (g *GiftCardActivity) String() string

func (*GiftCardActivity) UnmarshalJSON

func (g *GiftCardActivity) UnmarshalJSON(data []byte) error

type GiftCardActivityActivate

type GiftCardActivityActivate struct {
	// The amount added to the gift card. This value is a positive integer.
	//
	// Applications that use a custom order processing system must specify this amount in the
	// [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// The ID of the [order](entity:Order) that contains the `GIFT_CARD` line item.
	//
	// Applications that use the Square Orders API to process orders must specify the order ID
	// [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.
	OrderID *string `json:"order_id,omitempty" url:"order_id,omitempty"`
	// The UID of the `GIFT_CARD` line item in the order that represents the gift card purchase.
	//
	// Applications that use the Square Orders API to process orders must specify the line item UID
	// in the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.
	LineItemUID *string `json:"line_item_uid,omitempty" url:"line_item_uid,omitempty"`
	// A client-specified ID that associates the gift card activity with an entity in another system.
	//
	// Applications that use a custom order processing system can use this field to track information
	// related to an order or payment.
	ReferenceID *string `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// The payment instrument IDs used to process the gift card purchase, such as a credit card ID
	// or bank account ID.
	//
	// Applications that use a custom order processing system must specify payment instrument IDs in
	// the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.
	// Square uses this information to perform compliance checks.
	//
	// For applications that use the Square Orders API to process payments, Square has the necessary
	// instrument IDs to perform compliance checks.
	//
	// Each buyer payment instrument ID can contain a maximum of 255 characters.
	BuyerPaymentInstrumentIDs []string `json:"buyer_payment_instrument_ids,omitempty" url:"buyer_payment_instrument_ids,omitempty"`
	// contains filtered or unexported fields
}

Represents details about an `ACTIVATE` [gift card activity type](entity:GiftCardActivityType).

func (*GiftCardActivityActivate) GetAmountMoney

func (g *GiftCardActivityActivate) GetAmountMoney() *Money

func (*GiftCardActivityActivate) GetBuyerPaymentInstrumentIDs

func (g *GiftCardActivityActivate) GetBuyerPaymentInstrumentIDs() []string

func (*GiftCardActivityActivate) GetExtraProperties

func (g *GiftCardActivityActivate) GetExtraProperties() map[string]interface{}

func (*GiftCardActivityActivate) GetLineItemUID

func (g *GiftCardActivityActivate) GetLineItemUID() *string

func (*GiftCardActivityActivate) GetOrderID

func (g *GiftCardActivityActivate) GetOrderID() *string

func (*GiftCardActivityActivate) GetReferenceID

func (g *GiftCardActivityActivate) GetReferenceID() *string

func (*GiftCardActivityActivate) String

func (g *GiftCardActivityActivate) String() string

func (*GiftCardActivityActivate) UnmarshalJSON

func (g *GiftCardActivityActivate) UnmarshalJSON(data []byte) error

type GiftCardActivityAdjustDecrement

type GiftCardActivityAdjustDecrement struct {
	// The amount deducted from the gift card balance. This value is a positive integer.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// The reason the gift card balance was adjusted.
	// See [Reason](#type-reason) for possible values
	Reason GiftCardActivityAdjustDecrementReason `json:"reason" url:"reason"`
	// contains filtered or unexported fields
}

Represents details about an `ADJUST_DECREMENT` [gift card activity type](entity:GiftCardActivityType).

func (*GiftCardActivityAdjustDecrement) GetAmountMoney

func (g *GiftCardActivityAdjustDecrement) GetAmountMoney() *Money

func (*GiftCardActivityAdjustDecrement) GetExtraProperties

func (g *GiftCardActivityAdjustDecrement) GetExtraProperties() map[string]interface{}

func (*GiftCardActivityAdjustDecrement) GetReason

func (*GiftCardActivityAdjustDecrement) String

func (*GiftCardActivityAdjustDecrement) UnmarshalJSON

func (g *GiftCardActivityAdjustDecrement) UnmarshalJSON(data []byte) error

type GiftCardActivityAdjustDecrementReason

type GiftCardActivityAdjustDecrementReason string

Indicates the reason for deducting money from a [gift card](entity:GiftCard).

const (
	GiftCardActivityAdjustDecrementReasonSuspiciousActivity           GiftCardActivityAdjustDecrementReason = "SUSPICIOUS_ACTIVITY"
	GiftCardActivityAdjustDecrementReasonBalanceAccidentallyIncreased GiftCardActivityAdjustDecrementReason = "BALANCE_ACCIDENTALLY_INCREASED"
	GiftCardActivityAdjustDecrementReasonSupportIssue                 GiftCardActivityAdjustDecrementReason = "SUPPORT_ISSUE"
	GiftCardActivityAdjustDecrementReasonPurchaseWasRefunded          GiftCardActivityAdjustDecrementReason = "PURCHASE_WAS_REFUNDED"
)

func NewGiftCardActivityAdjustDecrementReasonFromString

func NewGiftCardActivityAdjustDecrementReasonFromString(s string) (GiftCardActivityAdjustDecrementReason, error)

func (GiftCardActivityAdjustDecrementReason) Ptr

type GiftCardActivityAdjustIncrement

type GiftCardActivityAdjustIncrement struct {
	// The amount added to the gift card balance. This value is a positive integer.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// The reason the gift card balance was adjusted.
	// See [Reason](#type-reason) for possible values
	Reason GiftCardActivityAdjustIncrementReason `json:"reason" url:"reason"`
	// contains filtered or unexported fields
}

Represents details about an `ADJUST_INCREMENT` [gift card activity type](entity:GiftCardActivityType).

func (*GiftCardActivityAdjustIncrement) GetAmountMoney

func (g *GiftCardActivityAdjustIncrement) GetAmountMoney() *Money

func (*GiftCardActivityAdjustIncrement) GetExtraProperties

func (g *GiftCardActivityAdjustIncrement) GetExtraProperties() map[string]interface{}

func (*GiftCardActivityAdjustIncrement) GetReason

func (*GiftCardActivityAdjustIncrement) String

func (*GiftCardActivityAdjustIncrement) UnmarshalJSON

func (g *GiftCardActivityAdjustIncrement) UnmarshalJSON(data []byte) error

type GiftCardActivityAdjustIncrementReason

type GiftCardActivityAdjustIncrementReason string

Indicates the reason for adding money to a [gift card](entity:GiftCard).

const (
	GiftCardActivityAdjustIncrementReasonComplimentary     GiftCardActivityAdjustIncrementReason = "COMPLIMENTARY"
	GiftCardActivityAdjustIncrementReasonSupportIssue      GiftCardActivityAdjustIncrementReason = "SUPPORT_ISSUE"
	GiftCardActivityAdjustIncrementReasonTransactionVoided GiftCardActivityAdjustIncrementReason = "TRANSACTION_VOIDED"
)

func NewGiftCardActivityAdjustIncrementReasonFromString

func NewGiftCardActivityAdjustIncrementReasonFromString(s string) (GiftCardActivityAdjustIncrementReason, error)

func (GiftCardActivityAdjustIncrementReason) Ptr

type GiftCardActivityBlock

type GiftCardActivityBlock struct {
	// The reason the gift card was blocked.
	// See [Reason](#type-reason) for possible values
	Reason GiftCardActivityBlockReason `json:"reason,omitempty" url:"reason,omitempty"`
	// contains filtered or unexported fields
}

Represents details about a `BLOCK` [gift card activity type](entity:GiftCardActivityType).

func (*GiftCardActivityBlock) GetExtraProperties

func (g *GiftCardActivityBlock) GetExtraProperties() map[string]interface{}

func (*GiftCardActivityBlock) String

func (g *GiftCardActivityBlock) String() string

func (*GiftCardActivityBlock) UnmarshalJSON

func (g *GiftCardActivityBlock) UnmarshalJSON(data []byte) error

type GiftCardActivityBlockReason

type GiftCardActivityBlockReason = string

Indicates the reason for blocking a [gift card](entity:GiftCard).

type GiftCardActivityClearBalance

type GiftCardActivityClearBalance struct {
	// The reason the gift card balance was cleared.
	// See [Reason](#type-reason) for possible values
	Reason GiftCardActivityClearBalanceReason `json:"reason" url:"reason"`
	// contains filtered or unexported fields
}

Represents details about a `CLEAR_BALANCE` [gift card activity type](entity:GiftCardActivityType).

func (*GiftCardActivityClearBalance) GetExtraProperties

func (g *GiftCardActivityClearBalance) GetExtraProperties() map[string]interface{}

func (*GiftCardActivityClearBalance) GetReason

func (*GiftCardActivityClearBalance) String

func (*GiftCardActivityClearBalance) UnmarshalJSON

func (g *GiftCardActivityClearBalance) UnmarshalJSON(data []byte) error

type GiftCardActivityClearBalanceReason

type GiftCardActivityClearBalanceReason string

Indicates the reason for clearing the balance of a [gift card](entity:GiftCard).

const (
	GiftCardActivityClearBalanceReasonSuspiciousActivity GiftCardActivityClearBalanceReason = "SUSPICIOUS_ACTIVITY"
	GiftCardActivityClearBalanceReasonReuseGiftcard      GiftCardActivityClearBalanceReason = "REUSE_GIFTCARD"
	GiftCardActivityClearBalanceReasonUnknownReason      GiftCardActivityClearBalanceReason = "UNKNOWN_REASON"
)

func NewGiftCardActivityClearBalanceReasonFromString

func NewGiftCardActivityClearBalanceReasonFromString(s string) (GiftCardActivityClearBalanceReason, error)

func (GiftCardActivityClearBalanceReason) Ptr

type GiftCardActivityDeactivate

type GiftCardActivityDeactivate struct {
	// The reason the gift card was deactivated.
	// See [Reason](#type-reason) for possible values
	Reason GiftCardActivityDeactivateReason `json:"reason" url:"reason"`
	// contains filtered or unexported fields
}

Represents details about a `DEACTIVATE` [gift card activity type](entity:GiftCardActivityType).

func (*GiftCardActivityDeactivate) GetExtraProperties

func (g *GiftCardActivityDeactivate) GetExtraProperties() map[string]interface{}

func (*GiftCardActivityDeactivate) GetReason

func (*GiftCardActivityDeactivate) String

func (g *GiftCardActivityDeactivate) String() string

func (*GiftCardActivityDeactivate) UnmarshalJSON

func (g *GiftCardActivityDeactivate) UnmarshalJSON(data []byte) error

type GiftCardActivityDeactivateReason

type GiftCardActivityDeactivateReason string

Indicates the reason for deactivating a [gift card](entity:GiftCard).

const (
	GiftCardActivityDeactivateReasonSuspiciousActivity   GiftCardActivityDeactivateReason = "SUSPICIOUS_ACTIVITY"
	GiftCardActivityDeactivateReasonUnknownReason        GiftCardActivityDeactivateReason = "UNKNOWN_REASON"
	GiftCardActivityDeactivateReasonChargebackDeactivate GiftCardActivityDeactivateReason = "CHARGEBACK_DEACTIVATE"
)

func NewGiftCardActivityDeactivateReasonFromString

func NewGiftCardActivityDeactivateReasonFromString(s string) (GiftCardActivityDeactivateReason, error)

func (GiftCardActivityDeactivateReason) Ptr

type GiftCardActivityImport

type GiftCardActivityImport struct {
	// The balance amount on the imported gift card.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// contains filtered or unexported fields
}

Represents details about an `IMPORT` [gift card activity type](entity:GiftCardActivityType). This activity type is used when Square imports a third-party gift card, in which case the `gan_source` of the gift card is set to `OTHER`.

func (*GiftCardActivityImport) GetAmountMoney

func (g *GiftCardActivityImport) GetAmountMoney() *Money

func (*GiftCardActivityImport) GetExtraProperties

func (g *GiftCardActivityImport) GetExtraProperties() map[string]interface{}

func (*GiftCardActivityImport) String

func (g *GiftCardActivityImport) String() string

func (*GiftCardActivityImport) UnmarshalJSON

func (g *GiftCardActivityImport) UnmarshalJSON(data []byte) error

type GiftCardActivityImportReversal

type GiftCardActivityImportReversal struct {
	// The amount of money cleared from the third-party gift card when
	// the import was reversed.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// contains filtered or unexported fields
}

Represents details about an `IMPORT_REVERSAL` [gift card activity type](entity:GiftCardActivityType).

func (*GiftCardActivityImportReversal) GetAmountMoney

func (g *GiftCardActivityImportReversal) GetAmountMoney() *Money

func (*GiftCardActivityImportReversal) GetExtraProperties

func (g *GiftCardActivityImportReversal) GetExtraProperties() map[string]interface{}

func (*GiftCardActivityImportReversal) String

func (*GiftCardActivityImportReversal) UnmarshalJSON

func (g *GiftCardActivityImportReversal) UnmarshalJSON(data []byte) error

type GiftCardActivityLoad

type GiftCardActivityLoad struct {
	// The amount added to the gift card. This value is a positive integer.
	//
	// Applications that use a custom order processing system must specify this amount in the
	// [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// The ID of the [order](entity:Order) that contains the `GIFT_CARD` line item.
	//
	// Applications that use the Square Orders API to process orders must specify the order ID in the
	// [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.
	OrderID *string `json:"order_id,omitempty" url:"order_id,omitempty"`
	// The UID of the `GIFT_CARD` line item in the order that represents the additional funds for the gift card.
	//
	// Applications that use the Square Orders API to process orders must specify the line item UID
	// in the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.
	LineItemUID *string `json:"line_item_uid,omitempty" url:"line_item_uid,omitempty"`
	// A client-specified ID that associates the gift card activity with an entity in another system.
	//
	// Applications that use a custom order processing system can use this field to track information related to
	// an order or payment.
	ReferenceID *string `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// The payment instrument IDs used to process the order for the additional funds, such as a credit card ID
	// or bank account ID.
	//
	// Applications that use a custom order processing system must specify payment instrument IDs in
	// the [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.
	// Square uses this information to perform compliance checks.
	//
	// For applications that use the Square Orders API to process payments, Square has the necessary
	// instrument IDs to perform compliance checks.
	//
	// Each buyer payment instrument ID can contain a maximum of 255 characters.
	BuyerPaymentInstrumentIDs []string `json:"buyer_payment_instrument_ids,omitempty" url:"buyer_payment_instrument_ids,omitempty"`
	// contains filtered or unexported fields
}

Represents details about a `LOAD` [gift card activity type](entity:GiftCardActivityType).

func (*GiftCardActivityLoad) GetAmountMoney

func (g *GiftCardActivityLoad) GetAmountMoney() *Money

func (*GiftCardActivityLoad) GetBuyerPaymentInstrumentIDs

func (g *GiftCardActivityLoad) GetBuyerPaymentInstrumentIDs() []string

func (*GiftCardActivityLoad) GetExtraProperties

func (g *GiftCardActivityLoad) GetExtraProperties() map[string]interface{}

func (*GiftCardActivityLoad) GetLineItemUID

func (g *GiftCardActivityLoad) GetLineItemUID() *string

func (*GiftCardActivityLoad) GetOrderID

func (g *GiftCardActivityLoad) GetOrderID() *string

func (*GiftCardActivityLoad) GetReferenceID

func (g *GiftCardActivityLoad) GetReferenceID() *string

func (*GiftCardActivityLoad) String

func (g *GiftCardActivityLoad) String() string

func (*GiftCardActivityLoad) UnmarshalJSON

func (g *GiftCardActivityLoad) UnmarshalJSON(data []byte) error

type GiftCardActivityRedeem

type GiftCardActivityRedeem struct {
	// The amount deducted from the gift card for the redemption. This value is a positive integer.
	//
	// Applications that use a custom payment processing system must specify this amount in the
	// [CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) request.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// The ID of the payment that represents the gift card redemption. Square populates this field
	// if the payment was processed by Square.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// A client-specified ID that associates the gift card activity with an entity in another system.
	//
	// Applications that use a custom payment processing system can use this field to track information
	// related to an order or payment.
	ReferenceID *string `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// The status of the gift card redemption. Gift cards redeemed from Square Point of Sale or the
	// Square Seller Dashboard use a two-state process: `PENDING`
	// to `COMPLETED` or `PENDING` to  `CANCELED`. Gift cards redeemed using the Gift Card Activities API
	// always have a `COMPLETED` status.
	// See [Status](#type-status) for possible values
	Status *GiftCardActivityRedeemStatus `json:"status,omitempty" url:"status,omitempty"`
	// contains filtered or unexported fields
}

Represents details about a `REDEEM` [gift card activity type](entity:GiftCardActivityType).

func (*GiftCardActivityRedeem) GetAmountMoney

func (g *GiftCardActivityRedeem) GetAmountMoney() *Money

func (*GiftCardActivityRedeem) GetExtraProperties

func (g *GiftCardActivityRedeem) GetExtraProperties() map[string]interface{}

func (*GiftCardActivityRedeem) GetPaymentID

func (g *GiftCardActivityRedeem) GetPaymentID() *string

func (*GiftCardActivityRedeem) GetReferenceID

func (g *GiftCardActivityRedeem) GetReferenceID() *string

func (*GiftCardActivityRedeem) GetStatus

func (*GiftCardActivityRedeem) String

func (g *GiftCardActivityRedeem) String() string

func (*GiftCardActivityRedeem) UnmarshalJSON

func (g *GiftCardActivityRedeem) UnmarshalJSON(data []byte) error

type GiftCardActivityRedeemStatus

type GiftCardActivityRedeemStatus string

Indicates the status of a [gift card](entity:GiftCard) redemption. This status is relevant only for redemptions made from Square products (such as Square Point of Sale) because Square products use a two-state process. Gift cards redeemed using the Gift Card Activities API always have a `COMPLETED` status.

const (
	GiftCardActivityRedeemStatusPending   GiftCardActivityRedeemStatus = "PENDING"
	GiftCardActivityRedeemStatusCompleted GiftCardActivityRedeemStatus = "COMPLETED"
	GiftCardActivityRedeemStatusCanceled  GiftCardActivityRedeemStatus = "CANCELED"
)

func NewGiftCardActivityRedeemStatusFromString

func NewGiftCardActivityRedeemStatusFromString(s string) (GiftCardActivityRedeemStatus, error)

func (GiftCardActivityRedeemStatus) Ptr

type GiftCardActivityRefund

type GiftCardActivityRefund struct {
	// The ID of the refunded `REDEEM` gift card activity. Square populates this field if the
	// `payment_id` in the corresponding [RefundPayment](api-endpoint:Refunds-RefundPayment) request
	// represents a gift card redemption.
	//
	// For applications that use a custom payment processing system, this field is required when creating
	// a `REFUND` activity. The provided `REDEEM` activity ID must be linked to the same gift card.
	RedeemActivityID *string `json:"redeem_activity_id,omitempty" url:"redeem_activity_id,omitempty"`
	// The amount added to the gift card for the refund. This value is a positive integer.
	//
	// This field is required when creating a `REFUND` activity. The amount can represent a full or partial refund.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// A client-specified ID that associates the gift card activity with an entity in another system.
	ReferenceID *string `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// The ID of the refunded payment. Square populates this field if the refund is for a
	// payment processed by Square. This field matches the `payment_id` in the corresponding
	// [RefundPayment](api-endpoint:Refunds-RefundPayment) request.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

Represents details about a `REFUND` [gift card activity type](entity:GiftCardActivityType).

func (*GiftCardActivityRefund) GetAmountMoney

func (g *GiftCardActivityRefund) GetAmountMoney() *Money

func (*GiftCardActivityRefund) GetExtraProperties

func (g *GiftCardActivityRefund) GetExtraProperties() map[string]interface{}

func (*GiftCardActivityRefund) GetPaymentID

func (g *GiftCardActivityRefund) GetPaymentID() *string

func (*GiftCardActivityRefund) GetRedeemActivityID

func (g *GiftCardActivityRefund) GetRedeemActivityID() *string

func (*GiftCardActivityRefund) GetReferenceID

func (g *GiftCardActivityRefund) GetReferenceID() *string

func (*GiftCardActivityRefund) String

func (g *GiftCardActivityRefund) String() string

func (*GiftCardActivityRefund) UnmarshalJSON

func (g *GiftCardActivityRefund) UnmarshalJSON(data []byte) error

type GiftCardActivityTransferBalanceFrom

type GiftCardActivityTransferBalanceFrom struct {
	// The ID of the gift card to which the specified amount was transferred.
	TransferToGiftCardID string `json:"transfer_to_gift_card_id" url:"transfer_to_gift_card_id"`
	// The amount deducted from the gift card for the transfer. This value is a positive integer.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// contains filtered or unexported fields
}

Represents details about a `TRANSFER_BALANCE_FROM` [gift card activity type](entity:GiftCardActivityType).

func (*GiftCardActivityTransferBalanceFrom) GetAmountMoney

func (g *GiftCardActivityTransferBalanceFrom) GetAmountMoney() *Money

func (*GiftCardActivityTransferBalanceFrom) GetExtraProperties

func (g *GiftCardActivityTransferBalanceFrom) GetExtraProperties() map[string]interface{}

func (*GiftCardActivityTransferBalanceFrom) GetTransferToGiftCardID

func (g *GiftCardActivityTransferBalanceFrom) GetTransferToGiftCardID() string

func (*GiftCardActivityTransferBalanceFrom) String

func (*GiftCardActivityTransferBalanceFrom) UnmarshalJSON

func (g *GiftCardActivityTransferBalanceFrom) UnmarshalJSON(data []byte) error

type GiftCardActivityTransferBalanceTo

type GiftCardActivityTransferBalanceTo struct {
	// The ID of the gift card from which the specified amount was transferred.
	TransferFromGiftCardID string `json:"transfer_from_gift_card_id" url:"transfer_from_gift_card_id"`
	// The amount added to the gift card balance for the transfer. This value is a positive integer.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// contains filtered or unexported fields
}

Represents details about a `TRANSFER_BALANCE_TO` [gift card activity type](entity:GiftCardActivityType).

func (*GiftCardActivityTransferBalanceTo) GetAmountMoney

func (g *GiftCardActivityTransferBalanceTo) GetAmountMoney() *Money

func (*GiftCardActivityTransferBalanceTo) GetExtraProperties

func (g *GiftCardActivityTransferBalanceTo) GetExtraProperties() map[string]interface{}

func (*GiftCardActivityTransferBalanceTo) GetTransferFromGiftCardID

func (g *GiftCardActivityTransferBalanceTo) GetTransferFromGiftCardID() string

func (*GiftCardActivityTransferBalanceTo) String

func (*GiftCardActivityTransferBalanceTo) UnmarshalJSON

func (g *GiftCardActivityTransferBalanceTo) UnmarshalJSON(data []byte) error

type GiftCardActivityType

type GiftCardActivityType string

Indicates the type of [gift card activity](entity:GiftCardActivity).

const (
	GiftCardActivityTypeActivate               GiftCardActivityType = "ACTIVATE"
	GiftCardActivityTypeLoad                   GiftCardActivityType = "LOAD"
	GiftCardActivityTypeRedeem                 GiftCardActivityType = "REDEEM"
	GiftCardActivityTypeClearBalance           GiftCardActivityType = "CLEAR_BALANCE"
	GiftCardActivityTypeDeactivate             GiftCardActivityType = "DEACTIVATE"
	GiftCardActivityTypeAdjustIncrement        GiftCardActivityType = "ADJUST_INCREMENT"
	GiftCardActivityTypeAdjustDecrement        GiftCardActivityType = "ADJUST_DECREMENT"
	GiftCardActivityTypeRefund                 GiftCardActivityType = "REFUND"
	GiftCardActivityTypeUnlinkedActivityRefund GiftCardActivityType = "UNLINKED_ACTIVITY_REFUND"
	GiftCardActivityTypeImport                 GiftCardActivityType = "IMPORT"
	GiftCardActivityTypeBlock                  GiftCardActivityType = "BLOCK"
	GiftCardActivityTypeUnblock                GiftCardActivityType = "UNBLOCK"
	GiftCardActivityTypeImportReversal         GiftCardActivityType = "IMPORT_REVERSAL"
	GiftCardActivityTypeTransferBalanceFrom    GiftCardActivityType = "TRANSFER_BALANCE_FROM"
	GiftCardActivityTypeTransferBalanceTo      GiftCardActivityType = "TRANSFER_BALANCE_TO"
)

func NewGiftCardActivityTypeFromString

func NewGiftCardActivityTypeFromString(s string) (GiftCardActivityType, error)

func (GiftCardActivityType) Ptr

type GiftCardActivityUnblock

type GiftCardActivityUnblock struct {
	// The reason the gift card was unblocked.
	// See [Reason](#type-reason) for possible values
	Reason GiftCardActivityUnblockReason `json:"reason,omitempty" url:"reason,omitempty"`
	// contains filtered or unexported fields
}

Represents details about an `UNBLOCK` [gift card activity type](entity:GiftCardActivityType).

func (*GiftCardActivityUnblock) GetExtraProperties

func (g *GiftCardActivityUnblock) GetExtraProperties() map[string]interface{}

func (*GiftCardActivityUnblock) String

func (g *GiftCardActivityUnblock) String() string

func (*GiftCardActivityUnblock) UnmarshalJSON

func (g *GiftCardActivityUnblock) UnmarshalJSON(data []byte) error

type GiftCardActivityUnblockReason

type GiftCardActivityUnblockReason = string

Indicates the reason for unblocking a [gift card](entity:GiftCard).

type GiftCardActivityUnlinkedActivityRefund

type GiftCardActivityUnlinkedActivityRefund struct {
	// The amount added to the gift card for the refund. This value is a positive integer.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// A client-specified ID that associates the gift card activity with an entity in another system.
	ReferenceID *string `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// The ID of the refunded payment. This field is not used starting in Square version 2022-06-16.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

Represents details about an `UNLINKED_ACTIVITY_REFUND` [gift card activity type](entity:GiftCardActivityType).

func (*GiftCardActivityUnlinkedActivityRefund) GetAmountMoney

func (g *GiftCardActivityUnlinkedActivityRefund) GetAmountMoney() *Money

func (*GiftCardActivityUnlinkedActivityRefund) GetExtraProperties

func (g *GiftCardActivityUnlinkedActivityRefund) GetExtraProperties() map[string]interface{}

func (*GiftCardActivityUnlinkedActivityRefund) GetPaymentID

func (*GiftCardActivityUnlinkedActivityRefund) GetReferenceID

func (g *GiftCardActivityUnlinkedActivityRefund) GetReferenceID() *string

func (*GiftCardActivityUnlinkedActivityRefund) String

func (*GiftCardActivityUnlinkedActivityRefund) UnmarshalJSON

func (g *GiftCardActivityUnlinkedActivityRefund) UnmarshalJSON(data []byte) error

type GiftCardGanSource

type GiftCardGanSource string

Indicates the source that generated the gift card account number (GAN).

const (
	GiftCardGanSourceSquare GiftCardGanSource = "SQUARE"
	GiftCardGanSourceOther  GiftCardGanSource = "OTHER"
)

func NewGiftCardGanSourceFromString

func NewGiftCardGanSourceFromString(s string) (GiftCardGanSource, error)

func (GiftCardGanSource) Ptr

type GiftCardStatus

type GiftCardStatus string

Indicates the gift card state.

const (
	GiftCardStatusActive      GiftCardStatus = "ACTIVE"
	GiftCardStatusDeactivated GiftCardStatus = "DEACTIVATED"
	GiftCardStatusBlocked     GiftCardStatus = "BLOCKED"
	GiftCardStatusPending     GiftCardStatus = "PENDING"
)

func NewGiftCardStatusFromString

func NewGiftCardStatusFromString(s string) (GiftCardStatus, error)

func (GiftCardStatus) Ptr

func (g GiftCardStatus) Ptr() *GiftCardStatus

type GiftCardType

type GiftCardType string

Indicates the gift card type.

const (
	GiftCardTypePhysical GiftCardType = "PHYSICAL"
	GiftCardTypeDigital  GiftCardType = "DIGITAL"
)

func NewGiftCardTypeFromString

func NewGiftCardTypeFromString(s string) (GiftCardType, error)

func (GiftCardType) Ptr

func (g GiftCardType) Ptr() *GiftCardType

type GiftCardsGetRequest

type GiftCardsGetRequest = GetGiftCardsRequest

GiftCardsGetRequest is an alias for GetGiftCardsRequest.

type GiftCardsListRequest

type GiftCardsListRequest = ListGiftCardsRequest

GiftCardsListRequest is an alias for ListGiftCardsRequest.

type InventoryAdjustment

type InventoryAdjustment struct {
	// A unique ID generated by Square for the
	// `InventoryAdjustment`.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// An optional ID provided by the application to tie the
	// `InventoryAdjustment` to an external
	// system.
	ReferenceID *string `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// The [inventory state](entity:InventoryState) of the related quantity
	// of items before the adjustment.
	// See [InventoryState](#type-inventorystate) for possible values
	FromState *InventoryState `json:"from_state,omitempty" url:"from_state,omitempty"`
	// The [inventory state](entity:InventoryState) of the related quantity
	// of items after the adjustment.
	// See [InventoryState](#type-inventorystate) for possible values
	ToState *InventoryState `json:"to_state,omitempty" url:"to_state,omitempty"`
	// The Square-generated ID of the [Location](entity:Location) where the related
	// quantity of items is being tracked.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The Square-generated ID of the
	// [CatalogObject](entity:CatalogObject) being tracked.
	CatalogObjectID *string `json:"catalog_object_id,omitempty" url:"catalog_object_id,omitempty"`
	// The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked.
	//
	// The Inventory API supports setting and reading the `"catalog_object_type": "ITEM_VARIATION"` field value.
	// In addition, it can also read the `"catalog_object_type": "ITEM"` field value that is set by the Square Restaurants app.
	CatalogObjectType *string `json:"catalog_object_type,omitempty" url:"catalog_object_type,omitempty"`
	// The number of items affected by the adjustment as a decimal string.
	// Can support up to 5 digits after the decimal point.
	Quantity *string `json:"quantity,omitempty" url:"quantity,omitempty"`
	// The 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" url:"total_price_money,omitempty"`
	// A client-generated RFC 3339-formatted timestamp that indicates when
	// the inventory adjustment took place. For inventory adjustment updates, the `occurred_at`
	// timestamp cannot be older than 24 hours or in the future relative to the
	// time of the request.
	OccurredAt *string `json:"occurred_at,omitempty" url:"occurred_at,omitempty"`
	// An RFC 3339-formatted timestamp that indicates when the inventory adjustment is received.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// Information about the application that caused the
	// inventory adjustment.
	Source *SourceApplication `json:"source,omitempty" url:"source,omitempty"`
	// The Square-generated ID of the [Employee](entity:Employee) responsible for the
	// inventory adjustment.
	EmployeeID *string `json:"employee_id,omitempty" url:"employee_id,omitempty"`
	// The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the
	// inventory adjustment.
	TeamMemberID *string `json:"team_member_id,omitempty" url:"team_member_id,omitempty"`
	// The Square-generated ID of the [Transaction](entity:Transaction) that
	// caused the adjustment. Only relevant for payment-related state
	// transitions.
	TransactionID *string `json:"transaction_id,omitempty" url:"transaction_id,omitempty"`
	// The Square-generated ID of the [Refund](entity:Refund) that
	// caused the adjustment. Only relevant for refund-related state
	// transitions.
	RefundID *string `json:"refund_id,omitempty" url:"refund_id,omitempty"`
	// The Square-generated ID of the purchase order that caused the
	// adjustment. Only relevant for state transitions from the Square for Retail
	// app.
	PurchaseOrderID *string `json:"purchase_order_id,omitempty" url:"purchase_order_id,omitempty"`
	// The Square-generated ID of the goods receipt that caused the
	// adjustment. Only relevant for state transitions from the Square for Retail
	// app.
	GoodsReceiptID *string `json:"goods_receipt_id,omitempty" url:"goods_receipt_id,omitempty"`
	// An adjustment group bundling the related adjustments of item variations through stock conversions in a single inventory event.
	AdjustmentGroup *InventoryAdjustmentGroup `json:"adjustment_group,omitempty" url:"adjustment_group,omitempty"`
	// contains filtered or unexported fields
}

Represents a change in state or quantity of product inventory at a particular time and location.

func (*InventoryAdjustment) GetAdjustmentGroup

func (i *InventoryAdjustment) GetAdjustmentGroup() *InventoryAdjustmentGroup

func (*InventoryAdjustment) GetCatalogObjectID

func (i *InventoryAdjustment) GetCatalogObjectID() *string

func (*InventoryAdjustment) GetCatalogObjectType

func (i *InventoryAdjustment) GetCatalogObjectType() *string

func (*InventoryAdjustment) GetCreatedAt

func (i *InventoryAdjustment) GetCreatedAt() *string

func (*InventoryAdjustment) GetEmployeeID

func (i *InventoryAdjustment) GetEmployeeID() *string

func (*InventoryAdjustment) GetExtraProperties

func (i *InventoryAdjustment) GetExtraProperties() map[string]interface{}

func (*InventoryAdjustment) GetFromState

func (i *InventoryAdjustment) GetFromState() *InventoryState

func (*InventoryAdjustment) GetGoodsReceiptID

func (i *InventoryAdjustment) GetGoodsReceiptID() *string

func (*InventoryAdjustment) GetID

func (i *InventoryAdjustment) GetID() *string

func (*InventoryAdjustment) GetLocationID

func (i *InventoryAdjustment) GetLocationID() *string

func (*InventoryAdjustment) GetOccurredAt

func (i *InventoryAdjustment) GetOccurredAt() *string

func (*InventoryAdjustment) GetPurchaseOrderID

func (i *InventoryAdjustment) GetPurchaseOrderID() *string

func (*InventoryAdjustment) GetQuantity

func (i *InventoryAdjustment) GetQuantity() *string

func (*InventoryAdjustment) GetReferenceID

func (i *InventoryAdjustment) GetReferenceID() *string

func (*InventoryAdjustment) GetRefundID

func (i *InventoryAdjustment) GetRefundID() *string

func (*InventoryAdjustment) GetSource

func (i *InventoryAdjustment) GetSource() *SourceApplication

func (*InventoryAdjustment) GetTeamMemberID

func (i *InventoryAdjustment) GetTeamMemberID() *string

func (*InventoryAdjustment) GetToState

func (i *InventoryAdjustment) GetToState() *InventoryState

func (*InventoryAdjustment) GetTotalPriceMoney

func (i *InventoryAdjustment) GetTotalPriceMoney() *Money

func (*InventoryAdjustment) GetTransactionID

func (i *InventoryAdjustment) GetTransactionID() *string

func (*InventoryAdjustment) String

func (i *InventoryAdjustment) String() string

func (*InventoryAdjustment) UnmarshalJSON

func (i *InventoryAdjustment) UnmarshalJSON(data []byte) error

type InventoryAdjustmentGroup

type InventoryAdjustmentGroup struct {
	// A unique ID generated by Square for the
	// `InventoryAdjustmentGroup`.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The inventory adjustment of the composed variation.
	RootAdjustmentID *string `json:"root_adjustment_id,omitempty" url:"root_adjustment_id,omitempty"`
	// Representative `from_state` for adjustments within the group. For example, for a group adjustment from `IN_STOCK` to `SOLD`,
	// there can be two component adjustments in the group: one from `IN_STOCK`to `COMPOSED` and the other one from `COMPOSED` to `SOLD`.
	// Here, the representative `from_state` for the `InventoryAdjustmentGroup` is `IN_STOCK`.
	// See [InventoryState](#type-inventorystate) for possible values
	FromState *InventoryState `json:"from_state,omitempty" url:"from_state,omitempty"`
	// Representative `to_state` for adjustments within group. For example, for a group adjustment from `IN_STOCK` to `SOLD`,
	// the two component adjustments in the group can be from `IN_STOCK` to `COMPOSED` and from `COMPOSED` to `SOLD`.
	// Here, the representative `to_state` of the `InventoryAdjustmentGroup` is `SOLD`.
	// See [InventoryState](#type-inventorystate) for possible values
	ToState *InventoryState `json:"to_state,omitempty" url:"to_state,omitempty"`
	// contains filtered or unexported fields
}

func (*InventoryAdjustmentGroup) GetExtraProperties

func (i *InventoryAdjustmentGroup) GetExtraProperties() map[string]interface{}

func (*InventoryAdjustmentGroup) GetFromState

func (i *InventoryAdjustmentGroup) GetFromState() *InventoryState

func (*InventoryAdjustmentGroup) GetID

func (i *InventoryAdjustmentGroup) GetID() *string

func (*InventoryAdjustmentGroup) GetRootAdjustmentID

func (i *InventoryAdjustmentGroup) GetRootAdjustmentID() *string

func (*InventoryAdjustmentGroup) GetToState

func (i *InventoryAdjustmentGroup) GetToState() *InventoryState

func (*InventoryAdjustmentGroup) String

func (i *InventoryAdjustmentGroup) String() string

func (*InventoryAdjustmentGroup) UnmarshalJSON

func (i *InventoryAdjustmentGroup) UnmarshalJSON(data []byte) error

type InventoryAlertType

type InventoryAlertType string

Indicates whether Square should alert the merchant when the inventory quantity of a CatalogItemVariation is low.

const (
	InventoryAlertTypeNone        InventoryAlertType = "NONE"
	InventoryAlertTypeLowQuantity InventoryAlertType = "LOW_QUANTITY"
)

func NewInventoryAlertTypeFromString

func NewInventoryAlertTypeFromString(s string) (InventoryAlertType, error)

func (InventoryAlertType) Ptr

type InventoryChange

type InventoryChange struct {
	// Indicates how the inventory change is applied. See
	// [InventoryChangeType](entity:InventoryChangeType) for all possible values.
	// See [InventoryChangeType](#type-inventorychangetype) for possible values
	Type *InventoryChangeType `json:"type,omitempty" url:"type,omitempty"`
	// Contains details about the physical count when `type` is
	// `PHYSICAL_COUNT`, and is unset for all other change types.
	PhysicalCount *InventoryPhysicalCount `json:"physical_count,omitempty" url:"physical_count,omitempty"`
	// Contains details about the inventory adjustment when `type` is
	// `ADJUSTMENT`, and is unset for all other change types.
	Adjustment *InventoryAdjustment `json:"adjustment,omitempty" url:"adjustment,omitempty"`
	// Contains details about the inventory transfer when `type` is
	// `TRANSFER`, and is unset for all other change types.
	//
	// _Note:_ An [InventoryTransfer](entity:InventoryTransfer) object can only be set in the input to the
	// [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory) endpoint when the seller has an active Retail Plus subscription.
	Transfer *InventoryTransfer `json:"transfer,omitempty" url:"transfer,omitempty"`
	// The [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) object representing the catalog measurement unit associated with the inventory change.
	MeasurementUnit *CatalogMeasurementUnit `json:"measurement_unit,omitempty" url:"measurement_unit,omitempty"`
	// The ID of the [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) object representing the catalog measurement unit associated with the inventory change.
	MeasurementUnitID *string `json:"measurement_unit_id,omitempty" url:"measurement_unit_id,omitempty"`
	// contains filtered or unexported fields
}

Represents a single physical count, inventory, adjustment, or transfer that is part of the history of inventory changes for a particular CatalogObject(entity:CatalogObject) instance.

func (*InventoryChange) GetAdjustment

func (i *InventoryChange) GetAdjustment() *InventoryAdjustment

func (*InventoryChange) GetExtraProperties

func (i *InventoryChange) GetExtraProperties() map[string]interface{}

func (*InventoryChange) GetMeasurementUnit

func (i *InventoryChange) GetMeasurementUnit() *CatalogMeasurementUnit

func (*InventoryChange) GetMeasurementUnitID

func (i *InventoryChange) GetMeasurementUnitID() *string

func (*InventoryChange) GetPhysicalCount

func (i *InventoryChange) GetPhysicalCount() *InventoryPhysicalCount

func (*InventoryChange) GetTransfer

func (i *InventoryChange) GetTransfer() *InventoryTransfer

func (*InventoryChange) GetType

func (i *InventoryChange) GetType() *InventoryChangeType

func (*InventoryChange) String

func (i *InventoryChange) String() string

func (*InventoryChange) UnmarshalJSON

func (i *InventoryChange) UnmarshalJSON(data []byte) error

type InventoryChangeType

type InventoryChangeType string

Indicates how the inventory change was applied to a tracked product quantity.

const (
	InventoryChangeTypePhysicalCount InventoryChangeType = "PHYSICAL_COUNT"
	InventoryChangeTypeAdjustment    InventoryChangeType = "ADJUSTMENT"
	InventoryChangeTypeTransfer      InventoryChangeType = "TRANSFER"
)

func NewInventoryChangeTypeFromString

func NewInventoryChangeTypeFromString(s string) (InventoryChangeType, error)

func (InventoryChangeType) Ptr

type InventoryChangesRequest

type InventoryChangesRequest = ChangesInventoryRequest

InventoryChangesRequest is an alias for ChangesInventoryRequest.

type InventoryCount

type InventoryCount struct {
	// The Square-generated ID of the
	// [CatalogObject](entity:CatalogObject) being tracked.
	CatalogObjectID *string `json:"catalog_object_id,omitempty" url:"catalog_object_id,omitempty"`
	// The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked.
	//
	// The Inventory API supports setting and reading the `"catalog_object_type": "ITEM_VARIATION"` field value.
	// In addition, it can also read the `"catalog_object_type": "ITEM"` field value that is set by the Square Restaurants app.
	CatalogObjectType *string `json:"catalog_object_type,omitempty" url:"catalog_object_type,omitempty"`
	// The current [inventory state](entity:InventoryState) for the related
	// quantity of items.
	// See [InventoryState](#type-inventorystate) for possible values
	State *InventoryState `json:"state,omitempty" url:"state,omitempty"`
	// The Square-generated ID of the [Location](entity:Location) where the related
	// quantity of items is being tracked.
	LocationID *string `json:"location_id,omitempty" url:"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.
	Quantity *string `json:"quantity,omitempty" url:"quantity,omitempty"`
	// An RFC 3339-formatted timestamp that indicates when the most recent physical count or adjustment affecting
	// the estimated count is received.
	CalculatedAt *string `json:"calculated_at,omitempty" url:"calculated_at,omitempty"`
	// Whether the inventory count is for composed variation (TRUE) or not (FALSE). If true, the inventory count will not be present in the response of
	// any of these endpoints: [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory),
	// [BatchRetrieveInventoryChanges](api-endpoint:Inventory-BatchRetrieveInventoryChanges),
	// [BatchRetrieveInventoryCounts](api-endpoint:Inventory-BatchRetrieveInventoryCounts), and
	// [RetrieveInventoryChanges](api-endpoint:Inventory-RetrieveInventoryChanges).
	IsEstimated *bool `json:"is_estimated,omitempty" url:"is_estimated,omitempty"`
	// contains filtered or unexported fields
}

Represents Square-estimated quantity of items in a particular state at a particular seller location based on the known history of physical counts and inventory adjustments.

func (*InventoryCount) GetCalculatedAt

func (i *InventoryCount) GetCalculatedAt() *string

func (*InventoryCount) GetCatalogObjectID

func (i *InventoryCount) GetCatalogObjectID() *string

func (*InventoryCount) GetCatalogObjectType

func (i *InventoryCount) GetCatalogObjectType() *string

func (*InventoryCount) GetExtraProperties

func (i *InventoryCount) GetExtraProperties() map[string]interface{}

func (*InventoryCount) GetIsEstimated

func (i *InventoryCount) GetIsEstimated() *bool

func (*InventoryCount) GetLocationID

func (i *InventoryCount) GetLocationID() *string

func (*InventoryCount) GetQuantity

func (i *InventoryCount) GetQuantity() *string

func (*InventoryCount) GetState

func (i *InventoryCount) GetState() *InventoryState

func (*InventoryCount) String

func (i *InventoryCount) String() string

func (*InventoryCount) UnmarshalJSON

func (i *InventoryCount) UnmarshalJSON(data []byte) error

type InventoryDeprecatedGetAdjustmentRequest

type InventoryDeprecatedGetAdjustmentRequest = DeprecatedGetAdjustmentInventoryRequest

InventoryDeprecatedGetAdjustmentRequest is an alias for DeprecatedGetAdjustmentInventoryRequest.

type InventoryDeprecatedGetPhysicalCountRequest

type InventoryDeprecatedGetPhysicalCountRequest = DeprecatedGetPhysicalCountInventoryRequest

InventoryDeprecatedGetPhysicalCountRequest is an alias for DeprecatedGetPhysicalCountInventoryRequest.

type InventoryGetAdjustmentRequest

type InventoryGetAdjustmentRequest = GetAdjustmentInventoryRequest

InventoryGetAdjustmentRequest is an alias for GetAdjustmentInventoryRequest.

type InventoryGetPhysicalCountRequest

type InventoryGetPhysicalCountRequest = GetPhysicalCountInventoryRequest

InventoryGetPhysicalCountRequest is an alias for GetPhysicalCountInventoryRequest.

type InventoryGetRequest

type InventoryGetRequest = GetInventoryRequest

InventoryGetRequest is an alias for GetInventoryRequest.

type InventoryGetTransferRequest

type InventoryGetTransferRequest = GetTransferInventoryRequest

InventoryGetTransferRequest is an alias for GetTransferInventoryRequest.

type InventoryPhysicalCount

type InventoryPhysicalCount struct {
	// A unique Square-generated ID for the
	// [InventoryPhysicalCount](entity:InventoryPhysicalCount).
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// An optional ID provided by the application to tie the
	// [InventoryPhysicalCount](entity:InventoryPhysicalCount) to an external
	// system.
	ReferenceID *string `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// The Square-generated ID of the
	// [CatalogObject](entity:CatalogObject) being tracked.
	CatalogObjectID *string `json:"catalog_object_id,omitempty" url:"catalog_object_id,omitempty"`
	// The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked.
	//
	// The Inventory API supports setting and reading the `"catalog_object_type": "ITEM_VARIATION"` field value.
	// In addition, it can also read the `"catalog_object_type": "ITEM"` field value that is set by the Square Restaurants app.
	CatalogObjectType *string `json:"catalog_object_type,omitempty" url:"catalog_object_type,omitempty"`
	// The current [inventory state](entity:InventoryState) for the related
	// quantity of items.
	// See [InventoryState](#type-inventorystate) for possible values
	State *InventoryState `json:"state,omitempty" url:"state,omitempty"`
	// The Square-generated ID of the [Location](entity:Location) where the related
	// quantity of items is being tracked.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The number of items affected by the physical count as a decimal string.
	// The number can support up to 5 digits after the decimal point.
	Quantity *string `json:"quantity,omitempty" url:"quantity,omitempty"`
	// Information about the application with which the
	// physical count is submitted.
	Source *SourceApplication `json:"source,omitempty" url:"source,omitempty"`
	// The Square-generated ID of the [Employee](entity:Employee) responsible for the
	// physical count.
	EmployeeID *string `json:"employee_id,omitempty" url:"employee_id,omitempty"`
	// The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the
	// physical count.
	TeamMemberID *string `json:"team_member_id,omitempty" url:"team_member_id,omitempty"`
	// A client-generated RFC 3339-formatted timestamp that indicates when
	// the physical count was examined. For physical count updates, the `occurred_at`
	// timestamp cannot be older than 24 hours or in the future relative to the
	// time of the request.
	OccurredAt *string `json:"occurred_at,omitempty" url:"occurred_at,omitempty"`
	// An RFC 3339-formatted timestamp that indicates when the physical count is received.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*InventoryPhysicalCount) GetCatalogObjectID

func (i *InventoryPhysicalCount) GetCatalogObjectID() *string

func (*InventoryPhysicalCount) GetCatalogObjectType

func (i *InventoryPhysicalCount) GetCatalogObjectType() *string

func (*InventoryPhysicalCount) GetCreatedAt

func (i *InventoryPhysicalCount) GetCreatedAt() *string

func (*InventoryPhysicalCount) GetEmployeeID

func (i *InventoryPhysicalCount) GetEmployeeID() *string

func (*InventoryPhysicalCount) GetExtraProperties

func (i *InventoryPhysicalCount) GetExtraProperties() map[string]interface{}

func (*InventoryPhysicalCount) GetID

func (i *InventoryPhysicalCount) GetID() *string

func (*InventoryPhysicalCount) GetLocationID

func (i *InventoryPhysicalCount) GetLocationID() *string

func (*InventoryPhysicalCount) GetOccurredAt

func (i *InventoryPhysicalCount) GetOccurredAt() *string

func (*InventoryPhysicalCount) GetQuantity

func (i *InventoryPhysicalCount) GetQuantity() *string

func (*InventoryPhysicalCount) GetReferenceID

func (i *InventoryPhysicalCount) GetReferenceID() *string

func (*InventoryPhysicalCount) GetSource

func (i *InventoryPhysicalCount) GetSource() *SourceApplication

func (*InventoryPhysicalCount) GetState

func (i *InventoryPhysicalCount) GetState() *InventoryState

func (*InventoryPhysicalCount) GetTeamMemberID

func (i *InventoryPhysicalCount) GetTeamMemberID() *string

func (*InventoryPhysicalCount) String

func (i *InventoryPhysicalCount) String() string

func (*InventoryPhysicalCount) UnmarshalJSON

func (i *InventoryPhysicalCount) UnmarshalJSON(data []byte) error

type InventoryState

type InventoryState string

Indicates the state of a tracked item quantity in the lifecycle of goods.

const (
	InventoryStateCustom                  InventoryState = "CUSTOM"
	InventoryStateInStock                 InventoryState = "IN_STOCK"
	InventoryStateSold                    InventoryState = "SOLD"
	InventoryStateReturnedByCustomer      InventoryState = "RETURNED_BY_CUSTOMER"
	InventoryStateReservedForSale         InventoryState = "RESERVED_FOR_SALE"
	InventoryStateSoldOnline              InventoryState = "SOLD_ONLINE"
	InventoryStateOrderedFromVendor       InventoryState = "ORDERED_FROM_VENDOR"
	InventoryStateReceivedFromVendor      InventoryState = "RECEIVED_FROM_VENDOR"
	InventoryStateInTransitTo             InventoryState = "IN_TRANSIT_TO"
	InventoryStateNone                    InventoryState = "NONE"
	InventoryStateWaste                   InventoryState = "WASTE"
	InventoryStateUnlinkedReturn          InventoryState = "UNLINKED_RETURN"
	InventoryStateComposed                InventoryState = "COMPOSED"
	InventoryStateDecomposed              InventoryState = "DECOMPOSED"
	InventoryStateSupportedByNewerVersion InventoryState = "SUPPORTED_BY_NEWER_VERSION"
	InventoryStateInTransit               InventoryState = "IN_TRANSIT"
)

func NewInventoryStateFromString

func NewInventoryStateFromString(s string) (InventoryState, error)

func (InventoryState) Ptr

func (i InventoryState) Ptr() *InventoryState

type InventoryTransfer

type InventoryTransfer struct {
	// A unique ID generated by Square for the
	// `InventoryTransfer`.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// An optional ID provided by the application to tie the
	// `InventoryTransfer` to an external system.
	ReferenceID *string `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// The [inventory state](entity:InventoryState) for the quantity of
	// items being transferred.
	// See [InventoryState](#type-inventorystate) for possible values
	State *InventoryState `json:"state,omitempty" url:"state,omitempty"`
	// The Square-generated ID of the [Location](entity:Location) where the related
	// quantity of items was tracked before the transfer.
	FromLocationID *string `json:"from_location_id,omitempty" url:"from_location_id,omitempty"`
	// The Square-generated ID of the [Location](entity:Location) where the related
	// quantity of items was tracked after the transfer.
	ToLocationID *string `json:"to_location_id,omitempty" url:"to_location_id,omitempty"`
	// The Square-generated ID of the
	// [CatalogObject](entity:CatalogObject) being tracked.
	CatalogObjectID *string `json:"catalog_object_id,omitempty" url:"catalog_object_id,omitempty"`
	// The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked.
	//
	// The Inventory API supports setting and reading the `"catalog_object_type": "ITEM_VARIATION"` field value.
	// In addition, it can also read the `"catalog_object_type": "ITEM"` field value that is set by the Square Restaurants app.
	CatalogObjectType *string `json:"catalog_object_type,omitempty" url:"catalog_object_type,omitempty"`
	// The number of items affected by the transfer as a decimal string.
	// Can support up to 5 digits after the decimal point.
	Quantity *string `json:"quantity,omitempty" url:"quantity,omitempty"`
	// A client-generated RFC 3339-formatted timestamp 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.
	OccurredAt *string `json:"occurred_at,omitempty" url:"occurred_at,omitempty"`
	// An RFC 3339-formatted timestamp that indicates when Square
	// received the transfer request.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// Information about the application that initiated the
	// inventory transfer.
	Source *SourceApplication `json:"source,omitempty" url:"source,omitempty"`
	// The Square-generated ID of the [Employee](entity:Employee) responsible for the
	// inventory transfer.
	EmployeeID *string `json:"employee_id,omitempty" url:"employee_id,omitempty"`
	// The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the
	// inventory transfer.
	TeamMemberID *string `json:"team_member_id,omitempty" url:"team_member_id,omitempty"`
	// contains filtered or unexported fields
}

Represents the transfer of a quantity of product inventory at a particular time from one location to another.

func (*InventoryTransfer) GetCatalogObjectID

func (i *InventoryTransfer) GetCatalogObjectID() *string

func (*InventoryTransfer) GetCatalogObjectType

func (i *InventoryTransfer) GetCatalogObjectType() *string

func (*InventoryTransfer) GetCreatedAt

func (i *InventoryTransfer) GetCreatedAt() *string

func (*InventoryTransfer) GetEmployeeID

func (i *InventoryTransfer) GetEmployeeID() *string

func (*InventoryTransfer) GetExtraProperties

func (i *InventoryTransfer) GetExtraProperties() map[string]interface{}

func (*InventoryTransfer) GetFromLocationID

func (i *InventoryTransfer) GetFromLocationID() *string

func (*InventoryTransfer) GetID

func (i *InventoryTransfer) GetID() *string

func (*InventoryTransfer) GetOccurredAt

func (i *InventoryTransfer) GetOccurredAt() *string

func (*InventoryTransfer) GetQuantity

func (i *InventoryTransfer) GetQuantity() *string

func (*InventoryTransfer) GetReferenceID

func (i *InventoryTransfer) GetReferenceID() *string

func (*InventoryTransfer) GetSource

func (i *InventoryTransfer) GetSource() *SourceApplication

func (*InventoryTransfer) GetState

func (i *InventoryTransfer) GetState() *InventoryState

func (*InventoryTransfer) GetTeamMemberID

func (i *InventoryTransfer) GetTeamMemberID() *string

func (*InventoryTransfer) GetToLocationID

func (i *InventoryTransfer) GetToLocationID() *string

func (*InventoryTransfer) String

func (i *InventoryTransfer) String() string

func (*InventoryTransfer) UnmarshalJSON

func (i *InventoryTransfer) UnmarshalJSON(data []byte) error

type Invoice

type Invoice struct {
	// The Square-assigned ID of the invoice.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The Square-assigned version number, which is incremented each time an update is committed to the invoice.
	Version *int `json:"version,omitempty" url:"version,omitempty"`
	// The ID of the location that this invoice is associated with.
	//
	// If specified in a `CreateInvoice` request, the value must match the `location_id` of the associated order.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The ID of the [order](entity:Order) for which the invoice is created.
	// This field is required when creating an invoice, and the order must be in the `OPEN` state.
	//
	// To view the line items and other information for the associated order, call the
	// [RetrieveOrder](api-endpoint:Orders-RetrieveOrder) endpoint using the order ID.
	OrderID *string `json:"order_id,omitempty" url:"order_id,omitempty"`
	// The customer who receives the invoice. This customer data is displayed on the invoice and used by Square to deliver the invoice.
	//
	// This field is required to publish an invoice, and it must specify the `customer_id`.
	PrimaryRecipient *InvoiceRecipient `json:"primary_recipient,omitempty" url:"primary_recipient,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. An invoice supports the following payment request combinations:
	// - One balance
	// - One deposit with one balance
	// - 2–12 installments
	// - One deposit with 2–12 installments
	//
	// This field is required when creating an invoice. It must contain at least one payment request.
	// All payment requests for the invoice must equal the total order amount. For more information, see
	// [Configuring payment requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests).
	//
	// Adding `INSTALLMENT` payment requests to an invoice requires an
	// [Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).
	PaymentRequests []*InvoicePaymentRequest `json:"payment_requests,omitempty" url:"payment_requests,omitempty"`
	// 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 on 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`.
	// See [InvoiceDeliveryMethod](#type-invoicedeliverymethod) for possible values
	DeliveryMethod *InvoiceDeliveryMethod `json:"delivery_method,omitempty" url:"delivery_method,omitempty"`
	// A user-friendly invoice number that is displayed on the invoice. The value is unique within a location.
	// If not provided when creating an invoice, Square assigns a value.
	// It increments from 1 and is padded with zeros making it 7 characters long
	// (for example, 0000001 and 0000002).
	InvoiceNumber *string `json:"invoice_number,omitempty" url:"invoice_number,omitempty"`
	// The title of the invoice, which is displayed on the invoice.
	Title *string `json:"title,omitempty" url:"title,omitempty"`
	// The description of the invoice, which is displayed on the invoice.
	Description *string `json:"description,omitempty" url:"description,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" url:"scheduled_at,omitempty"`
	// A temporary link to the Square-hosted payment page where the customer can pay the
	// invoice. If the link expires, customers can provide the email address or phone number
	// associated with the invoice and request a new link directly from the expired payment page.
	//
	// This field is added after the invoice is published and reaches the scheduled date
	// (if one is defined).
	PublicURL *string `json:"public_url,omitempty" url:"public_url,omitempty"`
	// The current amount due for the invoice. In addition to the
	// amount due on the next payment request, this includes any overdue payment amounts.
	NextPaymentAmountMoney *Money `json:"next_payment_amount_money,omitempty" url:"next_payment_amount_money,omitempty"`
	// The status of the invoice.
	// See [InvoiceStatus](#type-invoicestatus) for possible values
	Status *InvoiceStatus `json:"status,omitempty" url:"status,omitempty"`
	// The time zone used to interpret calendar dates on the invoice, such as `due_date`.
	// When an invoice is created, this field is set to the `timezone` specified for the seller
	// location. The value cannot be changed.
	//
	// For example, a payment `due_date` of 2021-03-09 with a `timezone` of America/Los\_Angeles
	// becomes overdue at midnight on March 9 in America/Los\_Angeles (which equals a UTC timestamp
	// of 2021-03-10T08:00:00Z).
	Timezone *string `json:"timezone,omitempty" url:"timezone,omitempty"`
	// The timestamp when the invoice was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp when the invoice was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The payment methods that customers can use to pay the invoice on the Square-hosted
	// invoice page. This setting is independent of any automatic payment requests for the invoice.
	//
	// This field is required when creating an invoice and must set at least one payment method to `true`.
	AcceptedPaymentMethods *InvoiceAcceptedPaymentMethods `json:"accepted_payment_methods,omitempty" url:"accepted_payment_methods,omitempty"`
	// Additional seller-defined fields that are displayed on the invoice. For more information, see
	// [Custom fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields).
	//
	// Adding custom fields to an invoice requires an
	// [Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).
	//
	// Max: 2 custom fields
	CustomFields []*InvoiceCustomField `json:"custom_fields,omitempty" url:"custom_fields,omitempty"`
	// The ID of the [subscription](entity:Subscription) associated with the invoice.
	// This field is present only on subscription billing invoices.
	SubscriptionID *string `json:"subscription_id,omitempty" url:"subscription_id,omitempty"`
	// The date of the sale or the date that the service is rendered, in `YYYY-MM-DD` format.
	// This field can be used to specify a past or future date which is displayed on the invoice.
	SaleOrServiceDate *string `json:"sale_or_service_date,omitempty" url:"sale_or_service_date,omitempty"`
	// **France only.** The payment terms and conditions that are displayed on the invoice. For more information,
	// see [Payment conditions](https://developer.squareup.com/docs/invoices-api/overview#payment-conditions).
	//
	// For countries other than France, Square returns an `INVALID_REQUEST_ERROR` with a `BAD_REQUEST` code and
	// "Payment conditions are not supported for this location's country" detail if this field is included in `CreateInvoice` or `UpdateInvoice` requests.
	PaymentConditions *string `json:"payment_conditions,omitempty" url:"payment_conditions,omitempty"`
	// Indicates whether to allow a customer to save a credit or debit card as a card on file or a bank transfer as a
	// bank account on file. If `true`, Square displays a __Save my card on file__ or __Save my bank on file__ checkbox on the
	// invoice payment page. Stored payment information can be used for future automatic payments. The default value is `false`.
	StorePaymentMethodEnabled *bool `json:"store_payment_method_enabled,omitempty" url:"store_payment_method_enabled,omitempty"`
	// Metadata about the attachments on the invoice. Invoice attachments are managed using the
	// [CreateInvoiceAttachment](api-endpoint:Invoices-CreateInvoiceAttachment) and [DeleteInvoiceAttachment](api-endpoint:Invoices-DeleteInvoiceAttachment) endpoints.
	Attachments []*InvoiceAttachment `json:"attachments,omitempty" url:"attachments,omitempty"`
	// The ID of the [team member](entity:TeamMember) who created the invoice.
	// This field is present only on invoices created in the Square Dashboard or Square Invoices app by a logged-in team member.
	CreatorTeamMemberID *string `json:"creator_team_member_id,omitempty" url:"creator_team_member_id,omitempty"`
	// contains filtered or unexported fields
}

Stores information about an invoice. You use the Invoices API to create and manage invoices. For more information, see [Invoices API Overview](https://developer.squareup.com/docs/invoices-api/overview).

func (*Invoice) GetAcceptedPaymentMethods

func (i *Invoice) GetAcceptedPaymentMethods() *InvoiceAcceptedPaymentMethods

func (*Invoice) GetAttachments

func (i *Invoice) GetAttachments() []*InvoiceAttachment

func (*Invoice) GetCreatedAt

func (i *Invoice) GetCreatedAt() *string

func (*Invoice) GetCreatorTeamMemberID added in v1.3.0

func (i *Invoice) GetCreatorTeamMemberID() *string

func (*Invoice) GetCustomFields

func (i *Invoice) GetCustomFields() []*InvoiceCustomField

func (*Invoice) GetDeliveryMethod

func (i *Invoice) GetDeliveryMethod() *InvoiceDeliveryMethod

func (*Invoice) GetDescription

func (i *Invoice) GetDescription() *string

func (*Invoice) GetExtraProperties

func (i *Invoice) GetExtraProperties() map[string]interface{}

func (*Invoice) GetID

func (i *Invoice) GetID() *string

func (*Invoice) GetInvoiceNumber

func (i *Invoice) GetInvoiceNumber() *string

func (*Invoice) GetLocationID

func (i *Invoice) GetLocationID() *string

func (*Invoice) GetNextPaymentAmountMoney

func (i *Invoice) GetNextPaymentAmountMoney() *Money

func (*Invoice) GetOrderID

func (i *Invoice) GetOrderID() *string

func (*Invoice) GetPaymentConditions

func (i *Invoice) GetPaymentConditions() *string

func (*Invoice) GetPaymentRequests

func (i *Invoice) GetPaymentRequests() []*InvoicePaymentRequest

func (*Invoice) GetPrimaryRecipient

func (i *Invoice) GetPrimaryRecipient() *InvoiceRecipient

func (*Invoice) GetPublicURL

func (i *Invoice) GetPublicURL() *string

func (*Invoice) GetSaleOrServiceDate

func (i *Invoice) GetSaleOrServiceDate() *string

func (*Invoice) GetScheduledAt

func (i *Invoice) GetScheduledAt() *string

func (*Invoice) GetStatus

func (i *Invoice) GetStatus() *InvoiceStatus

func (*Invoice) GetStorePaymentMethodEnabled

func (i *Invoice) GetStorePaymentMethodEnabled() *bool

func (*Invoice) GetSubscriptionID

func (i *Invoice) GetSubscriptionID() *string

func (*Invoice) GetTimezone

func (i *Invoice) GetTimezone() *string

func (*Invoice) GetTitle

func (i *Invoice) GetTitle() *string

func (*Invoice) GetUpdatedAt

func (i *Invoice) GetUpdatedAt() *string

func (*Invoice) GetVersion

func (i *Invoice) GetVersion() *int

func (*Invoice) String

func (i *Invoice) String() string

func (*Invoice) UnmarshalJSON

func (i *Invoice) UnmarshalJSON(data []byte) error

type InvoiceAcceptedPaymentMethods

type InvoiceAcceptedPaymentMethods struct {
	// Indicates whether credit card or debit card payments are accepted. The default value is `false`.
	Card *bool `json:"card,omitempty" url:"card,omitempty"`
	// Indicates whether Square gift card payments are accepted. The default value is `false`.
	SquareGiftCard *bool `json:"square_gift_card,omitempty" url:"square_gift_card,omitempty"`
	// Indicates whether ACH bank transfer payments are accepted. The default value is `false`.
	BankAccount *bool `json:"bank_account,omitempty" url:"bank_account,omitempty"`
	// Indicates whether Afterpay (also known as Clearpay) payments are accepted. The default value is `false`.
	//
	// This option is allowed only for invoices that have a single payment request of the `BALANCE` type. This payment method is
	// supported if the seller account accepts Afterpay payments and the seller location is in a country where Afterpay
	// invoice payments are supported. As a best practice, consider enabling an additional payment method when allowing
	// `buy_now_pay_later` payments. For more information, including detailed requirements and processing limits, see
	// [Buy Now Pay Later payments with Afterpay](https://developer.squareup.com/docs/invoices-api/overview#buy-now-pay-later).
	BuyNowPayLater *bool `json:"buy_now_pay_later,omitempty" url:"buy_now_pay_later,omitempty"`
	// Indicates whether Cash App payments are accepted. The default value is `false`.
	//
	// This payment method is supported only for seller [locations](entity:Location) in the United States.
	CashAppPay *bool `json:"cash_app_pay,omitempty" url:"cash_app_pay,omitempty"`
	// contains filtered or unexported fields
}

The payment methods that customers can use to pay an [invoice](entity:Invoice) on the Square-hosted invoice payment page.

func (*InvoiceAcceptedPaymentMethods) GetBankAccount

func (i *InvoiceAcceptedPaymentMethods) GetBankAccount() *bool

func (*InvoiceAcceptedPaymentMethods) GetBuyNowPayLater

func (i *InvoiceAcceptedPaymentMethods) GetBuyNowPayLater() *bool

func (*InvoiceAcceptedPaymentMethods) GetCard

func (i *InvoiceAcceptedPaymentMethods) GetCard() *bool

func (*InvoiceAcceptedPaymentMethods) GetCashAppPay

func (i *InvoiceAcceptedPaymentMethods) GetCashAppPay() *bool

func (*InvoiceAcceptedPaymentMethods) GetExtraProperties

func (i *InvoiceAcceptedPaymentMethods) GetExtraProperties() map[string]interface{}

func (*InvoiceAcceptedPaymentMethods) GetSquareGiftCard

func (i *InvoiceAcceptedPaymentMethods) GetSquareGiftCard() *bool

func (*InvoiceAcceptedPaymentMethods) String

func (*InvoiceAcceptedPaymentMethods) UnmarshalJSON

func (i *InvoiceAcceptedPaymentMethods) UnmarshalJSON(data []byte) error

type InvoiceAttachment

type InvoiceAttachment struct {
	// The Square-assigned ID of the attachment.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The file name of the attachment, which is displayed on the invoice.
	Filename *string `json:"filename,omitempty" url:"filename,omitempty"`
	// The description of the attachment, which is displayed on the invoice.
	// This field maps to the seller-defined **Message** field.
	Description *string `json:"description,omitempty" url:"description,omitempty"`
	// The file size of the attachment in bytes.
	Filesize *int `json:"filesize,omitempty" url:"filesize,omitempty"`
	// The MD5 hash that was generated from the file contents.
	Hash *string `json:"hash,omitempty" url:"hash,omitempty"`
	// The mime type of the attachment.
	// The following mime types are supported:
	// image/gif, image/jpeg, image/png, image/tiff, image/bmp, application/pdf.
	MimeType *string `json:"mime_type,omitempty" url:"mime_type,omitempty"`
	// The timestamp when the attachment was uploaded, in RFC 3339 format.
	UploadedAt *string `json:"uploaded_at,omitempty" url:"uploaded_at,omitempty"`
	// contains filtered or unexported fields
}

Represents a file attached to an [invoice](entity:Invoice).

func (*InvoiceAttachment) GetDescription

func (i *InvoiceAttachment) GetDescription() *string

func (*InvoiceAttachment) GetExtraProperties

func (i *InvoiceAttachment) GetExtraProperties() map[string]interface{}

func (*InvoiceAttachment) GetFilename

func (i *InvoiceAttachment) GetFilename() *string

func (*InvoiceAttachment) GetFilesize

func (i *InvoiceAttachment) GetFilesize() *int

func (*InvoiceAttachment) GetHash

func (i *InvoiceAttachment) GetHash() *string

func (*InvoiceAttachment) GetID

func (i *InvoiceAttachment) GetID() *string

func (*InvoiceAttachment) GetMimeType

func (i *InvoiceAttachment) GetMimeType() *string

func (*InvoiceAttachment) GetUploadedAt

func (i *InvoiceAttachment) GetUploadedAt() *string

func (*InvoiceAttachment) String

func (i *InvoiceAttachment) String() string

func (*InvoiceAttachment) UnmarshalJSON

func (i *InvoiceAttachment) UnmarshalJSON(data []byte) error

type InvoiceAutomaticPaymentSource

type InvoiceAutomaticPaymentSource string

Indicates the automatic payment method for an [invoice payment request](entity:InvoicePaymentRequest).

const (
	InvoiceAutomaticPaymentSourceNone       InvoiceAutomaticPaymentSource = "NONE"
	InvoiceAutomaticPaymentSourceCardOnFile InvoiceAutomaticPaymentSource = "CARD_ON_FILE"
	InvoiceAutomaticPaymentSourceBankOnFile InvoiceAutomaticPaymentSource = "BANK_ON_FILE"
)

func NewInvoiceAutomaticPaymentSourceFromString

func NewInvoiceAutomaticPaymentSourceFromString(s string) (InvoiceAutomaticPaymentSource, error)

func (InvoiceAutomaticPaymentSource) Ptr

type InvoiceCustomField

type InvoiceCustomField struct {
	// The label or title of the custom field. This field is required for a custom field.
	Label *string `json:"label,omitempty" url:"label,omitempty"`
	// The text of the custom field. If omitted, only the label is rendered.
	Value *string `json:"value,omitempty" url:"value,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 *InvoiceCustomFieldPlacement `json:"placement,omitempty" url:"placement,omitempty"`
	// contains filtered or unexported fields
}

An additional seller-defined and customer-facing field to include on the invoice. For more information, see [Custom fields](https://developer.squareup.com/docs/invoices-api/overview#custom-fields).

Adding custom fields to an invoice requires an [Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).

func (*InvoiceCustomField) GetExtraProperties

func (i *InvoiceCustomField) GetExtraProperties() map[string]interface{}

func (*InvoiceCustomField) GetLabel

func (i *InvoiceCustomField) GetLabel() *string

func (*InvoiceCustomField) GetPlacement

func (*InvoiceCustomField) GetValue

func (i *InvoiceCustomField) GetValue() *string

func (*InvoiceCustomField) String

func (i *InvoiceCustomField) String() string

func (*InvoiceCustomField) UnmarshalJSON

func (i *InvoiceCustomField) UnmarshalJSON(data []byte) error

type InvoiceCustomFieldPlacement

type InvoiceCustomFieldPlacement string

Indicates where to render a custom field on the Square-hosted invoice page and in emailed or PDF copies of the invoice.

const (
	InvoiceCustomFieldPlacementAboveLineItems InvoiceCustomFieldPlacement = "ABOVE_LINE_ITEMS"
	InvoiceCustomFieldPlacementBelowLineItems InvoiceCustomFieldPlacement = "BELOW_LINE_ITEMS"
)

func NewInvoiceCustomFieldPlacementFromString

func NewInvoiceCustomFieldPlacementFromString(s string) (InvoiceCustomFieldPlacement, error)

func (InvoiceCustomFieldPlacement) Ptr

type InvoiceDeliveryMethod

type InvoiceDeliveryMethod string

Indicates how Square delivers the [invoice](entity:Invoice) to the customer.

const (
	InvoiceDeliveryMethodEmail         InvoiceDeliveryMethod = "EMAIL"
	InvoiceDeliveryMethodShareManually InvoiceDeliveryMethod = "SHARE_MANUALLY"
	InvoiceDeliveryMethodSms           InvoiceDeliveryMethod = "SMS"
)

func NewInvoiceDeliveryMethodFromString

func NewInvoiceDeliveryMethodFromString(s string) (InvoiceDeliveryMethod, error)

func (InvoiceDeliveryMethod) Ptr

type InvoiceFilter

type InvoiceFilter struct {
	// Limits the search to the specified locations. A location is required.
	// In the current implementation, only one location can be specified.
	LocationIDs []string `json:"location_ids,omitempty" url:"location_ids,omitempty"`
	// 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,omitempty" url:"customer_ids,omitempty"`
	// contains filtered or unexported fields
}

Describes query filters to apply.

func (*InvoiceFilter) GetCustomerIDs

func (i *InvoiceFilter) GetCustomerIDs() []string

func (*InvoiceFilter) GetExtraProperties

func (i *InvoiceFilter) GetExtraProperties() map[string]interface{}

func (*InvoiceFilter) GetLocationIDs

func (i *InvoiceFilter) GetLocationIDs() []string

func (*InvoiceFilter) String

func (i *InvoiceFilter) String() string

func (*InvoiceFilter) UnmarshalJSON

func (i *InvoiceFilter) UnmarshalJSON(data []byte) error

type InvoicePaymentReminder

type InvoicePaymentReminder struct {
	// A Square-assigned ID that uniquely identifies the reminder within the
	// `InvoicePaymentRequest`.
	UID *string `json:"uid,omitempty" url:"uid,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`.
	RelativeScheduledDays *int `json:"relative_scheduled_days,omitempty" url:"relative_scheduled_days,omitempty"`
	// The reminder message.
	Message *string `json:"message,omitempty" url:"message,omitempty"`
	// The status of the reminder.
	// See [InvoicePaymentReminderStatus](#type-invoicepaymentreminderstatus) for possible values
	Status *InvoicePaymentReminderStatus `json:"status,omitempty" url:"status,omitempty"`
	// If sent, the timestamp when the reminder was sent, in RFC 3339 format.
	SentAt *string `json:"sent_at,omitempty" url:"sent_at,omitempty"`
	// contains filtered or unexported fields
}

Describes a payment request reminder (automatic notification) that Square sends to the customer. You configure a reminder relative to the payment request `due_date`.

func (*InvoicePaymentReminder) GetExtraProperties

func (i *InvoicePaymentReminder) GetExtraProperties() map[string]interface{}

func (*InvoicePaymentReminder) GetMessage

func (i *InvoicePaymentReminder) GetMessage() *string

func (*InvoicePaymentReminder) GetRelativeScheduledDays

func (i *InvoicePaymentReminder) GetRelativeScheduledDays() *int

func (*InvoicePaymentReminder) GetSentAt

func (i *InvoicePaymentReminder) GetSentAt() *string

func (*InvoicePaymentReminder) GetStatus

func (*InvoicePaymentReminder) GetUID

func (i *InvoicePaymentReminder) GetUID() *string

func (*InvoicePaymentReminder) String

func (i *InvoicePaymentReminder) String() string

func (*InvoicePaymentReminder) UnmarshalJSON

func (i *InvoicePaymentReminder) UnmarshalJSON(data []byte) error

type InvoicePaymentReminderStatus

type InvoicePaymentReminderStatus string

The status of a payment request reminder.

const (
	InvoicePaymentReminderStatusPending       InvoicePaymentReminderStatus = "PENDING"
	InvoicePaymentReminderStatusNotApplicable InvoicePaymentReminderStatus = "NOT_APPLICABLE"
	InvoicePaymentReminderStatusSent          InvoicePaymentReminderStatus = "SENT"
)

func NewInvoicePaymentReminderStatusFromString

func NewInvoicePaymentReminderStatusFromString(s string) (InvoicePaymentReminderStatus, error)

func (InvoicePaymentReminderStatus) Ptr

type InvoicePaymentRequest

type InvoicePaymentRequest struct {
	// The Square-generated ID of the payment request in an [invoice](entity:Invoice).
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// 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 *InvoiceRequestMethod `json:"request_method,omitempty" url:"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 *InvoiceRequestType `json:"request_type,omitempty" url:"request_type,omitempty"`
	// The due date (in the invoice's time zone) for the payment request, in `YYYY-MM-DD` format. This field
	// is required to create a payment request. If an `automatic_payment_source` is defined for the request, Square
	// charges the payment source on this date.
	//
	// After this date, the invoice becomes overdue. For example, a payment `due_date` of 2021-03-09 with a `timezone`
	// of America/Los\_Angeles becomes overdue at midnight on March 9 in America/Los\_Angeles (which equals a UTC
	// timestamp of 2021-03-10T08:00:00Z).
	DueDate *string `json:"due_date,omitempty" url:"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" url:"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's total amount.
	// - When the payment `request_type` is `INSTALLMENT`, it is the percentage of the order's 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" url:"percentage_requested,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" url:"tipping_enabled,omitempty"`
	// The payment method for an automatic payment.
	//
	// The default value is `NONE`.
	// See [InvoiceAutomaticPaymentSource](#type-invoiceautomaticpaymentsource) for possible values
	AutomaticPaymentSource *InvoiceAutomaticPaymentSource `json:"automatic_payment_source,omitempty" url:"automatic_payment_source,omitempty"`
	// The ID of the credit or debit card on file to charge for the payment request. To get the cards on file for a customer,
	// call [ListCards](api-endpoint:Cards-ListCards) and include the `customer_id` of the invoice recipient.
	CardID *string `json:"card_id,omitempty" url:"card_id,omitempty"`
	// A list of one or more reminders to send for the payment request.
	Reminders []*InvoicePaymentReminder `json:"reminders,omitempty" url:"reminders,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" url:"computed_amount_money,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" url:"total_completed_amount_money,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" url:"rounding_adjustment_included_money,omitempty"`
	// contains filtered or unexported fields
}

Represents a payment request for an [invoice](entity:Invoice). Invoices can specify a maximum of 13 payment requests, with up to 12 `INSTALLMENT` request types. For more information, see [Configuring payment requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests).

Adding `INSTALLMENT` payment requests to an invoice requires an [Invoices Plus subscription](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription).

func (*InvoicePaymentRequest) GetAutomaticPaymentSource

func (i *InvoicePaymentRequest) GetAutomaticPaymentSource() *InvoiceAutomaticPaymentSource

func (*InvoicePaymentRequest) GetCardID

func (i *InvoicePaymentRequest) GetCardID() *string

func (*InvoicePaymentRequest) GetComputedAmountMoney

func (i *InvoicePaymentRequest) GetComputedAmountMoney() *Money

func (*InvoicePaymentRequest) GetDueDate

func (i *InvoicePaymentRequest) GetDueDate() *string

func (*InvoicePaymentRequest) GetExtraProperties

func (i *InvoicePaymentRequest) GetExtraProperties() map[string]interface{}

func (*InvoicePaymentRequest) GetFixedAmountRequestedMoney

func (i *InvoicePaymentRequest) GetFixedAmountRequestedMoney() *Money

func (*InvoicePaymentRequest) GetPercentageRequested

func (i *InvoicePaymentRequest) GetPercentageRequested() *string

func (*InvoicePaymentRequest) GetReminders

func (i *InvoicePaymentRequest) GetReminders() []*InvoicePaymentReminder

func (*InvoicePaymentRequest) GetRequestMethod

func (i *InvoicePaymentRequest) GetRequestMethod() *InvoiceRequestMethod

func (*InvoicePaymentRequest) GetRequestType

func (i *InvoicePaymentRequest) GetRequestType() *InvoiceRequestType

func (*InvoicePaymentRequest) GetRoundingAdjustmentIncludedMoney

func (i *InvoicePaymentRequest) GetRoundingAdjustmentIncludedMoney() *Money

func (*InvoicePaymentRequest) GetTippingEnabled

func (i *InvoicePaymentRequest) GetTippingEnabled() *bool

func (*InvoicePaymentRequest) GetTotalCompletedAmountMoney

func (i *InvoicePaymentRequest) GetTotalCompletedAmountMoney() *Money

func (*InvoicePaymentRequest) GetUID

func (i *InvoicePaymentRequest) GetUID() *string

func (*InvoicePaymentRequest) String

func (i *InvoicePaymentRequest) String() string

func (*InvoicePaymentRequest) UnmarshalJSON

func (i *InvoicePaymentRequest) UnmarshalJSON(data []byte) error

type InvoiceQuery

type InvoiceQuery struct {
	// Query filters to apply in searching invoices.
	// For more information, see [Search for invoices](https://developer.squareup.com/docs/invoices-api/retrieve-list-search-invoices#search-invoices).
	Filter *InvoiceFilter `json:"filter,omitempty" url:"filter,omitempty"`
	// Describes the sort order for the search result.
	Sort *InvoiceSort `json:"sort,omitempty" url:"sort,omitempty"`
	// contains filtered or unexported fields
}

Describes query criteria for searching invoices.

func (*InvoiceQuery) GetExtraProperties

func (i *InvoiceQuery) GetExtraProperties() map[string]interface{}

func (*InvoiceQuery) GetFilter

func (i *InvoiceQuery) GetFilter() *InvoiceFilter

func (*InvoiceQuery) GetSort

func (i *InvoiceQuery) GetSort() *InvoiceSort

func (*InvoiceQuery) String

func (i *InvoiceQuery) String() string

func (*InvoiceQuery) UnmarshalJSON

func (i *InvoiceQuery) UnmarshalJSON(data []byte) error

type InvoiceRecipient

type InvoiceRecipient struct {
	// The ID of the customer. This is the customer profile ID that
	// you provide when creating a draft invoice.
	CustomerID *string `json:"customer_id,omitempty" url:"customer_id,omitempty"`
	// The recipient's given (that is, first) name.
	GivenName *string `json:"given_name,omitempty" url:"given_name,omitempty"`
	// The recipient's family (that is, last) name.
	FamilyName *string `json:"family_name,omitempty" url:"family_name,omitempty"`
	// The recipient's email address.
	EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"`
	// The recipient's physical address.
	Address *Address `json:"address,omitempty" url:"address,omitempty"`
	// The recipient's phone number.
	PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"`
	// The name of the recipient's company.
	CompanyName *string `json:"company_name,omitempty" url:"company_name,omitempty"`
	// The recipient's tax IDs. The country of the seller account determines whether this field
	// is available for the customer. For more information, see [Invoice recipient tax IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids).
	TaxIDs *InvoiceRecipientTaxIDs `json:"tax_ids,omitempty" url:"tax_ids,omitempty"`
	// contains filtered or unexported fields
}

Represents a snapshot of customer data. This object stores customer data that is displayed on the invoice and that Square uses to deliver the invoice.

When you provide a customer ID for a draft invoice, Square retrieves the associated customer profile and populates the remaining `InvoiceRecipient` fields. You cannot update these fields after the invoice is published. Square updates the customer ID in response to a merge operation, but does not update other fields.

func (*InvoiceRecipient) GetAddress

func (i *InvoiceRecipient) GetAddress() *Address

func (*InvoiceRecipient) GetCompanyName

func (i *InvoiceRecipient) GetCompanyName() *string

func (*InvoiceRecipient) GetCustomerID

func (i *InvoiceRecipient) GetCustomerID() *string

func (*InvoiceRecipient) GetEmailAddress

func (i *InvoiceRecipient) GetEmailAddress() *string

func (*InvoiceRecipient) GetExtraProperties

func (i *InvoiceRecipient) GetExtraProperties() map[string]interface{}

func (*InvoiceRecipient) GetFamilyName

func (i *InvoiceRecipient) GetFamilyName() *string

func (*InvoiceRecipient) GetGivenName

func (i *InvoiceRecipient) GetGivenName() *string

func (*InvoiceRecipient) GetPhoneNumber

func (i *InvoiceRecipient) GetPhoneNumber() *string

func (*InvoiceRecipient) GetTaxIDs

func (i *InvoiceRecipient) GetTaxIDs() *InvoiceRecipientTaxIDs

func (*InvoiceRecipient) String

func (i *InvoiceRecipient) String() string

func (*InvoiceRecipient) UnmarshalJSON

func (i *InvoiceRecipient) UnmarshalJSON(data []byte) error

type InvoiceRecipientTaxIDs

type InvoiceRecipientTaxIDs struct {
	// The EU VAT identification number for the invoice recipient. For example, `IE3426675K`.
	EuVat *string `json:"eu_vat,omitempty" url:"eu_vat,omitempty"`
	// contains filtered or unexported fields
}

Represents the tax IDs for an invoice recipient. The country of the seller account determines whether the corresponding `tax_ids` field is available for the customer. For more information, see [Invoice recipient tax IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids).

func (*InvoiceRecipientTaxIDs) GetEuVat

func (i *InvoiceRecipientTaxIDs) GetEuVat() *string

func (*InvoiceRecipientTaxIDs) GetExtraProperties

func (i *InvoiceRecipientTaxIDs) GetExtraProperties() map[string]interface{}

func (*InvoiceRecipientTaxIDs) String

func (i *InvoiceRecipientTaxIDs) String() string

func (*InvoiceRecipientTaxIDs) UnmarshalJSON

func (i *InvoiceRecipientTaxIDs) UnmarshalJSON(data []byte) error

type InvoiceRequestMethod

type InvoiceRequestMethod string

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.

const (
	InvoiceRequestMethodEmail               InvoiceRequestMethod = "EMAIL"
	InvoiceRequestMethodChargeCardOnFile    InvoiceRequestMethod = "CHARGE_CARD_ON_FILE"
	InvoiceRequestMethodShareManually       InvoiceRequestMethod = "SHARE_MANUALLY"
	InvoiceRequestMethodChargeBankOnFile    InvoiceRequestMethod = "CHARGE_BANK_ON_FILE"
	InvoiceRequestMethodSms                 InvoiceRequestMethod = "SMS"
	InvoiceRequestMethodSmsChargeCardOnFile InvoiceRequestMethod = "SMS_CHARGE_CARD_ON_FILE"
	InvoiceRequestMethodSmsChargeBankOnFile InvoiceRequestMethod = "SMS_CHARGE_BANK_ON_FILE"
)

func NewInvoiceRequestMethodFromString

func NewInvoiceRequestMethodFromString(s string) (InvoiceRequestMethod, error)

func (InvoiceRequestMethod) Ptr

type InvoiceRequestType

type InvoiceRequestType string

Indicates the type of the payment request. For more information, see [Configuring payment requests](https://developer.squareup.com/docs/invoices-api/create-publish-invoices#payment-requests).

const (
	InvoiceRequestTypeBalance     InvoiceRequestType = "BALANCE"
	InvoiceRequestTypeDeposit     InvoiceRequestType = "DEPOSIT"
	InvoiceRequestTypeInstallment InvoiceRequestType = "INSTALLMENT"
)

func NewInvoiceRequestTypeFromString

func NewInvoiceRequestTypeFromString(s string) (InvoiceRequestType, error)

func (InvoiceRequestType) Ptr

type InvoiceSort

type InvoiceSort struct {
	// The field to use for sorting.
	// See [InvoiceSortField](#type-invoicesortfield) for possible values
	Field InvoiceSortField `json:"field,omitempty" url:"field,omitempty"`
	// The order to use for sorting the results.
	// See [SortOrder](#type-sortorder) for possible values
	Order *SortOrder `json:"order,omitempty" url:"order,omitempty"`
	// contains filtered or unexported fields
}

Identifies the sort field and sort order.

func (*InvoiceSort) GetExtraProperties

func (i *InvoiceSort) GetExtraProperties() map[string]interface{}

func (*InvoiceSort) GetOrder

func (i *InvoiceSort) GetOrder() *SortOrder

func (*InvoiceSort) String

func (i *InvoiceSort) String() string

func (*InvoiceSort) UnmarshalJSON

func (i *InvoiceSort) UnmarshalJSON(data []byte) error

type InvoiceSortField

type InvoiceSortField = string

The field to use for sorting.

type InvoiceStatus

type InvoiceStatus string

Indicates the status of an [invoice](entity:Invoice).

const (
	InvoiceStatusDraft             InvoiceStatus = "DRAFT"
	InvoiceStatusUnpaid            InvoiceStatus = "UNPAID"
	InvoiceStatusScheduled         InvoiceStatus = "SCHEDULED"
	InvoiceStatusPartiallyPaid     InvoiceStatus = "PARTIALLY_PAID"
	InvoiceStatusPaid              InvoiceStatus = "PAID"
	InvoiceStatusPartiallyRefunded InvoiceStatus = "PARTIALLY_REFUNDED"
	InvoiceStatusRefunded          InvoiceStatus = "REFUNDED"
	InvoiceStatusCanceled          InvoiceStatus = "CANCELED"
	InvoiceStatusFailed            InvoiceStatus = "FAILED"
	InvoiceStatusPaymentPending    InvoiceStatus = "PAYMENT_PENDING"
)

func NewInvoiceStatusFromString

func NewInvoiceStatusFromString(s string) (InvoiceStatus, error)

func (InvoiceStatus) Ptr

func (i InvoiceStatus) Ptr() *InvoiceStatus

type InvoicesDeleteRequest

type InvoicesDeleteRequest = DeleteInvoicesRequest

InvoicesDeleteRequest is an alias for DeleteInvoicesRequest.

type InvoicesGetRequest

type InvoicesGetRequest = GetInvoicesRequest

InvoicesGetRequest is an alias for GetInvoicesRequest.

type InvoicesListRequest

type InvoicesListRequest = ListInvoicesRequest

InvoicesListRequest is an alias for ListInvoicesRequest.

type ItemVariationLocationOverrides

type ItemVariationLocationOverrides struct {
	// The ID of the `Location`. This can include locations that are deactivated.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The price of the `CatalogItemVariation` at the given `Location`, or blank for variable pricing.
	PriceMoney *Money `json:"price_money,omitempty" url:"price_money,omitempty"`
	// The pricing type (fixed or variable) for the `CatalogItemVariation` at the given `Location`.
	// See [CatalogPricingType](#type-catalogpricingtype) for possible values
	PricingType *CatalogPricingType `json:"pricing_type,omitempty" url:"pricing_type,omitempty"`
	// If `true`, inventory tracking is active for the `CatalogItemVariation` at this `Location`.
	TrackInventory *bool `json:"track_inventory,omitempty" url:"track_inventory,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 *InventoryAlertType `json:"inventory_alert_type,omitempty" url:"inventory_alert_type,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" url:"inventory_alert_threshold,omitempty"`
	// Indicates whether the overridden item variation is sold out at the specified location.
	//
	// When inventory tracking is enabled on the item variation either globally or at the specified location,
	// the item variation is automatically marked as sold out when its inventory count reaches zero. The seller
	// can manually set the item variation as sold out even when the inventory count is greater than zero.
	// Attempts by an application to set this attribute are ignored. Regardless how the sold-out status is set,
	// applications should treat its inventory count as zero when this attribute value is `true`.
	SoldOut *bool `json:"sold_out,omitempty" url:"sold_out,omitempty"`
	// The seller-assigned timestamp, of the RFC 3339 format, to indicate when this sold-out variation
	// becomes available again at the specified location. Attempts by an application to set this attribute are ignored.
	// When the current time is later than this attribute value, the affected item variation is no longer sold out.
	SoldOutValidUntil *string `json:"sold_out_valid_until,omitempty" url:"sold_out_valid_until,omitempty"`
	// contains filtered or unexported fields
}

Price and inventory alerting overrides for a `CatalogItemVariation` at a specific `Location`.

func (*ItemVariationLocationOverrides) GetExtraProperties

func (i *ItemVariationLocationOverrides) GetExtraProperties() map[string]interface{}

func (*ItemVariationLocationOverrides) GetInventoryAlertThreshold

func (i *ItemVariationLocationOverrides) GetInventoryAlertThreshold() *int64

func (*ItemVariationLocationOverrides) GetInventoryAlertType

func (i *ItemVariationLocationOverrides) GetInventoryAlertType() *InventoryAlertType

func (*ItemVariationLocationOverrides) GetLocationID

func (i *ItemVariationLocationOverrides) GetLocationID() *string

func (*ItemVariationLocationOverrides) GetPriceMoney

func (i *ItemVariationLocationOverrides) GetPriceMoney() *Money

func (*ItemVariationLocationOverrides) GetPricingType

func (*ItemVariationLocationOverrides) GetSoldOut

func (i *ItemVariationLocationOverrides) GetSoldOut() *bool

func (*ItemVariationLocationOverrides) GetSoldOutValidUntil

func (i *ItemVariationLocationOverrides) GetSoldOutValidUntil() *string

func (*ItemVariationLocationOverrides) GetTrackInventory

func (i *ItemVariationLocationOverrides) GetTrackInventory() *bool

func (*ItemVariationLocationOverrides) String

func (*ItemVariationLocationOverrides) UnmarshalJSON

func (i *ItemVariationLocationOverrides) UnmarshalJSON(data []byte) error

type Job added in v1.0.0

type Job struct {
	// **Read only** The unique Square-assigned ID of the job. If you need a job ID for an API request,
	// call [ListJobs](api-endpoint:Team-ListJobs) or use the ID returned when you created the job.
	// You can also get job IDs from a team member's wage setting.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The title of the job.
	Title *string `json:"title,omitempty" url:"title,omitempty"`
	// Indicates whether team members can earn tips for the job.
	IsTipEligible *bool `json:"is_tip_eligible,omitempty" url:"is_tip_eligible,omitempty"`
	// The timestamp when the job was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp when the job was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// **Read only** The current version of the job. Include this field in `UpdateJob` requests to enable
	// [optimistic concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency)
	// control and avoid overwrites from concurrent requests. Requests fail if the provided version doesn't
	// match the server version at the time of the request.
	Version *int `json:"version,omitempty" url:"version,omitempty"`
	// contains filtered or unexported fields
}

Represents a job that can be assigned to [team members](entity:TeamMember). This object defines the job's title and tip eligibility. Compensation is defined in a [job assignment](entity:JobAssignment) in a team member's wage setting.

func (*Job) GetCreatedAt added in v1.0.0

func (j *Job) GetCreatedAt() *string

func (*Job) GetExtraProperties added in v1.0.0

func (j *Job) GetExtraProperties() map[string]interface{}

func (*Job) GetID added in v1.0.0

func (j *Job) GetID() *string

func (*Job) GetIsTipEligible added in v1.0.0

func (j *Job) GetIsTipEligible() *bool

func (*Job) GetTitle added in v1.0.0

func (j *Job) GetTitle() *string

func (*Job) GetUpdatedAt added in v1.0.0

func (j *Job) GetUpdatedAt() *string

func (*Job) GetVersion added in v1.0.0

func (j *Job) GetVersion() *int

func (*Job) String added in v1.0.0

func (j *Job) String() string

func (*Job) UnmarshalJSON added in v1.0.0

func (j *Job) UnmarshalJSON(data []byte) error

type JobAssignment

type JobAssignment struct {
	// The title of the job.
	JobTitle *string `json:"job_title,omitempty" url:"job_title,omitempty"`
	// 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
	PayType JobAssignmentPayType `json:"pay_type" url:"pay_type"`
	// The hourly pay rate of the job. For `SALARY` pay types, Square calculates the hourly rate based on
	// `annual_rate` and `weekly_hours`.
	HourlyRate *Money `json:"hourly_rate,omitempty" url:"hourly_rate,omitempty"`
	// 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" url:"annual_rate,omitempty"`
	// The planned hours per week for the job. Set if the job `PayType` is `SALARY`.
	WeeklyHours *int `json:"weekly_hours,omitempty" url:"weekly_hours,omitempty"`
	// The ID of the [job](entity:Job).
	JobID *string `json:"job_id,omitempty" url:"job_id,omitempty"`
	// contains filtered or unexported fields
}

Represents a job assigned to a [team member](entity:TeamMember), including the compensation the team member earns for the job. Job assignments are listed in the team member's [wage setting](entity:WageSetting).

func (*JobAssignment) GetAnnualRate

func (j *JobAssignment) GetAnnualRate() *Money

func (*JobAssignment) GetExtraProperties

func (j *JobAssignment) GetExtraProperties() map[string]interface{}

func (*JobAssignment) GetHourlyRate

func (j *JobAssignment) GetHourlyRate() *Money

func (*JobAssignment) GetJobID added in v1.0.0

func (j *JobAssignment) GetJobID() *string

func (*JobAssignment) GetJobTitle

func (j *JobAssignment) GetJobTitle() *string

func (*JobAssignment) GetPayType

func (j *JobAssignment) GetPayType() JobAssignmentPayType

func (*JobAssignment) GetWeeklyHours

func (j *JobAssignment) GetWeeklyHours() *int

func (*JobAssignment) String

func (j *JobAssignment) String() string

func (*JobAssignment) UnmarshalJSON

func (j *JobAssignment) UnmarshalJSON(data []byte) error

type JobAssignmentPayType

type JobAssignmentPayType string

Enumerates the possible pay types that a job can be assigned.

const (
	JobAssignmentPayTypeNone   JobAssignmentPayType = "NONE"
	JobAssignmentPayTypeHourly JobAssignmentPayType = "HOURLY"
	JobAssignmentPayTypeSalary JobAssignmentPayType = "SALARY"
)

func NewJobAssignmentPayTypeFromString

func NewJobAssignmentPayTypeFromString(s string) (JobAssignmentPayType, error)

func (JobAssignmentPayType) Ptr

type LinkCustomerToGiftCardRequest

type LinkCustomerToGiftCardRequest struct {
	// The ID of the gift card to be linked.
	GiftCardID string `json:"-" url:"-"`
	// The ID of the customer to link to the gift card.
	CustomerID string `json:"customer_id" url:"-"`
}

type LinkCustomerToGiftCardResponse

type LinkCustomerToGiftCardResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The gift card with the ID of the linked customer listed in the `customer_ids` field.
	GiftCard *GiftCard `json:"gift_card,omitempty" url:"gift_card,omitempty"`
	// contains filtered or unexported fields
}

A response that contains the linked `GiftCard` object. If the request resulted in errors, the response contains a set of `Error` objects.

func (*LinkCustomerToGiftCardResponse) GetErrors

func (l *LinkCustomerToGiftCardResponse) GetErrors() []*Error

func (*LinkCustomerToGiftCardResponse) GetExtraProperties

func (l *LinkCustomerToGiftCardResponse) GetExtraProperties() map[string]interface{}

func (*LinkCustomerToGiftCardResponse) GetGiftCard

func (l *LinkCustomerToGiftCardResponse) GetGiftCard() *GiftCard

func (*LinkCustomerToGiftCardResponse) String

func (*LinkCustomerToGiftCardResponse) UnmarshalJSON

func (l *LinkCustomerToGiftCardResponse) UnmarshalJSON(data []byte) error

type ListBankAccountsRequest added in v1.2.0

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/working-with-apis/pagination) guide for more information.
	Cursor *string `json:"-" url:"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 *int `json:"-" url:"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:"-" url:"location_id,omitempty"`
}

type ListBankAccountsResponse

type ListBankAccountsResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// List of BankAccounts associated with this account.
	BankAccounts []*BankAccount `json:"bank_accounts,omitempty" url:"bank_accounts,omitempty"`
	// 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/working-with-apis/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Response object returned by ListBankAccounts.

func (*ListBankAccountsResponse) GetBankAccounts

func (l *ListBankAccountsResponse) GetBankAccounts() []*BankAccount

func (*ListBankAccountsResponse) GetCursor

func (l *ListBankAccountsResponse) GetCursor() *string

func (*ListBankAccountsResponse) GetErrors

func (l *ListBankAccountsResponse) GetErrors() []*Error

func (*ListBankAccountsResponse) GetExtraProperties

func (l *ListBankAccountsResponse) GetExtraProperties() map[string]interface{}

func (*ListBankAccountsResponse) String

func (l *ListBankAccountsResponse) String() string

func (*ListBankAccountsResponse) UnmarshalJSON

func (l *ListBankAccountsResponse) UnmarshalJSON(data []byte) error

type ListBookingCustomAttributeDefinitionsResponse

type ListBookingCustomAttributeDefinitionsResponse struct {
	// The retrieved custom attribute definitions. If no custom attribute definitions are found,
	// Square returns an empty object (`{}`).
	CustomAttributeDefinitions []*CustomAttributeDefinition `json:"custom_attribute_definitions,omitempty" url:"custom_attribute_definitions,omitempty"`
	// The cursor to provide in your next call to this endpoint to retrieve the next page of
	// results for your original request. This field is present only if the request succeeded and
	// additional results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [ListBookingCustomAttributeDefinitions](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributeDefinitions) response. Either `custom_attribute_definitions`, an empty object, or `errors` is present in the response. If additional results are available, the `cursor` field is also present along with `custom_attribute_definitions`.

func (*ListBookingCustomAttributeDefinitionsResponse) GetCursor

func (*ListBookingCustomAttributeDefinitionsResponse) GetCustomAttributeDefinitions

func (l *ListBookingCustomAttributeDefinitionsResponse) GetCustomAttributeDefinitions() []*CustomAttributeDefinition

func (*ListBookingCustomAttributeDefinitionsResponse) GetErrors

func (*ListBookingCustomAttributeDefinitionsResponse) GetExtraProperties

func (l *ListBookingCustomAttributeDefinitionsResponse) GetExtraProperties() map[string]interface{}

func (*ListBookingCustomAttributeDefinitionsResponse) String

func (*ListBookingCustomAttributeDefinitionsResponse) UnmarshalJSON

func (l *ListBookingCustomAttributeDefinitionsResponse) UnmarshalJSON(data []byte) error

type ListBookingCustomAttributesResponse

type ListBookingCustomAttributesResponse struct {
	// The retrieved custom attributes. If `with_definitions` was set to `true` in the request,
	// the custom attribute definition is returned in the `definition` field of each custom attribute.
	//
	// If no custom attributes are found, Square returns an empty object (`{}`).
	CustomAttributes []*CustomAttribute `json:"custom_attributes,omitempty" url:"custom_attributes,omitempty"`
	// The cursor to use in your next call to this endpoint to retrieve the next page of results
	// for your original request. This field is present only if the request succeeded and additional
	// results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [ListBookingCustomAttributes](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributes) response. Either `custom_attributes`, an empty object, or `errors` is present in the response. If additional results are available, the `cursor` field is also present along with `custom_attributes`.

func (*ListBookingCustomAttributesResponse) GetCursor

func (*ListBookingCustomAttributesResponse) GetCustomAttributes

func (l *ListBookingCustomAttributesResponse) GetCustomAttributes() []*CustomAttribute

func (*ListBookingCustomAttributesResponse) GetErrors

func (l *ListBookingCustomAttributesResponse) GetErrors() []*Error

func (*ListBookingCustomAttributesResponse) GetExtraProperties

func (l *ListBookingCustomAttributesResponse) GetExtraProperties() map[string]interface{}

func (*ListBookingCustomAttributesResponse) String

func (*ListBookingCustomAttributesResponse) UnmarshalJSON

func (l *ListBookingCustomAttributesResponse) UnmarshalJSON(data []byte) error

type ListBookingsRequest added in v1.2.0

type ListBookingsRequest struct {
	// The maximum number of results per page to return in a paged response.
	Limit *int `json:"-" url:"limit,omitempty"`
	// The pagination cursor from the preceding response to return the next page of the results. Do not set this when retrieving the first page of the results.
	Cursor *string `json:"-" url:"cursor,omitempty"`
	// The [customer](entity:Customer) for whom to retrieve bookings. If this is not set, bookings for all customers are retrieved.
	CustomerID *string `json:"-" url:"customer_id,omitempty"`
	// The team member for whom to retrieve bookings. If this is not set, bookings of all members are retrieved.
	TeamMemberID *string `json:"-" url:"team_member_id,omitempty"`
	// The location for which to retrieve bookings. If this is not set, all locations' bookings are retrieved.
	LocationID *string `json:"-" url:"location_id,omitempty"`
	// The RFC 3339 timestamp specifying the earliest of the start time. If this is not set, the current time is used.
	StartAtMin *string `json:"-" url:"start_at_min,omitempty"`
	// The RFC 3339 timestamp specifying the latest of the start time. If this is not set, the time of 31 days after `start_at_min` is used.
	StartAtMax *string `json:"-" url:"start_at_max,omitempty"`
}

type ListBookingsResponse

type ListBookingsResponse struct {
	// The list of targeted bookings.
	Bookings []*Booking `json:"bookings,omitempty" url:"bookings,omitempty"`
	// The pagination cursor to be used in the subsequent request to get the next page of the results. Stop retrieving the next page of the results when the cursor is not set.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*ListBookingsResponse) GetBookings

func (l *ListBookingsResponse) GetBookings() []*Booking

func (*ListBookingsResponse) GetCursor

func (l *ListBookingsResponse) GetCursor() *string

func (*ListBookingsResponse) GetErrors

func (l *ListBookingsResponse) GetErrors() []*Error

func (*ListBookingsResponse) GetExtraProperties

func (l *ListBookingsResponse) GetExtraProperties() map[string]interface{}

func (*ListBookingsResponse) String

func (l *ListBookingsResponse) String() string

func (*ListBookingsResponse) UnmarshalJSON

func (l *ListBookingsResponse) UnmarshalJSON(data []byte) error

type ListBreakTypesResponse

type ListBreakTypesResponse struct {
	// A page of `BreakType` results.
	BreakTypes []*BreakType `json:"break_types,omitempty" url:"break_types,omitempty"`
	// The value supplied in the subsequent request to fetch the next page
	// of `BreakType` results.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response to a request for a set of `BreakType` objects. The response contains the requested `BreakType` objects and might contain a set of `Error` objects if the request resulted in errors.

func (*ListBreakTypesResponse) GetBreakTypes

func (l *ListBreakTypesResponse) GetBreakTypes() []*BreakType

func (*ListBreakTypesResponse) GetCursor

func (l *ListBreakTypesResponse) GetCursor() *string

func (*ListBreakTypesResponse) GetErrors

func (l *ListBreakTypesResponse) GetErrors() []*Error

func (*ListBreakTypesResponse) GetExtraProperties

func (l *ListBreakTypesResponse) GetExtraProperties() map[string]interface{}

func (*ListBreakTypesResponse) String

func (l *ListBreakTypesResponse) String() string

func (*ListBreakTypesResponse) UnmarshalJSON

func (l *ListBreakTypesResponse) UnmarshalJSON(data []byte) error

type ListCardsRequest added in v1.2.0

type ListCardsRequest 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/build-basics/common-api-patterns/pagination) for more information.
	Cursor *string `json:"-" url:"cursor,omitempty"`
	// Limit results to cards associated with the customer supplied.
	// By default, all cards owned by the merchant are returned.
	CustomerID *string `json:"-" url:"customer_id,omitempty"`
	// Includes disabled cards.
	// By default, all enabled cards owned by the merchant are returned.
	IncludeDisabled *bool `json:"-" url:"include_disabled,omitempty"`
	// Limit results to cards associated with the reference_id supplied.
	ReferenceID *string `json:"-" url:"reference_id,omitempty"`
	// Sorts the returned list by when the card was created with the specified order.
	// This field defaults to ASC.
	SortOrder *SortOrder `json:"-" url:"sort_order,omitempty"`
}

type ListCardsResponse

type ListCardsResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested list of `Card`s.
	Cards []*Card `json:"cards,omitempty" url:"cards,omitempty"`
	// The pagination cursor to be used in a subsequent request. If empty,
	// this is the final response.
	//
	// See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [ListCards](api-endpoint:Cards-ListCards) endpoint.

Note: if there are errors processing the request, the card field will not be present.

func (*ListCardsResponse) GetCards

func (l *ListCardsResponse) GetCards() []*Card

func (*ListCardsResponse) GetCursor

func (l *ListCardsResponse) GetCursor() *string

func (*ListCardsResponse) GetErrors

func (l *ListCardsResponse) GetErrors() []*Error

func (*ListCardsResponse) GetExtraProperties

func (l *ListCardsResponse) GetExtraProperties() map[string]interface{}

func (*ListCardsResponse) String

func (l *ListCardsResponse) String() string

func (*ListCardsResponse) UnmarshalJSON

func (l *ListCardsResponse) UnmarshalJSON(data []byte) error

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" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// All of the events (payments, refunds, etc.) for a cash drawer during
	// the shift.
	CashDrawerShiftEvents []*CashDrawerShiftEvent `json:"cash_drawer_shift_events,omitempty" url:"cash_drawer_shift_events,omitempty"`
	// contains filtered or unexported fields
}

func (*ListCashDrawerShiftEventsResponse) GetCashDrawerShiftEvents

func (l *ListCashDrawerShiftEventsResponse) GetCashDrawerShiftEvents() []*CashDrawerShiftEvent

func (*ListCashDrawerShiftEventsResponse) GetCursor

func (l *ListCashDrawerShiftEventsResponse) GetCursor() *string

func (*ListCashDrawerShiftEventsResponse) GetErrors

func (l *ListCashDrawerShiftEventsResponse) GetErrors() []*Error

func (*ListCashDrawerShiftEventsResponse) GetExtraProperties

func (l *ListCashDrawerShiftEventsResponse) GetExtraProperties() map[string]interface{}

func (*ListCashDrawerShiftEventsResponse) String

func (*ListCashDrawerShiftEventsResponse) UnmarshalJSON

func (l *ListCashDrawerShiftEventsResponse) UnmarshalJSON(data []byte) error

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" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// A collection of CashDrawerShiftSummary objects for shifts that match
	// the query.
	CashDrawerShifts []*CashDrawerShiftSummary `json:"cash_drawer_shifts,omitempty" url:"cash_drawer_shifts,omitempty"`
	// contains filtered or unexported fields
}

func (*ListCashDrawerShiftsResponse) GetCashDrawerShifts

func (l *ListCashDrawerShiftsResponse) GetCashDrawerShifts() []*CashDrawerShiftSummary

func (*ListCashDrawerShiftsResponse) GetCursor

func (l *ListCashDrawerShiftsResponse) GetCursor() *string

func (*ListCashDrawerShiftsResponse) GetErrors

func (l *ListCashDrawerShiftsResponse) GetErrors() []*Error

func (*ListCashDrawerShiftsResponse) GetExtraProperties

func (l *ListCashDrawerShiftsResponse) GetExtraProperties() map[string]interface{}

func (*ListCashDrawerShiftsResponse) String

func (*ListCashDrawerShiftsResponse) UnmarshalJSON

func (l *ListCashDrawerShiftsResponse) UnmarshalJSON(data []byte) error

type ListCatalogRequest added in v1.2.0

type ListCatalogRequest struct {
	// The pagination cursor returned in the previous response. Leave unset for an initial request.
	// The page size is currently set to be 100.
	// See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.
	Cursor *string `json:"-" url:"cursor,omitempty"`
	// An optional case-insensitive, comma-separated list of object types to retrieve.
	//
	// The valid values are defined in the [CatalogObjectType](entity:CatalogObjectType) enum, for example,
	// `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`,
	// `MODIFIER`, `MODIFIER_LIST`, `IMAGE`, etc.
	//
	// If this is unspecified, the operation returns objects of all the top level types at the version
	// of the Square API used to make the request. Object types that are nested onto other object types
	// are not included in the defaults.
	//
	// At the current API version the default object types are:
	// ITEM, CATEGORY, TAX, DISCOUNT, MODIFIER_LIST,
	// PRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT,
	// SUBSCRIPTION_PLAN, ITEM_OPTION, CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNT_SETTINGS.
	Types *string `json:"-" url:"types,omitempty"`
	// 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](entity:CatalogObject)s' `version` attribute.  If not included, results will be from the
	// current version of the catalog.
	CatalogVersion *int64 `json:"-" url:"catalog_version,omitempty"`
}

type ListCatalogResponse

type ListCatalogResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The pagination cursor to be used in a subsequent request. If unset, this is the final response.
	// See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// The CatalogObjects returned.
	Objects []*CatalogObject `json:"objects,omitempty" url:"objects,omitempty"`
	// contains filtered or unexported fields
}

func (*ListCatalogResponse) GetCursor

func (l *ListCatalogResponse) GetCursor() *string

func (*ListCatalogResponse) GetErrors

func (l *ListCatalogResponse) GetErrors() []*Error

func (*ListCatalogResponse) GetExtraProperties

func (l *ListCatalogResponse) GetExtraProperties() map[string]interface{}

func (*ListCatalogResponse) GetObjects

func (l *ListCatalogResponse) GetObjects() []*CatalogObject

func (*ListCatalogResponse) String

func (l *ListCatalogResponse) String() string

func (*ListCatalogResponse) UnmarshalJSON

func (l *ListCatalogResponse) UnmarshalJSON(data []byte) error

type ListCustomerCustomAttributeDefinitionsResponse

type ListCustomerCustomAttributeDefinitionsResponse struct {
	// The retrieved custom attribute definitions. If no custom attribute definitions are found,
	// Square returns an empty object (`{}`).
	CustomAttributeDefinitions []*CustomAttributeDefinition `json:"custom_attribute_definitions,omitempty" url:"custom_attribute_definitions,omitempty"`
	// The cursor to provide in your next call to this endpoint to retrieve the next page of
	// results for your original request. This field is present only if the request succeeded and
	// additional results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [ListCustomerCustomAttributeDefinitions](api-endpoint:CustomerCustomAttributes-ListCustomerCustomAttributeDefinitions) response. Either `custom_attribute_definitions`, an empty object, or `errors` is present in the response. If additional results are available, the `cursor` field is also present along with `custom_attribute_definitions`.

func (*ListCustomerCustomAttributeDefinitionsResponse) GetCursor

func (*ListCustomerCustomAttributeDefinitionsResponse) GetCustomAttributeDefinitions

func (l *ListCustomerCustomAttributeDefinitionsResponse) GetCustomAttributeDefinitions() []*CustomAttributeDefinition

func (*ListCustomerCustomAttributeDefinitionsResponse) GetErrors

func (*ListCustomerCustomAttributeDefinitionsResponse) GetExtraProperties

func (l *ListCustomerCustomAttributeDefinitionsResponse) GetExtraProperties() map[string]interface{}

func (*ListCustomerCustomAttributeDefinitionsResponse) String

func (*ListCustomerCustomAttributeDefinitionsResponse) UnmarshalJSON

type ListCustomerCustomAttributesResponse

type ListCustomerCustomAttributesResponse struct {
	// The retrieved custom attributes. If `with_definitions` was set to `true` in the request,
	// the custom attribute definition is returned in the `definition` field of each custom attribute.
	//
	// If no custom attributes are found, Square returns an empty object (`{}`).
	CustomAttributes []*CustomAttribute `json:"custom_attributes,omitempty" url:"custom_attributes,omitempty"`
	// The cursor to use in your next call to this endpoint to retrieve the next page of results
	// for your original request. This field is present only if the request succeeded and additional
	// results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [ListCustomerCustomAttributes](api-endpoint:CustomerCustomAttributes-ListCustomerCustomAttributes) response. Either `custom_attributes`, an empty object, or `errors` is present in the response. If additional results are available, the `cursor` field is also present along with `custom_attributes`.

func (*ListCustomerCustomAttributesResponse) GetCursor

func (*ListCustomerCustomAttributesResponse) GetCustomAttributes

func (l *ListCustomerCustomAttributesResponse) GetCustomAttributes() []*CustomAttribute

func (*ListCustomerCustomAttributesResponse) GetErrors

func (l *ListCustomerCustomAttributesResponse) GetErrors() []*Error

func (*ListCustomerCustomAttributesResponse) GetExtraProperties

func (l *ListCustomerCustomAttributesResponse) GetExtraProperties() map[string]interface{}

func (*ListCustomerCustomAttributesResponse) String

func (*ListCustomerCustomAttributesResponse) UnmarshalJSON

func (l *ListCustomerCustomAttributesResponse) UnmarshalJSON(data []byte) error

type ListCustomerGroupsResponse

type ListCustomerGroupsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// A list of customer groups belonging to the current seller.
	Groups []*CustomerGroup `json:"groups,omitempty" url:"groups,omitempty"`
	// 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.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [ListCustomerGroups](api-endpoint:CustomerGroups-ListCustomerGroups) endpoint.

Either `errors` or `groups` is present in a given response (never both).

func (*ListCustomerGroupsResponse) GetCursor

func (l *ListCustomerGroupsResponse) GetCursor() *string

func (*ListCustomerGroupsResponse) GetErrors

func (l *ListCustomerGroupsResponse) GetErrors() []*Error

func (*ListCustomerGroupsResponse) GetExtraProperties

func (l *ListCustomerGroupsResponse) GetExtraProperties() map[string]interface{}

func (*ListCustomerGroupsResponse) GetGroups

func (l *ListCustomerGroupsResponse) GetGroups() []*CustomerGroup

func (*ListCustomerGroupsResponse) String

func (l *ListCustomerGroupsResponse) String() string

func (*ListCustomerGroupsResponse) UnmarshalJSON

func (l *ListCustomerGroupsResponse) UnmarshalJSON(data []byte) error

type ListCustomerSegmentsResponse

type ListCustomerSegmentsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The list of customer segments belonging to the associated Square account.
	Segments []*CustomerSegment `json:"segments,omitempty" url:"segments,omitempty"`
	// A pagination cursor to be used in subsequent calls to `ListCustomerSegments`
	// to retrieve the next set of query results. The cursor is only present if the request succeeded and
	// additional results are available.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body for requests to the `ListCustomerSegments` endpoint.

Either `errors` or `segments` is present in a given response (never both).

func (*ListCustomerSegmentsResponse) GetCursor

func (l *ListCustomerSegmentsResponse) GetCursor() *string

func (*ListCustomerSegmentsResponse) GetErrors

func (l *ListCustomerSegmentsResponse) GetErrors() []*Error

func (*ListCustomerSegmentsResponse) GetExtraProperties

func (l *ListCustomerSegmentsResponse) GetExtraProperties() map[string]interface{}

func (*ListCustomerSegmentsResponse) GetSegments

func (l *ListCustomerSegmentsResponse) GetSegments() []*CustomerSegment

func (*ListCustomerSegmentsResponse) String

func (*ListCustomerSegmentsResponse) UnmarshalJSON

func (l *ListCustomerSegmentsResponse) UnmarshalJSON(data []byte) error

type ListCustomersRequest added in v1.2.0

type ListCustomersRequest 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"-" url:"cursor,omitempty"`
	// The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.
	// If the specified limit is less than 1 or greater than 100, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 100.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Limit *int `json:"-" url:"limit,omitempty"`
	// Indicates how customers should be sorted.
	//
	// The default value is `DEFAULT`.
	SortField *CustomerSortField `json:"-" url:"sort_field,omitempty"`
	// Indicates whether customers should be sorted in ascending (`ASC`) or
	// descending (`DESC`) order.
	//
	// The default value is `ASC`.
	SortOrder *SortOrder `json:"-" url:"sort_order,omitempty"`
	// Indicates whether to return the total count of customers in the `count` field of the response.
	//
	// The default value is `false`.
	Count *bool `json:"-" url:"count,omitempty"`
}

type ListCustomersResponse

type ListCustomersResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The customer profiles associated with the Square account or an empty object (`{}`) if none are found.
	// Only customer profiles with public information (`given_name`, `family_name`, `company_name`, `email_address`, or
	// `phone_number`) are included in the response.
	Customers []*Customer `json:"customers,omitempty" url:"customers,omitempty"`
	// A pagination cursor to retrieve the next set of results for the
	// original query. A cursor is only present if the request succeeded and additional results
	// are available.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// The total count of customers associated with the Square account. Only customer profiles with public information
	// (`given_name`, `family_name`, `company_name`, `email_address`, or `phone_number`) are counted. This field is present
	// only if `count` is set to `true` in the request.
	Count *int64 `json:"count,omitempty" url:"count,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the `ListCustomers` endpoint.

Either `errors` or `customers` is present in a given response (never both).

func (*ListCustomersResponse) GetCount

func (l *ListCustomersResponse) GetCount() *int64

func (*ListCustomersResponse) GetCursor

func (l *ListCustomersResponse) GetCursor() *string

func (*ListCustomersResponse) GetCustomers

func (l *ListCustomersResponse) GetCustomers() []*Customer

func (*ListCustomersResponse) GetErrors

func (l *ListCustomersResponse) GetErrors() []*Error

func (*ListCustomersResponse) GetExtraProperties

func (l *ListCustomersResponse) GetExtraProperties() map[string]interface{}

func (*ListCustomersResponse) String

func (l *ListCustomersResponse) String() string

func (*ListCustomersResponse) UnmarshalJSON

func (l *ListCustomersResponse) UnmarshalJSON(data []byte) error

type ListDeviceCodesResponse

type ListDeviceCodesResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The queried DeviceCode.
	DeviceCodes []*DeviceCode `json:"device_codes,omitempty" url:"device_codes,omitempty"`
	// 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](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

func (*ListDeviceCodesResponse) GetCursor

func (l *ListDeviceCodesResponse) GetCursor() *string

func (*ListDeviceCodesResponse) GetDeviceCodes

func (l *ListDeviceCodesResponse) GetDeviceCodes() []*DeviceCode

func (*ListDeviceCodesResponse) GetErrors

func (l *ListDeviceCodesResponse) GetErrors() []*Error

func (*ListDeviceCodesResponse) GetExtraProperties

func (l *ListDeviceCodesResponse) GetExtraProperties() map[string]interface{}

func (*ListDeviceCodesResponse) String

func (l *ListDeviceCodesResponse) String() string

func (*ListDeviceCodesResponse) UnmarshalJSON

func (l *ListDeviceCodesResponse) UnmarshalJSON(data []byte) error

type ListDevicesRequest added in v1.2.0

type ListDevicesRequest 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.
	// See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.
	Cursor *string `json:"-" url:"cursor,omitempty"`
	// The order in which results are listed.
	// - `ASC` - Oldest to newest.
	// - `DESC` - Newest to oldest (default).
	SortOrder *SortOrder `json:"-" url:"sort_order,omitempty"`
	// The number of results to return in a single page.
	Limit *int `json:"-" url:"limit,omitempty"`
	// If present, only returns devices at the target location.
	LocationID *string `json:"-" url:"location_id,omitempty"`
}

type ListDevicesResponse

type ListDevicesResponse struct {
	// Information about errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested list of `Device` objects.
	Devices []*Device `json:"devices,omitempty" url:"devices,omitempty"`
	// The pagination cursor to be used in a subsequent request. If empty,
	// this is the final response.
	// See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

func (*ListDevicesResponse) GetCursor

func (l *ListDevicesResponse) GetCursor() *string

func (*ListDevicesResponse) GetDevices

func (l *ListDevicesResponse) GetDevices() []*Device

func (*ListDevicesResponse) GetErrors

func (l *ListDevicesResponse) GetErrors() []*Error

func (*ListDevicesResponse) GetExtraProperties

func (l *ListDevicesResponse) GetExtraProperties() map[string]interface{}

func (*ListDevicesResponse) String

func (l *ListDevicesResponse) String() string

func (*ListDevicesResponse) UnmarshalJSON

func (l *ListDevicesResponse) UnmarshalJSON(data []byte) error

type ListDisputeEvidenceResponse

type ListDisputeEvidenceResponse struct {
	// The list of evidence previously uploaded to the specified dispute.
	Evidence []*DisputeEvidence `json:"evidence,omitempty" url:"evidence,omitempty"`
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields in a `ListDisputeEvidence` response.

func (*ListDisputeEvidenceResponse) GetCursor

func (l *ListDisputeEvidenceResponse) GetCursor() *string

func (*ListDisputeEvidenceResponse) GetErrors

func (l *ListDisputeEvidenceResponse) GetErrors() []*Error

func (*ListDisputeEvidenceResponse) GetEvidence

func (l *ListDisputeEvidenceResponse) GetEvidence() []*DisputeEvidence

func (*ListDisputeEvidenceResponse) GetExtraProperties

func (l *ListDisputeEvidenceResponse) GetExtraProperties() map[string]interface{}

func (*ListDisputeEvidenceResponse) String

func (l *ListDisputeEvidenceResponse) String() string

func (*ListDisputeEvidenceResponse) UnmarshalJSON

func (l *ListDisputeEvidenceResponse) UnmarshalJSON(data []byte) error

type ListDisputesRequest added in v1.2.0

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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"-" url:"cursor,omitempty"`
	// The dispute states used to filter the result. If not specified, the endpoint returns all disputes.
	States *DisputeState `json:"-" url:"states,omitempty"`
	// The ID of the location for which to return a list of disputes.
	// If not specified, the endpoint returns disputes associated with all locations.
	LocationID *string `json:"-" url:"location_id,omitempty"`
}

type ListDisputesResponse

type ListDisputesResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The list of disputes.
	Disputes []*Dispute `json:"disputes,omitempty" url:"disputes,omitempty"`
	// 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Defines fields in a `ListDisputes` response.

func (*ListDisputesResponse) GetCursor

func (l *ListDisputesResponse) GetCursor() *string

func (*ListDisputesResponse) GetDisputes

func (l *ListDisputesResponse) GetDisputes() []*Dispute

func (*ListDisputesResponse) GetErrors

func (l *ListDisputesResponse) GetErrors() []*Error

func (*ListDisputesResponse) GetExtraProperties

func (l *ListDisputesResponse) GetExtraProperties() map[string]interface{}

func (*ListDisputesResponse) String

func (l *ListDisputesResponse) String() string

func (*ListDisputesResponse) UnmarshalJSON

func (l *ListDisputesResponse) UnmarshalJSON(data []byte) error

type ListEmployeeWagesResponse

type ListEmployeeWagesResponse struct {
	// A page of `EmployeeWage` results.
	EmployeeWages []*EmployeeWage `json:"employee_wages,omitempty" url:"employee_wages,omitempty"`
	// The value supplied in the subsequent request to fetch the next page
	// of `EmployeeWage` results.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response to a request for a set of `EmployeeWage` objects. The response contains a set of `EmployeeWage` objects.

func (*ListEmployeeWagesResponse) GetCursor

func (l *ListEmployeeWagesResponse) GetCursor() *string

func (*ListEmployeeWagesResponse) GetEmployeeWages

func (l *ListEmployeeWagesResponse) GetEmployeeWages() []*EmployeeWage

func (*ListEmployeeWagesResponse) GetErrors

func (l *ListEmployeeWagesResponse) GetErrors() []*Error

func (*ListEmployeeWagesResponse) GetExtraProperties

func (l *ListEmployeeWagesResponse) GetExtraProperties() map[string]interface{}

func (*ListEmployeeWagesResponse) String

func (l *ListEmployeeWagesResponse) String() string

func (*ListEmployeeWagesResponse) UnmarshalJSON

func (l *ListEmployeeWagesResponse) UnmarshalJSON(data []byte) error

type ListEmployeesRequest added in v1.2.0

type ListEmployeesRequest struct {
	LocationID *string `json:"-" url:"location_id,omitempty"`
	// Specifies the EmployeeStatus to filter the employee by.
	Status *EmployeeStatus `json:"-" url:"status,omitempty"`
	// The number of employees to be returned on each page.
	Limit *int `json:"-" url:"limit,omitempty"`
	// The token required to retrieve the specified page of results.
	Cursor *string `json:"-" url:"cursor,omitempty"`
}

type ListEmployeesResponse

type ListEmployeesResponse struct {
	Employees []*Employee `json:"employees,omitempty" url:"employees,omitempty"`
	// The token to be used to retrieve the next page of results.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*ListEmployeesResponse) GetCursor

func (l *ListEmployeesResponse) GetCursor() *string

func (*ListEmployeesResponse) GetEmployees

func (l *ListEmployeesResponse) GetEmployees() []*Employee

func (*ListEmployeesResponse) GetErrors

func (l *ListEmployeesResponse) GetErrors() []*Error

func (*ListEmployeesResponse) GetExtraProperties

func (l *ListEmployeesResponse) GetExtraProperties() map[string]interface{}

func (*ListEmployeesResponse) String

func (l *ListEmployeesResponse) String() string

func (*ListEmployeesResponse) UnmarshalJSON

func (l *ListEmployeesResponse) UnmarshalJSON(data []byte) error

type ListEntriesPayoutsRequest added in v1.2.0

type ListEntriesPayoutsRequest struct {
	// The ID of the payout to retrieve the information for.
	PayoutID string `json:"-" url:"-"`
	// The order in which payout entries are listed.
	SortOrder *SortOrder `json:"-" url:"sort_order,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/build-basics/common-api-patterns/pagination).
	// If request parameters change between requests, subsequent results may contain duplicates or missing records.
	Cursor *string `json:"-" url:"cursor,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 *int `json:"-" url:"limit,omitempty"`
}

type ListEventTypesRequest

type ListEventTypesRequest struct {
	// The API version for which to list event types. Setting this field overrides the default version used by the application.
	APIVersion *string `json:"-" url:"api_version,omitempty"`
}

type ListEventTypesResponse

type ListEventTypesResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The list of event types.
	EventTypes []string `json:"event_types,omitempty" url:"event_types,omitempty"`
	// Contains the metadata of an event type. For more information, see [EventTypeMetadata](entity:EventTypeMetadata).
	Metadata []*EventTypeMetadata `json:"metadata,omitempty" url:"metadata,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [ListEventTypes](api-endpoint:Events-ListEventTypes) endpoint.

Note: if there are errors processing the request, the event types field will not be present.

func (*ListEventTypesResponse) GetErrors

func (l *ListEventTypesResponse) GetErrors() []*Error

func (*ListEventTypesResponse) GetEventTypes

func (l *ListEventTypesResponse) GetEventTypes() []string

func (*ListEventTypesResponse) GetExtraProperties

func (l *ListEventTypesResponse) GetExtraProperties() map[string]interface{}

func (*ListEventTypesResponse) GetMetadata

func (l *ListEventTypesResponse) GetMetadata() []*EventTypeMetadata

func (*ListEventTypesResponse) String

func (l *ListEventTypesResponse) String() string

func (*ListEventTypesResponse) UnmarshalJSON

func (l *ListEventTypesResponse) UnmarshalJSON(data []byte) error

type ListEventsSubscriptionsRequest added in v1.2.0

type ListEventsSubscriptionsRequest struct {
	// The ID of the subscription to retrieve the events for.
	SubscriptionID string `json:"-" url:"-"`
	// When the total number of resulting subscription events exceeds the limit of a paged response,
	// specify the cursor returned from a preceding response here to fetch the next set of results.
	// If the cursor is unset, the response contains the last page of the results.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"-" url:"cursor,omitempty"`
	// The upper limit on the number of subscription events to return
	// in a paged response.
	Limit *int `json:"-" url:"limit,omitempty"`
}

type ListGiftCardActivitiesResponse

type ListGiftCardActivitiesResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested gift card activities or an empty object if none are found.
	GiftCardActivities []*GiftCardActivity `json:"gift_card_activities,omitempty" url:"gift_card_activities,omitempty"`
	// When a response is truncated, it includes a cursor that you can use in a
	// subsequent request to retrieve the next set of activities. If a cursor is not present, this is
	// the final response.
	// For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

A response that contains a list of `GiftCardActivity` objects. If the request resulted in errors, the response contains a set of `Error` objects.

func (*ListGiftCardActivitiesResponse) GetCursor

func (l *ListGiftCardActivitiesResponse) GetCursor() *string

func (*ListGiftCardActivitiesResponse) GetErrors

func (l *ListGiftCardActivitiesResponse) GetErrors() []*Error

func (*ListGiftCardActivitiesResponse) GetExtraProperties

func (l *ListGiftCardActivitiesResponse) GetExtraProperties() map[string]interface{}

func (*ListGiftCardActivitiesResponse) GetGiftCardActivities

func (l *ListGiftCardActivitiesResponse) GetGiftCardActivities() []*GiftCardActivity

func (*ListGiftCardActivitiesResponse) String

func (*ListGiftCardActivitiesResponse) UnmarshalJSON

func (l *ListGiftCardActivitiesResponse) UnmarshalJSON(data []byte) error

type ListGiftCardsRequest added in v1.2.0

type ListGiftCardsRequest struct {
	// If a [type](entity:GiftCardType) is provided, the endpoint returns gift cards of the specified type.
	// Otherwise, the endpoint returns gift cards of all types.
	Type *string `json:"-" url:"type,omitempty"`
	// If a [state](entity:GiftCardStatus) is provided, the endpoint returns the gift cards in the specified state.
	// Otherwise, the endpoint returns the gift cards of all states.
	State *string `json:"-" url:"state,omitempty"`
	// If a limit is provided, the endpoint returns only the specified number of results per page.
	// The maximum value is 200. The default value is 30.
	// For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).
	Limit *int `json:"-" url:"limit,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.
	// If a cursor is not provided, the endpoint returns the first page of the results.
	// For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).
	Cursor *string `json:"-" url:"cursor,omitempty"`
	// If a customer ID is provided, the endpoint returns only the gift cards linked to the specified customer.
	CustomerID *string `json:"-" url:"customer_id,omitempty"`
}

type ListGiftCardsResponse

type ListGiftCardsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested gift cards or an empty object if none are found.
	GiftCards []*GiftCard `json:"gift_cards,omitempty" url:"gift_cards,omitempty"`
	// When a response is truncated, it includes a cursor that you can use in a
	// subsequent request to retrieve the next set of gift cards. If a cursor is not present, this is
	// the final response.
	// For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

A response that contains a list of `GiftCard` objects. If the request resulted in errors, the response contains a set of `Error` objects.

func (*ListGiftCardsResponse) GetCursor

func (l *ListGiftCardsResponse) GetCursor() *string

func (*ListGiftCardsResponse) GetErrors

func (l *ListGiftCardsResponse) GetErrors() []*Error

func (*ListGiftCardsResponse) GetExtraProperties

func (l *ListGiftCardsResponse) GetExtraProperties() map[string]interface{}

func (*ListGiftCardsResponse) GetGiftCards

func (l *ListGiftCardsResponse) GetGiftCards() []*GiftCard

func (*ListGiftCardsResponse) String

func (l *ListGiftCardsResponse) String() string

func (*ListGiftCardsResponse) UnmarshalJSON

func (l *ListGiftCardsResponse) UnmarshalJSON(data []byte) error

type ListInvoicesRequest added in v1.2.0

type ListInvoicesRequest struct {
	// The ID of the location for which to list invoices.
	LocationID string `json:"-" url:"location_id"`
	// 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"-" url:"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 *int `json:"-" url:"limit,omitempty"`
}

type ListInvoicesResponse

type ListInvoicesResponse struct {
	// The invoices retrieved.
	Invoices []*Invoice `json:"invoices,omitempty" url:"invoices,omitempty"`
	// When a response is truncated, it includes a cursor that you can use in a
	// subsequent request to retrieve the next set of invoices. If empty, this is the final
	// response.
	// For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Describes a `ListInvoice` response.

func (*ListInvoicesResponse) GetCursor

func (l *ListInvoicesResponse) GetCursor() *string

func (*ListInvoicesResponse) GetErrors

func (l *ListInvoicesResponse) GetErrors() []*Error

func (*ListInvoicesResponse) GetExtraProperties

func (l *ListInvoicesResponse) GetExtraProperties() map[string]interface{}

func (*ListInvoicesResponse) GetInvoices

func (l *ListInvoicesResponse) GetInvoices() []*Invoice

func (*ListInvoicesResponse) String

func (l *ListInvoicesResponse) String() string

func (*ListInvoicesResponse) UnmarshalJSON

func (l *ListInvoicesResponse) UnmarshalJSON(data []byte) error

type ListJobsRequest added in v1.0.0

type ListJobsRequest struct {
	// The pagination cursor returned by the previous call to this endpoint. Provide this
	// cursor to retrieve the next page of results for your original request. For more information,
	// see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"-" url:"cursor,omitempty"`
}

type ListJobsResponse added in v1.0.0

type ListJobsResponse struct {
	// The retrieved jobs. A single paged response contains up to 100 jobs.
	Jobs []*Job `json:"jobs,omitempty" url:"jobs,omitempty"`
	// An opaque cursor used to retrieve the next page of results. This field is present only
	// if the request succeeded and additional results are available. For more information, see
	// [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// The errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [ListJobs](api-endpoint:Team-ListJobs) response. Either `jobs` or `errors` is present in the response. If additional results are available, the `cursor` field is also present.

func (*ListJobsResponse) GetCursor added in v1.0.0

func (l *ListJobsResponse) GetCursor() *string

func (*ListJobsResponse) GetErrors added in v1.0.0

func (l *ListJobsResponse) GetErrors() []*Error

func (*ListJobsResponse) GetExtraProperties added in v1.0.0

func (l *ListJobsResponse) GetExtraProperties() map[string]interface{}

func (*ListJobsResponse) GetJobs added in v1.0.0

func (l *ListJobsResponse) GetJobs() []*Job

func (*ListJobsResponse) String added in v1.0.0

func (l *ListJobsResponse) String() string

func (*ListJobsResponse) UnmarshalJSON added in v1.0.0

func (l *ListJobsResponse) UnmarshalJSON(data []byte) error

type ListLocationBookingProfilesResponse

type ListLocationBookingProfilesResponse struct {
	// The list of a seller's location booking profiles.
	LocationBookingProfiles []*LocationBookingProfile `json:"location_booking_profiles,omitempty" url:"location_booking_profiles,omitempty"`
	// The pagination cursor to be used in the subsequent request to get the next page of the results. Stop retrieving the next page of the results when the cursor is not set.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*ListLocationBookingProfilesResponse) GetCursor

func (*ListLocationBookingProfilesResponse) GetErrors

func (l *ListLocationBookingProfilesResponse) GetErrors() []*Error

func (*ListLocationBookingProfilesResponse) GetExtraProperties

func (l *ListLocationBookingProfilesResponse) GetExtraProperties() map[string]interface{}

func (*ListLocationBookingProfilesResponse) GetLocationBookingProfiles

func (l *ListLocationBookingProfilesResponse) GetLocationBookingProfiles() []*LocationBookingProfile

func (*ListLocationBookingProfilesResponse) String

func (*ListLocationBookingProfilesResponse) UnmarshalJSON

func (l *ListLocationBookingProfilesResponse) UnmarshalJSON(data []byte) error

type ListLocationCustomAttributeDefinitionsResponse

type ListLocationCustomAttributeDefinitionsResponse struct {
	// The retrieved custom attribute definitions. If no custom attribute definitions are found,
	// Square returns an empty object (`{}`).
	CustomAttributeDefinitions []*CustomAttributeDefinition `json:"custom_attribute_definitions,omitempty" url:"custom_attribute_definitions,omitempty"`
	// The cursor to provide in your next call to this endpoint to retrieve the next page of
	// results for your original request. This field is present only if the request succeeded and
	// additional results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [ListLocationCustomAttributeDefinitions](api-endpoint:LocationCustomAttributes-ListLocationCustomAttributeDefinitions) response. Either `custom_attribute_definitions`, an empty object, or `errors` is present in the response. If additional results are available, the `cursor` field is also present along with `custom_attribute_definitions`.

func (*ListLocationCustomAttributeDefinitionsResponse) GetCursor

func (*ListLocationCustomAttributeDefinitionsResponse) GetCustomAttributeDefinitions

func (l *ListLocationCustomAttributeDefinitionsResponse) GetCustomAttributeDefinitions() []*CustomAttributeDefinition

func (*ListLocationCustomAttributeDefinitionsResponse) GetErrors

func (*ListLocationCustomAttributeDefinitionsResponse) GetExtraProperties

func (l *ListLocationCustomAttributeDefinitionsResponse) GetExtraProperties() map[string]interface{}

func (*ListLocationCustomAttributeDefinitionsResponse) String

func (*ListLocationCustomAttributeDefinitionsResponse) UnmarshalJSON

type ListLocationCustomAttributesResponse

type ListLocationCustomAttributesResponse struct {
	// The retrieved custom attributes. If `with_definitions` was set to `true` in the request,
	// the custom attribute definition is returned in the `definition` field of each custom attribute.
	// If no custom attributes are found, Square returns an empty object (`{}`).
	CustomAttributes []*CustomAttribute `json:"custom_attributes,omitempty" url:"custom_attributes,omitempty"`
	// The cursor to use in your next call to this endpoint to retrieve the next page of results
	// for your original request. This field is present only if the request succeeded and additional
	// results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [ListLocationCustomAttributes](api-endpoint:LocationCustomAttributes-ListLocationCustomAttributes) response. Either `custom_attributes`, an empty object, or `errors` is present in the response. If additional results are available, the `cursor` field is also present along with `custom_attributes`.

func (*ListLocationCustomAttributesResponse) GetCursor

func (*ListLocationCustomAttributesResponse) GetCustomAttributes

func (l *ListLocationCustomAttributesResponse) GetCustomAttributes() []*CustomAttribute

func (*ListLocationCustomAttributesResponse) GetErrors

func (l *ListLocationCustomAttributesResponse) GetErrors() []*Error

func (*ListLocationCustomAttributesResponse) GetExtraProperties

func (l *ListLocationCustomAttributesResponse) GetExtraProperties() map[string]interface{}

func (*ListLocationCustomAttributesResponse) String

func (*ListLocationCustomAttributesResponse) UnmarshalJSON

func (l *ListLocationCustomAttributesResponse) UnmarshalJSON(data []byte) error

type ListLocationsResponse

type ListLocationsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The business locations.
	Locations []*Location `json:"locations,omitempty" url:"locations,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [ListLocations](api-endpoint:Locations-ListLocations) endpoint.

Either `errors` or `locations` is present in a given response (never both).

func (*ListLocationsResponse) GetErrors

func (l *ListLocationsResponse) GetErrors() []*Error

func (*ListLocationsResponse) GetExtraProperties

func (l *ListLocationsResponse) GetExtraProperties() map[string]interface{}

func (*ListLocationsResponse) GetLocations

func (l *ListLocationsResponse) GetLocations() []*Location

func (*ListLocationsResponse) String

func (l *ListLocationsResponse) String() string

func (*ListLocationsResponse) UnmarshalJSON

func (l *ListLocationsResponse) UnmarshalJSON(data []byte) error

type ListLoyaltyProgramsResponse

type ListLoyaltyProgramsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// A list of `LoyaltyProgram` for the merchant.
	Programs []*LoyaltyProgram `json:"programs,omitempty" url:"programs,omitempty"`
	// contains filtered or unexported fields
}

A response that contains all loyalty programs.

func (*ListLoyaltyProgramsResponse) GetErrors

func (l *ListLoyaltyProgramsResponse) GetErrors() []*Error

func (*ListLoyaltyProgramsResponse) GetExtraProperties

func (l *ListLoyaltyProgramsResponse) GetExtraProperties() map[string]interface{}

func (*ListLoyaltyProgramsResponse) GetPrograms

func (l *ListLoyaltyProgramsResponse) GetPrograms() []*LoyaltyProgram

func (*ListLoyaltyProgramsResponse) String

func (l *ListLoyaltyProgramsResponse) String() string

func (*ListLoyaltyProgramsResponse) UnmarshalJSON

func (l *ListLoyaltyProgramsResponse) UnmarshalJSON(data []byte) error

type ListLoyaltyPromotionsResponse

type ListLoyaltyPromotionsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The retrieved loyalty promotions.
	LoyaltyPromotions []*LoyaltyPromotion `json:"loyalty_promotions,omitempty" url:"loyalty_promotions,omitempty"`
	// The cursor to use in your next call to this endpoint to retrieve the next page of results
	// for your original request. This field is present only if the request succeeded and additional
	// results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Represents a [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions) response. One of `loyalty_promotions`, an empty object, or `errors` is present in the response. If additional results are available, the `cursor` field is also present along with `loyalty_promotions`.

func (*ListLoyaltyPromotionsResponse) GetCursor

func (l *ListLoyaltyPromotionsResponse) GetCursor() *string

func (*ListLoyaltyPromotionsResponse) GetErrors

func (l *ListLoyaltyPromotionsResponse) GetErrors() []*Error

func (*ListLoyaltyPromotionsResponse) GetExtraProperties

func (l *ListLoyaltyPromotionsResponse) GetExtraProperties() map[string]interface{}

func (*ListLoyaltyPromotionsResponse) GetLoyaltyPromotions

func (l *ListLoyaltyPromotionsResponse) GetLoyaltyPromotions() []*LoyaltyPromotion

func (*ListLoyaltyPromotionsResponse) String

func (*ListLoyaltyPromotionsResponse) UnmarshalJSON

func (l *ListLoyaltyPromotionsResponse) UnmarshalJSON(data []byte) error

type ListMerchantCustomAttributeDefinitionsResponse

type ListMerchantCustomAttributeDefinitionsResponse struct {
	// The retrieved custom attribute definitions. If no custom attribute definitions are found,
	// Square returns an empty object (`{}`).
	CustomAttributeDefinitions []*CustomAttributeDefinition `json:"custom_attribute_definitions,omitempty" url:"custom_attribute_definitions,omitempty"`
	// The cursor to provide in your next call to this endpoint to retrieve the next page of
	// results for your original request. This field is present only if the request succeeded and
	// additional results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [ListMerchantCustomAttributeDefinitions](api-endpoint:MerchantCustomAttributes-ListMerchantCustomAttributeDefinitions) response. Either `custom_attribute_definitions`, an empty object, or `errors` is present in the response. If additional results are available, the `cursor` field is also present along with `custom_attribute_definitions`.

func (*ListMerchantCustomAttributeDefinitionsResponse) GetCursor

func (*ListMerchantCustomAttributeDefinitionsResponse) GetCustomAttributeDefinitions

func (l *ListMerchantCustomAttributeDefinitionsResponse) GetCustomAttributeDefinitions() []*CustomAttributeDefinition

func (*ListMerchantCustomAttributeDefinitionsResponse) GetErrors

func (*ListMerchantCustomAttributeDefinitionsResponse) GetExtraProperties

func (l *ListMerchantCustomAttributeDefinitionsResponse) GetExtraProperties() map[string]interface{}

func (*ListMerchantCustomAttributeDefinitionsResponse) String

func (*ListMerchantCustomAttributeDefinitionsResponse) UnmarshalJSON

type ListMerchantCustomAttributesResponse

type ListMerchantCustomAttributesResponse struct {
	// The retrieved custom attributes. If `with_definitions` was set to `true` in the request,
	// the custom attribute definition is returned in the `definition` field of each custom attribute.
	// If no custom attributes are found, Square returns an empty object (`{}`).
	CustomAttributes []*CustomAttribute `json:"custom_attributes,omitempty" url:"custom_attributes,omitempty"`
	// The cursor to use in your next call to this endpoint to retrieve the next page of results
	// for your original request. This field is present only if the request succeeded and additional
	// results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [ListMerchantCustomAttributes](api-endpoint:MerchantCustomAttributes-ListMerchantCustomAttributes) response. Either `custom_attributes`, an empty object, or `errors` is present in the response. If additional results are available, the `cursor` field is also present along with `custom_attributes`.

func (*ListMerchantCustomAttributesResponse) GetCursor

func (*ListMerchantCustomAttributesResponse) GetCustomAttributes

func (l *ListMerchantCustomAttributesResponse) GetCustomAttributes() []*CustomAttribute

func (*ListMerchantCustomAttributesResponse) GetErrors

func (l *ListMerchantCustomAttributesResponse) GetErrors() []*Error

func (*ListMerchantCustomAttributesResponse) GetExtraProperties

func (l *ListMerchantCustomAttributesResponse) GetExtraProperties() map[string]interface{}

func (*ListMerchantCustomAttributesResponse) String

func (*ListMerchantCustomAttributesResponse) UnmarshalJSON

func (l *ListMerchantCustomAttributesResponse) UnmarshalJSON(data []byte) error

type ListMerchantsRequest added in v1.2.0

type ListMerchantsRequest struct {
	// The cursor generated by the previous response.
	Cursor *int `json:"-" url:"cursor,omitempty"`
}

type ListMerchantsResponse

type ListMerchantsResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested `Merchant` entities.
	Merchant []*Merchant `json:"merchant,omitempty" url:"merchant,omitempty"`
	// If the  response is truncated, the cursor to use in next  request to fetch next set of objects.
	Cursor *int `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

The response object returned by the [ListMerchant](api-endpoint:Merchants-ListMerchants) endpoint.

func (*ListMerchantsResponse) GetCursor

func (l *ListMerchantsResponse) GetCursor() *int

func (*ListMerchantsResponse) GetErrors

func (l *ListMerchantsResponse) GetErrors() []*Error

func (*ListMerchantsResponse) GetExtraProperties

func (l *ListMerchantsResponse) GetExtraProperties() map[string]interface{}

func (*ListMerchantsResponse) GetMerchant

func (l *ListMerchantsResponse) GetMerchant() []*Merchant

func (*ListMerchantsResponse) String

func (l *ListMerchantsResponse) String() string

func (*ListMerchantsResponse) UnmarshalJSON

func (l *ListMerchantsResponse) UnmarshalJSON(data []byte) error

type ListOrderCustomAttributeDefinitionsResponse

type ListOrderCustomAttributeDefinitionsResponse struct {
	// The retrieved custom attribute definitions. If no custom attribute definitions are found, Square returns an empty object (`{}`).
	CustomAttributeDefinitions []*CustomAttributeDefinition `json:"custom_attribute_definitions,omitempty" url:"custom_attribute_definitions,omitempty"`
	// The cursor to provide in your next call to this endpoint to retrieve the next page of results for your original request.
	// This field is present only if the request succeeded and additional results are available.
	// For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from listing order custom attribute definitions.

func (*ListOrderCustomAttributeDefinitionsResponse) GetCursor

func (*ListOrderCustomAttributeDefinitionsResponse) GetCustomAttributeDefinitions

func (l *ListOrderCustomAttributeDefinitionsResponse) GetCustomAttributeDefinitions() []*CustomAttributeDefinition

func (*ListOrderCustomAttributeDefinitionsResponse) GetErrors

func (*ListOrderCustomAttributeDefinitionsResponse) GetExtraProperties

func (l *ListOrderCustomAttributeDefinitionsResponse) GetExtraProperties() map[string]interface{}

func (*ListOrderCustomAttributeDefinitionsResponse) String

func (*ListOrderCustomAttributeDefinitionsResponse) UnmarshalJSON

func (l *ListOrderCustomAttributeDefinitionsResponse) UnmarshalJSON(data []byte) error

type ListOrderCustomAttributesResponse

type ListOrderCustomAttributesResponse struct {
	// The retrieved custom attributes. If no custom attribute are found, Square returns an empty object (`{}`).
	CustomAttributes []*CustomAttribute `json:"custom_attributes,omitempty" url:"custom_attributes,omitempty"`
	// The cursor to provide in your next call to this endpoint to retrieve the next page of results for your original request.
	// This field is present only if the request succeeded and additional results are available.
	// For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from listing order custom attributes.

func (*ListOrderCustomAttributesResponse) GetCursor

func (l *ListOrderCustomAttributesResponse) GetCursor() *string

func (*ListOrderCustomAttributesResponse) GetCustomAttributes

func (l *ListOrderCustomAttributesResponse) GetCustomAttributes() []*CustomAttribute

func (*ListOrderCustomAttributesResponse) GetErrors

func (l *ListOrderCustomAttributesResponse) GetErrors() []*Error

func (*ListOrderCustomAttributesResponse) GetExtraProperties

func (l *ListOrderCustomAttributesResponse) GetExtraProperties() map[string]interface{}

func (*ListOrderCustomAttributesResponse) String

func (*ListOrderCustomAttributesResponse) UnmarshalJSON

func (l *ListOrderCustomAttributesResponse) UnmarshalJSON(data []byte) error

type ListPaymentLinksResponse

type ListPaymentLinksResponse struct {
	// Errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The list of payment links.
	PaymentLinks []*PaymentLink `json:"payment_links,omitempty" url:"payment_links,omitempty"`
	//	When a response is truncated, it includes a cursor that you can use in a subsequent request
	//
	// to retrieve the next set of gift cards. If a cursor is not present, this is the final response.
	// For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPaymentLinksResponse) GetCursor

func (l *ListPaymentLinksResponse) GetCursor() *string

func (*ListPaymentLinksResponse) GetErrors

func (l *ListPaymentLinksResponse) GetErrors() []*Error

func (*ListPaymentLinksResponse) GetExtraProperties

func (l *ListPaymentLinksResponse) GetExtraProperties() map[string]interface{}
func (l *ListPaymentLinksResponse) GetPaymentLinks() []*PaymentLink

func (*ListPaymentLinksResponse) String

func (l *ListPaymentLinksResponse) String() string

func (*ListPaymentLinksResponse) UnmarshalJSON

func (l *ListPaymentLinksResponse) UnmarshalJSON(data []byte) error

type ListPaymentRefundsRequestSortField added in v1.2.0

type ListPaymentRefundsRequestSortField string
const (
	ListPaymentRefundsRequestSortFieldCreatedAt ListPaymentRefundsRequestSortField = "CREATED_AT"
	ListPaymentRefundsRequestSortFieldUpdatedAt ListPaymentRefundsRequestSortField = "UPDATED_AT"
)

func NewListPaymentRefundsRequestSortFieldFromString added in v1.2.0

func NewListPaymentRefundsRequestSortFieldFromString(s string) (ListPaymentRefundsRequestSortField, error)

func (ListPaymentRefundsRequestSortField) Ptr added in v1.2.0

type ListPaymentRefundsResponse

type ListPaymentRefundsResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The list of requested refunds.
	Refunds []*PaymentRefund `json:"refunds,omitempty" url:"refunds,omitempty"`
	// 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Defines the response returned by [ListPaymentRefunds](api-endpoint:Refunds-ListPaymentRefunds).

Either `errors` or `refunds` is present in a given response (never both).

func (*ListPaymentRefundsResponse) GetCursor

func (l *ListPaymentRefundsResponse) GetCursor() *string

func (*ListPaymentRefundsResponse) GetErrors

func (l *ListPaymentRefundsResponse) GetErrors() []*Error

func (*ListPaymentRefundsResponse) GetExtraProperties

func (l *ListPaymentRefundsResponse) GetExtraProperties() map[string]interface{}

func (*ListPaymentRefundsResponse) GetRefunds

func (l *ListPaymentRefundsResponse) GetRefunds() []*PaymentRefund

func (*ListPaymentRefundsResponse) String

func (l *ListPaymentRefundsResponse) String() string

func (*ListPaymentRefundsResponse) UnmarshalJSON

func (l *ListPaymentRefundsResponse) UnmarshalJSON(data []byte) error

type ListPaymentsRequest added in v1.2.0

type ListPaymentsRequest struct {
	// Indicates the start of the time range to retrieve payments for, in RFC 3339 format.
	// The range is determined using the `created_at` field for each Payment.
	// Inclusive. Default: The current time minus one year.
	BeginTime *string `json:"-" url:"begin_time,omitempty"`
	// Indicates the end of the time range to retrieve payments for, in RFC 3339 format.  The
	// range is determined using the `created_at` field for each Payment.
	//
	// Default: The current time.
	EndTime *string `json:"-" url:"end_time,omitempty"`
	// The order in which results are listed by `ListPaymentsRequest.sort_field`:
	// - `ASC` - Oldest to newest.
	// - `DESC` - Newest to oldest (default).
	SortOrder *string `json:"-" url:"sort_order,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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"-" url:"cursor,omitempty"`
	// Limit results to the location supplied. By default, results are returned
	// for the default (main) location associated with the seller.
	LocationID *string `json:"-" url:"location_id,omitempty"`
	// The exact amount in the `total_money` for a payment.
	Total *int64 `json:"-" url:"total,omitempty"`
	// The last four digits of a payment card.
	Last4 *string `json:"-" url:"last_4,omitempty"`
	// The brand of the payment card (for example, VISA).
	CardBrand *string `json:"-" url:"card_brand,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 *int `json:"-" url:"limit,omitempty"`
	// Whether the payment was taken offline or not.
	IsOfflinePayment *bool `json:"-" url:"is_offline_payment,omitempty"`
	// Indicates the start of the time range for which to retrieve offline payments, in RFC 3339
	// format for timestamps. The range is determined using the
	// `offline_payment_details.client_created_at` field for each Payment. If set, payments without a
	// value set in `offline_payment_details.client_created_at` will not be returned.
	//
	// Default: The current time.
	OfflineBeginTime *string `json:"-" url:"offline_begin_time,omitempty"`
	// Indicates the end of the time range for which to retrieve offline payments, in RFC 3339
	// format for timestamps. The range is determined using the
	// `offline_payment_details.client_created_at` field for each Payment. If set, payments without a
	// value set in `offline_payment_details.client_created_at` will not be returned.
	//
	// Default: The current time.
	OfflineEndTime *string `json:"-" url:"offline_end_time,omitempty"`
	// Indicates the start of the time range to retrieve payments for, in RFC 3339 format.  The
	// range is determined using the `updated_at` field for each Payment.
	UpdatedAtBeginTime *string `json:"-" url:"updated_at_begin_time,omitempty"`
	// Indicates the end of the time range to retrieve payments for, in RFC 3339 format.  The
	// range is determined using the `updated_at` field for each Payment.
	UpdatedAtEndTime *string `json:"-" url:"updated_at_end_time,omitempty"`
	// The field used to sort results by. The default is `CREATED_AT`.
	SortField *ListPaymentsRequestSortField `json:"-" url:"sort_field,omitempty"`
}

type ListPaymentsRequestSortField added in v1.2.0

type ListPaymentsRequestSortField string
const (
	ListPaymentsRequestSortFieldCreatedAt        ListPaymentsRequestSortField = "CREATED_AT"
	ListPaymentsRequestSortFieldOfflineCreatedAt ListPaymentsRequestSortField = "OFFLINE_CREATED_AT"
	ListPaymentsRequestSortFieldUpdatedAt        ListPaymentsRequestSortField = "UPDATED_AT"
)

func NewListPaymentsRequestSortFieldFromString added in v1.2.0

func NewListPaymentsRequestSortFieldFromString(s string) (ListPaymentsRequestSortField, error)

func (ListPaymentsRequestSortField) Ptr added in v1.2.0

type ListPaymentsResponse

type ListPaymentsResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested list of payments.
	Payments []*Payment `json:"payments,omitempty" url:"payments,omitempty"`
	// 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Defines the response returned by [ListPayments](api-endpoint:Payments-ListPayments).

func (*ListPaymentsResponse) GetCursor

func (l *ListPaymentsResponse) GetCursor() *string

func (*ListPaymentsResponse) GetErrors

func (l *ListPaymentsResponse) GetErrors() []*Error

func (*ListPaymentsResponse) GetExtraProperties

func (l *ListPaymentsResponse) GetExtraProperties() map[string]interface{}

func (*ListPaymentsResponse) GetPayments

func (l *ListPaymentsResponse) GetPayments() []*Payment

func (*ListPaymentsResponse) String

func (l *ListPaymentsResponse) String() string

func (*ListPaymentsResponse) UnmarshalJSON

func (l *ListPaymentsResponse) UnmarshalJSON(data []byte) error

type ListPayoutEntriesResponse

type ListPayoutEntriesResponse struct {
	// The requested list of payout entries, ordered with the given or default sort order.
	PayoutEntries []*PayoutEntry `json:"payout_entries,omitempty" url:"payout_entries,omitempty"`
	// 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response to retrieve payout records entries.

func (*ListPayoutEntriesResponse) GetCursor

func (l *ListPayoutEntriesResponse) GetCursor() *string

func (*ListPayoutEntriesResponse) GetErrors

func (l *ListPayoutEntriesResponse) GetErrors() []*Error

func (*ListPayoutEntriesResponse) GetExtraProperties

func (l *ListPayoutEntriesResponse) GetExtraProperties() map[string]interface{}

func (*ListPayoutEntriesResponse) GetPayoutEntries

func (l *ListPayoutEntriesResponse) GetPayoutEntries() []*PayoutEntry

func (*ListPayoutEntriesResponse) String

func (l *ListPayoutEntriesResponse) String() string

func (*ListPayoutEntriesResponse) UnmarshalJSON

func (l *ListPayoutEntriesResponse) UnmarshalJSON(data []byte) error

type ListPayoutsRequest added in v1.2.0

type ListPayoutsRequest struct {
	// The ID of the location for which to list the payouts.
	// By default, payouts are returned for the default (main) location associated with the seller.
	LocationID *string `json:"-" url:"location_id,omitempty"`
	// If provided, only payouts with the given status are returned.
	Status *PayoutStatus `json:"-" url:"status,omitempty"`
	// The timestamp for the beginning of the payout creation time, in RFC 3339 format.
	// Inclusive. Default: The current time minus one year.
	BeginTime *string `json:"-" url:"begin_time,omitempty"`
	// The timestamp for the end of the payout creation time, in RFC 3339 format.
	// Default: The current time.
	EndTime *string `json:"-" url:"end_time,omitempty"`
	// The order in which payouts are listed.
	SortOrder *SortOrder `json:"-" url:"sort_order,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/build-basics/common-api-patterns/pagination).
	// If request parameters change between requests, subsequent results may contain duplicates or missing records.
	Cursor *string `json:"-" url:"cursor,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 *int `json:"-" url:"limit,omitempty"`
}

type ListPayoutsResponse

type ListPayoutsResponse struct {
	// The requested list of payouts.
	Payouts []*Payout `json:"payouts,omitempty" url:"payouts,omitempty"`
	// 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response to retrieve payout records entries.

func (*ListPayoutsResponse) GetCursor

func (l *ListPayoutsResponse) GetCursor() *string

func (*ListPayoutsResponse) GetErrors

func (l *ListPayoutsResponse) GetErrors() []*Error

func (*ListPayoutsResponse) GetExtraProperties

func (l *ListPayoutsResponse) GetExtraProperties() map[string]interface{}

func (*ListPayoutsResponse) GetPayouts

func (l *ListPayoutsResponse) GetPayouts() []*Payout

func (*ListPayoutsResponse) String

func (l *ListPayoutsResponse) String() string

func (*ListPayoutsResponse) UnmarshalJSON

func (l *ListPayoutsResponse) UnmarshalJSON(data []byte) error

type ListRefundsRequest added in v1.2.0

type ListRefundsRequest struct {
	// Indicates the start of the time range to retrieve each `PaymentRefund` for, in RFC 3339
	// format.  The range is determined using the `created_at` field for each `PaymentRefund`.
	//
	// Default: The current time minus one year.
	BeginTime *string `json:"-" url:"begin_time,omitempty"`
	// Indicates the end of the time range to retrieve each `PaymentRefund` for, in RFC 3339
	// format.  The range is determined using the `created_at` field for each `PaymentRefund`.
	//
	// Default: The current time.
	EndTime *string `json:"-" url:"end_time,omitempty"`
	// The order in which results are listed by `PaymentRefund.created_at`:
	// - `ASC` - Oldest to newest.
	// - `DESC` - Newest to oldest (default).
	SortOrder *string `json:"-" url:"sort_order,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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"-" url:"cursor,omitempty"`
	// Limit results to the location supplied. By default, results are returned
	// for all locations associated with the seller.
	LocationID *string `json:"-" url:"location_id,omitempty"`
	// If provided, only refunds with the given status are returned.
	// For a list of refund status values, see [PaymentRefund](entity:PaymentRefund).
	//
	// Default: If omitted, refunds are returned regardless of their status.
	Status *string `json:"-" url:"status,omitempty"`
	// If provided, only returns refunds whose payments have the indicated source type.
	// Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `CASH`, and `EXTERNAL`.
	// For information about these payment source types, see
	// [Take Payments](https://developer.squareup.com/docs/payments-api/take-payments).
	//
	// Default: If omitted, refunds are returned regardless of the source type.
	SourceType *string `json:"-" url:"source_type,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 *int `json:"-" url:"limit,omitempty"`
	// Indicates the start of the time range to retrieve each `PaymentRefund` for, in RFC 3339
	// format.  The range is determined using the `updated_at` field for each `PaymentRefund`.
	//
	// Default: If omitted, the time range starts at `begin_time`.
	UpdatedAtBeginTime *string `json:"-" url:"updated_at_begin_time,omitempty"`
	// Indicates the end of the time range to retrieve each `PaymentRefund` for, in RFC 3339
	// format.  The range is determined using the `updated_at` field for each `PaymentRefund`.
	//
	// Default: The current time.
	UpdatedAtEndTime *string `json:"-" url:"updated_at_end_time,omitempty"`
	// The field used to sort results by. The default is `CREATED_AT`.
	SortField *ListPaymentRefundsRequestSortField `json:"-" url:"sort_field,omitempty"`
}

type ListSitesResponse

type ListSitesResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The sites that belong to the seller.
	Sites []*Site `json:"sites,omitempty" url:"sites,omitempty"`
	// contains filtered or unexported fields
}

Represents a `ListSites` response. The response can include either `sites` or `errors`.

func (*ListSitesResponse) GetErrors

func (l *ListSitesResponse) GetErrors() []*Error

func (*ListSitesResponse) GetExtraProperties

func (l *ListSitesResponse) GetExtraProperties() map[string]interface{}

func (*ListSitesResponse) GetSites

func (l *ListSitesResponse) GetSites() []*Site

func (*ListSitesResponse) String

func (l *ListSitesResponse) String() string

func (*ListSitesResponse) UnmarshalJSON

func (l *ListSitesResponse) UnmarshalJSON(data []byte) error

type ListSubscriptionEventsResponse

type ListSubscriptionEventsResponse struct {
	// Errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The retrieved subscription events.
	SubscriptionEvents []*SubscriptionEvent `json:"subscription_events,omitempty" url:"subscription_events,omitempty"`
	// When the total number of resulting subscription events exceeds the limit of a paged response,
	// the response includes a cursor for you to use in a subsequent request to fetch the next set of events.
	// If the cursor is unset, the response contains the last page of the results.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Defines output parameters in a response from the [ListSubscriptionEvents](api-endpoint:Subscriptions-ListSubscriptionEvents).

func (*ListSubscriptionEventsResponse) GetCursor

func (l *ListSubscriptionEventsResponse) GetCursor() *string

func (*ListSubscriptionEventsResponse) GetErrors

func (l *ListSubscriptionEventsResponse) GetErrors() []*Error

func (*ListSubscriptionEventsResponse) GetExtraProperties

func (l *ListSubscriptionEventsResponse) GetExtraProperties() map[string]interface{}

func (*ListSubscriptionEventsResponse) GetSubscriptionEvents

func (l *ListSubscriptionEventsResponse) GetSubscriptionEvents() []*SubscriptionEvent

func (*ListSubscriptionEventsResponse) String

func (*ListSubscriptionEventsResponse) UnmarshalJSON

func (l *ListSubscriptionEventsResponse) UnmarshalJSON(data []byte) error

type ListTeamMemberBookingProfilesResponse

type ListTeamMemberBookingProfilesResponse struct {
	// The list of team member booking profiles. The results are returned in the ascending order of the time
	// when the team member booking profiles were last updated. Multiple booking profiles updated at the same time
	// are further sorted in the ascending order of their IDs.
	TeamMemberBookingProfiles []*TeamMemberBookingProfile `json:"team_member_booking_profiles,omitempty" url:"team_member_booking_profiles,omitempty"`
	// The pagination cursor to be used in the subsequent request to get the next page of the results. Stop retrieving the next page of the results when the cursor is not set.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*ListTeamMemberBookingProfilesResponse) GetCursor

func (*ListTeamMemberBookingProfilesResponse) GetErrors

func (l *ListTeamMemberBookingProfilesResponse) GetErrors() []*Error

func (*ListTeamMemberBookingProfilesResponse) GetExtraProperties

func (l *ListTeamMemberBookingProfilesResponse) GetExtraProperties() map[string]interface{}

func (*ListTeamMemberBookingProfilesResponse) GetTeamMemberBookingProfiles

func (l *ListTeamMemberBookingProfilesResponse) GetTeamMemberBookingProfiles() []*TeamMemberBookingProfile

func (*ListTeamMemberBookingProfilesResponse) String

func (*ListTeamMemberBookingProfilesResponse) UnmarshalJSON

func (l *ListTeamMemberBookingProfilesResponse) UnmarshalJSON(data []byte) error

type ListTeamMemberWagesResponse

type ListTeamMemberWagesResponse struct {
	// A page of `TeamMemberWage` results.
	TeamMemberWages []*TeamMemberWage `json:"team_member_wages,omitempty" url:"team_member_wages,omitempty"`
	// The value supplied in the subsequent request to fetch the next page
	// of `TeamMemberWage` results.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response to a request for a set of `TeamMemberWage` objects. The response contains a set of `TeamMemberWage` objects.

func (*ListTeamMemberWagesResponse) GetCursor

func (l *ListTeamMemberWagesResponse) GetCursor() *string

func (*ListTeamMemberWagesResponse) GetErrors

func (l *ListTeamMemberWagesResponse) GetErrors() []*Error

func (*ListTeamMemberWagesResponse) GetExtraProperties

func (l *ListTeamMemberWagesResponse) GetExtraProperties() map[string]interface{}

func (*ListTeamMemberWagesResponse) GetTeamMemberWages

func (l *ListTeamMemberWagesResponse) GetTeamMemberWages() []*TeamMemberWage

func (*ListTeamMemberWagesResponse) String

func (l *ListTeamMemberWagesResponse) String() string

func (*ListTeamMemberWagesResponse) UnmarshalJSON

func (l *ListTeamMemberWagesResponse) UnmarshalJSON(data []byte) error

type ListTransactionsResponse

type ListTransactionsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// An array of transactions that match your query.
	Transactions []*Transaction `json:"transactions,omitempty" url:"transactions,omitempty"`
	// 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](https://developer.squareup.com/docs/working-with-apis/pagination) for more information.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [ListTransactions](api-endpoint:Transactions-ListTransactions) endpoint.

One of `errors` or `transactions` is present in a given response (never both).

func (*ListTransactionsResponse) GetCursor

func (l *ListTransactionsResponse) GetCursor() *string

func (*ListTransactionsResponse) GetErrors

func (l *ListTransactionsResponse) GetErrors() []*Error

func (*ListTransactionsResponse) GetExtraProperties

func (l *ListTransactionsResponse) GetExtraProperties() map[string]interface{}

func (*ListTransactionsResponse) GetTransactions

func (l *ListTransactionsResponse) GetTransactions() []*Transaction

func (*ListTransactionsResponse) String

func (l *ListTransactionsResponse) String() string

func (*ListTransactionsResponse) UnmarshalJSON

func (l *ListTransactionsResponse) UnmarshalJSON(data []byte) error

type ListWebhookEventTypesResponse

type ListWebhookEventTypesResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The list of event types.
	EventTypes []string `json:"event_types,omitempty" url:"event_types,omitempty"`
	// Contains the metadata of a webhook event type. For more information, see [EventTypeMetadata](entity:EventTypeMetadata).
	Metadata []*EventTypeMetadata `json:"metadata,omitempty" url:"metadata,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [ListWebhookEventTypes](api-endpoint:WebhookSubscriptions-ListWebhookEventTypes) endpoint.

Note: if there are errors processing the request, the event types field will not be present.

func (*ListWebhookEventTypesResponse) GetErrors

func (l *ListWebhookEventTypesResponse) GetErrors() []*Error

func (*ListWebhookEventTypesResponse) GetEventTypes

func (l *ListWebhookEventTypesResponse) GetEventTypes() []string

func (*ListWebhookEventTypesResponse) GetExtraProperties

func (l *ListWebhookEventTypesResponse) GetExtraProperties() map[string]interface{}

func (*ListWebhookEventTypesResponse) GetMetadata

func (*ListWebhookEventTypesResponse) String

func (*ListWebhookEventTypesResponse) UnmarshalJSON

func (l *ListWebhookEventTypesResponse) UnmarshalJSON(data []byte) error

type ListWebhookSubscriptionsResponse

type ListWebhookSubscriptionsResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested list of [Subscription](entity:WebhookSubscription)s.
	Subscriptions []*WebhookSubscription `json:"subscriptions,omitempty" url:"subscriptions,omitempty"`
	// 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [ListWebhookSubscriptions](api-endpoint:WebhookSubscriptions-ListWebhookSubscriptions) endpoint.

Note: if there are errors processing the request, the subscriptions field will not be present.

func (*ListWebhookSubscriptionsResponse) GetCursor

func (l *ListWebhookSubscriptionsResponse) GetCursor() *string

func (*ListWebhookSubscriptionsResponse) GetErrors

func (l *ListWebhookSubscriptionsResponse) GetErrors() []*Error

func (*ListWebhookSubscriptionsResponse) GetExtraProperties

func (l *ListWebhookSubscriptionsResponse) GetExtraProperties() map[string]interface{}

func (*ListWebhookSubscriptionsResponse) GetSubscriptions

func (l *ListWebhookSubscriptionsResponse) GetSubscriptions() []*WebhookSubscription

func (*ListWebhookSubscriptionsResponse) String

func (*ListWebhookSubscriptionsResponse) UnmarshalJSON

func (l *ListWebhookSubscriptionsResponse) UnmarshalJSON(data []byte) error

type ListWorkweekConfigsResponse

type ListWorkweekConfigsResponse struct {
	// A page of `WorkweekConfig` results.
	WorkweekConfigs []*WorkweekConfig `json:"workweek_configs,omitempty" url:"workweek_configs,omitempty"`
	// The value supplied in the subsequent request to fetch the next page of
	// `WorkweekConfig` results.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response to a request for a set of `WorkweekConfig` objects. The response contains the requested `WorkweekConfig` objects and might contain a set of `Error` objects if the request resulted in errors.

func (*ListWorkweekConfigsResponse) GetCursor

func (l *ListWorkweekConfigsResponse) GetCursor() *string

func (*ListWorkweekConfigsResponse) GetErrors

func (l *ListWorkweekConfigsResponse) GetErrors() []*Error

func (*ListWorkweekConfigsResponse) GetExtraProperties

func (l *ListWorkweekConfigsResponse) GetExtraProperties() map[string]interface{}

func (*ListWorkweekConfigsResponse) GetWorkweekConfigs

func (l *ListWorkweekConfigsResponse) GetWorkweekConfigs() []*WorkweekConfig

func (*ListWorkweekConfigsResponse) String

func (l *ListWorkweekConfigsResponse) String() string

func (*ListWorkweekConfigsResponse) UnmarshalJSON

func (l *ListWorkweekConfigsResponse) UnmarshalJSON(data []byte) error

type Location

type Location struct {
	// A short generated string of letters and numbers that uniquely identifies this location instance.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The name of the location.
	// This information appears in the Seller Dashboard as the nickname.
	// A location name must be unique within a seller account.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The physical address of the location.
	Address *Address `json:"address,omitempty" url:"address,omitempty"`
	// The [IANA time zone](https://www.iana.org/time-zones) identifier for
	// the time zone of the location. For example, `America/Los_Angeles`.
	Timezone *string `json:"timezone,omitempty" url:"timezone,omitempty"`
	// The Square features that are enabled for the location.
	// See [LocationCapability](entity:LocationCapability) for possible values.
	// See [LocationCapability](#type-locationcapability) for possible values
	Capabilities []LocationCapability `json:"capabilities,omitempty" url:"capabilities,omitempty"`
	// The status of the location.
	// See [LocationStatus](#type-locationstatus) for possible values
	Status *LocationStatus `json:"status,omitempty" url:"status,omitempty"`
	// The time when the location was created, in RFC 3339 format.
	// For more information, see [Working with Dates](https://developer.squareup.com/docs/build-basics/working-with-dates).
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The ID of the merchant that owns the location.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The country of the location, in the two-letter format of ISO 3166. For example, `US` or `JP`.
	//
	// See [Country](entity:Country) for possible values.
	// See [Country](#type-country) for possible values
	Country *Country `json:"country,omitempty" url:"country,omitempty"`
	// The language associated with the location, in
	// [BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A).
	// For more information, see [Language Preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences).
	LanguageCode *string `json:"language_code,omitempty" url:"language_code,omitempty"`
	// The currency used for all transactions at this location,
	// in ISO 4217 format. For example, the currency code for US dollars is `USD`.
	// See [Currency](entity:Currency) for possible values.
	// See [Currency](#type-currency) for possible values
	Currency *Currency `json:"currency,omitempty" url:"currency,omitempty"`
	// The phone number of the location. For example, `+1 855-700-6000`.
	PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"`
	// The name of the location's overall business. This name is present on receipts and other customer-facing branding, and can be changed no more than three times in a twelve-month period.
	BusinessName *string `json:"business_name,omitempty" url:"business_name,omitempty"`
	// The type of the location.
	// See [LocationType](#type-locationtype) for possible values
	Type *LocationType `json:"type,omitempty" url:"type,omitempty"`
	// The website URL of the location.  For example, `https://squareup.com`.
	WebsiteURL *string `json:"website_url,omitempty" url:"website_url,omitempty"`
	// The hours of operation for the location.
	BusinessHours *BusinessHours `json:"business_hours,omitempty" url:"business_hours,omitempty"`
	// The email address of the location. This can be unique to the location and is not always the email address for the business owner or administrator.
	BusinessEmail *string `json:"business_email,omitempty" url:"business_email,omitempty"`
	// The description of the location. For example, `Main Street location`.
	Description *string `json:"description,omitempty" url:"description,omitempty"`
	// The Twitter username of the location without the '@' symbol. For example, `Square`.
	TwitterUsername *string `json:"twitter_username,omitempty" url:"twitter_username,omitempty"`
	// The Instagram username of the location without the '@' symbol. For example, `square`.
	InstagramUsername *string `json:"instagram_username,omitempty" url:"instagram_username,omitempty"`
	// The Facebook profile URL of the location. The URL should begin with 'facebook.com/'. For example, `https://www.facebook.com/square`.
	FacebookURL *string `json:"facebook_url,omitempty" url:"facebook_url,omitempty"`
	// The physical coordinates (latitude and longitude) of the location.
	Coordinates *Coordinates `json:"coordinates,omitempty" url:"coordinates,omitempty"`
	// The URL of the logo image for the location. When configured in the Seller
	// Dashboard (Receipts section), the logo appears on transactions (such as receipts and invoices) that Square generates on behalf of the seller.
	// This image should have a roughly square (1:1) aspect ratio and should be at least 200x200 pixels.
	LogoURL *string `json:"logo_url,omitempty" url:"logo_url,omitempty"`
	// The URL of the Point of Sale background image for the location.
	PosBackgroundURL *string `json:"pos_background_url,omitempty" url:"pos_background_url,omitempty"`
	// A four-digit number that describes the kind of goods or services sold at the location.
	// The [merchant category code (MCC)](https://developer.squareup.com/docs/locations-api#initialize-a-merchant-category-code) of the location as standardized by ISO 18245.
	// For example, `5045`, for a location that sells computer goods and software.
	Mcc *string `json:"mcc,omitempty" url:"mcc,omitempty"`
	// The URL of a full-format logo image for the location. When configured in the Seller
	// Dashboard (Receipts section), the logo appears on transactions (such as receipts and invoices) that Square generates on behalf of the seller.
	// This image can be wider than it is tall and should be at least 1280x648 pixels.
	FullFormatLogoURL *string `json:"full_format_logo_url,omitempty" url:"full_format_logo_url,omitempty"`
	// The tax IDs for this location.
	TaxIDs *TaxIDs `json:"tax_ids,omitempty" url:"tax_ids,omitempty"`
	// contains filtered or unexported fields
}

Represents one of a business' [locations](https://developer.squareup.com/docs/locations-api).

func (*Location) GetAddress

func (l *Location) GetAddress() *Address

func (*Location) GetBusinessEmail

func (l *Location) GetBusinessEmail() *string

func (*Location) GetBusinessHours

func (l *Location) GetBusinessHours() *BusinessHours

func (*Location) GetBusinessName

func (l *Location) GetBusinessName() *string

func (*Location) GetCapabilities

func (l *Location) GetCapabilities() []LocationCapability

func (*Location) GetCoordinates

func (l *Location) GetCoordinates() *Coordinates

func (*Location) GetCountry

func (l *Location) GetCountry() *Country

func (*Location) GetCreatedAt

func (l *Location) GetCreatedAt() *string

func (*Location) GetCurrency

func (l *Location) GetCurrency() *Currency

func (*Location) GetDescription

func (l *Location) GetDescription() *string

func (*Location) GetExtraProperties

func (l *Location) GetExtraProperties() map[string]interface{}

func (*Location) GetFacebookURL

func (l *Location) GetFacebookURL() *string

func (*Location) GetFullFormatLogoURL

func (l *Location) GetFullFormatLogoURL() *string

func (*Location) GetID

func (l *Location) GetID() *string

func (*Location) GetInstagramUsername

func (l *Location) GetInstagramUsername() *string

func (*Location) GetLanguageCode

func (l *Location) GetLanguageCode() *string

func (*Location) GetLogoURL

func (l *Location) GetLogoURL() *string

func (*Location) GetMcc

func (l *Location) GetMcc() *string

func (*Location) GetMerchantID

func (l *Location) GetMerchantID() *string

func (*Location) GetName

func (l *Location) GetName() *string

func (*Location) GetPhoneNumber

func (l *Location) GetPhoneNumber() *string

func (*Location) GetPosBackgroundURL

func (l *Location) GetPosBackgroundURL() *string

func (*Location) GetStatus

func (l *Location) GetStatus() *LocationStatus

func (*Location) GetTaxIDs

func (l *Location) GetTaxIDs() *TaxIDs

func (*Location) GetTimezone

func (l *Location) GetTimezone() *string

func (*Location) GetTwitterUsername

func (l *Location) GetTwitterUsername() *string

func (*Location) GetType

func (l *Location) GetType() *LocationType

func (*Location) GetWebsiteURL

func (l *Location) GetWebsiteURL() *string

func (*Location) String

func (l *Location) String() string

func (*Location) UnmarshalJSON

func (l *Location) UnmarshalJSON(data []byte) error

type LocationBookingProfile

type LocationBookingProfile struct {
	// The ID of the [location](entity:Location).
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// Url for the online booking site for this location.
	BookingSiteURL *string `json:"booking_site_url,omitempty" url:"booking_site_url,omitempty"`
	// Indicates whether the location is enabled for online booking.
	OnlineBookingEnabled *bool `json:"online_booking_enabled,omitempty" url:"online_booking_enabled,omitempty"`
	// contains filtered or unexported fields
}

The booking profile of a seller's location, including the location's ID and whether the location is enabled for online booking.

func (*LocationBookingProfile) GetBookingSiteURL

func (l *LocationBookingProfile) GetBookingSiteURL() *string

func (*LocationBookingProfile) GetExtraProperties

func (l *LocationBookingProfile) GetExtraProperties() map[string]interface{}

func (*LocationBookingProfile) GetLocationID

func (l *LocationBookingProfile) GetLocationID() *string

func (*LocationBookingProfile) GetOnlineBookingEnabled

func (l *LocationBookingProfile) GetOnlineBookingEnabled() *bool

func (*LocationBookingProfile) String

func (l *LocationBookingProfile) String() string

func (*LocationBookingProfile) UnmarshalJSON

func (l *LocationBookingProfile) UnmarshalJSON(data []byte) error

type LocationCapability

type LocationCapability string

The capabilities a location might have.

const (
	LocationCapabilityCreditCardProcessing LocationCapability = "CREDIT_CARD_PROCESSING"
	LocationCapabilityAutomaticTransfers   LocationCapability = "AUTOMATIC_TRANSFERS"
	LocationCapabilityUnlinkedRefunds      LocationCapability = "UNLINKED_REFUNDS"
)

func NewLocationCapabilityFromString

func NewLocationCapabilityFromString(s string) (LocationCapability, error)

func (LocationCapability) Ptr

type LocationStatus

type LocationStatus string

A location's status.

const (
	LocationStatusActive   LocationStatus = "ACTIVE"
	LocationStatusInactive LocationStatus = "INACTIVE"
)

func NewLocationStatusFromString

func NewLocationStatusFromString(s string) (LocationStatus, error)

func (LocationStatus) Ptr

func (l LocationStatus) Ptr() *LocationStatus

type LocationType

type LocationType string

A location's type.

const (
	LocationTypePhysical LocationType = "PHYSICAL"
	LocationTypeMobile   LocationType = "MOBILE"
)

func NewLocationTypeFromString

func NewLocationTypeFromString(s string) (LocationType, error)

func (LocationType) Ptr

func (l LocationType) Ptr() *LocationType

type LocationsGetRequest

type LocationsGetRequest = GetLocationsRequest

LocationsGetRequest is an alias for GetLocationsRequest.

type LoyaltyAccount

type LoyaltyAccount struct {
	// The Square-assigned ID of the loyalty account.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram) to which the account belongs.
	ProgramID string `json:"program_id" url:"program_id"`
	// The available point balance in the loyalty account. If points are scheduled to expire, they are listed in the `expiring_point_deadlines` field.
	//
	// 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 *int `json:"balance,omitempty" url:"balance,omitempty"`
	// The total points accrued during the lifetime of the account.
	LifetimePoints *int `json:"lifetime_points,omitempty" url:"lifetime_points,omitempty"`
	// The Square-assigned ID of the [customer](entity:Customer) that is associated with the account.
	CustomerID *string `json:"customer_id,omitempty" url:"customer_id,omitempty"`
	// The timestamp when the buyer joined the loyalty program, in RFC 3339 format. This field is used to display the **Enrolled On** or **Member Since** date in first-party Square products.
	//
	// If this field is not set in a `CreateLoyaltyAccount` request, Square populates it after the buyer's first action on their account
	// (when `AccumulateLoyaltyPoints` or `CreateLoyaltyReward` is called). In first-party flows, Square populates the field when the buyer agrees to the terms of service in Square Point of Sale.
	//
	// This field is typically specified in a `CreateLoyaltyAccount` request when creating a loyalty account for a buyer who already interacted with their account.
	// For example, you would set this field when migrating accounts from an external system. The timestamp in the request can represent a current or previous date and time, but it cannot be set for the future.
	EnrolledAt *string `json:"enrolled_at,omitempty" url:"enrolled_at,omitempty"`
	// The timestamp when the loyalty account was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp when the loyalty account was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The mapping that associates the loyalty account with a buyer. Currently,
	// a loyalty account can only be mapped to a buyer by phone number.
	//
	// To create a loyalty account, you must specify the `mapping` field, with the buyer's phone number
	// in the `phone_number` field.
	Mapping *LoyaltyAccountMapping `json:"mapping,omitempty" url:"mapping,omitempty"`
	// The schedule for when points expire in the loyalty account balance. This field is present only if the account has points that are scheduled to expire.
	//
	// The total number of points in this field equals the number of points in the `balance` field.
	ExpiringPointDeadlines []*LoyaltyAccountExpiringPointDeadline `json:"expiring_point_deadlines,omitempty" url:"expiring_point_deadlines,omitempty"`
	// contains filtered or unexported fields
}

Describes a loyalty account in a [loyalty program](entity:LoyaltyProgram). For more information, see [Create and Retrieve Loyalty Accounts](https://developer.squareup.com/docs/loyalty-api/loyalty-accounts).

func (*LoyaltyAccount) GetBalance

func (l *LoyaltyAccount) GetBalance() *int

func (*LoyaltyAccount) GetCreatedAt

func (l *LoyaltyAccount) GetCreatedAt() *string

func (*LoyaltyAccount) GetCustomerID

func (l *LoyaltyAccount) GetCustomerID() *string

func (*LoyaltyAccount) GetEnrolledAt

func (l *LoyaltyAccount) GetEnrolledAt() *string

func (*LoyaltyAccount) GetExpiringPointDeadlines

func (l *LoyaltyAccount) GetExpiringPointDeadlines() []*LoyaltyAccountExpiringPointDeadline

func (*LoyaltyAccount) GetExtraProperties

func (l *LoyaltyAccount) GetExtraProperties() map[string]interface{}

func (*LoyaltyAccount) GetID

func (l *LoyaltyAccount) GetID() *string

func (*LoyaltyAccount) GetLifetimePoints

func (l *LoyaltyAccount) GetLifetimePoints() *int

func (*LoyaltyAccount) GetMapping

func (l *LoyaltyAccount) GetMapping() *LoyaltyAccountMapping

func (*LoyaltyAccount) GetProgramID

func (l *LoyaltyAccount) GetProgramID() string

func (*LoyaltyAccount) GetUpdatedAt

func (l *LoyaltyAccount) GetUpdatedAt() *string

func (*LoyaltyAccount) String

func (l *LoyaltyAccount) String() string

func (*LoyaltyAccount) UnmarshalJSON

func (l *LoyaltyAccount) UnmarshalJSON(data []byte) error

type LoyaltyAccountExpiringPointDeadline

type LoyaltyAccountExpiringPointDeadline struct {
	// The number of points scheduled to expire at the `expires_at` timestamp.
	Points int `json:"points" url:"points"`
	// The timestamp of when the points are scheduled to expire, in RFC 3339 format.
	ExpiresAt string `json:"expires_at" url:"expires_at"`
	// contains filtered or unexported fields
}

Represents a set of points for a loyalty account that are scheduled to expire on a specific date.

func (*LoyaltyAccountExpiringPointDeadline) GetExpiresAt

func (l *LoyaltyAccountExpiringPointDeadline) GetExpiresAt() string

func (*LoyaltyAccountExpiringPointDeadline) GetExtraProperties

func (l *LoyaltyAccountExpiringPointDeadline) GetExtraProperties() map[string]interface{}

func (*LoyaltyAccountExpiringPointDeadline) GetPoints

func (*LoyaltyAccountExpiringPointDeadline) String

func (*LoyaltyAccountExpiringPointDeadline) UnmarshalJSON

func (l *LoyaltyAccountExpiringPointDeadline) UnmarshalJSON(data []byte) error

type LoyaltyAccountMapping

type LoyaltyAccountMapping struct {
	// The Square-assigned ID of the mapping.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The timestamp when the mapping was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The phone number of the buyer, in E.164 format. For example, "+14155551111".
	PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"`
	// contains filtered or unexported fields
}

Represents the mapping that associates a loyalty account with a buyer.

Currently, a loyalty account can only be mapped to a buyer by phone number. For more information, see [Loyalty Overview](https://developer.squareup.com/docs/loyalty/overview).

func (*LoyaltyAccountMapping) GetCreatedAt

func (l *LoyaltyAccountMapping) GetCreatedAt() *string

func (*LoyaltyAccountMapping) GetExtraProperties

func (l *LoyaltyAccountMapping) GetExtraProperties() map[string]interface{}

func (*LoyaltyAccountMapping) GetID

func (l *LoyaltyAccountMapping) GetID() *string

func (*LoyaltyAccountMapping) GetPhoneNumber

func (l *LoyaltyAccountMapping) GetPhoneNumber() *string

func (*LoyaltyAccountMapping) String

func (l *LoyaltyAccountMapping) String() string

func (*LoyaltyAccountMapping) UnmarshalJSON

func (l *LoyaltyAccountMapping) UnmarshalJSON(data []byte) error

type LoyaltyEvent

type LoyaltyEvent struct {
	// The Square-assigned ID of the loyalty event.
	ID string `json:"id" url:"id"`
	// The type of the loyalty event.
	// See [LoyaltyEventType](#type-loyaltyeventtype) for possible values
	Type LoyaltyEventType `json:"type" url:"type"`
	// The timestamp when the event was created, in RFC 3339 format.
	CreatedAt string `json:"created_at" url:"created_at"`
	// Provides metadata when the event `type` is `ACCUMULATE_POINTS`.
	AccumulatePoints *LoyaltyEventAccumulatePoints `json:"accumulate_points,omitempty" url:"accumulate_points,omitempty"`
	// Provides metadata when the event `type` is `CREATE_REWARD`.
	CreateReward *LoyaltyEventCreateReward `json:"create_reward,omitempty" url:"create_reward,omitempty"`
	// Provides metadata when the event `type` is `REDEEM_REWARD`.
	RedeemReward *LoyaltyEventRedeemReward `json:"redeem_reward,omitempty" url:"redeem_reward,omitempty"`
	// Provides metadata when the event `type` is `DELETE_REWARD`.
	DeleteReward *LoyaltyEventDeleteReward `json:"delete_reward,omitempty" url:"delete_reward,omitempty"`
	// Provides metadata when the event `type` is `ADJUST_POINTS`.
	AdjustPoints *LoyaltyEventAdjustPoints `json:"adjust_points,omitempty" url:"adjust_points,omitempty"`
	// The ID of the [loyalty account](entity:LoyaltyAccount) associated with the event.
	LoyaltyAccountID string `json:"loyalty_account_id" url:"loyalty_account_id"`
	// The ID of the [location](entity:Location) where the event occurred.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// Defines whether the event was generated by the Square Point of Sale.
	// See [LoyaltyEventSource](#type-loyaltyeventsource) for possible values
	Source LoyaltyEventSource `json:"source" url:"source"`
	// Provides metadata when the event `type` is `EXPIRE_POINTS`.
	ExpirePoints *LoyaltyEventExpirePoints `json:"expire_points,omitempty" url:"expire_points,omitempty"`
	// Provides metadata when the event `type` is `OTHER`.
	OtherEvent *LoyaltyEventOther `json:"other_event,omitempty" url:"other_event,omitempty"`
	// Provides metadata when the event `type` is `ACCUMULATE_PROMOTION_POINTS`.
	AccumulatePromotionPoints *LoyaltyEventAccumulatePromotionPoints `json:"accumulate_promotion_points,omitempty" url:"accumulate_promotion_points,omitempty"`
	// contains filtered or unexported fields
}

Provides information about a loyalty event. For more information, see [Search for Balance-Changing Loyalty Events](https://developer.squareup.com/docs/loyalty-api/loyalty-events).

func (*LoyaltyEvent) GetAccumulatePoints

func (l *LoyaltyEvent) GetAccumulatePoints() *LoyaltyEventAccumulatePoints

func (*LoyaltyEvent) GetAccumulatePromotionPoints

func (l *LoyaltyEvent) GetAccumulatePromotionPoints() *LoyaltyEventAccumulatePromotionPoints

func (*LoyaltyEvent) GetAdjustPoints

func (l *LoyaltyEvent) GetAdjustPoints() *LoyaltyEventAdjustPoints

func (*LoyaltyEvent) GetCreateReward

func (l *LoyaltyEvent) GetCreateReward() *LoyaltyEventCreateReward

func (*LoyaltyEvent) GetCreatedAt

func (l *LoyaltyEvent) GetCreatedAt() string

func (*LoyaltyEvent) GetDeleteReward

func (l *LoyaltyEvent) GetDeleteReward() *LoyaltyEventDeleteReward

func (*LoyaltyEvent) GetExpirePoints

func (l *LoyaltyEvent) GetExpirePoints() *LoyaltyEventExpirePoints

func (*LoyaltyEvent) GetExtraProperties

func (l *LoyaltyEvent) GetExtraProperties() map[string]interface{}

func (*LoyaltyEvent) GetID

func (l *LoyaltyEvent) GetID() string

func (*LoyaltyEvent) GetLocationID

func (l *LoyaltyEvent) GetLocationID() *string

func (*LoyaltyEvent) GetLoyaltyAccountID

func (l *LoyaltyEvent) GetLoyaltyAccountID() string

func (*LoyaltyEvent) GetOtherEvent

func (l *LoyaltyEvent) GetOtherEvent() *LoyaltyEventOther

func (*LoyaltyEvent) GetRedeemReward

func (l *LoyaltyEvent) GetRedeemReward() *LoyaltyEventRedeemReward

func (*LoyaltyEvent) GetSource

func (l *LoyaltyEvent) GetSource() LoyaltyEventSource

func (*LoyaltyEvent) GetType

func (l *LoyaltyEvent) GetType() LoyaltyEventType

func (*LoyaltyEvent) String

func (l *LoyaltyEvent) String() string

func (*LoyaltyEvent) UnmarshalJSON

func (l *LoyaltyEvent) UnmarshalJSON(data []byte) error

type LoyaltyEventAccumulatePoints

type LoyaltyEventAccumulatePoints struct {
	// The ID of the [loyalty program](entity:LoyaltyProgram).
	LoyaltyProgramID *string `json:"loyalty_program_id,omitempty" url:"loyalty_program_id,omitempty"`
	// The number of points accumulated by the event.
	Points *int `json:"points,omitempty" url:"points,omitempty"`
	// The ID of the [order](entity: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" url:"order_id,omitempty"`
	// contains filtered or unexported fields
}

Provides metadata when the event `type` is `ACCUMULATE_POINTS`.

func (*LoyaltyEventAccumulatePoints) GetExtraProperties

func (l *LoyaltyEventAccumulatePoints) GetExtraProperties() map[string]interface{}

func (*LoyaltyEventAccumulatePoints) GetLoyaltyProgramID

func (l *LoyaltyEventAccumulatePoints) GetLoyaltyProgramID() *string

func (*LoyaltyEventAccumulatePoints) GetOrderID

func (l *LoyaltyEventAccumulatePoints) GetOrderID() *string

func (*LoyaltyEventAccumulatePoints) GetPoints

func (l *LoyaltyEventAccumulatePoints) GetPoints() *int

func (*LoyaltyEventAccumulatePoints) String

func (*LoyaltyEventAccumulatePoints) UnmarshalJSON

func (l *LoyaltyEventAccumulatePoints) UnmarshalJSON(data []byte) error

type LoyaltyEventAccumulatePromotionPoints

type LoyaltyEventAccumulatePromotionPoints struct {
	// The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram).
	LoyaltyProgramID *string `json:"loyalty_program_id,omitempty" url:"loyalty_program_id,omitempty"`
	// The Square-assigned ID of the [loyalty promotion](entity:LoyaltyPromotion).
	LoyaltyPromotionID *string `json:"loyalty_promotion_id,omitempty" url:"loyalty_promotion_id,omitempty"`
	// The number of points earned by the event.
	Points int `json:"points" url:"points"`
	// The ID of the [order](entity:Order) for which the buyer earned the promotion points.
	// Only applications that use the Orders API to process orders can trigger this event.
	OrderID string `json:"order_id" url:"order_id"`
	// contains filtered or unexported fields
}

Provides metadata when the event `type` is `ACCUMULATE_PROMOTION_POINTS`.

func (*LoyaltyEventAccumulatePromotionPoints) GetExtraProperties

func (l *LoyaltyEventAccumulatePromotionPoints) GetExtraProperties() map[string]interface{}

func (*LoyaltyEventAccumulatePromotionPoints) GetLoyaltyProgramID

func (l *LoyaltyEventAccumulatePromotionPoints) GetLoyaltyProgramID() *string

func (*LoyaltyEventAccumulatePromotionPoints) GetLoyaltyPromotionID

func (l *LoyaltyEventAccumulatePromotionPoints) GetLoyaltyPromotionID() *string

func (*LoyaltyEventAccumulatePromotionPoints) GetOrderID

func (*LoyaltyEventAccumulatePromotionPoints) GetPoints

func (*LoyaltyEventAccumulatePromotionPoints) String

func (*LoyaltyEventAccumulatePromotionPoints) UnmarshalJSON

func (l *LoyaltyEventAccumulatePromotionPoints) UnmarshalJSON(data []byte) error

type LoyaltyEventAdjustPoints

type LoyaltyEventAdjustPoints struct {
	// The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram).
	LoyaltyProgramID *string `json:"loyalty_program_id,omitempty" url:"loyalty_program_id,omitempty"`
	// The number of points added or removed.
	Points int `json:"points" url:"points"`
	// The reason for the adjustment of points.
	Reason *string `json:"reason,omitempty" url:"reason,omitempty"`
	// contains filtered or unexported fields
}

Provides metadata when the event `type` is `ADJUST_POINTS`.

func (*LoyaltyEventAdjustPoints) GetExtraProperties

func (l *LoyaltyEventAdjustPoints) GetExtraProperties() map[string]interface{}

func (*LoyaltyEventAdjustPoints) GetLoyaltyProgramID

func (l *LoyaltyEventAdjustPoints) GetLoyaltyProgramID() *string

func (*LoyaltyEventAdjustPoints) GetPoints

func (l *LoyaltyEventAdjustPoints) GetPoints() int

func (*LoyaltyEventAdjustPoints) GetReason

func (l *LoyaltyEventAdjustPoints) GetReason() *string

func (*LoyaltyEventAdjustPoints) String

func (l *LoyaltyEventAdjustPoints) String() string

func (*LoyaltyEventAdjustPoints) UnmarshalJSON

func (l *LoyaltyEventAdjustPoints) UnmarshalJSON(data []byte) error

type LoyaltyEventCreateReward

type LoyaltyEventCreateReward struct {
	// The ID of the [loyalty program](entity:LoyaltyProgram).
	LoyaltyProgramID string `json:"loyalty_program_id" url:"loyalty_program_id"`
	// The Square-assigned ID of the created [loyalty reward](entity:LoyaltyReward).
	// This field is returned only if the event source is `LOYALTY_API`.
	RewardID *string `json:"reward_id,omitempty" url:"reward_id,omitempty"`
	// The loyalty points used to create the reward.
	Points int `json:"points" url:"points"`
	// contains filtered or unexported fields
}

Provides metadata when the event `type` is `CREATE_REWARD`.

func (*LoyaltyEventCreateReward) GetExtraProperties

func (l *LoyaltyEventCreateReward) GetExtraProperties() map[string]interface{}

func (*LoyaltyEventCreateReward) GetLoyaltyProgramID

func (l *LoyaltyEventCreateReward) GetLoyaltyProgramID() string

func (*LoyaltyEventCreateReward) GetPoints

func (l *LoyaltyEventCreateReward) GetPoints() int

func (*LoyaltyEventCreateReward) GetRewardID

func (l *LoyaltyEventCreateReward) GetRewardID() *string

func (*LoyaltyEventCreateReward) String

func (l *LoyaltyEventCreateReward) String() string

func (*LoyaltyEventCreateReward) UnmarshalJSON

func (l *LoyaltyEventCreateReward) UnmarshalJSON(data []byte) error

type LoyaltyEventDateTimeFilter

type LoyaltyEventDateTimeFilter struct {
	// The `created_at` date time range used to filter the result.
	CreatedAt *TimeRange `json:"created_at,omitempty" url:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Filter events by date time range.

func (*LoyaltyEventDateTimeFilter) GetCreatedAt

func (l *LoyaltyEventDateTimeFilter) GetCreatedAt() *TimeRange

func (*LoyaltyEventDateTimeFilter) GetExtraProperties

func (l *LoyaltyEventDateTimeFilter) GetExtraProperties() map[string]interface{}

func (*LoyaltyEventDateTimeFilter) String

func (l *LoyaltyEventDateTimeFilter) String() string

func (*LoyaltyEventDateTimeFilter) UnmarshalJSON

func (l *LoyaltyEventDateTimeFilter) UnmarshalJSON(data []byte) error

type LoyaltyEventDeleteReward

type LoyaltyEventDeleteReward struct {
	// The ID of the [loyalty program](entity:LoyaltyProgram).
	LoyaltyProgramID string `json:"loyalty_program_id" url:"loyalty_program_id"`
	// The ID of the deleted [loyalty reward](entity:LoyaltyReward).
	// This field is returned only if the event source is `LOYALTY_API`.
	RewardID *string `json:"reward_id,omitempty" url:"reward_id,omitempty"`
	// The number of points returned to the loyalty account.
	Points int `json:"points" url:"points"`
	// contains filtered or unexported fields
}

Provides metadata when the event `type` is `DELETE_REWARD`.

func (*LoyaltyEventDeleteReward) GetExtraProperties

func (l *LoyaltyEventDeleteReward) GetExtraProperties() map[string]interface{}

func (*LoyaltyEventDeleteReward) GetLoyaltyProgramID

func (l *LoyaltyEventDeleteReward) GetLoyaltyProgramID() string

func (*LoyaltyEventDeleteReward) GetPoints

func (l *LoyaltyEventDeleteReward) GetPoints() int

func (*LoyaltyEventDeleteReward) GetRewardID

func (l *LoyaltyEventDeleteReward) GetRewardID() *string

func (*LoyaltyEventDeleteReward) String

func (l *LoyaltyEventDeleteReward) String() string

func (*LoyaltyEventDeleteReward) UnmarshalJSON

func (l *LoyaltyEventDeleteReward) UnmarshalJSON(data []byte) error

type LoyaltyEventExpirePoints

type LoyaltyEventExpirePoints struct {
	// The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram).
	LoyaltyProgramID string `json:"loyalty_program_id" url:"loyalty_program_id"`
	// The number of points expired.
	Points int `json:"points" url:"points"`
	// contains filtered or unexported fields
}

Provides metadata when the event `type` is `EXPIRE_POINTS`.

func (*LoyaltyEventExpirePoints) GetExtraProperties

func (l *LoyaltyEventExpirePoints) GetExtraProperties() map[string]interface{}

func (*LoyaltyEventExpirePoints) GetLoyaltyProgramID

func (l *LoyaltyEventExpirePoints) GetLoyaltyProgramID() string

func (*LoyaltyEventExpirePoints) GetPoints

func (l *LoyaltyEventExpirePoints) GetPoints() int

func (*LoyaltyEventExpirePoints) String

func (l *LoyaltyEventExpirePoints) String() string

func (*LoyaltyEventExpirePoints) UnmarshalJSON

func (l *LoyaltyEventExpirePoints) UnmarshalJSON(data []byte) error

type LoyaltyEventFilter

type LoyaltyEventFilter struct {
	// Filter events by loyalty account.
	LoyaltyAccountFilter *LoyaltyEventLoyaltyAccountFilter `json:"loyalty_account_filter,omitempty" url:"loyalty_account_filter,omitempty"`
	// Filter events by event type.
	TypeFilter *LoyaltyEventTypeFilter `json:"type_filter,omitempty" url:"type_filter,omitempty"`
	// 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" url:"date_time_filter,omitempty"`
	// Filter events by location.
	LocationFilter *LoyaltyEventLocationFilter `json:"location_filter,omitempty" url:"location_filter,omitempty"`
	// Filter events by the order associated with the event.
	OrderFilter *LoyaltyEventOrderFilter `json:"order_filter,omitempty" url:"order_filter,omitempty"`
	// contains filtered or unexported fields
}

The filtering criteria. If the request specifies multiple filters, the endpoint uses a logical AND to evaluate them.

func (*LoyaltyEventFilter) GetDateTimeFilter

func (l *LoyaltyEventFilter) GetDateTimeFilter() *LoyaltyEventDateTimeFilter

func (*LoyaltyEventFilter) GetExtraProperties

func (l *LoyaltyEventFilter) GetExtraProperties() map[string]interface{}

func (*LoyaltyEventFilter) GetLocationFilter

func (l *LoyaltyEventFilter) GetLocationFilter() *LoyaltyEventLocationFilter

func (*LoyaltyEventFilter) GetLoyaltyAccountFilter

func (l *LoyaltyEventFilter) GetLoyaltyAccountFilter() *LoyaltyEventLoyaltyAccountFilter

func (*LoyaltyEventFilter) GetOrderFilter

func (l *LoyaltyEventFilter) GetOrderFilter() *LoyaltyEventOrderFilter

func (*LoyaltyEventFilter) GetTypeFilter

func (l *LoyaltyEventFilter) GetTypeFilter() *LoyaltyEventTypeFilter

func (*LoyaltyEventFilter) String

func (l *LoyaltyEventFilter) String() string

func (*LoyaltyEventFilter) UnmarshalJSON

func (l *LoyaltyEventFilter) UnmarshalJSON(data []byte) error

type LoyaltyEventLocationFilter

type LoyaltyEventLocationFilter struct {
	// The [location](entity:Location) IDs for loyalty events to query.
	// If multiple values are specified, the endpoint uses
	// a logical OR to combine them.
	LocationIDs []string `json:"location_ids,omitempty" url:"location_ids,omitempty"`
	// contains filtered or unexported fields
}

Filter events by location.

func (*LoyaltyEventLocationFilter) GetExtraProperties

func (l *LoyaltyEventLocationFilter) GetExtraProperties() map[string]interface{}

func (*LoyaltyEventLocationFilter) GetLocationIDs

func (l *LoyaltyEventLocationFilter) GetLocationIDs() []string

func (*LoyaltyEventLocationFilter) String

func (l *LoyaltyEventLocationFilter) String() string

func (*LoyaltyEventLocationFilter) UnmarshalJSON

func (l *LoyaltyEventLocationFilter) UnmarshalJSON(data []byte) error

type LoyaltyEventLoyaltyAccountFilter

type LoyaltyEventLoyaltyAccountFilter struct {
	// The ID of the [loyalty account](entity:LoyaltyAccount) associated with loyalty events.
	LoyaltyAccountID string `json:"loyalty_account_id" url:"loyalty_account_id"`
	// contains filtered or unexported fields
}

Filter events by loyalty account.

func (*LoyaltyEventLoyaltyAccountFilter) GetExtraProperties

func (l *LoyaltyEventLoyaltyAccountFilter) GetExtraProperties() map[string]interface{}

func (*LoyaltyEventLoyaltyAccountFilter) GetLoyaltyAccountID

func (l *LoyaltyEventLoyaltyAccountFilter) GetLoyaltyAccountID() string

func (*LoyaltyEventLoyaltyAccountFilter) String

func (*LoyaltyEventLoyaltyAccountFilter) UnmarshalJSON

func (l *LoyaltyEventLoyaltyAccountFilter) UnmarshalJSON(data []byte) error

type LoyaltyEventOrderFilter

type LoyaltyEventOrderFilter struct {
	// The ID of the [order](entity:Order) associated with the event.
	OrderID string `json:"order_id" url:"order_id"`
	// contains filtered or unexported fields
}

Filter events by the order associated with the event.

func (*LoyaltyEventOrderFilter) GetExtraProperties

func (l *LoyaltyEventOrderFilter) GetExtraProperties() map[string]interface{}

func (*LoyaltyEventOrderFilter) GetOrderID

func (l *LoyaltyEventOrderFilter) GetOrderID() string

func (*LoyaltyEventOrderFilter) String

func (l *LoyaltyEventOrderFilter) String() string

func (*LoyaltyEventOrderFilter) UnmarshalJSON

func (l *LoyaltyEventOrderFilter) UnmarshalJSON(data []byte) error

type LoyaltyEventOther

type LoyaltyEventOther struct {
	// The Square-assigned ID of the [loyalty program](entity:LoyaltyProgram).
	LoyaltyProgramID string `json:"loyalty_program_id" url:"loyalty_program_id"`
	// The number of points added or removed.
	Points int `json:"points" url:"points"`
	// contains filtered or unexported fields
}

Provides metadata when the event `type` is `OTHER`.

func (*LoyaltyEventOther) GetExtraProperties

func (l *LoyaltyEventOther) GetExtraProperties() map[string]interface{}

func (*LoyaltyEventOther) GetLoyaltyProgramID

func (l *LoyaltyEventOther) GetLoyaltyProgramID() string

func (*LoyaltyEventOther) GetPoints

func (l *LoyaltyEventOther) GetPoints() int

func (*LoyaltyEventOther) String

func (l *LoyaltyEventOther) String() string

func (*LoyaltyEventOther) UnmarshalJSON

func (l *LoyaltyEventOther) UnmarshalJSON(data []byte) error

type LoyaltyEventQuery

type LoyaltyEventQuery struct {
	// The query filter criteria.
	Filter *LoyaltyEventFilter `json:"filter,omitempty" url:"filter,omitempty"`
	// contains filtered or unexported fields
}

Represents a query used to search for loyalty events.

func (*LoyaltyEventQuery) GetExtraProperties

func (l *LoyaltyEventQuery) GetExtraProperties() map[string]interface{}

func (*LoyaltyEventQuery) GetFilter

func (l *LoyaltyEventQuery) GetFilter() *LoyaltyEventFilter

func (*LoyaltyEventQuery) String

func (l *LoyaltyEventQuery) String() string

func (*LoyaltyEventQuery) UnmarshalJSON

func (l *LoyaltyEventQuery) UnmarshalJSON(data []byte) error

type LoyaltyEventRedeemReward

type LoyaltyEventRedeemReward struct {
	// The ID of the [loyalty program](entity:LoyaltyProgram).
	LoyaltyProgramID string `json:"loyalty_program_id" url:"loyalty_program_id"`
	// The ID of the redeemed [loyalty reward](entity:LoyaltyReward).
	// This field is returned only if the event source is `LOYALTY_API`.
	RewardID *string `json:"reward_id,omitempty" url:"reward_id,omitempty"`
	// The ID of the [order](entity: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" url:"order_id,omitempty"`
	// contains filtered or unexported fields
}

Provides metadata when the event `type` is `REDEEM_REWARD`.

func (*LoyaltyEventRedeemReward) GetExtraProperties

func (l *LoyaltyEventRedeemReward) GetExtraProperties() map[string]interface{}

func (*LoyaltyEventRedeemReward) GetLoyaltyProgramID

func (l *LoyaltyEventRedeemReward) GetLoyaltyProgramID() string

func (*LoyaltyEventRedeemReward) GetOrderID

func (l *LoyaltyEventRedeemReward) GetOrderID() *string

func (*LoyaltyEventRedeemReward) GetRewardID

func (l *LoyaltyEventRedeemReward) GetRewardID() *string

func (*LoyaltyEventRedeemReward) String

func (l *LoyaltyEventRedeemReward) String() string

func (*LoyaltyEventRedeemReward) UnmarshalJSON

func (l *LoyaltyEventRedeemReward) UnmarshalJSON(data []byte) error

type LoyaltyEventSource

type LoyaltyEventSource string

Defines whether the event was generated by the Square Point of Sale.

const (
	LoyaltyEventSourceSquare     LoyaltyEventSource = "SQUARE"
	LoyaltyEventSourceLoyaltyAPI LoyaltyEventSource = "LOYALTY_API"
)

func NewLoyaltyEventSourceFromString

func NewLoyaltyEventSourceFromString(s string) (LoyaltyEventSource, error)

func (LoyaltyEventSource) Ptr

type LoyaltyEventType

type LoyaltyEventType string

The type of the loyalty event.

const (
	LoyaltyEventTypeAccumulatePoints          LoyaltyEventType = "ACCUMULATE_POINTS"
	LoyaltyEventTypeCreateReward              LoyaltyEventType = "CREATE_REWARD"
	LoyaltyEventTypeRedeemReward              LoyaltyEventType = "REDEEM_REWARD"
	LoyaltyEventTypeDeleteReward              LoyaltyEventType = "DELETE_REWARD"
	LoyaltyEventTypeAdjustPoints              LoyaltyEventType = "ADJUST_POINTS"
	LoyaltyEventTypeExpirePoints              LoyaltyEventType = "EXPIRE_POINTS"
	LoyaltyEventTypeOther                     LoyaltyEventType = "OTHER"
	LoyaltyEventTypeAccumulatePromotionPoints LoyaltyEventType = "ACCUMULATE_PROMOTION_POINTS"
)

func NewLoyaltyEventTypeFromString

func NewLoyaltyEventTypeFromString(s string) (LoyaltyEventType, error)

func (LoyaltyEventType) Ptr

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
	Types []LoyaltyEventType `json:"types,omitempty" url:"types,omitempty"`
	// contains filtered or unexported fields
}

Filter events by event type.

func (*LoyaltyEventTypeFilter) GetExtraProperties

func (l *LoyaltyEventTypeFilter) GetExtraProperties() map[string]interface{}

func (*LoyaltyEventTypeFilter) GetTypes

func (l *LoyaltyEventTypeFilter) GetTypes() []LoyaltyEventType

func (*LoyaltyEventTypeFilter) String

func (l *LoyaltyEventTypeFilter) String() string

func (*LoyaltyEventTypeFilter) UnmarshalJSON

func (l *LoyaltyEventTypeFilter) UnmarshalJSON(data []byte) error

type LoyaltyProgram

type LoyaltyProgram struct {
	// The Square-assigned ID of the loyalty program. Updates to
	// the loyalty program do not modify the identifier.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// Whether the program is currently active.
	// See [LoyaltyProgramStatus](#type-loyaltyprogramstatus) for possible values
	Status *LoyaltyProgramStatus `json:"status,omitempty" url:"status,omitempty"`
	// The list of rewards for buyers, sorted by ascending points.
	RewardTiers []*LoyaltyProgramRewardTier `json:"reward_tiers,omitempty" url:"reward_tiers,omitempty"`
	// If present, details for how points expire.
	ExpirationPolicy *LoyaltyProgramExpirationPolicy `json:"expiration_policy,omitempty" url:"expiration_policy,omitempty"`
	// A cosmetic name for the “points” currency.
	Terminology *LoyaltyProgramTerminology `json:"terminology,omitempty" url:"terminology,omitempty"`
	// The [locations](entity:Location) at which the program is active.
	LocationIDs []string `json:"location_ids,omitempty" url:"location_ids,omitempty"`
	// The timestamp when the program was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp when the reward was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// Defines how buyers can earn loyalty points from the base loyalty program.
	// To check for associated [loyalty promotions](entity:LoyaltyPromotion) that enable
	// buyers to earn extra points, call [ListLoyaltyPromotions](api-endpoint:Loyalty-ListLoyaltyPromotions).
	AccrualRules []*LoyaltyProgramAccrualRule `json:"accrual_rules,omitempty" url:"accrual_rules,omitempty"`
	// contains filtered or unexported fields
}

Represents a Square loyalty program. Loyalty programs define how buyers can earn points and redeem points for rewards. Square sellers can have only one loyalty program, which is created and managed from the Seller Dashboard. For more information, see [Loyalty Program Overview](https://developer.squareup.com/docs/loyalty/overview).

func (*LoyaltyProgram) GetAccrualRules

func (l *LoyaltyProgram) GetAccrualRules() []*LoyaltyProgramAccrualRule

func (*LoyaltyProgram) GetCreatedAt

func (l *LoyaltyProgram) GetCreatedAt() *string

func (*LoyaltyProgram) GetExpirationPolicy

func (l *LoyaltyProgram) GetExpirationPolicy() *LoyaltyProgramExpirationPolicy

func (*LoyaltyProgram) GetExtraProperties

func (l *LoyaltyProgram) GetExtraProperties() map[string]interface{}

func (*LoyaltyProgram) GetID

func (l *LoyaltyProgram) GetID() *string

func (*LoyaltyProgram) GetLocationIDs

func (l *LoyaltyProgram) GetLocationIDs() []string

func (*LoyaltyProgram) GetRewardTiers

func (l *LoyaltyProgram) GetRewardTiers() []*LoyaltyProgramRewardTier

func (*LoyaltyProgram) GetStatus

func (l *LoyaltyProgram) GetStatus() *LoyaltyProgramStatus

func (*LoyaltyProgram) GetTerminology

func (l *LoyaltyProgram) GetTerminology() *LoyaltyProgramTerminology

func (*LoyaltyProgram) GetUpdatedAt

func (l *LoyaltyProgram) GetUpdatedAt() *string

func (*LoyaltyProgram) String

func (l *LoyaltyProgram) String() string

func (*LoyaltyProgram) UnmarshalJSON

func (l *LoyaltyProgram) UnmarshalJSON(data []byte) error

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
	AccrualType LoyaltyProgramAccrualRuleType `json:"accrual_type" url:"accrual_type"`
	// The number of points that
	// buyers earn based on the `accrual_type`.
	Points *int `json:"points,omitempty" url:"points,omitempty"`
	// Additional data for rules with the `VISIT` accrual type.
	VisitData *LoyaltyProgramAccrualRuleVisitData `json:"visit_data,omitempty" url:"visit_data,omitempty"`
	// Additional data for rules with the `SPEND` accrual type.
	SpendData *LoyaltyProgramAccrualRuleSpendData `json:"spend_data,omitempty" url:"spend_data,omitempty"`
	// Additional data for rules with the `ITEM_VARIATION` accrual type.
	ItemVariationData *LoyaltyProgramAccrualRuleItemVariationData `json:"item_variation_data,omitempty" url:"item_variation_data,omitempty"`
	// Additional data for rules with the `CATEGORY` accrual type.
	CategoryData *LoyaltyProgramAccrualRuleCategoryData `json:"category_data,omitempty" url:"category_data,omitempty"`
	// contains filtered or unexported fields
}

Represents an accrual rule, which defines how buyers can earn points from the base [loyalty program](entity:LoyaltyProgram).

func (*LoyaltyProgramAccrualRule) GetAccrualType

func (*LoyaltyProgramAccrualRule) GetCategoryData

func (*LoyaltyProgramAccrualRule) GetExtraProperties

func (l *LoyaltyProgramAccrualRule) GetExtraProperties() map[string]interface{}

func (*LoyaltyProgramAccrualRule) GetItemVariationData

func (*LoyaltyProgramAccrualRule) GetPoints

func (l *LoyaltyProgramAccrualRule) GetPoints() *int

func (*LoyaltyProgramAccrualRule) GetSpendData

func (*LoyaltyProgramAccrualRule) GetVisitData

func (*LoyaltyProgramAccrualRule) String

func (l *LoyaltyProgramAccrualRule) String() string

func (*LoyaltyProgramAccrualRule) UnmarshalJSON

func (l *LoyaltyProgramAccrualRule) UnmarshalJSON(data []byte) error

type LoyaltyProgramAccrualRuleCategoryData

type LoyaltyProgramAccrualRuleCategoryData struct {
	// The ID of the `CATEGORY` [catalog object](entity:CatalogObject) that buyers can purchase to earn
	// points.
	CategoryID string `json:"category_id" url:"category_id"`
	// contains filtered or unexported fields
}

Represents additional data for rules with the `CATEGORY` accrual type.

func (*LoyaltyProgramAccrualRuleCategoryData) GetCategoryID

func (l *LoyaltyProgramAccrualRuleCategoryData) GetCategoryID() string

func (*LoyaltyProgramAccrualRuleCategoryData) GetExtraProperties

func (l *LoyaltyProgramAccrualRuleCategoryData) GetExtraProperties() map[string]interface{}

func (*LoyaltyProgramAccrualRuleCategoryData) String

func (*LoyaltyProgramAccrualRuleCategoryData) UnmarshalJSON

func (l *LoyaltyProgramAccrualRuleCategoryData) UnmarshalJSON(data []byte) error

type LoyaltyProgramAccrualRuleItemVariationData

type LoyaltyProgramAccrualRuleItemVariationData struct {
	// The ID of the `ITEM_VARIATION` [catalog object](entity:CatalogObject) that buyers can purchase to earn
	// points.
	ItemVariationID string `json:"item_variation_id" url:"item_variation_id"`
	// contains filtered or unexported fields
}

Represents additional data for rules with the `ITEM_VARIATION` accrual type.

func (*LoyaltyProgramAccrualRuleItemVariationData) GetExtraProperties

func (l *LoyaltyProgramAccrualRuleItemVariationData) GetExtraProperties() map[string]interface{}

func (*LoyaltyProgramAccrualRuleItemVariationData) GetItemVariationID

func (l *LoyaltyProgramAccrualRuleItemVariationData) GetItemVariationID() string

func (*LoyaltyProgramAccrualRuleItemVariationData) String

func (*LoyaltyProgramAccrualRuleItemVariationData) UnmarshalJSON

func (l *LoyaltyProgramAccrualRuleItemVariationData) UnmarshalJSON(data []byte) error

type LoyaltyProgramAccrualRuleSpendData

type LoyaltyProgramAccrualRuleSpendData struct {
	// The amount that buyers must spend to earn points.
	// For example, given an "Earn 1 point for every $10 spent" accrual rule, a buyer who spends $105 earns 10 points.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// The IDs of any `CATEGORY` catalog objects that are excluded from points accrual.
	//
	// You can use the [BatchRetrieveCatalogObjects](api-endpoint:Catalog-BatchRetrieveCatalogObjects)
	// endpoint to retrieve information about the excluded categories.
	ExcludedCategoryIDs []string `json:"excluded_category_ids,omitempty" url:"excluded_category_ids,omitempty"`
	// The IDs of any `ITEM_VARIATION` catalog objects that are excluded from points accrual.
	//
	// You can use the [BatchRetrieveCatalogObjects](api-endpoint:Catalog-BatchRetrieveCatalogObjects)
	// endpoint to retrieve information about the excluded item variations.
	ExcludedItemVariationIDs []string `json:"excluded_item_variation_ids,omitempty" url:"excluded_item_variation_ids,omitempty"`
	// Indicates how taxes should be treated when calculating the purchase amount used for points accrual.
	// See [LoyaltyProgramAccrualRuleTaxMode](#type-loyaltyprogramaccrualruletaxmode) for possible values
	TaxMode LoyaltyProgramAccrualRuleTaxMode `json:"tax_mode" url:"tax_mode"`
	// contains filtered or unexported fields
}

Represents additional data for rules with the `SPEND` accrual type.

func (*LoyaltyProgramAccrualRuleSpendData) GetAmountMoney

func (l *LoyaltyProgramAccrualRuleSpendData) GetAmountMoney() *Money

func (*LoyaltyProgramAccrualRuleSpendData) GetExcludedCategoryIDs

func (l *LoyaltyProgramAccrualRuleSpendData) GetExcludedCategoryIDs() []string

func (*LoyaltyProgramAccrualRuleSpendData) GetExcludedItemVariationIDs

func (l *LoyaltyProgramAccrualRuleSpendData) GetExcludedItemVariationIDs() []string

func (*LoyaltyProgramAccrualRuleSpendData) GetExtraProperties

func (l *LoyaltyProgramAccrualRuleSpendData) GetExtraProperties() map[string]interface{}

func (*LoyaltyProgramAccrualRuleSpendData) GetTaxMode

func (*LoyaltyProgramAccrualRuleSpendData) String

func (*LoyaltyProgramAccrualRuleSpendData) UnmarshalJSON

func (l *LoyaltyProgramAccrualRuleSpendData) UnmarshalJSON(data []byte) error

type LoyaltyProgramAccrualRuleTaxMode

type LoyaltyProgramAccrualRuleTaxMode string

Indicates how taxes should be treated when calculating the purchase amount used for loyalty points accrual. This setting applies only to `SPEND` accrual rules or `VISIT` accrual rules that have a minimum spend requirement.

const (
	LoyaltyProgramAccrualRuleTaxModeBeforeTax LoyaltyProgramAccrualRuleTaxMode = "BEFORE_TAX"
	LoyaltyProgramAccrualRuleTaxModeAfterTax  LoyaltyProgramAccrualRuleTaxMode = "AFTER_TAX"
)

func NewLoyaltyProgramAccrualRuleTaxModeFromString

func NewLoyaltyProgramAccrualRuleTaxModeFromString(s string) (LoyaltyProgramAccrualRuleTaxMode, error)

func (LoyaltyProgramAccrualRuleTaxMode) Ptr

type LoyaltyProgramAccrualRuleType

type LoyaltyProgramAccrualRuleType string

The type of the accrual rule that defines how buyers can earn points.

const (
	LoyaltyProgramAccrualRuleTypeVisit         LoyaltyProgramAccrualRuleType = "VISIT"
	LoyaltyProgramAccrualRuleTypeSpend         LoyaltyProgramAccrualRuleType = "SPEND"
	LoyaltyProgramAccrualRuleTypeItemVariation LoyaltyProgramAccrualRuleType = "ITEM_VARIATION"
	LoyaltyProgramAccrualRuleTypeCategory      LoyaltyProgramAccrualRuleType = "CATEGORY"
)

func NewLoyaltyProgramAccrualRuleTypeFromString

func NewLoyaltyProgramAccrualRuleTypeFromString(s string) (LoyaltyProgramAccrualRuleType, error)

func (LoyaltyProgramAccrualRuleType) Ptr

type LoyaltyProgramAccrualRuleVisitData

type LoyaltyProgramAccrualRuleVisitData struct {
	// The minimum purchase required during the visit to quality for points.
	MinimumAmountMoney *Money `json:"minimum_amount_money,omitempty" url:"minimum_amount_money,omitempty"`
	// Indicates how taxes should be treated when calculating the purchase amount to determine whether the visit qualifies for points.
	// This setting applies only if `minimum_amount_money` is specified.
	// See [LoyaltyProgramAccrualRuleTaxMode](#type-loyaltyprogramaccrualruletaxmode) for possible values
	TaxMode LoyaltyProgramAccrualRuleTaxMode `json:"tax_mode" url:"tax_mode"`
	// contains filtered or unexported fields
}

Represents additional data for rules with the `VISIT` accrual type.

func (*LoyaltyProgramAccrualRuleVisitData) GetExtraProperties

func (l *LoyaltyProgramAccrualRuleVisitData) GetExtraProperties() map[string]interface{}

func (*LoyaltyProgramAccrualRuleVisitData) GetMinimumAmountMoney

func (l *LoyaltyProgramAccrualRuleVisitData) GetMinimumAmountMoney() *Money

func (*LoyaltyProgramAccrualRuleVisitData) GetTaxMode

func (*LoyaltyProgramAccrualRuleVisitData) String

func (*LoyaltyProgramAccrualRuleVisitData) UnmarshalJSON

func (l *LoyaltyProgramAccrualRuleVisitData) UnmarshalJSON(data []byte) error

type LoyaltyProgramExpirationPolicy

type LoyaltyProgramExpirationPolicy struct {
	// The number of months before points expire, in `P[n]M` RFC 3339 duration format. For example, a value of `P12M` represents a duration of 12 months.
	// Points are valid through the last day of the month in which they are scheduled to expire. For example, with a  `P12M` duration, points earned on July 6, 2020 expire on August 1, 2021.
	ExpirationDuration string `json:"expiration_duration" url:"expiration_duration"`
	// contains filtered or unexported fields
}

Describes when the loyalty program expires.

func (*LoyaltyProgramExpirationPolicy) GetExpirationDuration

func (l *LoyaltyProgramExpirationPolicy) GetExpirationDuration() string

func (*LoyaltyProgramExpirationPolicy) GetExtraProperties

func (l *LoyaltyProgramExpirationPolicy) GetExtraProperties() map[string]interface{}

func (*LoyaltyProgramExpirationPolicy) String

func (*LoyaltyProgramExpirationPolicy) UnmarshalJSON

func (l *LoyaltyProgramExpirationPolicy) UnmarshalJSON(data []byte) error

type LoyaltyProgramRewardDefinition

type LoyaltyProgramRewardDefinition struct {
	// Indicates the scope of the reward tier. DEPRECATED at version 2020-12-16. You can find this information in the
	// `product_set_data` field of the `PRODUCT_SET` catalog object referenced by the pricing rule. For `ORDER` scopes,
	// `all_products` is true. For `ITEM_VARIATION` or `CATEGORY` scopes, `product_ids_any` is a list of
	// catalog object IDs of the given type.
	// See [LoyaltyProgramRewardDefinitionScope](#type-loyaltyprogramrewarddefinitionscope) for possible values
	Scope LoyaltyProgramRewardDefinitionScope `json:"scope" url:"scope"`
	// 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
	DiscountType LoyaltyProgramRewardDefinitionType `json:"discount_type" url:"discount_type"`
	// 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" url:"percentage_discount,omitempty"`
	// 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,omitempty" url:"catalog_object_ids,omitempty"`
	// 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" url:"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" url:"max_discount_money,omitempty"`
	// contains filtered or unexported fields
}

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 [Getting discount details for a reward tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details).

func (*LoyaltyProgramRewardDefinition) GetCatalogObjectIDs

func (l *LoyaltyProgramRewardDefinition) GetCatalogObjectIDs() []string

func (*LoyaltyProgramRewardDefinition) GetDiscountType

func (*LoyaltyProgramRewardDefinition) GetExtraProperties

func (l *LoyaltyProgramRewardDefinition) GetExtraProperties() map[string]interface{}

func (*LoyaltyProgramRewardDefinition) GetFixedDiscountMoney

func (l *LoyaltyProgramRewardDefinition) GetFixedDiscountMoney() *Money

func (*LoyaltyProgramRewardDefinition) GetMaxDiscountMoney

func (l *LoyaltyProgramRewardDefinition) GetMaxDiscountMoney() *Money

func (*LoyaltyProgramRewardDefinition) GetPercentageDiscount

func (l *LoyaltyProgramRewardDefinition) GetPercentageDiscount() *string

func (*LoyaltyProgramRewardDefinition) GetScope

func (*LoyaltyProgramRewardDefinition) String

func (*LoyaltyProgramRewardDefinition) UnmarshalJSON

func (l *LoyaltyProgramRewardDefinition) UnmarshalJSON(data []byte) error

type LoyaltyProgramRewardDefinitionScope

type LoyaltyProgramRewardDefinitionScope string

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 [Getting discount details for a reward tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details).

const (
	LoyaltyProgramRewardDefinitionScopeOrder         LoyaltyProgramRewardDefinitionScope = "ORDER"
	LoyaltyProgramRewardDefinitionScopeItemVariation LoyaltyProgramRewardDefinitionScope = "ITEM_VARIATION"
	LoyaltyProgramRewardDefinitionScopeCategory      LoyaltyProgramRewardDefinitionScope = "CATEGORY"
)

func NewLoyaltyProgramRewardDefinitionScopeFromString

func NewLoyaltyProgramRewardDefinitionScopeFromString(s string) (LoyaltyProgramRewardDefinitionScope, error)

func (LoyaltyProgramRewardDefinitionScope) Ptr

type LoyaltyProgramRewardDefinitionType

type LoyaltyProgramRewardDefinitionType string

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 [Getting discount details for a reward tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details).

const (
	LoyaltyProgramRewardDefinitionTypeFixedAmount     LoyaltyProgramRewardDefinitionType = "FIXED_AMOUNT"
	LoyaltyProgramRewardDefinitionTypeFixedPercentage LoyaltyProgramRewardDefinitionType = "FIXED_PERCENTAGE"
)

func NewLoyaltyProgramRewardDefinitionTypeFromString

func NewLoyaltyProgramRewardDefinitionTypeFromString(s string) (LoyaltyProgramRewardDefinitionType, error)

func (LoyaltyProgramRewardDefinitionType) Ptr

type LoyaltyProgramRewardTier

type LoyaltyProgramRewardTier struct {
	// The Square-assigned ID of the reward tier.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The points exchanged for the reward tier.
	Points int `json:"points" url:"points"`
	// The name of the reward tier.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Provides details about the reward tier definition.
	// DEPRECATED at version 2020-12-16. Replaced by the `pricing_rule_reference` field.
	Definition *LoyaltyProgramRewardDefinition `json:"definition,omitempty" url:"definition,omitempty"`
	// The timestamp when the reward tier was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// 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](api-endpoint:Catalog-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 [Getting discount details for a reward tier](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards#get-discount-details).
	PricingRuleReference *CatalogObjectReference `json:"pricing_rule_reference,omitempty" url:"pricing_rule_reference,omitempty"`
	// contains filtered or unexported fields
}

Represents a reward tier in a loyalty program. A reward tier defines how buyers can redeem points for a reward, such as the number of points required and the value and scope of the discount. A loyalty program can offer multiple reward tiers.

func (*LoyaltyProgramRewardTier) GetCreatedAt

func (l *LoyaltyProgramRewardTier) GetCreatedAt() *string

func (*LoyaltyProgramRewardTier) GetDefinition

func (*LoyaltyProgramRewardTier) GetExtraProperties

func (l *LoyaltyProgramRewardTier) GetExtraProperties() map[string]interface{}

func (*LoyaltyProgramRewardTier) GetID

func (l *LoyaltyProgramRewardTier) GetID() *string

func (*LoyaltyProgramRewardTier) GetName

func (l *LoyaltyProgramRewardTier) GetName() *string

func (*LoyaltyProgramRewardTier) GetPoints

func (l *LoyaltyProgramRewardTier) GetPoints() int

func (*LoyaltyProgramRewardTier) GetPricingRuleReference

func (l *LoyaltyProgramRewardTier) GetPricingRuleReference() *CatalogObjectReference

func (*LoyaltyProgramRewardTier) String

func (l *LoyaltyProgramRewardTier) String() string

func (*LoyaltyProgramRewardTier) UnmarshalJSON

func (l *LoyaltyProgramRewardTier) UnmarshalJSON(data []byte) error

type LoyaltyProgramStatus

type LoyaltyProgramStatus string

Indicates whether the program is currently active.

const (
	LoyaltyProgramStatusInactive LoyaltyProgramStatus = "INACTIVE"
	LoyaltyProgramStatusActive   LoyaltyProgramStatus = "ACTIVE"
)

func NewLoyaltyProgramStatusFromString

func NewLoyaltyProgramStatusFromString(s string) (LoyaltyProgramStatus, error)

func (LoyaltyProgramStatus) Ptr

type LoyaltyProgramTerminology

type LoyaltyProgramTerminology struct {
	// A singular unit for a point (for example, 1 point is called 1 star).
	One string `json:"one" url:"one"`
	// A plural unit for point (for example, 10 points is called 10 stars).
	Other string `json:"other" url:"other"`
	// contains filtered or unexported fields
}

Represents the naming used for loyalty points.

func (*LoyaltyProgramTerminology) GetExtraProperties

func (l *LoyaltyProgramTerminology) GetExtraProperties() map[string]interface{}

func (*LoyaltyProgramTerminology) GetOne

func (l *LoyaltyProgramTerminology) GetOne() string

func (*LoyaltyProgramTerminology) GetOther

func (l *LoyaltyProgramTerminology) GetOther() string

func (*LoyaltyProgramTerminology) String

func (l *LoyaltyProgramTerminology) String() string

func (*LoyaltyProgramTerminology) UnmarshalJSON

func (l *LoyaltyProgramTerminology) UnmarshalJSON(data []byte) error

type LoyaltyPromotion

type LoyaltyPromotion struct {
	// The Square-assigned ID of the promotion.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The name of the promotion.
	Name string `json:"name" url:"name"`
	// The points incentive for the promotion. This field defines whether promotion points
	// are earned by multiplying base program points or by adding a specified number of points.
	Incentive *LoyaltyPromotionIncentive `json:"incentive,omitempty" url:"incentive,omitempty"`
	// The scheduling information that defines when purchases can qualify to earn points from an `ACTIVE` promotion.
	AvailableTime *LoyaltyPromotionAvailableTimeData `json:"available_time,omitempty" url:"available_time,omitempty"`
	// The number of times a buyer can earn promotion points during a specified interval.
	// If not specified, buyers can trigger the promotion an unlimited number of times.
	TriggerLimit *LoyaltyPromotionTriggerLimit `json:"trigger_limit,omitempty" url:"trigger_limit,omitempty"`
	// The current status of the promotion.
	// See [LoyaltyPromotionStatus](#type-loyaltypromotionstatus) for possible values
	Status *LoyaltyPromotionStatus `json:"status,omitempty" url:"status,omitempty"`
	// The timestamp of when the promotion was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp of when the promotion was canceled, in RFC 3339 format.
	CanceledAt *string `json:"canceled_at,omitempty" url:"canceled_at,omitempty"`
	// The timestamp when the promotion was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The ID of the [loyalty program](entity:LoyaltyProgram) associated with the promotion.
	LoyaltyProgramID *string `json:"loyalty_program_id,omitempty" url:"loyalty_program_id,omitempty"`
	// The minimum purchase amount required to earn promotion points. If specified, this amount is positive.
	MinimumSpendAmountMoney *Money `json:"minimum_spend_amount_money,omitempty" url:"minimum_spend_amount_money,omitempty"`
	// The IDs of any qualifying `ITEM_VARIATION` [catalog objects](entity:CatalogObject). If specified,
	// the purchase must include at least one of these items to qualify for the promotion.
	//
	// This option is valid only if the base loyalty program uses a `VISIT` or `SPEND` accrual rule.
	// With `SPEND` accrual rules, make sure that qualifying promotional items are not excluded.
	//
	// You can specify `qualifying_item_variation_ids` or `qualifying_category_ids` for a given promotion, but not both.
	QualifyingItemVariationIDs []string `json:"qualifying_item_variation_ids,omitempty" url:"qualifying_item_variation_ids,omitempty"`
	// The IDs of any qualifying `CATEGORY` [catalog objects](entity:CatalogObject). If specified,
	// the purchase must include at least one item from one of these categories to qualify for the promotion.
	//
	// This option is valid only if the base loyalty program uses a `VISIT` or `SPEND` accrual rule.
	// With `SPEND` accrual rules, make sure that qualifying promotional items are not excluded.
	//
	// You can specify `qualifying_category_ids` or `qualifying_item_variation_ids` for a promotion, but not both.
	QualifyingCategoryIDs []string `json:"qualifying_category_ids,omitempty" url:"qualifying_category_ids,omitempty"`
	// contains filtered or unexported fields
}

Represents a promotion for a [loyalty program](entity:LoyaltyProgram). Loyalty promotions enable buyers to earn extra points on top of those earned from the base program.

A loyalty program can have a maximum of 10 loyalty promotions with an `ACTIVE` or `SCHEDULED` status.

func (*LoyaltyPromotion) GetAvailableTime

func (l *LoyaltyPromotion) GetAvailableTime() *LoyaltyPromotionAvailableTimeData

func (*LoyaltyPromotion) GetCanceledAt

func (l *LoyaltyPromotion) GetCanceledAt() *string

func (*LoyaltyPromotion) GetCreatedAt

func (l *LoyaltyPromotion) GetCreatedAt() *string

func (*LoyaltyPromotion) GetExtraProperties

func (l *LoyaltyPromotion) GetExtraProperties() map[string]interface{}

func (*LoyaltyPromotion) GetID

func (l *LoyaltyPromotion) GetID() *string

func (*LoyaltyPromotion) GetIncentive

func (l *LoyaltyPromotion) GetIncentive() *LoyaltyPromotionIncentive

func (*LoyaltyPromotion) GetLoyaltyProgramID

func (l *LoyaltyPromotion) GetLoyaltyProgramID() *string

func (*LoyaltyPromotion) GetMinimumSpendAmountMoney

func (l *LoyaltyPromotion) GetMinimumSpendAmountMoney() *Money

func (*LoyaltyPromotion) GetName

func (l *LoyaltyPromotion) GetName() string

func (*LoyaltyPromotion) GetQualifyingCategoryIDs

func (l *LoyaltyPromotion) GetQualifyingCategoryIDs() []string

func (*LoyaltyPromotion) GetQualifyingItemVariationIDs

func (l *LoyaltyPromotion) GetQualifyingItemVariationIDs() []string

func (*LoyaltyPromotion) GetStatus

func (l *LoyaltyPromotion) GetStatus() *LoyaltyPromotionStatus

func (*LoyaltyPromotion) GetTriggerLimit

func (l *LoyaltyPromotion) GetTriggerLimit() *LoyaltyPromotionTriggerLimit

func (*LoyaltyPromotion) GetUpdatedAt

func (l *LoyaltyPromotion) GetUpdatedAt() *string

func (*LoyaltyPromotion) String

func (l *LoyaltyPromotion) String() string

func (*LoyaltyPromotion) UnmarshalJSON

func (l *LoyaltyPromotion) UnmarshalJSON(data []byte) error

type LoyaltyPromotionAvailableTimeData

type LoyaltyPromotionAvailableTimeData struct {
	// The date that the promotion starts, in `YYYY-MM-DD` format. Square populates this field
	// based on the provided `time_periods`.
	StartDate *string `json:"start_date,omitempty" url:"start_date,omitempty"`
	// The date that the promotion ends, in `YYYY-MM-DD` format. Square populates this field
	// based on the provided `time_periods`. If an end date is not specified, an `ACTIVE` promotion
	// remains available until it is canceled.
	EndDate *string `json:"end_date,omitempty" url:"end_date,omitempty"`
	// A list of [iCalendar (RFC 5545) events](https://tools.ietf.org/html/rfc5545#section-3.6.1)
	// (`VEVENT`). Each event represents an available time period per day or days of the week.
	// A day can have a maximum of one available time period.
	//
	// Only `DTSTART`, `DURATION`, and `RRULE` are supported. `DTSTART` and `DURATION` are required and
	// timestamps must be in local (unzoned) time format. Include `RRULE` to specify recurring promotions,
	// an end date (using the `UNTIL` keyword), or both. For more information, see
	// [Available time](https://developer.squareup.com/docs/loyalty-api/loyalty-promotions#available-time).
	//
	// Note that `BEGIN:VEVENT` and `END:VEVENT` are optional in a `CreateLoyaltyPromotion` request
	// but are always included in the response.
	TimePeriods []string `json:"time_periods,omitempty" url:"time_periods,omitempty"`
	// contains filtered or unexported fields
}

Represents scheduling information that determines when purchases can qualify to earn points from a [loyalty promotion](entity:LoyaltyPromotion).

func (*LoyaltyPromotionAvailableTimeData) GetEndDate

func (l *LoyaltyPromotionAvailableTimeData) GetEndDate() *string

func (*LoyaltyPromotionAvailableTimeData) GetExtraProperties

func (l *LoyaltyPromotionAvailableTimeData) GetExtraProperties() map[string]interface{}

func (*LoyaltyPromotionAvailableTimeData) GetStartDate

func (l *LoyaltyPromotionAvailableTimeData) GetStartDate() *string

func (*LoyaltyPromotionAvailableTimeData) GetTimePeriods

func (l *LoyaltyPromotionAvailableTimeData) GetTimePeriods() []string

func (*LoyaltyPromotionAvailableTimeData) String

func (*LoyaltyPromotionAvailableTimeData) UnmarshalJSON

func (l *LoyaltyPromotionAvailableTimeData) UnmarshalJSON(data []byte) error

type LoyaltyPromotionIncentive

type LoyaltyPromotionIncentive struct {
	// The type of points incentive.
	// See [LoyaltyPromotionIncentiveType](#type-loyaltypromotionincentivetype) for possible values
	Type LoyaltyPromotionIncentiveType `json:"type" url:"type"`
	// Additional data for a `POINTS_MULTIPLIER` incentive type.
	PointsMultiplierData *LoyaltyPromotionIncentivePointsMultiplierData `json:"points_multiplier_data,omitempty" url:"points_multiplier_data,omitempty"`
	// Additional data for a `POINTS_ADDITION` incentive type.
	PointsAdditionData *LoyaltyPromotionIncentivePointsAdditionData `json:"points_addition_data,omitempty" url:"points_addition_data,omitempty"`
	// contains filtered or unexported fields
}

Represents how points for a [loyalty promotion](entity:LoyaltyPromotion) are calculated, either by multiplying the points earned from the base program or by adding a specified number of points to the points earned from the base program.

func (*LoyaltyPromotionIncentive) GetExtraProperties

func (l *LoyaltyPromotionIncentive) GetExtraProperties() map[string]interface{}

func (*LoyaltyPromotionIncentive) GetPointsAdditionData

func (*LoyaltyPromotionIncentive) GetPointsMultiplierData

func (*LoyaltyPromotionIncentive) GetType

func (*LoyaltyPromotionIncentive) String

func (l *LoyaltyPromotionIncentive) String() string

func (*LoyaltyPromotionIncentive) UnmarshalJSON

func (l *LoyaltyPromotionIncentive) UnmarshalJSON(data []byte) error

type LoyaltyPromotionIncentivePointsAdditionData

type LoyaltyPromotionIncentivePointsAdditionData struct {
	// The number of additional points to earn each time the promotion is triggered. For example,
	// suppose a purchase qualifies for 5 points from the base loyalty program. If the purchase also
	// qualifies for a `POINTS_ADDITION` promotion incentive with a `points_addition` of 3, the buyer
	// earns a total of 8 points (5 program points + 3 promotion points = 8 points).
	PointsAddition int `json:"points_addition" url:"points_addition"`
	// contains filtered or unexported fields
}

Represents the metadata for a `POINTS_ADDITION` type of [loyalty promotion incentive](entity:LoyaltyPromotionIncentive).

func (*LoyaltyPromotionIncentivePointsAdditionData) GetExtraProperties

func (l *LoyaltyPromotionIncentivePointsAdditionData) GetExtraProperties() map[string]interface{}

func (*LoyaltyPromotionIncentivePointsAdditionData) GetPointsAddition

func (l *LoyaltyPromotionIncentivePointsAdditionData) GetPointsAddition() int

func (*LoyaltyPromotionIncentivePointsAdditionData) String

func (*LoyaltyPromotionIncentivePointsAdditionData) UnmarshalJSON

func (l *LoyaltyPromotionIncentivePointsAdditionData) UnmarshalJSON(data []byte) error

type LoyaltyPromotionIncentivePointsMultiplierData

type LoyaltyPromotionIncentivePointsMultiplierData struct {
	// The multiplier used to calculate the number of points earned each time the promotion
	// is triggered. For example, suppose a purchase qualifies for 5 points from the base loyalty program.
	// If the purchase also qualifies for a `POINTS_MULTIPLIER` promotion incentive with a `points_multiplier`
	// of 3, the buyer earns a total of 15 points (5 program points x 3 promotion multiplier = 15 points).
	//
	// DEPRECATED at version 2023-08-16. Replaced by the `multiplier` field.
	//
	// One of the following is required when specifying a points multiplier:
	// - (Recommended) The `multiplier` field.
	// - This deprecated `points_multiplier` field. If provided in the request, Square also returns `multiplier`
	// with the equivalent value.
	PointsMultiplier *int `json:"points_multiplier,omitempty" url:"points_multiplier,omitempty"`
	// The multiplier used to calculate the number of points earned each time the promotion is triggered,
	// specified as a string representation of a decimal. Square supports multipliers up to 10x, with three
	// point precision for decimal multipliers. For example, suppose a purchase qualifies for 4 points from the
	// base loyalty program. If the purchase also qualifies for a `POINTS_MULTIPLIER` promotion incentive with a
	// `multiplier` of "1.5", the buyer earns a total of 6 points (4 program points x 1.5 promotion multiplier = 6 points).
	// Fractional points are dropped.
	//
	// One of the following is required when specifying a points multiplier:
	// - (Recommended) This `multiplier` field.
	// - The deprecated `points_multiplier` field. If provided in the request, Square also returns `multiplier`
	// with the equivalent value.
	Multiplier *string `json:"multiplier,omitempty" url:"multiplier,omitempty"`
	// contains filtered or unexported fields
}

Represents the metadata for a `POINTS_MULTIPLIER` type of [loyalty promotion incentive](entity:LoyaltyPromotionIncentive).

func (*LoyaltyPromotionIncentivePointsMultiplierData) GetExtraProperties

func (l *LoyaltyPromotionIncentivePointsMultiplierData) GetExtraProperties() map[string]interface{}

func (*LoyaltyPromotionIncentivePointsMultiplierData) GetMultiplier

func (*LoyaltyPromotionIncentivePointsMultiplierData) GetPointsMultiplier

func (l *LoyaltyPromotionIncentivePointsMultiplierData) GetPointsMultiplier() *int

func (*LoyaltyPromotionIncentivePointsMultiplierData) String

func (*LoyaltyPromotionIncentivePointsMultiplierData) UnmarshalJSON

func (l *LoyaltyPromotionIncentivePointsMultiplierData) UnmarshalJSON(data []byte) error

type LoyaltyPromotionIncentiveType

type LoyaltyPromotionIncentiveType string

Indicates the type of points incentive for a [loyalty promotion](entity:LoyaltyPromotion), which is used to determine how buyers can earn points from the promotion.

const (
	LoyaltyPromotionIncentiveTypePointsMultiplier LoyaltyPromotionIncentiveType = "POINTS_MULTIPLIER"
	LoyaltyPromotionIncentiveTypePointsAddition   LoyaltyPromotionIncentiveType = "POINTS_ADDITION"
)

func NewLoyaltyPromotionIncentiveTypeFromString

func NewLoyaltyPromotionIncentiveTypeFromString(s string) (LoyaltyPromotionIncentiveType, error)

func (LoyaltyPromotionIncentiveType) Ptr

type LoyaltyPromotionStatus

type LoyaltyPromotionStatus string

Indicates the status of a [loyalty promotion](entity:LoyaltyPromotion).

const (
	LoyaltyPromotionStatusActive    LoyaltyPromotionStatus = "ACTIVE"
	LoyaltyPromotionStatusEnded     LoyaltyPromotionStatus = "ENDED"
	LoyaltyPromotionStatusCanceled  LoyaltyPromotionStatus = "CANCELED"
	LoyaltyPromotionStatusScheduled LoyaltyPromotionStatus = "SCHEDULED"
)

func NewLoyaltyPromotionStatusFromString

func NewLoyaltyPromotionStatusFromString(s string) (LoyaltyPromotionStatus, error)

func (LoyaltyPromotionStatus) Ptr

type LoyaltyPromotionTriggerLimit

type LoyaltyPromotionTriggerLimit struct {
	// The maximum number of times a buyer can trigger the promotion during the specified `interval`.
	Times int `json:"times" url:"times"`
	// The time period the limit applies to.
	// See [LoyaltyPromotionTriggerLimitInterval](#type-loyaltypromotiontriggerlimitinterval) for possible values
	Interval *LoyaltyPromotionTriggerLimitInterval `json:"interval,omitempty" url:"interval,omitempty"`
	// contains filtered or unexported fields
}

Represents the number of times a buyer can earn points during a [loyalty promotion](entity:LoyaltyPromotion). If this field is not set, buyers can trigger the promotion an unlimited number of times to earn points during the time that the promotion is available.

A purchase that is disqualified from earning points because of this limit might qualify for another active promotion.

func (*LoyaltyPromotionTriggerLimit) GetExtraProperties

func (l *LoyaltyPromotionTriggerLimit) GetExtraProperties() map[string]interface{}

func (*LoyaltyPromotionTriggerLimit) GetInterval

func (*LoyaltyPromotionTriggerLimit) GetTimes

func (l *LoyaltyPromotionTriggerLimit) GetTimes() int

func (*LoyaltyPromotionTriggerLimit) String

func (*LoyaltyPromotionTriggerLimit) UnmarshalJSON

func (l *LoyaltyPromotionTriggerLimit) UnmarshalJSON(data []byte) error

type LoyaltyPromotionTriggerLimitInterval

type LoyaltyPromotionTriggerLimitInterval string

Indicates the time period that the [trigger limit](entity:LoyaltyPromotionTriggerLimit) applies to, which is used to determine the number of times a buyer can earn points for a [loyalty promotion](entity:LoyaltyPromotion).

const (
	LoyaltyPromotionTriggerLimitIntervalAllTime LoyaltyPromotionTriggerLimitInterval = "ALL_TIME"
	LoyaltyPromotionTriggerLimitIntervalDay     LoyaltyPromotionTriggerLimitInterval = "DAY"
)

func NewLoyaltyPromotionTriggerLimitIntervalFromString

func NewLoyaltyPromotionTriggerLimitIntervalFromString(s string) (LoyaltyPromotionTriggerLimitInterval, error)

func (LoyaltyPromotionTriggerLimitInterval) Ptr

type LoyaltyReward

type LoyaltyReward struct {
	// The Square-assigned ID of the loyalty reward.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The status of a loyalty reward.
	// See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible values
	Status *LoyaltyRewardStatus `json:"status,omitempty" url:"status,omitempty"`
	// The Square-assigned ID of the [loyalty account](entity:LoyaltyAccount) to which the reward belongs.
	LoyaltyAccountID string `json:"loyalty_account_id" url:"loyalty_account_id"`
	// The Square-assigned ID of the [reward tier](entity:LoyaltyProgramRewardTier) used to create the reward.
	RewardTierID string `json:"reward_tier_id" url:"reward_tier_id"`
	// The number of loyalty points used for the reward.
	Points *int `json:"points,omitempty" url:"points,omitempty"`
	// The Square-assigned ID of the [order](entity:Order) to which the reward is attached.
	OrderID *string `json:"order_id,omitempty" url:"order_id,omitempty"`
	// The timestamp when the reward was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp when the reward was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The timestamp when the reward was redeemed, in RFC 3339 format.
	RedeemedAt *string `json:"redeemed_at,omitempty" url:"redeemed_at,omitempty"`
	// contains filtered or unexported fields
}

Represents a contract to redeem loyalty points for a [reward tier](entity:LoyaltyProgramRewardTier) discount. Loyalty rewards can be in an ISSUED, REDEEMED, or DELETED state. For more information, see [Manage loyalty rewards](https://developer.squareup.com/docs/loyalty-api/loyalty-rewards).

func (*LoyaltyReward) GetCreatedAt

func (l *LoyaltyReward) GetCreatedAt() *string

func (*LoyaltyReward) GetExtraProperties

func (l *LoyaltyReward) GetExtraProperties() map[string]interface{}

func (*LoyaltyReward) GetID

func (l *LoyaltyReward) GetID() *string

func (*LoyaltyReward) GetLoyaltyAccountID

func (l *LoyaltyReward) GetLoyaltyAccountID() string

func (*LoyaltyReward) GetOrderID

func (l *LoyaltyReward) GetOrderID() *string

func (*LoyaltyReward) GetPoints

func (l *LoyaltyReward) GetPoints() *int

func (*LoyaltyReward) GetRedeemedAt

func (l *LoyaltyReward) GetRedeemedAt() *string

func (*LoyaltyReward) GetRewardTierID

func (l *LoyaltyReward) GetRewardTierID() string

func (*LoyaltyReward) GetStatus

func (l *LoyaltyReward) GetStatus() *LoyaltyRewardStatus

func (*LoyaltyReward) GetUpdatedAt

func (l *LoyaltyReward) GetUpdatedAt() *string

func (*LoyaltyReward) String

func (l *LoyaltyReward) String() string

func (*LoyaltyReward) UnmarshalJSON

func (l *LoyaltyReward) UnmarshalJSON(data []byte) error

type LoyaltyRewardStatus

type LoyaltyRewardStatus string

The status of the loyalty reward.

const (
	LoyaltyRewardStatusIssued   LoyaltyRewardStatus = "ISSUED"
	LoyaltyRewardStatusRedeemed LoyaltyRewardStatus = "REDEEMED"
	LoyaltyRewardStatusDeleted  LoyaltyRewardStatus = "DELETED"
)

func NewLoyaltyRewardStatusFromString

func NewLoyaltyRewardStatusFromString(s string) (LoyaltyRewardStatus, error)

func (LoyaltyRewardStatus) Ptr

type MeasurementUnit

type MeasurementUnit struct {
	// 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" url:"custom_unit,omitempty"`
	// Represents a standard area unit.
	// See [MeasurementUnitArea](#type-measurementunitarea) for possible values
	AreaUnit *MeasurementUnitArea `json:"area_unit,omitempty" url:"area_unit,omitempty"`
	// Represents a standard length unit.
	// See [MeasurementUnitLength](#type-measurementunitlength) for possible values
	LengthUnit *MeasurementUnitLength `json:"length_unit,omitempty" url:"length_unit,omitempty"`
	// Represents a standard volume unit.
	// See [MeasurementUnitVolume](#type-measurementunitvolume) for possible values
	VolumeUnit *MeasurementUnitVolume `json:"volume_unit,omitempty" url:"volume_unit,omitempty"`
	// Represents a standard unit of weight or mass.
	// See [MeasurementUnitWeight](#type-measurementunitweight) for possible values
	WeightUnit *MeasurementUnitWeight `json:"weight_unit,omitempty" url:"weight_unit,omitempty"`
	// Reserved for API integrations that lack the ability to specify a real measurement unit
	// See [MeasurementUnitGeneric](#type-measurementunitgeneric) for possible values
	GenericUnit *MeasurementUnitGeneric `json:"generic_unit,omitempty" url:"generic_unit,omitempty"`
	// Represents a standard unit of time.
	// See [MeasurementUnitTime](#type-measurementunittime) for possible values
	TimeUnit *MeasurementUnitTime `json:"time_unit,omitempty" url:"time_unit,omitempty"`
	// Represents the type of the measurement unit.
	// See [MeasurementUnitUnitType](#type-measurementunitunittype) for possible values
	Type *MeasurementUnitUnitType `json:"type,omitempty" url:"type,omitempty"`
	// contains filtered or unexported fields
}

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`.

func (*MeasurementUnit) GetAreaUnit

func (m *MeasurementUnit) GetAreaUnit() *MeasurementUnitArea

func (*MeasurementUnit) GetCustomUnit

func (m *MeasurementUnit) GetCustomUnit() *MeasurementUnitCustom

func (*MeasurementUnit) GetExtraProperties

func (m *MeasurementUnit) GetExtraProperties() map[string]interface{}

func (*MeasurementUnit) GetLengthUnit

func (m *MeasurementUnit) GetLengthUnit() *MeasurementUnitLength

func (*MeasurementUnit) GetTimeUnit

func (m *MeasurementUnit) GetTimeUnit() *MeasurementUnitTime

func (*MeasurementUnit) GetType

func (*MeasurementUnit) GetVolumeUnit

func (m *MeasurementUnit) GetVolumeUnit() *MeasurementUnitVolume

func (*MeasurementUnit) GetWeightUnit

func (m *MeasurementUnit) GetWeightUnit() *MeasurementUnitWeight

func (*MeasurementUnit) String

func (m *MeasurementUnit) String() string

func (*MeasurementUnit) UnmarshalJSON

func (m *MeasurementUnit) UnmarshalJSON(data []byte) error

type MeasurementUnitArea

type MeasurementUnitArea string

Unit of area used to measure a quantity.

const (
	MeasurementUnitAreaImperialAcre           MeasurementUnitArea = "IMPERIAL_ACRE"
	MeasurementUnitAreaImperialSquareInch     MeasurementUnitArea = "IMPERIAL_SQUARE_INCH"
	MeasurementUnitAreaImperialSquareFoot     MeasurementUnitArea = "IMPERIAL_SQUARE_FOOT"
	MeasurementUnitAreaImperialSquareYard     MeasurementUnitArea = "IMPERIAL_SQUARE_YARD"
	MeasurementUnitAreaImperialSquareMile     MeasurementUnitArea = "IMPERIAL_SQUARE_MILE"
	MeasurementUnitAreaMetricSquareCentimeter MeasurementUnitArea = "METRIC_SQUARE_CENTIMETER"
	MeasurementUnitAreaMetricSquareMeter      MeasurementUnitArea = "METRIC_SQUARE_METER"
	MeasurementUnitAreaMetricSquareKilometer  MeasurementUnitArea = "METRIC_SQUARE_KILOMETER"
)

func NewMeasurementUnitAreaFromString

func NewMeasurementUnitAreaFromString(s string) (MeasurementUnitArea, error)

func (MeasurementUnitArea) Ptr

type MeasurementUnitCustom

type MeasurementUnitCustom struct {
	// The name of the custom unit, for example "bushel".
	Name string `json:"name" url:"name"`
	// The abbreviation of the custom unit, such as "bsh" (bushel). This appears
	// in the cart for the Point of Sale app, and in reports.
	Abbreviation string `json:"abbreviation" url:"abbreviation"`
	// contains filtered or unexported fields
}

The information needed to define a custom unit, provided by the seller.

func (*MeasurementUnitCustom) GetAbbreviation

func (m *MeasurementUnitCustom) GetAbbreviation() string

func (*MeasurementUnitCustom) GetExtraProperties

func (m *MeasurementUnitCustom) GetExtraProperties() map[string]interface{}

func (*MeasurementUnitCustom) GetName

func (m *MeasurementUnitCustom) GetName() string

func (*MeasurementUnitCustom) String

func (m *MeasurementUnitCustom) String() string

func (*MeasurementUnitCustom) UnmarshalJSON

func (m *MeasurementUnitCustom) UnmarshalJSON(data []byte) error

type MeasurementUnitGeneric

type MeasurementUnitGeneric = string

type MeasurementUnitLength

type MeasurementUnitLength string

The unit of length used to measure a quantity.

const (
	MeasurementUnitLengthImperialInch     MeasurementUnitLength = "IMPERIAL_INCH"
	MeasurementUnitLengthImperialFoot     MeasurementUnitLength = "IMPERIAL_FOOT"
	MeasurementUnitLengthImperialYard     MeasurementUnitLength = "IMPERIAL_YARD"
	MeasurementUnitLengthImperialMile     MeasurementUnitLength = "IMPERIAL_MILE"
	MeasurementUnitLengthMetricMillimeter MeasurementUnitLength = "METRIC_MILLIMETER"
	MeasurementUnitLengthMetricCentimeter MeasurementUnitLength = "METRIC_CENTIMETER"
	MeasurementUnitLengthMetricMeter      MeasurementUnitLength = "METRIC_METER"
	MeasurementUnitLengthMetricKilometer  MeasurementUnitLength = "METRIC_KILOMETER"
)

func NewMeasurementUnitLengthFromString

func NewMeasurementUnitLengthFromString(s string) (MeasurementUnitLength, error)

func (MeasurementUnitLength) Ptr

type MeasurementUnitTime

type MeasurementUnitTime string

Unit of time used to measure a quantity (a duration).

const (
	MeasurementUnitTimeGenericMillisecond MeasurementUnitTime = "GENERIC_MILLISECOND"
	MeasurementUnitTimeGenericSecond      MeasurementUnitTime = "GENERIC_SECOND"
	MeasurementUnitTimeGenericMinute      MeasurementUnitTime = "GENERIC_MINUTE"
	MeasurementUnitTimeGenericHour        MeasurementUnitTime = "GENERIC_HOUR"
	MeasurementUnitTimeGenericDay         MeasurementUnitTime = "GENERIC_DAY"
)

func NewMeasurementUnitTimeFromString

func NewMeasurementUnitTimeFromString(s string) (MeasurementUnitTime, error)

func (MeasurementUnitTime) Ptr

type MeasurementUnitUnitType

type MeasurementUnitUnitType string

Describes the type of this unit and indicates which field contains the unit information. This is an ‘open’ enum.

const (
	MeasurementUnitUnitTypeTypeCustom  MeasurementUnitUnitType = "TYPE_CUSTOM"
	MeasurementUnitUnitTypeTypeArea    MeasurementUnitUnitType = "TYPE_AREA"
	MeasurementUnitUnitTypeTypeLength  MeasurementUnitUnitType = "TYPE_LENGTH"
	MeasurementUnitUnitTypeTypeVolume  MeasurementUnitUnitType = "TYPE_VOLUME"
	MeasurementUnitUnitTypeTypeWeight  MeasurementUnitUnitType = "TYPE_WEIGHT"
	MeasurementUnitUnitTypeTypeGeneric MeasurementUnitUnitType = "TYPE_GENERIC"
)

func NewMeasurementUnitUnitTypeFromString

func NewMeasurementUnitUnitTypeFromString(s string) (MeasurementUnitUnitType, error)

func (MeasurementUnitUnitType) Ptr

type MeasurementUnitVolume

type MeasurementUnitVolume string

The unit of volume used to measure a quantity.

const (
	MeasurementUnitVolumeGenericFluidOunce MeasurementUnitVolume = "GENERIC_FLUID_OUNCE"
	MeasurementUnitVolumeGenericShot       MeasurementUnitVolume = "GENERIC_SHOT"
	MeasurementUnitVolumeGenericCup        MeasurementUnitVolume = "GENERIC_CUP"
	MeasurementUnitVolumeGenericPint       MeasurementUnitVolume = "GENERIC_PINT"
	MeasurementUnitVolumeGenericQuart      MeasurementUnitVolume = "GENERIC_QUART"
	MeasurementUnitVolumeGenericGallon     MeasurementUnitVolume = "GENERIC_GALLON"
	MeasurementUnitVolumeImperialCubicInch MeasurementUnitVolume = "IMPERIAL_CUBIC_INCH"
	MeasurementUnitVolumeImperialCubicFoot MeasurementUnitVolume = "IMPERIAL_CUBIC_FOOT"
	MeasurementUnitVolumeImperialCubicYard MeasurementUnitVolume = "IMPERIAL_CUBIC_YARD"
	MeasurementUnitVolumeMetricMilliliter  MeasurementUnitVolume = "METRIC_MILLILITER"
	MeasurementUnitVolumeMetricLiter       MeasurementUnitVolume = "METRIC_LITER"
)

func NewMeasurementUnitVolumeFromString

func NewMeasurementUnitVolumeFromString(s string) (MeasurementUnitVolume, error)

func (MeasurementUnitVolume) Ptr

type MeasurementUnitWeight

type MeasurementUnitWeight string

Unit of weight used to measure a quantity.

const (
	MeasurementUnitWeightImperialWeightOunce MeasurementUnitWeight = "IMPERIAL_WEIGHT_OUNCE"
	MeasurementUnitWeightImperialPound       MeasurementUnitWeight = "IMPERIAL_POUND"
	MeasurementUnitWeightImperialStone       MeasurementUnitWeight = "IMPERIAL_STONE"
	MeasurementUnitWeightMetricMilligram     MeasurementUnitWeight = "METRIC_MILLIGRAM"
	MeasurementUnitWeightMetricGram          MeasurementUnitWeight = "METRIC_GRAM"
	MeasurementUnitWeightMetricKilogram      MeasurementUnitWeight = "METRIC_KILOGRAM"
)

func NewMeasurementUnitWeightFromString

func NewMeasurementUnitWeightFromString(s string) (MeasurementUnitWeight, error)

func (MeasurementUnitWeight) Ptr

type Merchant

type Merchant struct {
	// The Square-issued ID of the merchant.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The name of the merchant's overall business.
	BusinessName *string `json:"business_name,omitempty" url:"business_name,omitempty"`
	// The country code associated with the merchant, in the two-letter format of ISO 3166. For example, `US` or `JP`.
	// See [Country](#type-country) for possible values
	Country Country `json:"country" url:"country"`
	// The code indicating the [language preferences](https://developer.squareup.com/docs/build-basics/general-considerations/language-preferences) of the merchant, in [BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A). For example, `en-US` or `fr-CA`.
	LanguageCode *string `json:"language_code,omitempty" url:"language_code,omitempty"`
	// The currency associated with the merchant, in ISO 4217 format. For example, the currency code for US dollars is `USD`.
	// See [Currency](#type-currency) for possible values
	Currency *Currency `json:"currency,omitempty" url:"currency,omitempty"`
	// The merchant's status.
	// See [MerchantStatus](#type-merchantstatus) for possible values
	Status *MerchantStatus `json:"status,omitempty" url:"status,omitempty"`
	// The ID of the [main `Location`](https://developer.squareup.com/docs/locations-api#about-the-main-location) for this merchant.
	MainLocationID *string `json:"main_location_id,omitempty" url:"main_location_id,omitempty"`
	// The time when the merchant was created, in RFC 3339 format.
	//
	//	For more information, see [Working with Dates](https://developer.squareup.com/docs/build-basics/working-with-dates).
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Represents a business that sells with Square.

func (*Merchant) GetBusinessName

func (m *Merchant) GetBusinessName() *string

func (*Merchant) GetCountry

func (m *Merchant) GetCountry() Country

func (*Merchant) GetCreatedAt

func (m *Merchant) GetCreatedAt() *string

func (*Merchant) GetCurrency

func (m *Merchant) GetCurrency() *Currency

func (*Merchant) GetExtraProperties

func (m *Merchant) GetExtraProperties() map[string]interface{}

func (*Merchant) GetID

func (m *Merchant) GetID() *string

func (*Merchant) GetLanguageCode

func (m *Merchant) GetLanguageCode() *string

func (*Merchant) GetMainLocationID

func (m *Merchant) GetMainLocationID() *string

func (*Merchant) GetStatus

func (m *Merchant) GetStatus() *MerchantStatus

func (*Merchant) String

func (m *Merchant) String() string

func (*Merchant) UnmarshalJSON

func (m *Merchant) UnmarshalJSON(data []byte) error

type MerchantStatus

type MerchantStatus string
const (
	MerchantStatusActive   MerchantStatus = "ACTIVE"
	MerchantStatusInactive MerchantStatus = "INACTIVE"
)

func NewMerchantStatusFromString

func NewMerchantStatusFromString(s string) (MerchantStatus, error)

func (MerchantStatus) Ptr

func (m MerchantStatus) Ptr() *MerchantStatus

type MerchantsGetRequest

type MerchantsGetRequest = GetMerchantsRequest

MerchantsGetRequest is an alias for GetMerchantsRequest.

type MerchantsListRequest

type MerchantsListRequest = ListMerchantsRequest

MerchantsListRequest is an alias for ListMerchantsRequest.

type ModifierLocationOverrides

type ModifierLocationOverrides struct {
	// The ID of the `Location` object representing the location. This can include a deactivated location.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The overridden price at the specified location. If this is unspecified, the modifier price is not overridden.
	// The modifier becomes free of charge at the specified location, when this `price_money` field is set to 0.
	PriceMoney *Money `json:"price_money,omitempty" url:"price_money,omitempty"`
	// Indicates whether the modifier is sold out at the specified location or not. As an example, for cheese (modifier) burger (item), when the modifier is sold out, it is the cheese, but not the burger, that is sold out.
	// The seller can manually set this sold out status. Attempts by an application to set this attribute are ignored.
	SoldOut *bool `json:"sold_out,omitempty" url:"sold_out,omitempty"`
	// contains filtered or unexported fields
}

Location-specific overrides for specified properties of a `CatalogModifier` object.

func (*ModifierLocationOverrides) GetExtraProperties

func (m *ModifierLocationOverrides) GetExtraProperties() map[string]interface{}

func (*ModifierLocationOverrides) GetLocationID

func (m *ModifierLocationOverrides) GetLocationID() *string

func (*ModifierLocationOverrides) GetPriceMoney

func (m *ModifierLocationOverrides) GetPriceMoney() *Money

func (*ModifierLocationOverrides) GetSoldOut

func (m *ModifierLocationOverrides) GetSoldOut() *bool

func (*ModifierLocationOverrides) String

func (m *ModifierLocationOverrides) String() string

func (*ModifierLocationOverrides) UnmarshalJSON

func (m *ModifierLocationOverrides) UnmarshalJSON(data []byte) error

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" url:"amount,omitempty"`
	// The type of currency, in __ISO 4217 format__. For example, the currency
	// code for US dollars is `USD`.
	//
	// See [Currency](entity:Currency) for possible values.
	// See [Currency](#type-currency) for possible values
	Currency *Currency `json:"currency,omitempty" url:"currency,omitempty"`
	// contains filtered or unexported fields
}

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](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts) for more information.

func (*Money) GetAmount

func (m *Money) GetAmount() *int64

func (*Money) GetCurrency

func (m *Money) GetCurrency() *Currency

func (*Money) GetExtraProperties

func (m *Money) GetExtraProperties() map[string]interface{}

func (*Money) String

func (m *Money) String() string

func (*Money) UnmarshalJSON

func (m *Money) UnmarshalJSON(data []byte) error

type ObtainTokenRequest

type ObtainTokenRequest struct {
	// The Square-issued ID of your application, which is available as the **Application ID**
	// on the **OAuth** page in the [Developer Console](https://developer.squareup.com/apps).
	//
	// Required for the code flow and PKCE flow for any grant type.
	ClientID string `json:"client_id" url:"-"`
	// The secret key for your application, which is available as the **Application secret**
	// on the **OAuth** page in the [Developer Console](https://developer.squareup.com/apps).
	//
	// Required for the code flow for any grant type. Don't confuse your client secret with your
	// personal access token.
	ClientSecret *string `json:"client_secret,omitempty" url:"-"`
	// The authorization code to exchange for an OAuth access token. This is the `code`
	// value that Square sent to your redirect URL in the authorization response.
	//
	// Required for the code flow and PKCE flow if `grant_type` is `authorization_code`.
	Code *string `json:"code,omitempty" url:"-"`
	// The redirect URL for your application, which you registered as the **Redirect URL**
	// on the **OAuth** page in the [Developer Console](https://developer.squareup.com/apps).
	//
	// Required for the code flow and PKCE flow if `grant_type` is `authorization_code` and
	// you provided the `redirect_uri` parameter in your authorization URL.
	RedirectURI *string `json:"redirect_uri,omitempty" url:"-"`
	// The method used to obtain an OAuth access token. The request must include the
	// credential that corresponds to the specified grant type. Valid values are:
	// - `authorization_code` - Requires the `code` field.
	// - `refresh_token` - Requires the `refresh_token` field.
	// - `migration_token` - LEGACY for access tokens obtained using a Square API version prior
	// to 2019-03-13. Requires the `migration_token` field.
	GrantType string `json:"grant_type" url:"-"`
	// A valid refresh token used to generate a new OAuth access token. This is a
	// refresh token that was returned in a previous `ObtainToken` response.
	//
	// Required for the code flow and PKCE flow if `grant_type` is `refresh_token`.
	RefreshToken *string `json:"refresh_token,omitempty" url:"-"`
	// __LEGACY__ A valid access token (obtained using a Square API version prior to 2019-03-13)
	// used to generate a new OAuth access token.
	//
	// Required if `grant_type` is `migration_token`. For more information, see
	// [Migrate to Using Refresh Tokens](https://developer.squareup.com/docs/oauth-api/migrate-to-refresh-tokens).
	MigrationToken *string `json:"migration_token,omitempty" url:"-"`
	// The list of permissions that are explicitly requested for the access token.
	// For example, ["MERCHANT_PROFILE_READ","PAYMENTS_READ","BANK_ACCOUNTS_READ"].
	//
	// The returned access token is limited to the permissions that are the intersection
	// of these requested permissions and those authorized by the provided `refresh_token`.
	//
	// Optional for the code flow and PKCE flow if `grant_type` is `refresh_token`.
	Scopes []string `json:"scopes,omitempty" url:"-"`
	// Indicates whether the returned access token should expire in 24 hours.
	//
	// Optional for the code flow and PKCE flow for any grant type. The default value is `false`.
	ShortLived *bool `json:"short_lived,omitempty" url:"-"`
	// The secret your application generated for the authorization request used to
	// obtain the authorization code. This is the source of the `code_challenge` hash you
	// provided in your authorization URL.
	//
	// Required for the PKCE flow if `grant_type` is `authorization_code`.
	CodeVerifier *string `json:"code_verifier,omitempty" url:"-"`
}

type ObtainTokenResponse

type ObtainTokenResponse struct {
	// An OAuth access token used to authorize Square API requests on behalf of the seller.
	// Include this token as a bearer token in the `Authorization` header of your API requests.
	//
	// OAuth access tokens expire in 30 days (except `short_lived` access tokens). You should call
	// `ObtainToken` and provide the returned `refresh_token` to get a new access token well before
	// the current one expires. For more information, see [OAuth API: Walkthrough](https://developer.squareup.com/docs/oauth-api/walkthrough).
	AccessToken *string `json:"access_token,omitempty" url:"access_token,omitempty"`
	// The type of access token. This value is always `bearer`.
	TokenType *string `json:"token_type,omitempty" url:"token_type,omitempty"`
	// The timestamp of when the `access_token` expires, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format.
	ExpiresAt *string `json:"expires_at,omitempty" url:"expires_at,omitempty"`
	// The ID of the authorizing [merchant](entity:Merchant) (seller), which represents a business.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// __LEGACY__ The ID of merchant's subscription.
	// The ID is only present if the merchant signed up for a subscription plan during authorization.
	SubscriptionID *string `json:"subscription_id,omitempty" url:"subscription_id,omitempty"`
	// __LEGACY__ The ID of the subscription plan the merchant signed
	// up for. The ID is only present if the merchant signed up for a subscription plan during
	// authorization.
	PlanID *string `json:"plan_id,omitempty" url:"plan_id,omitempty"`
	// The OpenID token that belongs to this person. This token is only present if the
	// `OPENID` scope is included in the authorization request.
	//
	// Deprecated at version 2021-09-15. Square doesn't support OpenID or other single sign-on (SSO)
	// protocols on top of OAuth.
	IDToken *string `json:"id_token,omitempty" url:"id_token,omitempty"`
	// A refresh token that can be used in an `ObtainToken` request to generate a new access token.
	//
	// With the code flow:
	// - For the `authorization_code` grant type, the refresh token is multi-use and never expires.
	// - For the `refresh_token` grant type, the response returns the same refresh token.
	//
	// With the PKCE flow:
	// - For the `authorization_code` grant type, the refresh token is single-use and expires in 90 days.
	// - For the `refresh_token` grant type, the refresh token is a new single-use refresh token that expires in 90 days.
	//
	// For more information, see [Refresh, Revoke, and Limit the Scope of OAuth Tokens](https://developer.squareup.com/docs/oauth-api/refresh-revoke-limit-scope).
	RefreshToken *string `json:"refresh_token,omitempty" url:"refresh_token,omitempty"`
	// Indicates whether the access_token is short lived. If `true`, the access token expires
	// in 24 hours. If `false`, the access token expires in 30 days.
	ShortLived *bool `json:"short_lived,omitempty" url:"short_lived,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The timestamp of when the `refresh_token` expires, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm)
	// format.
	//
	// This field is only returned for the PKCE flow.
	RefreshTokenExpiresAt *string `json:"refresh_token_expires_at,omitempty" url:"refresh_token_expires_at,omitempty"`
	// contains filtered or unexported fields
}

Represents an [ObtainToken](api-endpoint:OAuth-ObtainToken) response.

func (*ObtainTokenResponse) GetAccessToken

func (o *ObtainTokenResponse) GetAccessToken() *string

func (*ObtainTokenResponse) GetErrors

func (o *ObtainTokenResponse) GetErrors() []*Error

func (*ObtainTokenResponse) GetExpiresAt

func (o *ObtainTokenResponse) GetExpiresAt() *string

func (*ObtainTokenResponse) GetExtraProperties

func (o *ObtainTokenResponse) GetExtraProperties() map[string]interface{}

func (*ObtainTokenResponse) GetIDToken

func (o *ObtainTokenResponse) GetIDToken() *string

func (*ObtainTokenResponse) GetMerchantID

func (o *ObtainTokenResponse) GetMerchantID() *string

func (*ObtainTokenResponse) GetPlanID

func (o *ObtainTokenResponse) GetPlanID() *string

func (*ObtainTokenResponse) GetRefreshToken

func (o *ObtainTokenResponse) GetRefreshToken() *string

func (*ObtainTokenResponse) GetRefreshTokenExpiresAt

func (o *ObtainTokenResponse) GetRefreshTokenExpiresAt() *string

func (*ObtainTokenResponse) GetShortLived

func (o *ObtainTokenResponse) GetShortLived() *bool

func (*ObtainTokenResponse) GetSubscriptionID

func (o *ObtainTokenResponse) GetSubscriptionID() *string

func (*ObtainTokenResponse) GetTokenType

func (o *ObtainTokenResponse) GetTokenType() *string

func (*ObtainTokenResponse) String

func (o *ObtainTokenResponse) String() string

func (*ObtainTokenResponse) UnmarshalJSON

func (o *ObtainTokenResponse) UnmarshalJSON(data []byte) error

type OfflinePaymentDetails

type OfflinePaymentDetails struct {
	// The client-side timestamp of when the offline payment was created, in RFC 3339 format.
	ClientCreatedAt *string `json:"client_created_at,omitempty" url:"client_created_at,omitempty"`
	// contains filtered or unexported fields
}

Details specific to offline payments.

func (*OfflinePaymentDetails) GetClientCreatedAt

func (o *OfflinePaymentDetails) GetClientCreatedAt() *string

func (*OfflinePaymentDetails) GetExtraProperties

func (o *OfflinePaymentDetails) GetExtraProperties() map[string]interface{}

func (*OfflinePaymentDetails) String

func (o *OfflinePaymentDetails) String() string

func (*OfflinePaymentDetails) UnmarshalJSON

func (o *OfflinePaymentDetails) UnmarshalJSON(data []byte) error

type Order

type Order struct {
	// The order's unique ID.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The ID of the seller location that this order is associated with.
	LocationID string `json:"location_id" url:"location_id"`
	// A client-specified ID to associate an entity in another system
	// with this order.
	ReferenceID *string `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// The origination details of the order.
	Source *OrderSource `json:"source,omitempty" url:"source,omitempty"`
	// The ID of the [customer](entity:Customer) associated with the order.
	//
	// You should specify a `customer_id` on the order (or the payment) to ensure that transactions
	// are reliably linked to customers. Omitting this field might result in the creation of new
	// [instant profiles](https://developer.squareup.com/docs/customers-api/what-it-does#instant-profiles).
	CustomerID *string `json:"customer_id,omitempty" url:"customer_id,omitempty"`
	// The line items included in the order.
	LineItems []*OrderLineItem `json:"line_items,omitempty" url:"line_items,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 generates an `OrderLineItemAppliedTax` for every line item.
	//
	// On reads, each tax in the list includes the total amount of that tax applied to the order.
	//
	// __IMPORTANT__: If `LINE_ITEM` scope is set on any taxes in this field, using the deprecated
	// `line_items.taxes` field results in an error. Use `line_items.applied_taxes`
	// instead.
	Taxes []*OrderLineItemTax `json:"taxes,omitempty" url:"taxes,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 generates an `OrderLineItemAppliedDiscount`
	// for every line item.
	//
	// __IMPORTANT__: If `LINE_ITEM` scope is set on any discounts in this field, using the deprecated
	// `line_items.discounts` field results in an error. Use `line_items.applied_discounts`
	// instead.
	Discounts []*OrderLineItemDiscount `json:"discounts,omitempty" url:"discounts,omitempty"`
	// A list of service charges applied to the order.
	ServiceCharges []*OrderServiceCharge `json:"service_charges,omitempty" url:"service_charges,omitempty"`
	// Details about order fulfillment.
	//
	// Orders can only be created with at most one fulfillment. However, orders returned
	// by the API might contain multiple fulfillments.
	Fulfillments []*Fulfillment `json:"fulfillments,omitempty" url:"fulfillments,omitempty"`
	// A collection of items from sale orders being returned in this one. Normally part of an
	// itemized return or exchange. There is exactly one `Return` object per sale `Order` being
	// referenced.
	Returns []*OrderReturn `json:"returns,omitempty" url:"returns,omitempty"`
	// The rollup of the returned money amounts.
	ReturnAmounts *OrderMoneyAmounts `json:"return_amounts,omitempty" url:"return_amounts,omitempty"`
	// The net money amounts (sale money - return money).
	NetAmounts *OrderMoneyAmounts `json:"net_amounts,omitempty" url:"net_amounts,omitempty"`
	// A positive rounding adjustment to the total of the order. This adjustment is commonly
	// used to apply cash rounding when the minimum unit of account is smaller than the lowest physical
	// denomination of the currency.
	RoundingAdjustment *OrderRoundingAdjustment `json:"rounding_adjustment,omitempty" url:"rounding_adjustment,omitempty"`
	// The tenders that were used to pay for the order.
	Tenders []*Tender `json:"tenders,omitempty" url:"tenders,omitempty"`
	// The refunds that are part of this order.
	Refunds []*Refund `json:"refunds,omitempty" url:"refunds,omitempty"`
	// 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 (such as personally
	// identifiable information or card details).
	//
	// Keys written by applications must be 60 characters or less and must be in the character set
	// `[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
	// with a namespace, separated from the key with a ':' character.
	//
	// Values have a maximum length of 255 characters.
	//
	// An application can 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.
	//
	// For more information, see  [Metadata](https://developer.squareup.com/docs/build-basics/metadata).
	Metadata map[string]*string `json:"metadata,omitempty" url:"metadata,omitempty"`
	// The timestamp for when the order was created, at server side, in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp for when the order was last updated, at server side, in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The timestamp for when the order reached a terminal [state](entity:OrderState), in RFC 3339 format (for example "2016-09-04T23:59:33.123Z").
	ClosedAt *string `json:"closed_at,omitempty" url:"closed_at,omitempty"`
	// The current state of the order.
	// See [OrderState](#type-orderstate) for possible values
	State *OrderState `json:"state,omitempty" url:"state,omitempty"`
	// The version number, which is incremented each time an update is committed to the order.
	// Orders not created through the API do not include a version number and
	// therefore cannot be updated.
	//
	// [Read more about working with versions](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders).
	Version *int `json:"version,omitempty" url:"version,omitempty"`
	// The total amount of money to collect for the order.
	TotalMoney *Money `json:"total_money,omitempty" url:"total_money,omitempty"`
	// The total amount of tax money to collect for the order.
	TotalTaxMoney *Money `json:"total_tax_money,omitempty" url:"total_tax_money,omitempty"`
	// The total amount of discount money to collect for the order.
	TotalDiscountMoney *Money `json:"total_discount_money,omitempty" url:"total_discount_money,omitempty"`
	// The total amount of tip money to collect for the order.
	TotalTipMoney *Money `json:"total_tip_money,omitempty" url:"total_tip_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` only includes inclusive tax amounts,
	// not additive tax amounts.
	TotalServiceChargeMoney *Money `json:"total_service_charge_money,omitempty" url:"total_service_charge_money,omitempty"`
	// A short-term identifier for the order (such as a customer first name,
	// table number, or auto-generated order number that resets daily).
	TicketName *string `json:"ticket_name,omitempty" url:"ticket_name,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
	// preconfigured [pricing rules](entity:CatalogPricingRule).
	PricingOptions *OrderPricingOptions `json:"pricing_options,omitempty" url:"pricing_options,omitempty"`
	// A set-like list of Rewards that have been added to the Order.
	Rewards []*OrderReward `json:"rewards,omitempty" url:"rewards,omitempty"`
	// The net amount of money due on the order.
	NetAmountDueMoney *Money `json:"net_amount_due_money,omitempty" url:"net_amount_due_money,omitempty"`
	// contains filtered or unexported fields
}

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 about any associated tenders, refunds, and returns.

All Connect V2 Transactions have all been converted to Orders including all associated itemization data.

func (*Order) GetClosedAt

func (o *Order) GetClosedAt() *string

func (*Order) GetCreatedAt

func (o *Order) GetCreatedAt() *string

func (*Order) GetCustomerID

func (o *Order) GetCustomerID() *string

func (*Order) GetDiscounts

func (o *Order) GetDiscounts() []*OrderLineItemDiscount

func (*Order) GetExtraProperties

func (o *Order) GetExtraProperties() map[string]interface{}

func (*Order) GetFulfillments

func (o *Order) GetFulfillments() []*Fulfillment

func (*Order) GetID

func (o *Order) GetID() *string

func (*Order) GetLineItems

func (o *Order) GetLineItems() []*OrderLineItem

func (*Order) GetLocationID

func (o *Order) GetLocationID() string

func (*Order) GetMetadata

func (o *Order) GetMetadata() map[string]*string

func (*Order) GetNetAmountDueMoney

func (o *Order) GetNetAmountDueMoney() *Money

func (*Order) GetNetAmounts

func (o *Order) GetNetAmounts() *OrderMoneyAmounts

func (*Order) GetPricingOptions

func (o *Order) GetPricingOptions() *OrderPricingOptions

func (*Order) GetReferenceID

func (o *Order) GetReferenceID() *string

func (*Order) GetRefunds

func (o *Order) GetRefunds() []*Refund

func (*Order) GetReturnAmounts

func (o *Order) GetReturnAmounts() *OrderMoneyAmounts

func (*Order) GetReturns

func (o *Order) GetReturns() []*OrderReturn

func (*Order) GetRewards

func (o *Order) GetRewards() []*OrderReward

func (*Order) GetRoundingAdjustment

func (o *Order) GetRoundingAdjustment() *OrderRoundingAdjustment

func (*Order) GetServiceCharges

func (o *Order) GetServiceCharges() []*OrderServiceCharge

func (*Order) GetSource

func (o *Order) GetSource() *OrderSource

func (*Order) GetState

func (o *Order) GetState() *OrderState

func (*Order) GetTaxes

func (o *Order) GetTaxes() []*OrderLineItemTax

func (*Order) GetTenders

func (o *Order) GetTenders() []*Tender

func (*Order) GetTicketName

func (o *Order) GetTicketName() *string

func (*Order) GetTotalDiscountMoney

func (o *Order) GetTotalDiscountMoney() *Money

func (*Order) GetTotalMoney

func (o *Order) GetTotalMoney() *Money

func (*Order) GetTotalServiceChargeMoney

func (o *Order) GetTotalServiceChargeMoney() *Money

func (*Order) GetTotalTaxMoney

func (o *Order) GetTotalTaxMoney() *Money

func (*Order) GetTotalTipMoney

func (o *Order) GetTotalTipMoney() *Money

func (*Order) GetUpdatedAt

func (o *Order) GetUpdatedAt() *string

func (*Order) GetVersion

func (o *Order) GetVersion() *int

func (*Order) String

func (o *Order) String() string

func (*Order) UnmarshalJSON

func (o *Order) UnmarshalJSON(data []byte) error

type OrderEntry

type OrderEntry struct {
	// The ID of the order.
	OrderID *string `json:"order_id,omitempty" url:"order_id,omitempty"`
	// The version number, which is incremented each time an update is committed to the order.
	// Orders that were not created through the API do not include a version number and
	// therefore cannot be updated.
	//
	// [Read more about working with versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders)
	Version *int `json:"version,omitempty" url:"version,omitempty"`
	// The location ID the order belongs to.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// contains filtered or unexported fields
}

A lightweight description of an [order](entity:Order) that is returned when `returned_entries` is `true` on a SearchOrdersRequest(api-endpoint:Orders-SearchOrders).

func (*OrderEntry) GetExtraProperties

func (o *OrderEntry) GetExtraProperties() map[string]interface{}

func (*OrderEntry) GetLocationID

func (o *OrderEntry) GetLocationID() *string

func (*OrderEntry) GetOrderID

func (o *OrderEntry) GetOrderID() *string

func (*OrderEntry) GetVersion

func (o *OrderEntry) GetVersion() *int

func (*OrderEntry) String

func (o *OrderEntry) String() string

func (*OrderEntry) UnmarshalJSON

func (o *OrderEntry) UnmarshalJSON(data []byte) error

type OrderLineItem

type OrderLineItem struct {
	// A unique ID that identifies the line item only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The name of the line item.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The count, or measurement, of a line item being purchased:
	//
	// If `quantity` is a whole number, and `quantity_unit` is not specified, then `quantity` denotes an item count.  For example: `3` apples.
	//
	// If `quantity` is a whole or decimal number, and `quantity_unit` is also specified, then `quantity` denotes a measurement.  For example: `2.25` pounds of broccoli.
	//
	// For more information, see [Specify item quantity and measurement unit](https://developer.squareup.com/docs/orders-api/create-orders#specify-item-quantity-and-measurement-unit).
	//
	// Line items with a quantity of `0` are automatically removed
	// when paying for or otherwise completing the order.
	Quantity string `json:"quantity" url:"quantity"`
	// The measurement unit and decimal precision that this line item's quantity is measured in.
	QuantityUnit *OrderQuantityUnit `json:"quantity_unit,omitempty" url:"quantity_unit,omitempty"`
	// An optional note associated with the line item.
	Note *string `json:"note,omitempty" url:"note,omitempty"`
	// The [CatalogItemVariation](entity:CatalogItemVariation) ID applied to this line item.
	CatalogObjectID *string `json:"catalog_object_id,omitempty" url:"catalog_object_id,omitempty"`
	// The version of the catalog object that this line item references.
	CatalogVersion *int64 `json:"catalog_version,omitempty" url:"catalog_version,omitempty"`
	// The name of the variation applied to this line item.
	VariationName *string `json:"variation_name,omitempty" url:"variation_name,omitempty"`
	// The type of line item: an itemized sale, a non-itemized sale (custom amount), or the
	// activation or reloading of a gift card.
	// See [OrderLineItemItemType](#type-orderlineitemitemtype) for possible values
	ItemType *OrderLineItemItemType `json:"item_type,omitempty" url:"item_type,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 (such as personally
	// identifiable information or card details).
	//
	// Keys written by applications must be 60 characters or less and must be in the character set
	// `[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
	// with a namespace, separated from the key with a ':' character.
	//
	// Values have a maximum length of 255 characters.
	//
	// An application can 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.
	//
	// For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).
	Metadata map[string]*string `json:"metadata,omitempty" url:"metadata,omitempty"`
	// The [CatalogModifier](entity:CatalogModifier)s applied to this line item.
	Modifiers []*OrderLineItemModifier `json:"modifiers,omitempty" url:"modifiers,omitempty"`
	// 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` is 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,omitempty" url:"applied_taxes,omitempty"`
	// 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` is 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,omitempty" url:"applied_discounts,omitempty"`
	// The list of references to service charges applied to this line item. Each
	// `OrderLineItemAppliedServiceCharge` has a `service_charge_id` that references the `uid` of a
	// top-level `OrderServiceCharge` applied to the line item. On reads, the amount applied is
	// populated.
	//
	// To change the amount of a service charge, modify the referenced top-level service charge.
	AppliedServiceCharges []*OrderLineItemAppliedServiceCharge `json:"applied_service_charges,omitempty" url:"applied_service_charges,omitempty"`
	// The base price for a single unit of the line item.
	BasePriceMoney *Money `json:"base_price_money,omitempty" url:"base_price_money,omitempty"`
	// The total price of all item variations sold in this line item.
	// The price is calculated as `base_price_money` multiplied by `quantity`.
	// It does not include modifiers.
	VariationTotalPriceMoney *Money `json:"variation_total_price_money,omitempty" url:"variation_total_price_money,omitempty"`
	// The amount of money made in gross sales for this line item.
	// The amount is calculated as the sum of the variation's total price and each modifier's total price.
	// For inclusive tax items in the US, Canada, and Japan, tax is deducted from `gross_sales_money`. For Europe and
	// Australia, inclusive tax remains as part of the gross sale calculation.
	GrossSalesMoney *Money `json:"gross_sales_money,omitempty" url:"gross_sales_money,omitempty"`
	// The total amount of tax money to collect for the line item.
	TotalTaxMoney *Money `json:"total_tax_money,omitempty" url:"total_tax_money,omitempty"`
	// The total amount of discount money to collect for the line item.
	TotalDiscountMoney *Money `json:"total_discount_money,omitempty" url:"total_discount_money,omitempty"`
	// The total amount of money to collect for this line item.
	TotalMoney *Money `json:"total_money,omitempty" url:"total_money,omitempty"`
	// Describes pricing adjustments that are blocked from automatic
	// application to a line item. For more information, see
	// [Apply Taxes and Discounts](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts).
	PricingBlocklists *OrderLineItemPricingBlocklists `json:"pricing_blocklists,omitempty" url:"pricing_blocklists,omitempty"`
	// The total amount of apportioned service charge money to collect for the line item.
	TotalServiceChargeMoney *Money `json:"total_service_charge_money,omitempty" url:"total_service_charge_money,omitempty"`
	// contains filtered or unexported fields
}

Represents a line item in an order. Each line item describes a different product to purchase, with its own quantity and price details.

func (*OrderLineItem) GetAppliedDiscounts

func (o *OrderLineItem) GetAppliedDiscounts() []*OrderLineItemAppliedDiscount

func (*OrderLineItem) GetAppliedServiceCharges

func (o *OrderLineItem) GetAppliedServiceCharges() []*OrderLineItemAppliedServiceCharge

func (*OrderLineItem) GetAppliedTaxes

func (o *OrderLineItem) GetAppliedTaxes() []*OrderLineItemAppliedTax

func (*OrderLineItem) GetBasePriceMoney

func (o *OrderLineItem) GetBasePriceMoney() *Money

func (*OrderLineItem) GetCatalogObjectID

func (o *OrderLineItem) GetCatalogObjectID() *string

func (*OrderLineItem) GetCatalogVersion

func (o *OrderLineItem) GetCatalogVersion() *int64

func (*OrderLineItem) GetExtraProperties

func (o *OrderLineItem) GetExtraProperties() map[string]interface{}

func (*OrderLineItem) GetGrossSalesMoney

func (o *OrderLineItem) GetGrossSalesMoney() *Money

func (*OrderLineItem) GetItemType

func (o *OrderLineItem) GetItemType() *OrderLineItemItemType

func (*OrderLineItem) GetMetadata

func (o *OrderLineItem) GetMetadata() map[string]*string

func (*OrderLineItem) GetModifiers

func (o *OrderLineItem) GetModifiers() []*OrderLineItemModifier

func (*OrderLineItem) GetName

func (o *OrderLineItem) GetName() *string

func (*OrderLineItem) GetNote

func (o *OrderLineItem) GetNote() *string

func (*OrderLineItem) GetPricingBlocklists

func (o *OrderLineItem) GetPricingBlocklists() *OrderLineItemPricingBlocklists

func (*OrderLineItem) GetQuantity

func (o *OrderLineItem) GetQuantity() string

func (*OrderLineItem) GetQuantityUnit

func (o *OrderLineItem) GetQuantityUnit() *OrderQuantityUnit

func (*OrderLineItem) GetTotalDiscountMoney

func (o *OrderLineItem) GetTotalDiscountMoney() *Money

func (*OrderLineItem) GetTotalMoney

func (o *OrderLineItem) GetTotalMoney() *Money

func (*OrderLineItem) GetTotalServiceChargeMoney

func (o *OrderLineItem) GetTotalServiceChargeMoney() *Money

func (*OrderLineItem) GetTotalTaxMoney

func (o *OrderLineItem) GetTotalTaxMoney() *Money

func (*OrderLineItem) GetUID

func (o *OrderLineItem) GetUID() *string

func (*OrderLineItem) GetVariationName

func (o *OrderLineItem) GetVariationName() *string

func (*OrderLineItem) GetVariationTotalPriceMoney

func (o *OrderLineItem) GetVariationTotalPriceMoney() *Money

func (*OrderLineItem) String

func (o *OrderLineItem) String() string

func (*OrderLineItem) UnmarshalJSON

func (o *OrderLineItem) UnmarshalJSON(data []byte) error

type OrderLineItemAppliedDiscount

type OrderLineItemAppliedDiscount struct {
	// A unique ID that identifies the applied discount only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The `uid` of the discount that the applied discount represents. It 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`.
	DiscountUID string `json:"discount_uid" url:"discount_uid"`
	// The amount of money applied by the discount to the line item.
	AppliedMoney *Money `json:"applied_money,omitempty" url:"applied_money,omitempty"`
	// contains filtered or unexported fields
}

Represents an applied portion of a discount to a line item in an order.

Order scoped discounts have automatically 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 is automatically computed based on participating line items.

func (*OrderLineItemAppliedDiscount) GetAppliedMoney

func (o *OrderLineItemAppliedDiscount) GetAppliedMoney() *Money

func (*OrderLineItemAppliedDiscount) GetDiscountUID

func (o *OrderLineItemAppliedDiscount) GetDiscountUID() string

func (*OrderLineItemAppliedDiscount) GetExtraProperties

func (o *OrderLineItemAppliedDiscount) GetExtraProperties() map[string]interface{}

func (*OrderLineItemAppliedDiscount) GetUID

func (o *OrderLineItemAppliedDiscount) GetUID() *string

func (*OrderLineItemAppliedDiscount) String

func (*OrderLineItemAppliedDiscount) UnmarshalJSON

func (o *OrderLineItemAppliedDiscount) UnmarshalJSON(data []byte) error

type OrderLineItemAppliedServiceCharge

type OrderLineItemAppliedServiceCharge struct {
	// A unique ID that identifies the applied service charge only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The `uid` of the service charge that the applied service charge represents. It must
	// reference a service charge present in the `order.service_charges` field.
	//
	// This field is immutable. To change which service charges apply to a line item,
	// delete and add a new `OrderLineItemAppliedServiceCharge`.
	ServiceChargeUID string `json:"service_charge_uid" url:"service_charge_uid"`
	// The amount of money applied by the service charge to the line item.
	AppliedMoney *Money `json:"applied_money,omitempty" url:"applied_money,omitempty"`
	// contains filtered or unexported fields
}

func (*OrderLineItemAppliedServiceCharge) GetAppliedMoney

func (o *OrderLineItemAppliedServiceCharge) GetAppliedMoney() *Money

func (*OrderLineItemAppliedServiceCharge) GetExtraProperties

func (o *OrderLineItemAppliedServiceCharge) GetExtraProperties() map[string]interface{}

func (*OrderLineItemAppliedServiceCharge) GetServiceChargeUID

func (o *OrderLineItemAppliedServiceCharge) GetServiceChargeUID() string

func (*OrderLineItemAppliedServiceCharge) GetUID

func (*OrderLineItemAppliedServiceCharge) String

func (*OrderLineItemAppliedServiceCharge) UnmarshalJSON

func (o *OrderLineItemAppliedServiceCharge) UnmarshalJSON(data []byte) error

type OrderLineItemAppliedTax

type OrderLineItemAppliedTax struct {
	// A unique ID that identifies the applied tax only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The `uid` of the tax for which this applied tax represents. It 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 a new
	// `OrderLineItemAppliedTax`.
	TaxUID string `json:"tax_uid" url:"tax_uid"`
	// The amount of money applied by the tax to the line item.
	AppliedMoney *Money `json:"applied_money,omitempty" url:"applied_money,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*OrderLineItemAppliedTax) GetAppliedMoney

func (o *OrderLineItemAppliedTax) GetAppliedMoney() *Money

func (*OrderLineItemAppliedTax) GetExtraProperties

func (o *OrderLineItemAppliedTax) GetExtraProperties() map[string]interface{}

func (*OrderLineItemAppliedTax) GetTaxUID

func (o *OrderLineItemAppliedTax) GetTaxUID() string

func (*OrderLineItemAppliedTax) GetUID

func (o *OrderLineItemAppliedTax) GetUID() *string

func (*OrderLineItemAppliedTax) String

func (o *OrderLineItemAppliedTax) String() string

func (*OrderLineItemAppliedTax) UnmarshalJSON

func (o *OrderLineItemAppliedTax) UnmarshalJSON(data []byte) error

type OrderLineItemDiscount

type OrderLineItemDiscount struct {
	// A unique ID that identifies the discount only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The catalog object ID referencing [CatalogDiscount](entity:CatalogDiscount).
	CatalogObjectID *string `json:"catalog_object_id,omitempty" url:"catalog_object_id,omitempty"`
	// The version of the catalog object that this discount references.
	CatalogVersion *int64 `json:"catalog_version,omitempty" url:"catalog_version,omitempty"`
	// The discount's name.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The type of the discount.
	//
	// Discounts that do not reference a catalog object ID must have a type of
	// `FIXED_PERCENTAGE` or `FIXED_AMOUNT`.
	// See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for possible values
	Type *OrderLineItemDiscountType `json:"type,omitempty" url:"type,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.
	Percentage *string `json:"percentage,omitempty" url:"percentage,omitempty"`
	// The total declared monetary amount of the discount.
	//
	// `amount_money` is not set for percentage-based discounts.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// The amount of discount actually applied to the line item.
	//
	// The amount 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 than `amount_money` because the total
	// amount of the discount is distributed across all line items.
	AppliedMoney *Money `json:"applied_money,omitempty" url:"applied_money,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 (such as personally
	// identifiable information or card details).
	//
	// Keys written by applications must be 60 characters or less and must be in the character set
	// `[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
	// with a namespace, separated from the key with a ':' character.
	//
	// Values have a maximum length of 255 characters.
	//
	// An application can 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.
	//
	// For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).
	Metadata map[string]*string `json:"metadata,omitempty" url:"metadata,omitempty"`
	// 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 *OrderLineItemDiscountScope `json:"scope,omitempty" url:"scope,omitempty"`
	// The reward IDs 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,omitempty" url:"reward_ids,omitempty"`
	// The object ID of a [pricing rule](entity:CatalogPricingRule) 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" url:"pricing_rule_id,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*OrderLineItemDiscount) GetAmountMoney

func (o *OrderLineItemDiscount) GetAmountMoney() *Money

func (*OrderLineItemDiscount) GetAppliedMoney

func (o *OrderLineItemDiscount) GetAppliedMoney() *Money

func (*OrderLineItemDiscount) GetCatalogObjectID

func (o *OrderLineItemDiscount) GetCatalogObjectID() *string

func (*OrderLineItemDiscount) GetCatalogVersion

func (o *OrderLineItemDiscount) GetCatalogVersion() *int64

func (*OrderLineItemDiscount) GetExtraProperties

func (o *OrderLineItemDiscount) GetExtraProperties() map[string]interface{}

func (*OrderLineItemDiscount) GetMetadata

func (o *OrderLineItemDiscount) GetMetadata() map[string]*string

func (*OrderLineItemDiscount) GetName

func (o *OrderLineItemDiscount) GetName() *string

func (*OrderLineItemDiscount) GetPercentage

func (o *OrderLineItemDiscount) GetPercentage() *string

func (*OrderLineItemDiscount) GetPricingRuleID

func (o *OrderLineItemDiscount) GetPricingRuleID() *string

func (*OrderLineItemDiscount) GetRewardIDs

func (o *OrderLineItemDiscount) GetRewardIDs() []string

func (*OrderLineItemDiscount) GetScope

func (*OrderLineItemDiscount) GetType

func (*OrderLineItemDiscount) GetUID

func (o *OrderLineItemDiscount) GetUID() *string

func (*OrderLineItemDiscount) String

func (o *OrderLineItemDiscount) String() string

func (*OrderLineItemDiscount) UnmarshalJSON

func (o *OrderLineItemDiscount) UnmarshalJSON(data []byte) error

type OrderLineItemDiscountScope

type OrderLineItemDiscountScope string

Indicates whether this is a line-item or order-level discount.

const (
	OrderLineItemDiscountScopeOtherDiscountScope OrderLineItemDiscountScope = "OTHER_DISCOUNT_SCOPE"
	OrderLineItemDiscountScopeLineItem           OrderLineItemDiscountScope = "LINE_ITEM"
	OrderLineItemDiscountScopeOrder              OrderLineItemDiscountScope = "ORDER"
)

func NewOrderLineItemDiscountScopeFromString

func NewOrderLineItemDiscountScopeFromString(s string) (OrderLineItemDiscountScope, error)

func (OrderLineItemDiscountScope) Ptr

type OrderLineItemDiscountType

type OrderLineItemDiscountType string

Indicates how the discount is applied to the associated line item or order.

const (
	OrderLineItemDiscountTypeUnknownDiscount    OrderLineItemDiscountType = "UNKNOWN_DISCOUNT"
	OrderLineItemDiscountTypeFixedPercentage    OrderLineItemDiscountType = "FIXED_PERCENTAGE"
	OrderLineItemDiscountTypeFixedAmount        OrderLineItemDiscountType = "FIXED_AMOUNT"
	OrderLineItemDiscountTypeVariablePercentage OrderLineItemDiscountType = "VARIABLE_PERCENTAGE"
	OrderLineItemDiscountTypeVariableAmount     OrderLineItemDiscountType = "VARIABLE_AMOUNT"
)

func NewOrderLineItemDiscountTypeFromString

func NewOrderLineItemDiscountTypeFromString(s string) (OrderLineItemDiscountType, error)

func (OrderLineItemDiscountType) Ptr

type OrderLineItemItemType

type OrderLineItemItemType string

Represents the line item type.

const (
	OrderLineItemItemTypeItem         OrderLineItemItemType = "ITEM"
	OrderLineItemItemTypeCustomAmount OrderLineItemItemType = "CUSTOM_AMOUNT"
	OrderLineItemItemTypeGiftCard     OrderLineItemItemType = "GIFT_CARD"
)

func NewOrderLineItemItemTypeFromString

func NewOrderLineItemItemTypeFromString(s string) (OrderLineItemItemType, error)

func (OrderLineItemItemType) Ptr

type OrderLineItemModifier

type OrderLineItemModifier struct {
	// A unique ID that identifies the modifier only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The catalog object ID referencing [CatalogModifier](entity:CatalogModifier).
	CatalogObjectID *string `json:"catalog_object_id,omitempty" url:"catalog_object_id,omitempty"`
	// The version of the catalog object that this modifier references.
	CatalogVersion *int64 `json:"catalog_version,omitempty" url:"catalog_version,omitempty"`
	// The name of the item modifier.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The quantity of the line item modifier. The modifier quantity can be 0 or more.
	// For example, suppose a restaurant offers a cheeseburger on the menu. When a buyer orders
	// this item, the restaurant records the purchase by creating an `Order` object with a line item
	// for a burger. The line item includes a line item modifier: the name is cheese and the quantity
	// is 1. The buyer has the option to order extra cheese (or no cheese). If the buyer chooses
	// the extra cheese option, the modifier quantity increases to 2. If the buyer does not want
	// any cheese, the modifier quantity is set to 0.
	Quantity *string `json:"quantity,omitempty" url:"quantity,omitempty"`
	// 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](entity:CatalogModifier) price.
	BasePriceMoney *Money `json:"base_price_money,omitempty" url:"base_price_money,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" url:"total_price_money,omitempty"`
	// 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 (such as personally
	// identifiable information or card details).
	//
	// Keys written by applications must be 60 characters or less and must be in the character set
	// `[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
	// with a namespace, separated from the key with a ':' character.
	//
	// Values have a maximum length of 255 characters.
	//
	// An application can 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.
	//
	// For more information, see  [Metadata](https://developer.squareup.com/docs/build-basics/metadata).
	Metadata map[string]*string `json:"metadata,omitempty" url:"metadata,omitempty"`
	// contains filtered or unexported fields
}

A CatalogModifier(entity:CatalogModifier).

func (*OrderLineItemModifier) GetBasePriceMoney

func (o *OrderLineItemModifier) GetBasePriceMoney() *Money

func (*OrderLineItemModifier) GetCatalogObjectID

func (o *OrderLineItemModifier) GetCatalogObjectID() *string

func (*OrderLineItemModifier) GetCatalogVersion

func (o *OrderLineItemModifier) GetCatalogVersion() *int64

func (*OrderLineItemModifier) GetExtraProperties

func (o *OrderLineItemModifier) GetExtraProperties() map[string]interface{}

func (*OrderLineItemModifier) GetMetadata

func (o *OrderLineItemModifier) GetMetadata() map[string]*string

func (*OrderLineItemModifier) GetName

func (o *OrderLineItemModifier) GetName() *string

func (*OrderLineItemModifier) GetQuantity

func (o *OrderLineItemModifier) GetQuantity() *string

func (*OrderLineItemModifier) GetTotalPriceMoney

func (o *OrderLineItemModifier) GetTotalPriceMoney() *Money

func (*OrderLineItemModifier) GetUID

func (o *OrderLineItemModifier) GetUID() *string

func (*OrderLineItemModifier) String

func (o *OrderLineItemModifier) String() string

func (*OrderLineItemModifier) UnmarshalJSON

func (o *OrderLineItemModifier) UnmarshalJSON(data []byte) error

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,omitempty" url:"blocked_discounts,omitempty"`
	// 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,omitempty" url:"blocked_taxes,omitempty"`
	// contains filtered or unexported fields
}

Describes pricing adjustments that are blocked from automatic application to a line item. For more information, see [Apply Taxes and Discounts](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts).

func (*OrderLineItemPricingBlocklists) GetBlockedDiscounts

func (*OrderLineItemPricingBlocklists) GetBlockedTaxes

func (*OrderLineItemPricingBlocklists) GetExtraProperties

func (o *OrderLineItemPricingBlocklists) GetExtraProperties() map[string]interface{}

func (*OrderLineItemPricingBlocklists) String

func (*OrderLineItemPricingBlocklists) UnmarshalJSON

func (o *OrderLineItemPricingBlocklists) UnmarshalJSON(data []byte) error

type OrderLineItemPricingBlocklistsBlockedDiscount

type OrderLineItemPricingBlocklistsBlockedDiscount struct {
	// A unique ID of the `BlockedDiscount` within the order.
	UID *string `json:"uid,omitempty" url:"uid,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.
	DiscountUID *string `json:"discount_uid,omitempty" url:"discount_uid,omitempty"`
	// 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.
	DiscountCatalogObjectID *string `json:"discount_catalog_object_id,omitempty" url:"discount_catalog_object_id,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*OrderLineItemPricingBlocklistsBlockedDiscount) GetDiscountCatalogObjectID

func (o *OrderLineItemPricingBlocklistsBlockedDiscount) GetDiscountCatalogObjectID() *string

func (*OrderLineItemPricingBlocklistsBlockedDiscount) GetDiscountUID

func (*OrderLineItemPricingBlocklistsBlockedDiscount) GetExtraProperties

func (o *OrderLineItemPricingBlocklistsBlockedDiscount) GetExtraProperties() map[string]interface{}

func (*OrderLineItemPricingBlocklistsBlockedDiscount) GetUID

func (*OrderLineItemPricingBlocklistsBlockedDiscount) String

func (*OrderLineItemPricingBlocklistsBlockedDiscount) UnmarshalJSON

func (o *OrderLineItemPricingBlocklistsBlockedDiscount) UnmarshalJSON(data []byte) error

type OrderLineItemPricingBlocklistsBlockedTax

type OrderLineItemPricingBlocklistsBlockedTax struct {
	// A unique ID of the `BlockedTax` within the order.
	UID *string `json:"uid,omitempty" url:"uid,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.
	TaxUID *string `json:"tax_uid,omitempty" url:"tax_uid,omitempty"`
	// 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.
	TaxCatalogObjectID *string `json:"tax_catalog_object_id,omitempty" url:"tax_catalog_object_id,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*OrderLineItemPricingBlocklistsBlockedTax) GetExtraProperties

func (o *OrderLineItemPricingBlocklistsBlockedTax) GetExtraProperties() map[string]interface{}

func (*OrderLineItemPricingBlocklistsBlockedTax) GetTaxCatalogObjectID

func (o *OrderLineItemPricingBlocklistsBlockedTax) GetTaxCatalogObjectID() *string

func (*OrderLineItemPricingBlocklistsBlockedTax) GetTaxUID

func (*OrderLineItemPricingBlocklistsBlockedTax) GetUID

func (*OrderLineItemPricingBlocklistsBlockedTax) String

func (*OrderLineItemPricingBlocklistsBlockedTax) UnmarshalJSON

func (o *OrderLineItemPricingBlocklistsBlockedTax) UnmarshalJSON(data []byte) error

type OrderLineItemTax

type OrderLineItemTax struct {
	// A unique ID that identifies the tax only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The catalog object ID referencing [CatalogTax](entity:CatalogTax).
	CatalogObjectID *string `json:"catalog_object_id,omitempty" url:"catalog_object_id,omitempty"`
	// The version of the catalog object that this tax references.
	CatalogVersion *int64 `json:"catalog_version,omitempty" url:"catalog_version,omitempty"`
	// The tax's name.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Indicates the calculation method used to apply the tax.
	// See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values
	Type *OrderLineItemTaxType `json:"type,omitempty" url:"type,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%.
	Percentage *string `json:"percentage,omitempty" url:"percentage,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 (such as personally
	// identifiable information or card details).
	//
	// Keys written by applications must be 60 characters or less and must be in the character set
	// `[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
	// with a namespace, separated from the key with a ':' character.
	//
	// Values have a maximum length of 255 characters.
	//
	// An application can 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.
	//
	// For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).
	Metadata map[string]*string `json:"metadata,omitempty" url:"metadata,omitempty"`
	// The amount of money applied to the order by the tax.
	//
	// - For percentage-based taxes, `applied_money` is the money
	// calculated using the percentage.
	AppliedMoney *Money `json:"applied_money,omitempty" url:"applied_money,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 only applies 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 *OrderLineItemTaxScope `json:"scope,omitempty" url:"scope,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/orders-api/apply-taxes-and-discounts/auto-apply-taxes).
	AutoApplied *bool `json:"auto_applied,omitempty" url:"auto_applied,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*OrderLineItemTax) GetAppliedMoney

func (o *OrderLineItemTax) GetAppliedMoney() *Money

func (*OrderLineItemTax) GetAutoApplied

func (o *OrderLineItemTax) GetAutoApplied() *bool

func (*OrderLineItemTax) GetCatalogObjectID

func (o *OrderLineItemTax) GetCatalogObjectID() *string

func (*OrderLineItemTax) GetCatalogVersion

func (o *OrderLineItemTax) GetCatalogVersion() *int64

func (*OrderLineItemTax) GetExtraProperties

func (o *OrderLineItemTax) GetExtraProperties() map[string]interface{}

func (*OrderLineItemTax) GetMetadata

func (o *OrderLineItemTax) GetMetadata() map[string]*string

func (*OrderLineItemTax) GetName

func (o *OrderLineItemTax) GetName() *string

func (*OrderLineItemTax) GetPercentage

func (o *OrderLineItemTax) GetPercentage() *string

func (*OrderLineItemTax) GetScope

func (o *OrderLineItemTax) GetScope() *OrderLineItemTaxScope

func (*OrderLineItemTax) GetType

func (o *OrderLineItemTax) GetType() *OrderLineItemTaxType

func (*OrderLineItemTax) GetUID

func (o *OrderLineItemTax) GetUID() *string

func (*OrderLineItemTax) String

func (o *OrderLineItemTax) String() string

func (*OrderLineItemTax) UnmarshalJSON

func (o *OrderLineItemTax) UnmarshalJSON(data []byte) error

type OrderLineItemTaxScope

type OrderLineItemTaxScope string

Indicates whether this is a line-item or order-level tax.

const (
	OrderLineItemTaxScopeOtherTaxScope OrderLineItemTaxScope = "OTHER_TAX_SCOPE"
	OrderLineItemTaxScopeLineItem      OrderLineItemTaxScope = "LINE_ITEM"
	OrderLineItemTaxScopeOrder         OrderLineItemTaxScope = "ORDER"
)

func NewOrderLineItemTaxScopeFromString

func NewOrderLineItemTaxScopeFromString(s string) (OrderLineItemTaxScope, error)

func (OrderLineItemTaxScope) Ptr

type OrderLineItemTaxType

type OrderLineItemTaxType string

Indicates how the tax is applied to the associated line item or order.

const (
	OrderLineItemTaxTypeUnknownTax OrderLineItemTaxType = "UNKNOWN_TAX"
	OrderLineItemTaxTypeAdditive   OrderLineItemTaxType = "ADDITIVE"
	OrderLineItemTaxTypeInclusive  OrderLineItemTaxType = "INCLUSIVE"
)

func NewOrderLineItemTaxTypeFromString

func NewOrderLineItemTaxTypeFromString(s string) (OrderLineItemTaxType, error)

func (OrderLineItemTaxType) Ptr

type OrderMoneyAmounts

type OrderMoneyAmounts struct {
	// The total money.
	TotalMoney *Money `json:"total_money,omitempty" url:"total_money,omitempty"`
	// The money associated with taxes.
	TaxMoney *Money `json:"tax_money,omitempty" url:"tax_money,omitempty"`
	// The money associated with discounts.
	DiscountMoney *Money `json:"discount_money,omitempty" url:"discount_money,omitempty"`
	// The money associated with tips.
	TipMoney *Money `json:"tip_money,omitempty" url:"tip_money,omitempty"`
	// The money associated with service charges.
	ServiceChargeMoney *Money `json:"service_charge_money,omitempty" url:"service_charge_money,omitempty"`
	// contains filtered or unexported fields
}

A collection of various money amounts.

func (*OrderMoneyAmounts) GetDiscountMoney

func (o *OrderMoneyAmounts) GetDiscountMoney() *Money

func (*OrderMoneyAmounts) GetExtraProperties

func (o *OrderMoneyAmounts) GetExtraProperties() map[string]interface{}

func (*OrderMoneyAmounts) GetServiceChargeMoney

func (o *OrderMoneyAmounts) GetServiceChargeMoney() *Money

func (*OrderMoneyAmounts) GetTaxMoney

func (o *OrderMoneyAmounts) GetTaxMoney() *Money

func (*OrderMoneyAmounts) GetTipMoney

func (o *OrderMoneyAmounts) GetTipMoney() *Money

func (*OrderMoneyAmounts) GetTotalMoney

func (o *OrderMoneyAmounts) GetTotalMoney() *Money

func (*OrderMoneyAmounts) String

func (o *OrderMoneyAmounts) String() string

func (*OrderMoneyAmounts) UnmarshalJSON

func (o *OrderMoneyAmounts) UnmarshalJSON(data []byte) error

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" url:"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" url:"auto_apply_taxes,omitempty"`
	// contains filtered or unexported fields
}

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 preconfigured [pricing rules](entity:CatalogPricingRule).

func (*OrderPricingOptions) GetAutoApplyDiscounts

func (o *OrderPricingOptions) GetAutoApplyDiscounts() *bool

func (*OrderPricingOptions) GetAutoApplyTaxes

func (o *OrderPricingOptions) GetAutoApplyTaxes() *bool

func (*OrderPricingOptions) GetExtraProperties

func (o *OrderPricingOptions) GetExtraProperties() map[string]interface{}

func (*OrderPricingOptions) String

func (o *OrderPricingOptions) String() string

func (*OrderPricingOptions) UnmarshalJSON

func (o *OrderPricingOptions) UnmarshalJSON(data []byte) error

type OrderQuantityUnit

type OrderQuantityUnit struct {
	// A [MeasurementUnit](entity:MeasurementUnit) that represents the
	// unit of measure for the quantity.
	MeasurementUnit *MeasurementUnit `json:"measurement_unit,omitempty" url:"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 such as `"1.0"` and `"1.1"`, but not `"1.01"`.
	//
	// Min: 0. Max: 5.
	Precision *int `json:"precision,omitempty" url:"precision,omitempty"`
	// The catalog object ID referencing the
	// [CatalogMeasurementUnit](entity:CatalogMeasurementUnit).
	//
	// This field is set when this is a catalog-backed measurement unit.
	CatalogObjectID *string `json:"catalog_object_id,omitempty" url:"catalog_object_id,omitempty"`
	// The version of the catalog object that this measurement unit references.
	//
	// This field is set when this is a catalog-backed measurement unit.
	CatalogVersion *int64 `json:"catalog_version,omitempty" url:"catalog_version,omitempty"`
	// contains filtered or unexported fields
}

Contains the measurement unit for a quantity and a precision that specifies the number of digits after the decimal point for decimal quantities.

func (*OrderQuantityUnit) GetCatalogObjectID

func (o *OrderQuantityUnit) GetCatalogObjectID() *string

func (*OrderQuantityUnit) GetCatalogVersion

func (o *OrderQuantityUnit) GetCatalogVersion() *int64

func (*OrderQuantityUnit) GetExtraProperties

func (o *OrderQuantityUnit) GetExtraProperties() map[string]interface{}

func (*OrderQuantityUnit) GetMeasurementUnit

func (o *OrderQuantityUnit) GetMeasurementUnit() *MeasurementUnit

func (*OrderQuantityUnit) GetPrecision

func (o *OrderQuantityUnit) GetPrecision() *int

func (*OrderQuantityUnit) String

func (o *OrderQuantityUnit) String() string

func (*OrderQuantityUnit) UnmarshalJSON

func (o *OrderQuantityUnit) UnmarshalJSON(data []byte) error

type OrderReturn

type OrderReturn struct {
	// A unique ID that identifies the return only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// An order that contains the original sale of these return line items. This is unset
	// for unlinked returns.
	SourceOrderID *string `json:"source_order_id,omitempty" url:"source_order_id,omitempty"`
	// A collection of line items that are being returned.
	ReturnLineItems []*OrderReturnLineItem `json:"return_line_items,omitempty" url:"return_line_items,omitempty"`
	// A collection of service charges that are being returned.
	ReturnServiceCharges []*OrderReturnServiceCharge `json:"return_service_charges,omitempty" url:"return_service_charges,omitempty"`
	// A 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,omitempty" url:"return_taxes,omitempty"`
	// A 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,omitempty" url:"return_discounts,omitempty"`
	// A collection of references to tips being returned for an order.
	ReturnTips []*OrderReturnTip `json:"return_tips,omitempty" url:"return_tips,omitempty"`
	// A positive or negative rounding adjustment to the total value being returned. Adjustments are commonly
	// used to apply cash rounding when the minimum unit of the account is smaller than the lowest
	// physical denomination of the currency.
	RoundingAdjustment *OrderRoundingAdjustment `json:"rounding_adjustment,omitempty" url:"rounding_adjustment,omitempty"`
	// An aggregate monetary value being returned by this return entry.
	ReturnAmounts *OrderMoneyAmounts `json:"return_amounts,omitempty" url:"return_amounts,omitempty"`
	// contains filtered or unexported fields
}

The set of line items, service charges, taxes, discounts, tips, and other items being returned in an order.

func (*OrderReturn) GetExtraProperties

func (o *OrderReturn) GetExtraProperties() map[string]interface{}

func (*OrderReturn) GetReturnAmounts

func (o *OrderReturn) GetReturnAmounts() *OrderMoneyAmounts

func (*OrderReturn) GetReturnDiscounts

func (o *OrderReturn) GetReturnDiscounts() []*OrderReturnDiscount

func (*OrderReturn) GetReturnLineItems

func (o *OrderReturn) GetReturnLineItems() []*OrderReturnLineItem

func (*OrderReturn) GetReturnServiceCharges

func (o *OrderReturn) GetReturnServiceCharges() []*OrderReturnServiceCharge

func (*OrderReturn) GetReturnTaxes

func (o *OrderReturn) GetReturnTaxes() []*OrderReturnTax

func (*OrderReturn) GetReturnTips

func (o *OrderReturn) GetReturnTips() []*OrderReturnTip

func (*OrderReturn) GetRoundingAdjustment

func (o *OrderReturn) GetRoundingAdjustment() *OrderRoundingAdjustment

func (*OrderReturn) GetSourceOrderID

func (o *OrderReturn) GetSourceOrderID() *string

func (*OrderReturn) GetUID

func (o *OrderReturn) GetUID() *string

func (*OrderReturn) String

func (o *OrderReturn) String() string

func (*OrderReturn) UnmarshalJSON

func (o *OrderReturn) UnmarshalJSON(data []byte) error

type OrderReturnDiscount

type OrderReturnDiscount struct {
	// A unique ID that identifies the returned discount only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The discount `uid` from the order that contains the original application of this discount.
	SourceDiscountUID *string `json:"source_discount_uid,omitempty" url:"source_discount_uid,omitempty"`
	// The catalog object ID referencing [CatalogDiscount](entity:CatalogDiscount).
	CatalogObjectID *string `json:"catalog_object_id,omitempty" url:"catalog_object_id,omitempty"`
	// The version of the catalog object that this discount references.
	CatalogVersion *int64 `json:"catalog_version,omitempty" url:"catalog_version,omitempty"`
	// The discount's name.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The type of the discount. If it is created by the API, it is `FIXED_PERCENTAGE` or `FIXED_AMOUNT`.
	//
	// Discounts that do not reference a catalog object ID must have a type of
	// `FIXED_PERCENTAGE` or `FIXED_AMOUNT`.
	// See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for possible values
	Type *OrderLineItemDiscountType `json:"type,omitempty" url:"type,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.
	Percentage *string `json:"percentage,omitempty" url:"percentage,omitempty"`
	// The total declared monetary amount of the discount.
	//
	// `amount_money` is not set for percentage-based discounts.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// The amount of discount actually applied to this line item. When an amount-based
	// discount is at the order level, this value is different from `amount_money` because the discount
	// is distributed across the line items.
	AppliedMoney *Money `json:"applied_money,omitempty" url:"applied_money,omitempty"`
	// Indicates the level at which the `OrderReturnDiscount` applies. For `ORDER` scoped
	// discounts, the server generates references in `applied_discounts` on all
	// `OrderReturnLineItem`s. For `LINE_ITEM` scoped discounts, the discount is only applied to
	// `OrderReturnLineItem`s with references in their `applied_discounts` field.
	// See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values
	Scope *OrderLineItemDiscountScope `json:"scope,omitempty" url:"scope,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*OrderReturnDiscount) GetAmountMoney

func (o *OrderReturnDiscount) GetAmountMoney() *Money

func (*OrderReturnDiscount) GetAppliedMoney

func (o *OrderReturnDiscount) GetAppliedMoney() *Money

func (*OrderReturnDiscount) GetCatalogObjectID

func (o *OrderReturnDiscount) GetCatalogObjectID() *string

func (*OrderReturnDiscount) GetCatalogVersion

func (o *OrderReturnDiscount) GetCatalogVersion() *int64

func (*OrderReturnDiscount) GetExtraProperties

func (o *OrderReturnDiscount) GetExtraProperties() map[string]interface{}

func (*OrderReturnDiscount) GetName

func (o *OrderReturnDiscount) GetName() *string

func (*OrderReturnDiscount) GetPercentage

func (o *OrderReturnDiscount) GetPercentage() *string

func (*OrderReturnDiscount) GetScope

func (*OrderReturnDiscount) GetSourceDiscountUID

func (o *OrderReturnDiscount) GetSourceDiscountUID() *string

func (*OrderReturnDiscount) GetType

func (*OrderReturnDiscount) GetUID

func (o *OrderReturnDiscount) GetUID() *string

func (*OrderReturnDiscount) String

func (o *OrderReturnDiscount) String() string

func (*OrderReturnDiscount) UnmarshalJSON

func (o *OrderReturnDiscount) UnmarshalJSON(data []byte) error

type OrderReturnLineItem

type OrderReturnLineItem struct {
	// A unique ID for this return line-item entry.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The `uid` of the line item in the original sale order.
	SourceLineItemUID *string `json:"source_line_item_uid,omitempty" url:"source_line_item_uid,omitempty"`
	// The name of the line item.
	Name *string `json:"name,omitempty" url:"name,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"`.
	Quantity string `json:"quantity" url:"quantity"`
	// The unit and precision that this return line item's quantity is measured in.
	QuantityUnit *OrderQuantityUnit `json:"quantity_unit,omitempty" url:"quantity_unit,omitempty"`
	// The note of the return line item.
	Note *string `json:"note,omitempty" url:"note,omitempty"`
	// The [CatalogItemVariation](entity:CatalogItemVariation) ID applied to this return line item.
	CatalogObjectID *string `json:"catalog_object_id,omitempty" url:"catalog_object_id,omitempty"`
	// The version of the catalog object that this line item references.
	CatalogVersion *int64 `json:"catalog_version,omitempty" url:"catalog_version,omitempty"`
	// The name of the variation applied to this return line item.
	VariationName *string `json:"variation_name,omitempty" url:"variation_name,omitempty"`
	// The type of line item: an itemized return, a non-itemized return (custom amount),
	// or the return of an unactivated gift card sale.
	// See [OrderLineItemItemType](#type-orderlineitemitemtype) for possible values
	ItemType *OrderLineItemItemType `json:"item_type,omitempty" url:"item_type,omitempty"`
	// The [CatalogModifier](entity:CatalogModifier)s applied to this line item.
	ReturnModifiers []*OrderReturnLineItemModifier `json:"return_modifiers,omitempty" url:"return_modifiers,omitempty"`
	// The list of references to `OrderReturnTax` entities applied to the return line item. Each
	// `OrderLineItemAppliedTax` has a `tax_uid` that references the `uid` of a top-level
	// `OrderReturnTax` applied to the return line item. On reads, the applied amount
	// is populated.
	AppliedTaxes []*OrderLineItemAppliedTax `json:"applied_taxes,omitempty" url:"applied_taxes,omitempty"`
	// The list of references to `OrderReturnDiscount` entities applied to the return line item. Each
	// `OrderLineItemAppliedDiscount` has a `discount_uid` that references the `uid` of a top-level
	// `OrderReturnDiscount` applied to the return line item. On reads, the applied amount
	// is populated.
	AppliedDiscounts []*OrderLineItemAppliedDiscount `json:"applied_discounts,omitempty" url:"applied_discounts,omitempty"`
	// The base price for a single unit of the line item.
	BasePriceMoney *Money `json:"base_price_money,omitempty" url:"base_price_money,omitempty"`
	// The total price of all item variations returned in this line item.
	// The price is calculated as `base_price_money` multiplied by `quantity` and
	// does not include modifiers.
	VariationTotalPriceMoney *Money `json:"variation_total_price_money,omitempty" url:"variation_total_price_money,omitempty"`
	// The gross return amount of money calculated as (item base price + modifiers price) * quantity.
	GrossReturnMoney *Money `json:"gross_return_money,omitempty" url:"gross_return_money,omitempty"`
	// The total amount of tax money to return for the line item.
	TotalTaxMoney *Money `json:"total_tax_money,omitempty" url:"total_tax_money,omitempty"`
	// The total amount of discount money to return for the line item.
	TotalDiscountMoney *Money `json:"total_discount_money,omitempty" url:"total_discount_money,omitempty"`
	// The total amount of money to return for this line item.
	TotalMoney *Money `json:"total_money,omitempty" url:"total_money,omitempty"`
	// The list of references to `OrderReturnServiceCharge` entities applied to the return
	// line item. Each `OrderLineItemAppliedServiceCharge` has a `service_charge_uid` that
	// references the `uid` of a top-level `OrderReturnServiceCharge` applied to the return line
	// item. On reads, the applied amount is populated.
	AppliedServiceCharges []*OrderLineItemAppliedServiceCharge `json:"applied_service_charges,omitempty" url:"applied_service_charges,omitempty"`
	// The total amount of apportioned service charge money to return for the line item.
	TotalServiceChargeMoney *Money `json:"total_service_charge_money,omitempty" url:"total_service_charge_money,omitempty"`
	// contains filtered or unexported fields
}

The line item being returned in an order.

func (*OrderReturnLineItem) GetAppliedDiscounts

func (o *OrderReturnLineItem) GetAppliedDiscounts() []*OrderLineItemAppliedDiscount

func (*OrderReturnLineItem) GetAppliedServiceCharges

func (o *OrderReturnLineItem) GetAppliedServiceCharges() []*OrderLineItemAppliedServiceCharge

func (*OrderReturnLineItem) GetAppliedTaxes

func (o *OrderReturnLineItem) GetAppliedTaxes() []*OrderLineItemAppliedTax

func (*OrderReturnLineItem) GetBasePriceMoney

func (o *OrderReturnLineItem) GetBasePriceMoney() *Money

func (*OrderReturnLineItem) GetCatalogObjectID

func (o *OrderReturnLineItem) GetCatalogObjectID() *string

func (*OrderReturnLineItem) GetCatalogVersion

func (o *OrderReturnLineItem) GetCatalogVersion() *int64

func (*OrderReturnLineItem) GetExtraProperties

func (o *OrderReturnLineItem) GetExtraProperties() map[string]interface{}

func (*OrderReturnLineItem) GetGrossReturnMoney

func (o *OrderReturnLineItem) GetGrossReturnMoney() *Money

func (*OrderReturnLineItem) GetItemType

func (o *OrderReturnLineItem) GetItemType() *OrderLineItemItemType

func (*OrderReturnLineItem) GetName

func (o *OrderReturnLineItem) GetName() *string

func (*OrderReturnLineItem) GetNote

func (o *OrderReturnLineItem) GetNote() *string

func (*OrderReturnLineItem) GetQuantity

func (o *OrderReturnLineItem) GetQuantity() string

func (*OrderReturnLineItem) GetQuantityUnit

func (o *OrderReturnLineItem) GetQuantityUnit() *OrderQuantityUnit

func (*OrderReturnLineItem) GetReturnModifiers

func (o *OrderReturnLineItem) GetReturnModifiers() []*OrderReturnLineItemModifier

func (*OrderReturnLineItem) GetSourceLineItemUID

func (o *OrderReturnLineItem) GetSourceLineItemUID() *string

func (*OrderReturnLineItem) GetTotalDiscountMoney

func (o *OrderReturnLineItem) GetTotalDiscountMoney() *Money

func (*OrderReturnLineItem) GetTotalMoney

func (o *OrderReturnLineItem) GetTotalMoney() *Money

func (*OrderReturnLineItem) GetTotalServiceChargeMoney

func (o *OrderReturnLineItem) GetTotalServiceChargeMoney() *Money

func (*OrderReturnLineItem) GetTotalTaxMoney

func (o *OrderReturnLineItem) GetTotalTaxMoney() *Money

func (*OrderReturnLineItem) GetUID

func (o *OrderReturnLineItem) GetUID() *string

func (*OrderReturnLineItem) GetVariationName

func (o *OrderReturnLineItem) GetVariationName() *string

func (*OrderReturnLineItem) GetVariationTotalPriceMoney

func (o *OrderReturnLineItem) GetVariationTotalPriceMoney() *Money

func (*OrderReturnLineItem) String

func (o *OrderReturnLineItem) String() string

func (*OrderReturnLineItem) UnmarshalJSON

func (o *OrderReturnLineItem) UnmarshalJSON(data []byte) error

type OrderReturnLineItemModifier

type OrderReturnLineItemModifier struct {
	// A unique ID that identifies the return modifier only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The modifier `uid` from the order's line item that contains the
	// original sale of this line item modifier.
	SourceModifierUID *string `json:"source_modifier_uid,omitempty" url:"source_modifier_uid,omitempty"`
	// The catalog object ID referencing [CatalogModifier](entity:CatalogModifier).
	CatalogObjectID *string `json:"catalog_object_id,omitempty" url:"catalog_object_id,omitempty"`
	// The version of the catalog object that this line item modifier references.
	CatalogVersion *int64 `json:"catalog_version,omitempty" url:"catalog_version,omitempty"`
	// The name of the item modifier.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// 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` overrides the predefined [CatalogModifier](entity:CatalogModifier) price.
	BasePriceMoney *Money `json:"base_price_money,omitempty" url:"base_price_money,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" url:"total_price_money,omitempty"`
	// The quantity of the line item modifier. The modifier quantity can be 0 or more.
	// For example, suppose a restaurant offers a cheeseburger on the menu. When a buyer orders
	// this item, the restaurant records the purchase by creating an `Order` object with a line item
	// for a burger. The line item includes a line item modifier: the name is cheese and the quantity
	// is 1. The buyer has the option to order extra cheese (or no cheese). If the buyer chooses
	// the extra cheese option, the modifier quantity increases to 2. If the buyer does not want
	// any cheese, the modifier quantity is set to 0.
	Quantity *string `json:"quantity,omitempty" url:"quantity,omitempty"`
	// contains filtered or unexported fields
}

A line item modifier being returned.

func (*OrderReturnLineItemModifier) GetBasePriceMoney

func (o *OrderReturnLineItemModifier) GetBasePriceMoney() *Money

func (*OrderReturnLineItemModifier) GetCatalogObjectID

func (o *OrderReturnLineItemModifier) GetCatalogObjectID() *string

func (*OrderReturnLineItemModifier) GetCatalogVersion

func (o *OrderReturnLineItemModifier) GetCatalogVersion() *int64

func (*OrderReturnLineItemModifier) GetExtraProperties

func (o *OrderReturnLineItemModifier) GetExtraProperties() map[string]interface{}

func (*OrderReturnLineItemModifier) GetName

func (o *OrderReturnLineItemModifier) GetName() *string

func (*OrderReturnLineItemModifier) GetQuantity

func (o *OrderReturnLineItemModifier) GetQuantity() *string

func (*OrderReturnLineItemModifier) GetSourceModifierUID

func (o *OrderReturnLineItemModifier) GetSourceModifierUID() *string

func (*OrderReturnLineItemModifier) GetTotalPriceMoney

func (o *OrderReturnLineItemModifier) GetTotalPriceMoney() *Money

func (*OrderReturnLineItemModifier) GetUID

func (o *OrderReturnLineItemModifier) GetUID() *string

func (*OrderReturnLineItemModifier) String

func (o *OrderReturnLineItemModifier) String() string

func (*OrderReturnLineItemModifier) UnmarshalJSON

func (o *OrderReturnLineItemModifier) UnmarshalJSON(data []byte) error

type OrderReturnServiceCharge

type OrderReturnServiceCharge struct {
	// A unique ID that identifies the return service charge only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The service charge `uid` from the order containing the original
	// service charge. `source_service_charge_uid` is `null` for
	// unlinked returns.
	SourceServiceChargeUID *string `json:"source_service_charge_uid,omitempty" url:"source_service_charge_uid,omitempty"`
	// The name of the service charge.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The catalog object ID of the associated [OrderServiceCharge](entity:OrderServiceCharge).
	CatalogObjectID *string `json:"catalog_object_id,omitempty" url:"catalog_object_id,omitempty"`
	// The version of the catalog object that this service charge references.
	CatalogVersion *int64 `json:"catalog_version,omitempty" url:"catalog_version,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%.
	//
	// Either `percentage` or `amount_money` should be set, but not both.
	Percentage *string `json:"percentage,omitempty" url:"percentage,omitempty"`
	// The amount of a non-percentage-based service charge.
	//
	// Either `percentage` or `amount_money` should be set, but not both.
	AmountMoney *Money `json:"amount_money,omitempty" url:"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" url:"applied_money,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` because the inclusive
	// tax amount is already included in both `applied_money` and `total_tax_money`.
	TotalMoney *Money `json:"total_money,omitempty" url:"total_money,omitempty"`
	// The total amount of tax money to collect for the service charge.
	TotalTaxMoney *Money `json:"total_tax_money,omitempty" url:"total_tax_money,omitempty"`
	// The calculation phase after which to apply the service charge.
	// See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values
	CalculationPhase *OrderServiceChargeCalculationPhase `json:"calculation_phase,omitempty" url:"calculation_phase,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" url:"taxable,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 applied amount is
	// populated.
	AppliedTaxes []*OrderLineItemAppliedTax `json:"applied_taxes,omitempty" url:"applied_taxes,omitempty"`
	// The treatment type of the service charge.
	// See [OrderServiceChargeTreatmentType](#type-orderservicechargetreatmenttype) for possible values
	TreatmentType *OrderServiceChargeTreatmentType `json:"treatment_type,omitempty" url:"treatment_type,omitempty"`
	// Indicates the level at which the apportioned service charge applies. For `ORDER`
	// scoped service charges, Square generates references in `applied_service_charges` on
	// all order line items that do not have them. For `LINE_ITEM` scoped service charges,
	// the service charge only applies to line items with a service charge reference in their
	// `applied_service_charges` field.
	//
	// This field is immutable. To change the scope of an apportioned service charge, you must delete
	// the apportioned service charge and re-add it as a new apportioned service charge.
	// See [OrderServiceChargeScope](#type-orderservicechargescope) for possible values
	Scope *OrderServiceChargeScope `json:"scope,omitempty" url:"scope,omitempty"`
	// contains filtered or unexported fields
}

Represents the service charge applied to the original order.

func (*OrderReturnServiceCharge) GetAmountMoney

func (o *OrderReturnServiceCharge) GetAmountMoney() *Money

func (*OrderReturnServiceCharge) GetAppliedMoney

func (o *OrderReturnServiceCharge) GetAppliedMoney() *Money

func (*OrderReturnServiceCharge) GetAppliedTaxes

func (o *OrderReturnServiceCharge) GetAppliedTaxes() []*OrderLineItemAppliedTax

func (*OrderReturnServiceCharge) GetCalculationPhase

func (*OrderReturnServiceCharge) GetCatalogObjectID

func (o *OrderReturnServiceCharge) GetCatalogObjectID() *string

func (*OrderReturnServiceCharge) GetCatalogVersion

func (o *OrderReturnServiceCharge) GetCatalogVersion() *int64

func (*OrderReturnServiceCharge) GetExtraProperties

func (o *OrderReturnServiceCharge) GetExtraProperties() map[string]interface{}

func (*OrderReturnServiceCharge) GetName

func (o *OrderReturnServiceCharge) GetName() *string

func (*OrderReturnServiceCharge) GetPercentage

func (o *OrderReturnServiceCharge) GetPercentage() *string

func (*OrderReturnServiceCharge) GetScope

func (*OrderReturnServiceCharge) GetSourceServiceChargeUID

func (o *OrderReturnServiceCharge) GetSourceServiceChargeUID() *string

func (*OrderReturnServiceCharge) GetTaxable

func (o *OrderReturnServiceCharge) GetTaxable() *bool

func (*OrderReturnServiceCharge) GetTotalMoney

func (o *OrderReturnServiceCharge) GetTotalMoney() *Money

func (*OrderReturnServiceCharge) GetTotalTaxMoney

func (o *OrderReturnServiceCharge) GetTotalTaxMoney() *Money

func (*OrderReturnServiceCharge) GetTreatmentType

func (*OrderReturnServiceCharge) GetUID

func (o *OrderReturnServiceCharge) GetUID() *string

func (*OrderReturnServiceCharge) String

func (o *OrderReturnServiceCharge) String() string

func (*OrderReturnServiceCharge) UnmarshalJSON

func (o *OrderReturnServiceCharge) UnmarshalJSON(data []byte) error

type OrderReturnTax

type OrderReturnTax struct {
	// A unique ID that identifies the returned tax only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The tax `uid` from the order that contains the original tax charge.
	SourceTaxUID *string `json:"source_tax_uid,omitempty" url:"source_tax_uid,omitempty"`
	// The catalog object ID referencing [CatalogTax](entity:CatalogTax).
	CatalogObjectID *string `json:"catalog_object_id,omitempty" url:"catalog_object_id,omitempty"`
	// The version of the catalog object that this tax references.
	CatalogVersion *int64 `json:"catalog_version,omitempty" url:"catalog_version,omitempty"`
	// The tax's name.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Indicates the calculation method used to apply the tax.
	// See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values
	Type *OrderLineItemTaxType `json:"type,omitempty" url:"type,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%.
	Percentage *string `json:"percentage,omitempty" url:"percentage,omitempty"`
	// The amount of money applied by the tax in an order.
	AppliedMoney *Money `json:"applied_money,omitempty" url:"applied_money,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 is only applied to
	// `OrderReturnLineItem`s with references in their `applied_discounts` field.
	// See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values
	Scope *OrderLineItemTaxScope `json:"scope,omitempty" url:"scope,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*OrderReturnTax) GetAppliedMoney

func (o *OrderReturnTax) GetAppliedMoney() *Money

func (*OrderReturnTax) GetCatalogObjectID

func (o *OrderReturnTax) GetCatalogObjectID() *string

func (*OrderReturnTax) GetCatalogVersion

func (o *OrderReturnTax) GetCatalogVersion() *int64

func (*OrderReturnTax) GetExtraProperties

func (o *OrderReturnTax) GetExtraProperties() map[string]interface{}

func (*OrderReturnTax) GetName

func (o *OrderReturnTax) GetName() *string

func (*OrderReturnTax) GetPercentage

func (o *OrderReturnTax) GetPercentage() *string

func (*OrderReturnTax) GetScope

func (o *OrderReturnTax) GetScope() *OrderLineItemTaxScope

func (*OrderReturnTax) GetSourceTaxUID

func (o *OrderReturnTax) GetSourceTaxUID() *string

func (*OrderReturnTax) GetType

func (o *OrderReturnTax) GetType() *OrderLineItemTaxType

func (*OrderReturnTax) GetUID

func (o *OrderReturnTax) GetUID() *string

func (*OrderReturnTax) String

func (o *OrderReturnTax) String() string

func (*OrderReturnTax) UnmarshalJSON

func (o *OrderReturnTax) UnmarshalJSON(data []byte) error

type OrderReturnTip

type OrderReturnTip struct {
	// A unique ID that identifies the tip only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The amount of tip being returned
	// --
	AppliedMoney *Money `json:"applied_money,omitempty" url:"applied_money,omitempty"`
	// The tender `uid` from the order that contains the original application of this tip.
	SourceTenderUID *string `json:"source_tender_uid,omitempty" url:"source_tender_uid,omitempty"`
	// The tender `id` from the order that contains the original application of this tip.
	SourceTenderID *string `json:"source_tender_id,omitempty" url:"source_tender_id,omitempty"`
	// contains filtered or unexported fields
}

A tip being returned.

func (*OrderReturnTip) GetAppliedMoney

func (o *OrderReturnTip) GetAppliedMoney() *Money

func (*OrderReturnTip) GetExtraProperties

func (o *OrderReturnTip) GetExtraProperties() map[string]interface{}

func (*OrderReturnTip) GetSourceTenderID

func (o *OrderReturnTip) GetSourceTenderID() *string

func (*OrderReturnTip) GetSourceTenderUID

func (o *OrderReturnTip) GetSourceTenderUID() *string

func (*OrderReturnTip) GetUID

func (o *OrderReturnTip) GetUID() *string

func (*OrderReturnTip) String

func (o *OrderReturnTip) String() string

func (*OrderReturnTip) UnmarshalJSON

func (o *OrderReturnTip) UnmarshalJSON(data []byte) error

type OrderReward

type OrderReward struct {
	// The identifier of the reward.
	ID string `json:"id" url:"id"`
	// The identifier of the reward tier corresponding to this reward.
	RewardTierID string `json:"reward_tier_id" url:"reward_tier_id"`
	// contains filtered or unexported fields
}

Represents a reward that can be applied to an order if the necessary reward tier criteria are met. Rewards are created through the Loyalty API.

func (*OrderReward) GetExtraProperties

func (o *OrderReward) GetExtraProperties() map[string]interface{}

func (*OrderReward) GetID

func (o *OrderReward) GetID() string

func (*OrderReward) GetRewardTierID

func (o *OrderReward) GetRewardTierID() string

func (*OrderReward) String

func (o *OrderReward) String() string

func (*OrderReward) UnmarshalJSON

func (o *OrderReward) UnmarshalJSON(data []byte) error

type OrderRoundingAdjustment

type OrderRoundingAdjustment struct {
	// A unique ID that identifies the rounding adjustment only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The name of the rounding adjustment from the original sale order.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The actual rounding adjustment amount.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// contains filtered or unexported fields
}

A rounding adjustment of the money being returned. Commonly used to apply cash rounding when the minimum unit of the account is smaller than the lowest physical denomination of the currency.

func (*OrderRoundingAdjustment) GetAmountMoney

func (o *OrderRoundingAdjustment) GetAmountMoney() *Money

func (*OrderRoundingAdjustment) GetExtraProperties

func (o *OrderRoundingAdjustment) GetExtraProperties() map[string]interface{}

func (*OrderRoundingAdjustment) GetName

func (o *OrderRoundingAdjustment) GetName() *string

func (*OrderRoundingAdjustment) GetUID

func (o *OrderRoundingAdjustment) GetUID() *string

func (*OrderRoundingAdjustment) String

func (o *OrderRoundingAdjustment) String() string

func (*OrderRoundingAdjustment) UnmarshalJSON

func (o *OrderRoundingAdjustment) UnmarshalJSON(data []byte) error

type OrderServiceCharge

type OrderServiceCharge struct {
	// A unique ID that identifies the service charge only within this order.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// The name of the service charge.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The catalog object ID referencing the service charge [CatalogObject](entity:CatalogObject).
	CatalogObjectID *string `json:"catalog_object_id,omitempty" url:"catalog_object_id,omitempty"`
	// The version of the catalog object that this service charge references.
	CatalogVersion *int64 `json:"catalog_version,omitempty" url:"catalog_version,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.
	Percentage *string `json:"percentage,omitempty" url:"percentage,omitempty"`
	// 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" url:"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" url:"applied_money,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`
	// because the inclusive tax amount is already included in both
	// `applied_money` and `total_tax_money`.
	TotalMoney *Money `json:"total_money,omitempty" url:"total_money,omitempty"`
	// The total amount of tax money to collect for the service charge.
	TotalTaxMoney *Money `json:"total_tax_money,omitempty" url:"total_tax_money,omitempty"`
	// The calculation phase at which to apply the service charge.
	// See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values
	CalculationPhase *OrderServiceChargeCalculationPhase `json:"calculation_phase,omitempty" url:"calculation_phase,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" url:"taxable,omitempty"`
	// The list of references to the 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` is 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,omitempty" url:"applied_taxes,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 (such as personally
	// identifiable information or card details).
	//
	// Keys written by applications must be 60 characters or less and must be in the character set
	// `[a-zA-Z0-9_-]`. Entries can also include metadata generated by Square. These keys are prefixed
	// with a namespace, separated from the key with a ':' character.
	//
	// Values have a maximum length of 255 characters.
	//
	// An application can 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.
	//
	// For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata).
	Metadata map[string]*string `json:"metadata,omitempty" url:"metadata,omitempty"`
	// The type of the service charge.
	// See [OrderServiceChargeType](#type-orderservicechargetype) for possible values
	Type *OrderServiceChargeType `json:"type,omitempty" url:"type,omitempty"`
	// The treatment type of the service charge.
	// See [OrderServiceChargeTreatmentType](#type-orderservicechargetreatmenttype) for possible values
	TreatmentType *OrderServiceChargeTreatmentType `json:"treatment_type,omitempty" url:"treatment_type,omitempty"`
	// Indicates the level at which the apportioned service charge applies. For `ORDER`
	// scoped service charges, Square generates references in `applied_service_charges` on
	// all order line items that do not have them. For `LINE_ITEM` scoped service charges,
	// the service charge only applies to line items with a service charge reference in their
	// `applied_service_charges` field.
	//
	// This field is immutable. To change the scope of an apportioned service charge, you must delete
	// the apportioned service charge and re-add it as a new apportioned service charge.
	// See [OrderServiceChargeScope](#type-orderservicechargescope) for possible values
	Scope *OrderServiceChargeScope `json:"scope,omitempty" url:"scope,omitempty"`
	// contains filtered or unexported fields
}

Represents a service charge applied to an order.

func (*OrderServiceCharge) GetAmountMoney

func (o *OrderServiceCharge) GetAmountMoney() *Money

func (*OrderServiceCharge) GetAppliedMoney

func (o *OrderServiceCharge) GetAppliedMoney() *Money

func (*OrderServiceCharge) GetAppliedTaxes

func (o *OrderServiceCharge) GetAppliedTaxes() []*OrderLineItemAppliedTax

func (*OrderServiceCharge) GetCalculationPhase

func (o *OrderServiceCharge) GetCalculationPhase() *OrderServiceChargeCalculationPhase

func (*OrderServiceCharge) GetCatalogObjectID

func (o *OrderServiceCharge) GetCatalogObjectID() *string

func (*OrderServiceCharge) GetCatalogVersion

func (o *OrderServiceCharge) GetCatalogVersion() *int64

func (*OrderServiceCharge) GetExtraProperties

func (o *OrderServiceCharge) GetExtraProperties() map[string]interface{}

func (*OrderServiceCharge) GetMetadata

func (o *OrderServiceCharge) GetMetadata() map[string]*string

func (*OrderServiceCharge) GetName

func (o *OrderServiceCharge) GetName() *string

func (*OrderServiceCharge) GetPercentage

func (o *OrderServiceCharge) GetPercentage() *string

func (*OrderServiceCharge) GetScope

func (*OrderServiceCharge) GetTaxable

func (o *OrderServiceCharge) GetTaxable() *bool

func (*OrderServiceCharge) GetTotalMoney

func (o *OrderServiceCharge) GetTotalMoney() *Money

func (*OrderServiceCharge) GetTotalTaxMoney

func (o *OrderServiceCharge) GetTotalTaxMoney() *Money

func (*OrderServiceCharge) GetTreatmentType

func (o *OrderServiceCharge) GetTreatmentType() *OrderServiceChargeTreatmentType

func (*OrderServiceCharge) GetType

func (*OrderServiceCharge) GetUID

func (o *OrderServiceCharge) GetUID() *string

func (*OrderServiceCharge) String

func (o *OrderServiceCharge) String() string

func (*OrderServiceCharge) UnmarshalJSON

func (o *OrderServiceCharge) UnmarshalJSON(data []byte) error

type OrderServiceChargeCalculationPhase

type OrderServiceChargeCalculationPhase string

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/orders-api/how-it-works#how-totals-are-calculated)

const (
	OrderServiceChargeCalculationPhaseSubtotalPhase              OrderServiceChargeCalculationPhase = "SUBTOTAL_PHASE"
	OrderServiceChargeCalculationPhaseTotalPhase                 OrderServiceChargeCalculationPhase = "TOTAL_PHASE"
	OrderServiceChargeCalculationPhaseApportionedPercentagePhase OrderServiceChargeCalculationPhase = "APPORTIONED_PERCENTAGE_PHASE"
	OrderServiceChargeCalculationPhaseApportionedAmountPhase     OrderServiceChargeCalculationPhase = "APPORTIONED_AMOUNT_PHASE"
)

func NewOrderServiceChargeCalculationPhaseFromString

func NewOrderServiceChargeCalculationPhaseFromString(s string) (OrderServiceChargeCalculationPhase, error)

func (OrderServiceChargeCalculationPhase) Ptr

type OrderServiceChargeScope

type OrderServiceChargeScope string

Indicates whether this is a line-item or order-level apportioned service charge.

const (
	OrderServiceChargeScopeOtherServiceChargeScope OrderServiceChargeScope = "OTHER_SERVICE_CHARGE_SCOPE"
	OrderServiceChargeScopeLineItem                OrderServiceChargeScope = "LINE_ITEM"
	OrderServiceChargeScopeOrder                   OrderServiceChargeScope = "ORDER"
)

func NewOrderServiceChargeScopeFromString

func NewOrderServiceChargeScopeFromString(s string) (OrderServiceChargeScope, error)

func (OrderServiceChargeScope) Ptr

type OrderServiceChargeTreatmentType

type OrderServiceChargeTreatmentType string

Indicates whether the service charge will be treated as a value-holding line item or apportioned toward a line item.

const (
	OrderServiceChargeTreatmentTypeLineItemTreatment    OrderServiceChargeTreatmentType = "LINE_ITEM_TREATMENT"
	OrderServiceChargeTreatmentTypeApportionedTreatment OrderServiceChargeTreatmentType = "APPORTIONED_TREATMENT"
)

func NewOrderServiceChargeTreatmentTypeFromString

func NewOrderServiceChargeTreatmentTypeFromString(s string) (OrderServiceChargeTreatmentType, error)

func (OrderServiceChargeTreatmentType) Ptr

type OrderServiceChargeType

type OrderServiceChargeType string
const (
	OrderServiceChargeTypeAutoGratuity OrderServiceChargeType = "AUTO_GRATUITY"
	OrderServiceChargeTypeCustom       OrderServiceChargeType = "CUSTOM"
)

func NewOrderServiceChargeTypeFromString

func NewOrderServiceChargeTypeFromString(s string) (OrderServiceChargeType, error)

func (OrderServiceChargeType) Ptr

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" url:"name,omitempty"`
	// contains filtered or unexported fields
}

Represents the origination details of an order.

func (*OrderSource) GetExtraProperties

func (o *OrderSource) GetExtraProperties() map[string]interface{}

func (*OrderSource) GetName

func (o *OrderSource) GetName() *string

func (*OrderSource) String

func (o *OrderSource) String() string

func (*OrderSource) UnmarshalJSON

func (o *OrderSource) UnmarshalJSON(data []byte) error

type OrderState

type OrderState string

The state of the order.

const (
	OrderStateOpen      OrderState = "OPEN"
	OrderStateCompleted OrderState = "COMPLETED"
	OrderStateCanceled  OrderState = "CANCELED"
	OrderStateDraft     OrderState = "DRAFT"
)

func NewOrderStateFromString

func NewOrderStateFromString(s string) (OrderState, error)

func (OrderState) Ptr

func (o OrderState) Ptr() *OrderState

type OrdersGetRequest

type OrdersGetRequest = GetOrdersRequest

OrdersGetRequest is an alias for GetOrdersRequest.

type PauseSubscriptionRequest

type PauseSubscriptionRequest struct {
	// The ID of the subscription to pause.
	SubscriptionID string `json:"-" url:"-"`
	// The `YYYY-MM-DD`-formatted date when the scheduled `PAUSE` action takes place on the subscription.
	//
	// When this date is unspecified or falls within the current billing cycle, the subscription is paused
	// on the starting date of the next billing cycle.
	PauseEffectiveDate *string `json:"pause_effective_date,omitempty" url:"-"`
	// The number of billing cycles the subscription will be paused before it is reactivated.
	//
	// When this is set, a `RESUME` action is also scheduled to take place on the subscription at
	// the end of the specified pause cycle duration. In this case, neither `resume_effective_date`
	// nor `resume_change_timing` may be specified.
	PauseCycleDuration *int64 `json:"pause_cycle_duration,omitempty" url:"-"`
	// The date when the subscription is reactivated by a scheduled `RESUME` action.
	// This date must be at least one billing cycle ahead of `pause_effective_date`.
	ResumeEffectiveDate *string `json:"resume_effective_date,omitempty" url:"-"`
	// The timing whether the subscription is reactivated immediately or at the end of the billing cycle, relative to
	// `resume_effective_date`.
	// See [ChangeTiming](#type-changetiming) for possible values
	ResumeChangeTiming *ChangeTiming `json:"resume_change_timing,omitempty" url:"-"`
	// The user-provided reason to pause the subscription.
	PauseReason *string `json:"pause_reason,omitempty" url:"-"`
}

type PauseSubscriptionResponse

type PauseSubscriptionResponse struct {
	// Errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The subscription to be paused by the scheduled `PAUSE` action.
	Subscription *Subscription `json:"subscription,omitempty" url:"subscription,omitempty"`
	// The list of a `PAUSE` action and a possible `RESUME` action created by the request.
	Actions []*SubscriptionAction `json:"actions,omitempty" url:"actions,omitempty"`
	// contains filtered or unexported fields
}

Defines output parameters in a response from the [PauseSubscription](api-endpoint:Subscriptions-PauseSubscription) endpoint.

func (*PauseSubscriptionResponse) GetActions

func (p *PauseSubscriptionResponse) GetActions() []*SubscriptionAction

func (*PauseSubscriptionResponse) GetErrors

func (p *PauseSubscriptionResponse) GetErrors() []*Error

func (*PauseSubscriptionResponse) GetExtraProperties

func (p *PauseSubscriptionResponse) GetExtraProperties() map[string]interface{}

func (*PauseSubscriptionResponse) GetSubscription

func (p *PauseSubscriptionResponse) GetSubscription() *Subscription

func (*PauseSubscriptionResponse) String

func (p *PauseSubscriptionResponse) String() string

func (*PauseSubscriptionResponse) UnmarshalJSON

func (p *PauseSubscriptionResponse) UnmarshalJSON(data []byte) error

type PayOrderRequest

type PayOrderRequest struct {
	// The ID of the order being paid.
	OrderID string `json:"-" url:"-"`
	// A value you specify that uniquely identifies this request among requests you have sent. If
	// you are unsure whether a particular payment request was completed successfully, you can reattempt
	// it with the same idempotency key without worrying about duplicate payments.
	//
	// For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).
	IdempotencyKey string `json:"idempotency_key" url:"-"`
	// The version of the order being paid. If not supplied, the latest version will be paid.
	OrderVersion *int `json:"order_version,omitempty" url:"-"`
	// The IDs of the [payments](entity:Payment) to collect.
	// The payment total must match the order total.
	PaymentIDs []string `json:"payment_ids,omitempty" url:"-"`
}

type PayOrderResponse

type PayOrderResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The paid, updated [order](entity:Order).
	Order *Order `json:"order,omitempty" url:"order,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [PayOrder](api-endpoint:Orders-PayOrder) endpoint.

func (*PayOrderResponse) GetErrors

func (p *PayOrderResponse) GetErrors() []*Error

func (*PayOrderResponse) GetExtraProperties

func (p *PayOrderResponse) GetExtraProperties() map[string]interface{}

func (*PayOrderResponse) GetOrder

func (p *PayOrderResponse) GetOrder() *Order

func (*PayOrderResponse) String

func (p *PayOrderResponse) String() string

func (*PayOrderResponse) UnmarshalJSON

func (p *PayOrderResponse) UnmarshalJSON(data []byte) error

type Payment

type Payment struct {
	// A unique ID for the payment.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The timestamp of when the payment was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp of when the payment was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// 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" url:"amount_money,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" url:"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" url:"total_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.
	//
	// To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required.
	// For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions).
	AppFeeMoney *Money `json:"app_fee_money,omitempty" url:"app_fee_money,omitempty"`
	// The amount of money approved for this payment. This value may change if Square chooses to
	// obtain reauthorization as part of a call to [UpdatePayment](api-endpoint:Payments-UpdatePayment).
	ApprovedMoney *Money `json:"approved_money,omitempty" url:"approved_money,omitempty"`
	// The processing fees and fee adjustments assessed by Square for this payment.
	ProcessingFee []*ProcessingFee `json:"processing_fee,omitempty" url:"processing_fee,omitempty"`
	// 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" url:"refunded_money,omitempty"`
	// Indicates whether the payment is APPROVED, PENDING, COMPLETED, CANCELED, or FAILED.
	Status *string `json:"status,omitempty" url:"status,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" url:"delay_duration,omitempty"`
	// The action to be applied to the payment when the `delay_duration` has elapsed.
	//
	// Current values include `CANCEL` and `COMPLETE`.
	DelayAction *string `json:"delay_action,omitempty" url:"delay_action,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" url:"delayed_until,omitempty"`
	// The source type for this payment.
	//
	// Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `BUY_NOW_PAY_LATER`, `SQUARE_ACCOUNT`,
	// `CASH` and `EXTERNAL`. For information about these payment source types,
	// see [Take Payments](https://developer.squareup.com/docs/payments-api/take-payments).
	SourceType *string `json:"source_type,omitempty" url:"source_type,omitempty"`
	// Details about a card payment. These details are only populated if the source_type is `CARD`.
	CardDetails *CardPaymentDetails `json:"card_details,omitempty" url:"card_details,omitempty"`
	// Details about a cash payment. These details are only populated if the source_type is `CASH`.
	CashDetails *CashPaymentDetails `json:"cash_details,omitempty" url:"cash_details,omitempty"`
	// Details about a bank account payment. These details are only populated if the source_type is `BANK_ACCOUNT`.
	BankAccountDetails *BankAccountPaymentDetails `json:"bank_account_details,omitempty" url:"bank_account_details,omitempty"`
	// Details about an external payment. The details are only populated
	// if the `source_type` is `EXTERNAL`.
	ExternalDetails *ExternalPaymentDetails `json:"external_details,omitempty" url:"external_details,omitempty"`
	// Details about an wallet payment. The details are only populated
	// if the `source_type` is `WALLET`.
	WalletDetails *DigitalWalletDetails `json:"wallet_details,omitempty" url:"wallet_details,omitempty"`
	// Details about a Buy Now Pay Later payment. The details are only populated
	// if the `source_type` is `BUY_NOW_PAY_LATER`. For more information, see
	// [Afterpay Payments](https://developer.squareup.com/docs/payments-api/take-payments/afterpay-payments).
	BuyNowPayLaterDetails *BuyNowPayLaterDetails `json:"buy_now_pay_later_details,omitempty" url:"buy_now_pay_later_details,omitempty"`
	// Details about a Square Account payment. The details are only populated
	// if the `source_type` is `SQUARE_ACCOUNT`.
	SquareAccountDetails *SquareAccountDetails `json:"square_account_details,omitempty" url:"square_account_details,omitempty"`
	// The ID of the location associated with the payment.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The ID of the order associated with the payment.
	OrderID *string `json:"order_id,omitempty" url:"order_id,omitempty"`
	// An optional ID that associates the payment with an entity in
	// another system.
	ReferenceID *string `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// The ID of the customer associated with the payment. If the ID is
	// not provided in the `CreatePayment` request that was used to create the `Payment`,
	// Square may use information in the request
	// (such as the billing and shipping address, email address, and payment source)
	// to identify a matching customer profile in the Customer Directory.
	// If found, the profile ID is used. If a profile is not found, the
	// API attempts to create an
	// [instant profile](https://developer.squareup.com/docs/customers-api/what-it-does#instant-profiles).
	// If the API cannot create an
	// instant profile (either because the seller has disabled it or the
	// seller's region prevents creating it), this field remains unset. Note that
	// this process is asynchronous and it may take some time before a
	// customer ID is added to the payment.
	CustomerID *string `json:"customer_id,omitempty" url:"customer_id,omitempty"`
	// __Deprecated__: Use `Payment.team_member_id` instead.
	//
	// An optional ID of the employee associated with taking the payment.
	EmployeeID *string `json:"employee_id,omitempty" url:"employee_id,omitempty"`
	// An optional ID of the [TeamMember](entity:TeamMember) associated with taking the payment.
	TeamMemberID *string `json:"team_member_id,omitempty" url:"team_member_id,omitempty"`
	// A list of `refund_id`s identifying refunds for the payment.
	RefundIDs []string `json:"refund_ids,omitempty" url:"refund_ids,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" url:"risk_evaluation,omitempty"`
	// An optional ID for a Terminal checkout that is associated with the payment.
	TerminalCheckoutID *string `json:"terminal_checkout_id,omitempty" url:"terminal_checkout_id,omitempty"`
	// The buyer's email address.
	BuyerEmailAddress *string `json:"buyer_email_address,omitempty" url:"buyer_email_address,omitempty"`
	// The buyer's billing address.
	BillingAddress *Address `json:"billing_address,omitempty" url:"billing_address,omitempty"`
	// The buyer's shipping address.
	ShippingAddress *Address `json:"shipping_address,omitempty" url:"shipping_address,omitempty"`
	// An optional note to include when creating a payment.
	Note *string `json:"note,omitempty" url:"note,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" url:"statement_description_identifier,omitempty"`
	// Actions that can be performed on this payment:
	// - `EDIT_AMOUNT_UP` - The payment amount can be edited up.
	// - `EDIT_AMOUNT_DOWN` - The payment amount can be edited down.
	// - `EDIT_TIP_AMOUNT_UP` - The tip amount can be edited up.
	// - `EDIT_TIP_AMOUNT_DOWN` - The tip amount can be edited down.
	// - `EDIT_DELAY_ACTION` - The delay_action can be edited.
	Capabilities []string `json:"capabilities,omitempty" url:"capabilities,omitempty"`
	// The payment's receipt number.
	// The field is missing if a payment is canceled.
	ReceiptNumber *string `json:"receipt_number,omitempty" url:"receipt_number,omitempty"`
	// The URL for the payment's receipt.
	// The field is only populated for COMPLETED payments.
	ReceiptURL *string `json:"receipt_url,omitempty" url:"receipt_url,omitempty"`
	// Details about the device that took the payment.
	DeviceDetails *DeviceDetails `json:"device_details,omitempty" url:"device_details,omitempty"`
	// Details about the application that took the payment.
	ApplicationDetails *ApplicationDetails `json:"application_details,omitempty" url:"application_details,omitempty"`
	// Whether or not this payment was taken offline.
	IsOfflinePayment *bool `json:"is_offline_payment,omitempty" url:"is_offline_payment,omitempty"`
	// Additional information about the payment if it was taken offline.
	OfflinePaymentDetails *OfflinePaymentDetails `json:"offline_payment_details,omitempty" url:"offline_payment_details,omitempty"`
	// Used for optimistic concurrency. This opaque token identifies a specific version of the
	// `Payment` object.
	VersionToken *string `json:"version_token,omitempty" url:"version_token,omitempty"`
	// contains filtered or unexported fields
}

Represents a payment processed by the Square API.

func (*Payment) GetAmountMoney

func (p *Payment) GetAmountMoney() *Money

func (*Payment) GetAppFeeMoney

func (p *Payment) GetAppFeeMoney() *Money

func (*Payment) GetApplicationDetails

func (p *Payment) GetApplicationDetails() *ApplicationDetails

func (*Payment) GetApprovedMoney

func (p *Payment) GetApprovedMoney() *Money

func (*Payment) GetBankAccountDetails

func (p *Payment) GetBankAccountDetails() *BankAccountPaymentDetails

func (*Payment) GetBillingAddress

func (p *Payment) GetBillingAddress() *Address

func (*Payment) GetBuyNowPayLaterDetails

func (p *Payment) GetBuyNowPayLaterDetails() *BuyNowPayLaterDetails

func (*Payment) GetBuyerEmailAddress

func (p *Payment) GetBuyerEmailAddress() *string

func (*Payment) GetCapabilities

func (p *Payment) GetCapabilities() []string

func (*Payment) GetCardDetails

func (p *Payment) GetCardDetails() *CardPaymentDetails

func (*Payment) GetCashDetails

func (p *Payment) GetCashDetails() *CashPaymentDetails

func (*Payment) GetCreatedAt

func (p *Payment) GetCreatedAt() *string

func (*Payment) GetCustomerID

func (p *Payment) GetCustomerID() *string

func (*Payment) GetDelayAction

func (p *Payment) GetDelayAction() *string

func (*Payment) GetDelayDuration

func (p *Payment) GetDelayDuration() *string

func (*Payment) GetDelayedUntil

func (p *Payment) GetDelayedUntil() *string

func (*Payment) GetDeviceDetails

func (p *Payment) GetDeviceDetails() *DeviceDetails

func (*Payment) GetEmployeeID

func (p *Payment) GetEmployeeID() *string

func (*Payment) GetExternalDetails

func (p *Payment) GetExternalDetails() *ExternalPaymentDetails

func (*Payment) GetExtraProperties

func (p *Payment) GetExtraProperties() map[string]interface{}

func (*Payment) GetID

func (p *Payment) GetID() *string

func (*Payment) GetIsOfflinePayment

func (p *Payment) GetIsOfflinePayment() *bool

func (*Payment) GetLocationID

func (p *Payment) GetLocationID() *string

func (*Payment) GetNote

func (p *Payment) GetNote() *string

func (*Payment) GetOfflinePaymentDetails

func (p *Payment) GetOfflinePaymentDetails() *OfflinePaymentDetails

func (*Payment) GetOrderID

func (p *Payment) GetOrderID() *string

func (*Payment) GetProcessingFee

func (p *Payment) GetProcessingFee() []*ProcessingFee

func (*Payment) GetReceiptNumber

func (p *Payment) GetReceiptNumber() *string

func (*Payment) GetReceiptURL

func (p *Payment) GetReceiptURL() *string

func (*Payment) GetReferenceID

func (p *Payment) GetReferenceID() *string

func (*Payment) GetRefundIDs

func (p *Payment) GetRefundIDs() []string

func (*Payment) GetRefundedMoney

func (p *Payment) GetRefundedMoney() *Money

func (*Payment) GetRiskEvaluation

func (p *Payment) GetRiskEvaluation() *RiskEvaluation

func (*Payment) GetShippingAddress

func (p *Payment) GetShippingAddress() *Address

func (*Payment) GetSourceType

func (p *Payment) GetSourceType() *string

func (*Payment) GetSquareAccountDetails

func (p *Payment) GetSquareAccountDetails() *SquareAccountDetails

func (*Payment) GetStatementDescriptionIdentifier

func (p *Payment) GetStatementDescriptionIdentifier() *string

func (*Payment) GetStatus

func (p *Payment) GetStatus() *string

func (*Payment) GetTeamMemberID

func (p *Payment) GetTeamMemberID() *string

func (*Payment) GetTerminalCheckoutID

func (p *Payment) GetTerminalCheckoutID() *string

func (*Payment) GetTipMoney

func (p *Payment) GetTipMoney() *Money

func (*Payment) GetTotalMoney

func (p *Payment) GetTotalMoney() *Money

func (*Payment) GetUpdatedAt

func (p *Payment) GetUpdatedAt() *string

func (*Payment) GetVersionToken

func (p *Payment) GetVersionToken() *string

func (*Payment) GetWalletDetails

func (p *Payment) GetWalletDetails() *DigitalWalletDetails

func (*Payment) String

func (p *Payment) String() string

func (*Payment) UnmarshalJSON

func (p *Payment) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityAppFeeRefundDetail

type PaymentBalanceActivityAppFeeRefundDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// The ID of the refund associated with this activity.
	RefundID *string `json:"refund_id,omitempty" url:"refund_id,omitempty"`
	// The ID of the location of the merchant associated with the payment refund activity
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityAppFeeRefundDetail) GetExtraProperties

func (p *PaymentBalanceActivityAppFeeRefundDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityAppFeeRefundDetail) GetLocationID

func (*PaymentBalanceActivityAppFeeRefundDetail) GetPaymentID

func (*PaymentBalanceActivityAppFeeRefundDetail) GetRefundID

func (*PaymentBalanceActivityAppFeeRefundDetail) String

func (*PaymentBalanceActivityAppFeeRefundDetail) UnmarshalJSON

func (p *PaymentBalanceActivityAppFeeRefundDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityAppFeeRevenueDetail

type PaymentBalanceActivityAppFeeRevenueDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// The ID of the location of the merchant associated with the payment activity
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityAppFeeRevenueDetail) GetExtraProperties

func (p *PaymentBalanceActivityAppFeeRevenueDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityAppFeeRevenueDetail) GetLocationID

func (*PaymentBalanceActivityAppFeeRevenueDetail) GetPaymentID

func (*PaymentBalanceActivityAppFeeRevenueDetail) String

func (*PaymentBalanceActivityAppFeeRevenueDetail) UnmarshalJSON

func (p *PaymentBalanceActivityAppFeeRevenueDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityAutomaticSavingsDetail

type PaymentBalanceActivityAutomaticSavingsDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// The ID of the payout associated with this activity.
	PayoutID *string `json:"payout_id,omitempty" url:"payout_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityAutomaticSavingsDetail) GetExtraProperties

func (p *PaymentBalanceActivityAutomaticSavingsDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityAutomaticSavingsDetail) GetPaymentID

func (*PaymentBalanceActivityAutomaticSavingsDetail) GetPayoutID

func (*PaymentBalanceActivityAutomaticSavingsDetail) String

func (*PaymentBalanceActivityAutomaticSavingsDetail) UnmarshalJSON

func (p *PaymentBalanceActivityAutomaticSavingsDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityAutomaticSavingsReversedDetail

type PaymentBalanceActivityAutomaticSavingsReversedDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// The ID of the payout associated with this activity.
	PayoutID *string `json:"payout_id,omitempty" url:"payout_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityAutomaticSavingsReversedDetail) GetExtraProperties

func (p *PaymentBalanceActivityAutomaticSavingsReversedDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityAutomaticSavingsReversedDetail) GetPaymentID

func (*PaymentBalanceActivityAutomaticSavingsReversedDetail) GetPayoutID

func (*PaymentBalanceActivityAutomaticSavingsReversedDetail) String

func (*PaymentBalanceActivityAutomaticSavingsReversedDetail) UnmarshalJSON

type PaymentBalanceActivityChargeDetail

type PaymentBalanceActivityChargeDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityChargeDetail) GetExtraProperties

func (p *PaymentBalanceActivityChargeDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityChargeDetail) GetPaymentID

func (p *PaymentBalanceActivityChargeDetail) GetPaymentID() *string

func (*PaymentBalanceActivityChargeDetail) String

func (*PaymentBalanceActivityChargeDetail) UnmarshalJSON

func (p *PaymentBalanceActivityChargeDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityDepositFeeDetail

type PaymentBalanceActivityDepositFeeDetail struct {
	// The ID of the payout that triggered this deposit fee activity.
	PayoutID *string `json:"payout_id,omitempty" url:"payout_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityDepositFeeDetail) GetExtraProperties

func (p *PaymentBalanceActivityDepositFeeDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityDepositFeeDetail) GetPayoutID

func (*PaymentBalanceActivityDepositFeeDetail) String

func (*PaymentBalanceActivityDepositFeeDetail) UnmarshalJSON

func (p *PaymentBalanceActivityDepositFeeDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityDepositFeeReversedDetail

type PaymentBalanceActivityDepositFeeReversedDetail struct {
	// The ID of the payout that triggered this deposit fee activity.
	PayoutID *string `json:"payout_id,omitempty" url:"payout_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityDepositFeeReversedDetail) GetExtraProperties

func (p *PaymentBalanceActivityDepositFeeReversedDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityDepositFeeReversedDetail) GetPayoutID

func (*PaymentBalanceActivityDepositFeeReversedDetail) String

func (*PaymentBalanceActivityDepositFeeReversedDetail) UnmarshalJSON

type PaymentBalanceActivityDisputeDetail

type PaymentBalanceActivityDisputeDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// The ID of the dispute associated with this activity.
	DisputeID *string `json:"dispute_id,omitempty" url:"dispute_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityDisputeDetail) GetDisputeID

func (p *PaymentBalanceActivityDisputeDetail) GetDisputeID() *string

func (*PaymentBalanceActivityDisputeDetail) GetExtraProperties

func (p *PaymentBalanceActivityDisputeDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityDisputeDetail) GetPaymentID

func (p *PaymentBalanceActivityDisputeDetail) GetPaymentID() *string

func (*PaymentBalanceActivityDisputeDetail) String

func (*PaymentBalanceActivityDisputeDetail) UnmarshalJSON

func (p *PaymentBalanceActivityDisputeDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityFeeDetail

type PaymentBalanceActivityFeeDetail struct {
	// The ID of the payment associated with this activity
	// This will only be populated when a principal LedgerEntryToken is also populated.
	// If the fee is independent (there is no principal LedgerEntryToken) then this will likely not
	// be populated.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityFeeDetail) GetExtraProperties

func (p *PaymentBalanceActivityFeeDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityFeeDetail) GetPaymentID

func (p *PaymentBalanceActivityFeeDetail) GetPaymentID() *string

func (*PaymentBalanceActivityFeeDetail) String

func (*PaymentBalanceActivityFeeDetail) UnmarshalJSON

func (p *PaymentBalanceActivityFeeDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityFreeProcessingDetail

type PaymentBalanceActivityFreeProcessingDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityFreeProcessingDetail) GetExtraProperties

func (p *PaymentBalanceActivityFreeProcessingDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityFreeProcessingDetail) GetPaymentID

func (*PaymentBalanceActivityFreeProcessingDetail) String

func (*PaymentBalanceActivityFreeProcessingDetail) UnmarshalJSON

func (p *PaymentBalanceActivityFreeProcessingDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityHoldAdjustmentDetail

type PaymentBalanceActivityHoldAdjustmentDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityHoldAdjustmentDetail) GetExtraProperties

func (p *PaymentBalanceActivityHoldAdjustmentDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityHoldAdjustmentDetail) GetPaymentID

func (*PaymentBalanceActivityHoldAdjustmentDetail) String

func (*PaymentBalanceActivityHoldAdjustmentDetail) UnmarshalJSON

func (p *PaymentBalanceActivityHoldAdjustmentDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityOpenDisputeDetail

type PaymentBalanceActivityOpenDisputeDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// The ID of the dispute associated with this activity.
	DisputeID *string `json:"dispute_id,omitempty" url:"dispute_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityOpenDisputeDetail) GetDisputeID

func (*PaymentBalanceActivityOpenDisputeDetail) GetExtraProperties

func (p *PaymentBalanceActivityOpenDisputeDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityOpenDisputeDetail) GetPaymentID

func (*PaymentBalanceActivityOpenDisputeDetail) String

func (*PaymentBalanceActivityOpenDisputeDetail) UnmarshalJSON

func (p *PaymentBalanceActivityOpenDisputeDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityOtherAdjustmentDetail

type PaymentBalanceActivityOtherAdjustmentDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityOtherAdjustmentDetail) GetExtraProperties

func (p *PaymentBalanceActivityOtherAdjustmentDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityOtherAdjustmentDetail) GetPaymentID

func (*PaymentBalanceActivityOtherAdjustmentDetail) String

func (*PaymentBalanceActivityOtherAdjustmentDetail) UnmarshalJSON

func (p *PaymentBalanceActivityOtherAdjustmentDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityOtherDetail

type PaymentBalanceActivityOtherDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityOtherDetail) GetExtraProperties

func (p *PaymentBalanceActivityOtherDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityOtherDetail) GetPaymentID

func (p *PaymentBalanceActivityOtherDetail) GetPaymentID() *string

func (*PaymentBalanceActivityOtherDetail) String

func (*PaymentBalanceActivityOtherDetail) UnmarshalJSON

func (p *PaymentBalanceActivityOtherDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityRefundDetail

type PaymentBalanceActivityRefundDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// The ID of the refund associated with this activity.
	RefundID *string `json:"refund_id,omitempty" url:"refund_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityRefundDetail) GetExtraProperties

func (p *PaymentBalanceActivityRefundDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityRefundDetail) GetPaymentID

func (p *PaymentBalanceActivityRefundDetail) GetPaymentID() *string

func (*PaymentBalanceActivityRefundDetail) GetRefundID

func (p *PaymentBalanceActivityRefundDetail) GetRefundID() *string

func (*PaymentBalanceActivityRefundDetail) String

func (*PaymentBalanceActivityRefundDetail) UnmarshalJSON

func (p *PaymentBalanceActivityRefundDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityReleaseAdjustmentDetail

type PaymentBalanceActivityReleaseAdjustmentDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityReleaseAdjustmentDetail) GetExtraProperties

func (p *PaymentBalanceActivityReleaseAdjustmentDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityReleaseAdjustmentDetail) GetPaymentID

func (*PaymentBalanceActivityReleaseAdjustmentDetail) String

func (*PaymentBalanceActivityReleaseAdjustmentDetail) UnmarshalJSON

func (p *PaymentBalanceActivityReleaseAdjustmentDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityReserveHoldDetail

type PaymentBalanceActivityReserveHoldDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityReserveHoldDetail) GetExtraProperties

func (p *PaymentBalanceActivityReserveHoldDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityReserveHoldDetail) GetPaymentID

func (*PaymentBalanceActivityReserveHoldDetail) String

func (*PaymentBalanceActivityReserveHoldDetail) UnmarshalJSON

func (p *PaymentBalanceActivityReserveHoldDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityReserveReleaseDetail

type PaymentBalanceActivityReserveReleaseDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityReserveReleaseDetail) GetExtraProperties

func (p *PaymentBalanceActivityReserveReleaseDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityReserveReleaseDetail) GetPaymentID

func (*PaymentBalanceActivityReserveReleaseDetail) String

func (*PaymentBalanceActivityReserveReleaseDetail) UnmarshalJSON

func (p *PaymentBalanceActivityReserveReleaseDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivitySquareCapitalPaymentDetail

type PaymentBalanceActivitySquareCapitalPaymentDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivitySquareCapitalPaymentDetail) GetExtraProperties

func (p *PaymentBalanceActivitySquareCapitalPaymentDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivitySquareCapitalPaymentDetail) GetPaymentID

func (*PaymentBalanceActivitySquareCapitalPaymentDetail) String

func (*PaymentBalanceActivitySquareCapitalPaymentDetail) UnmarshalJSON

type PaymentBalanceActivitySquareCapitalReversedPaymentDetail

type PaymentBalanceActivitySquareCapitalReversedPaymentDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivitySquareCapitalReversedPaymentDetail) GetExtraProperties

func (p *PaymentBalanceActivitySquareCapitalReversedPaymentDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivitySquareCapitalReversedPaymentDetail) GetPaymentID

func (*PaymentBalanceActivitySquareCapitalReversedPaymentDetail) String

func (*PaymentBalanceActivitySquareCapitalReversedPaymentDetail) UnmarshalJSON

type PaymentBalanceActivitySquarePayrollTransferDetail

type PaymentBalanceActivitySquarePayrollTransferDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivitySquarePayrollTransferDetail) GetExtraProperties

func (p *PaymentBalanceActivitySquarePayrollTransferDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivitySquarePayrollTransferDetail) GetPaymentID

func (*PaymentBalanceActivitySquarePayrollTransferDetail) String

func (*PaymentBalanceActivitySquarePayrollTransferDetail) UnmarshalJSON

type PaymentBalanceActivitySquarePayrollTransferReversedDetail

type PaymentBalanceActivitySquarePayrollTransferReversedDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivitySquarePayrollTransferReversedDetail) GetExtraProperties

func (p *PaymentBalanceActivitySquarePayrollTransferReversedDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivitySquarePayrollTransferReversedDetail) GetPaymentID

func (*PaymentBalanceActivitySquarePayrollTransferReversedDetail) String

func (*PaymentBalanceActivitySquarePayrollTransferReversedDetail) UnmarshalJSON

type PaymentBalanceActivityTaxOnFeeDetail

type PaymentBalanceActivityTaxOnFeeDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// The description of the tax rate being applied. For example: "GST", "HST".
	TaxRateDescription *string `json:"tax_rate_description,omitempty" url:"tax_rate_description,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityTaxOnFeeDetail) GetExtraProperties

func (p *PaymentBalanceActivityTaxOnFeeDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityTaxOnFeeDetail) GetPaymentID

func (p *PaymentBalanceActivityTaxOnFeeDetail) GetPaymentID() *string

func (*PaymentBalanceActivityTaxOnFeeDetail) GetTaxRateDescription

func (p *PaymentBalanceActivityTaxOnFeeDetail) GetTaxRateDescription() *string

func (*PaymentBalanceActivityTaxOnFeeDetail) String

func (*PaymentBalanceActivityTaxOnFeeDetail) UnmarshalJSON

func (p *PaymentBalanceActivityTaxOnFeeDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityThirdPartyFeeDetail

type PaymentBalanceActivityThirdPartyFeeDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityThirdPartyFeeDetail) GetExtraProperties

func (p *PaymentBalanceActivityThirdPartyFeeDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityThirdPartyFeeDetail) GetPaymentID

func (*PaymentBalanceActivityThirdPartyFeeDetail) String

func (*PaymentBalanceActivityThirdPartyFeeDetail) UnmarshalJSON

func (p *PaymentBalanceActivityThirdPartyFeeDetail) UnmarshalJSON(data []byte) error

type PaymentBalanceActivityThirdPartyFeeRefundDetail

type PaymentBalanceActivityThirdPartyFeeRefundDetail struct {
	// The ID of the payment associated with this activity.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// The public refund id associated with this activity.
	RefundID *string `json:"refund_id,omitempty" url:"refund_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentBalanceActivityThirdPartyFeeRefundDetail) GetExtraProperties

func (p *PaymentBalanceActivityThirdPartyFeeRefundDetail) GetExtraProperties() map[string]interface{}

func (*PaymentBalanceActivityThirdPartyFeeRefundDetail) GetPaymentID

func (*PaymentBalanceActivityThirdPartyFeeRefundDetail) GetRefundID

func (*PaymentBalanceActivityThirdPartyFeeRefundDetail) String

func (*PaymentBalanceActivityThirdPartyFeeRefundDetail) UnmarshalJSON

type PaymentLink struct {
	// The Square-assigned ID of the payment link.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The Square-assigned version number, which is incremented each time an update is committed to the payment link.
	Version int `json:"version" url:"version"`
	// The optional description of the `payment_link` object.
	// It is primarily for use by your application and is not used anywhere.
	Description *string `json:"description,omitempty" url:"description,omitempty"`
	// The ID of the order associated with the payment link.
	OrderID *string `json:"order_id,omitempty" url:"order_id,omitempty"`
	// The checkout options configured for the payment link.
	// For more information, see [Optional Checkout Configurations](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations).
	CheckoutOptions *CheckoutOptions `json:"checkout_options,omitempty" url:"checkout_options,omitempty"`
	// Describes buyer data to prepopulate
	// on the checkout page.
	PrePopulatedData *PrePopulatedData `json:"pre_populated_data,omitempty" url:"pre_populated_data,omitempty"`
	// The shortened URL of the payment link.
	URL *string `json:"url,omitempty" url:"url,omitempty"`
	// The long URL of the payment link.
	LongURL *string `json:"long_url,omitempty" url:"long_url,omitempty"`
	// The timestamp when the payment link was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp when the payment link was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// An optional note. After Square processes the payment, this note is added to the
	// resulting `Payment`.
	PaymentNote *string `json:"payment_note,omitempty" url:"payment_note,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentLink) GetCheckoutOptions

func (p *PaymentLink) GetCheckoutOptions() *CheckoutOptions

func (*PaymentLink) GetCreatedAt

func (p *PaymentLink) GetCreatedAt() *string

func (*PaymentLink) GetDescription

func (p *PaymentLink) GetDescription() *string

func (*PaymentLink) GetExtraProperties

func (p *PaymentLink) GetExtraProperties() map[string]interface{}

func (*PaymentLink) GetID

func (p *PaymentLink) GetID() *string

func (*PaymentLink) GetLongURL

func (p *PaymentLink) GetLongURL() *string

func (*PaymentLink) GetOrderID

func (p *PaymentLink) GetOrderID() *string

func (*PaymentLink) GetPaymentNote

func (p *PaymentLink) GetPaymentNote() *string

func (*PaymentLink) GetPrePopulatedData

func (p *PaymentLink) GetPrePopulatedData() *PrePopulatedData

func (*PaymentLink) GetURL

func (p *PaymentLink) GetURL() *string

func (*PaymentLink) GetUpdatedAt

func (p *PaymentLink) GetUpdatedAt() *string

func (*PaymentLink) GetVersion

func (p *PaymentLink) GetVersion() int

func (*PaymentLink) String

func (p *PaymentLink) String() string

func (*PaymentLink) UnmarshalJSON

func (p *PaymentLink) UnmarshalJSON(data []byte) error

type PaymentLinkRelatedResources

type PaymentLinkRelatedResources struct {
	// The order associated with the payment link.
	Orders []*Order `json:"orders,omitempty" url:"orders,omitempty"`
	// The subscription plan associated with the payment link.
	SubscriptionPlans []*CatalogObject `json:"subscription_plans,omitempty" url:"subscription_plans,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentLinkRelatedResources) GetExtraProperties

func (p *PaymentLinkRelatedResources) GetExtraProperties() map[string]interface{}

func (*PaymentLinkRelatedResources) GetOrders

func (p *PaymentLinkRelatedResources) GetOrders() []*Order

func (*PaymentLinkRelatedResources) GetSubscriptionPlans

func (p *PaymentLinkRelatedResources) GetSubscriptionPlans() []*CatalogObject

func (*PaymentLinkRelatedResources) String

func (p *PaymentLinkRelatedResources) String() string

func (*PaymentLinkRelatedResources) UnmarshalJSON

func (p *PaymentLinkRelatedResources) UnmarshalJSON(data []byte) error

type PaymentOptions

type PaymentOptions struct {
	// Indicates whether the `Payment` objects created from this `TerminalCheckout` are
	// automatically `COMPLETED` or left in an `APPROVED` state for later modification.
	//
	// Default: true
	Autocomplete *bool `json:"autocomplete,omitempty" url:"autocomplete,omitempty"`
	// The duration of time after the payment's creation when Square automatically resolves the
	// payment. This automatic resolution applies only to payments that do not reach a terminal state
	// (`COMPLETED` or `CANCELED`) 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 and a maximum value of 36 hours. This feature is only supported for card payments,
	// and all payments will be considered card-present.
	//
	// This parameter can only be set for a delayed capture payment (`autocomplete=false`). For more
	// information, see [Delayed Capture](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture#time-threshold).
	//
	// Default: "PT36H" (36 hours) from the creation time
	DelayDuration *string `json:"delay_duration,omitempty" url:"delay_duration,omitempty"`
	// 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 parameter can only be set for a delayed capture payment (`autocomplete=false`).
	//
	// For more information, see [Take Partial Payments](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/partial-payments-with-gift-cards).
	//
	// Default: false
	AcceptPartialAuthorization *bool `json:"accept_partial_authorization,omitempty" url:"accept_partial_authorization,omitempty"`
	// The action to be applied to the `Payment` when the delay_duration has elapsed.
	// The action must be CANCEL or COMPLETE.
	//
	// The action cannot be set to COMPLETE if an `order_id` is present on the TerminalCheckout.
	//
	// This parameter can only be set for a delayed capture payment (`autocomplete=false`). For more
	// information, see [Delayed Capture](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture#time-threshold).
	//
	// Default: CANCEL
	// See [DelayAction](#type-delayaction) for possible values
	DelayAction *PaymentOptionsDelayAction `json:"delay_action,omitempty" url:"delay_action,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentOptions) GetAcceptPartialAuthorization

func (p *PaymentOptions) GetAcceptPartialAuthorization() *bool

func (*PaymentOptions) GetAutocomplete

func (p *PaymentOptions) GetAutocomplete() *bool

func (*PaymentOptions) GetDelayAction

func (p *PaymentOptions) GetDelayAction() *PaymentOptionsDelayAction

func (*PaymentOptions) GetDelayDuration

func (p *PaymentOptions) GetDelayDuration() *string

func (*PaymentOptions) GetExtraProperties

func (p *PaymentOptions) GetExtraProperties() map[string]interface{}

func (*PaymentOptions) String

func (p *PaymentOptions) String() string

func (*PaymentOptions) UnmarshalJSON

func (p *PaymentOptions) UnmarshalJSON(data []byte) error

type PaymentOptionsDelayAction

type PaymentOptionsDelayAction string

Describes the action to be applied to a delayed capture payment when the delay_duration has elapsed.

const (
	PaymentOptionsDelayActionCancel   PaymentOptionsDelayAction = "CANCEL"
	PaymentOptionsDelayActionComplete PaymentOptionsDelayAction = "COMPLETE"
)

func NewPaymentOptionsDelayActionFromString

func NewPaymentOptionsDelayActionFromString(s string) (PaymentOptionsDelayAction, error)

func (PaymentOptionsDelayAction) Ptr

type PaymentRefund

type PaymentRefund struct {
	// The unique ID for this refund, generated by Square.
	ID string `json:"id" url:"id"`
	// The refund's status:
	// - `PENDING` - Awaiting approval.
	// - `COMPLETED` - Successfully completed.
	// - `REJECTED` - The refund was rejected.
	// - `FAILED` - An error occurred.
	Status *string `json:"status,omitempty" url:"status,omitempty"`
	// The location ID associated with the payment this refund is attached to.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// Flag indicating whether or not the refund is linked to an existing payment in Square.
	Unlinked *bool `json:"unlinked,omitempty" url:"unlinked,omitempty"`
	// The destination type for this refund.
	//
	// Current values include `CARD`, `BANK_ACCOUNT`, `WALLET`, `BUY_NOW_PAY_LATER`, `CASH`,
	// `EXTERNAL`, and `SQUARE_ACCOUNT`.
	DestinationType *string `json:"destination_type,omitempty" url:"destination_type,omitempty"`
	// Contains information about the refund destination. This field is populated only if
	// `destination_id` is defined in the `RefundPayment` request.
	DestinationDetails *DestinationDetails `json:"destination_details,omitempty" url:"destination_details,omitempty"`
	// 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).
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// 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" url:"app_fee_money,omitempty"`
	// Processing fees and fee adjustments assessed by Square for this refund.
	ProcessingFee []*ProcessingFee `json:"processing_fee,omitempty" url:"processing_fee,omitempty"`
	// The ID of the payment associated with this refund.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// The ID of the order associated with the refund.
	OrderID *string `json:"order_id,omitempty" url:"order_id,omitempty"`
	// The reason for the refund.
	Reason *string `json:"reason,omitempty" url:"reason,omitempty"`
	// The timestamp of when the refund was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp of when the refund was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// An optional ID of the team member associated with taking the payment.
	TeamMemberID *string `json:"team_member_id,omitempty" url:"team_member_id,omitempty"`
	// An optional ID for a Terminal refund.
	TerminalRefundID *string `json:"terminal_refund_id,omitempty" url:"terminal_refund_id,omitempty"`
	// contains filtered or unexported fields
}

Represents a refund of a payment made using Square. Contains information about the original payment and the amount of money refunded.

func (*PaymentRefund) GetAmountMoney

func (p *PaymentRefund) GetAmountMoney() *Money

func (*PaymentRefund) GetAppFeeMoney

func (p *PaymentRefund) GetAppFeeMoney() *Money

func (*PaymentRefund) GetCreatedAt

func (p *PaymentRefund) GetCreatedAt() *string

func (*PaymentRefund) GetDestinationDetails

func (p *PaymentRefund) GetDestinationDetails() *DestinationDetails

func (*PaymentRefund) GetDestinationType

func (p *PaymentRefund) GetDestinationType() *string

func (*PaymentRefund) GetExtraProperties

func (p *PaymentRefund) GetExtraProperties() map[string]interface{}

func (*PaymentRefund) GetID

func (p *PaymentRefund) GetID() string

func (*PaymentRefund) GetLocationID

func (p *PaymentRefund) GetLocationID() *string

func (*PaymentRefund) GetOrderID

func (p *PaymentRefund) GetOrderID() *string

func (*PaymentRefund) GetPaymentID

func (p *PaymentRefund) GetPaymentID() *string

func (*PaymentRefund) GetProcessingFee

func (p *PaymentRefund) GetProcessingFee() []*ProcessingFee

func (*PaymentRefund) GetReason

func (p *PaymentRefund) GetReason() *string

func (*PaymentRefund) GetStatus

func (p *PaymentRefund) GetStatus() *string

func (*PaymentRefund) GetTeamMemberID

func (p *PaymentRefund) GetTeamMemberID() *string

func (*PaymentRefund) GetTerminalRefundID

func (p *PaymentRefund) GetTerminalRefundID() *string

func (*PaymentRefund) GetUnlinked

func (p *PaymentRefund) GetUnlinked() *bool

func (*PaymentRefund) GetUpdatedAt

func (p *PaymentRefund) GetUpdatedAt() *string

func (*PaymentRefund) String

func (p *PaymentRefund) String() string

func (*PaymentRefund) UnmarshalJSON

func (p *PaymentRefund) UnmarshalJSON(data []byte) error

type PaymentsCancelRequest

type PaymentsCancelRequest = CancelPaymentsRequest

PaymentsCancelRequest is an alias for CancelPaymentsRequest.

type PaymentsGetRequest

type PaymentsGetRequest = GetPaymentsRequest

PaymentsGetRequest is an alias for GetPaymentsRequest.

type PaymentsListRequest

type PaymentsListRequest = ListPaymentsRequest

PaymentsListRequest is an alias for ListPaymentsRequest.

type Payout

type Payout struct {
	// A unique ID for the payout.
	ID string `json:"id" url:"id"`
	// Indicates the payout status.
	// See [PayoutStatus](#type-payoutstatus) for possible values
	Status *PayoutStatus `json:"status,omitempty" url:"status,omitempty"`
	// The ID of the location associated with the payout.
	LocationID string `json:"location_id" url:"location_id"`
	// The timestamp of when the payout was created and submitted for deposit to the seller's banking destination, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp of when the payout was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The amount of money involved in the payout. A positive amount indicates a deposit, and a negative amount indicates a withdrawal. This amount is never zero.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// Information about the banking destination (such as a bank account, Square checking account, or debit card)
	// against which the payout was made.
	Destination *Destination `json:"destination,omitempty" url:"destination,omitempty"`
	// The version number, which is incremented each time an update is made to this payout record.
	// The version number helps developers receive event notifications or feeds out of order.
	Version *int `json:"version,omitempty" url:"version,omitempty"`
	// Indicates the payout type.
	// See [PayoutType](#type-payouttype) for possible values
	Type *PayoutType `json:"type,omitempty" url:"type,omitempty"`
	// A list of transfer fees and any taxes on the fees assessed by Square for this payout.
	PayoutFee []*PayoutFee `json:"payout_fee,omitempty" url:"payout_fee,omitempty"`
	// The calendar date, in ISO 8601 format (YYYY-MM-DD), when the payout is due to arrive in the seller’s banking destination.
	ArrivalDate *string `json:"arrival_date,omitempty" url:"arrival_date,omitempty"`
	// A unique ID for each `Payout` object that might also appear on the seller’s bank statement. You can use this ID to automate the process of reconciling each payout with the corresponding line item on the bank statement.
	EndToEndID *string `json:"end_to_end_id,omitempty" url:"end_to_end_id,omitempty"`
	// contains filtered or unexported fields
}

An accounting of the amount owed the seller and record of the actual transfer to their external bank account or to the Square balance.

func (*Payout) GetAmountMoney

func (p *Payout) GetAmountMoney() *Money

func (*Payout) GetArrivalDate

func (p *Payout) GetArrivalDate() *string

func (*Payout) GetCreatedAt

func (p *Payout) GetCreatedAt() *string

func (*Payout) GetDestination

func (p *Payout) GetDestination() *Destination

func (*Payout) GetEndToEndID

func (p *Payout) GetEndToEndID() *string

func (*Payout) GetExtraProperties

func (p *Payout) GetExtraProperties() map[string]interface{}

func (*Payout) GetID

func (p *Payout) GetID() string

func (*Payout) GetLocationID

func (p *Payout) GetLocationID() string

func (*Payout) GetPayoutFee

func (p *Payout) GetPayoutFee() []*PayoutFee

func (*Payout) GetStatus

func (p *Payout) GetStatus() *PayoutStatus

func (*Payout) GetType

func (p *Payout) GetType() *PayoutType

func (*Payout) GetUpdatedAt

func (p *Payout) GetUpdatedAt() *string

func (*Payout) GetVersion

func (p *Payout) GetVersion() *int

func (*Payout) String

func (p *Payout) String() string

func (*Payout) UnmarshalJSON

func (p *Payout) UnmarshalJSON(data []byte) error

type PayoutEntry

type PayoutEntry struct {
	// A unique ID for the payout entry.
	ID string `json:"id" url:"id"`
	// The ID of the payout entries’ associated payout.
	PayoutID string `json:"payout_id" url:"payout_id"`
	// The timestamp of when the payout entry affected the balance, in RFC 3339 format.
	EffectiveAt *string `json:"effective_at,omitempty" url:"effective_at,omitempty"`
	// The type of activity associated with this payout entry.
	// See [ActivityType](#type-activitytype) for possible values
	Type *ActivityType `json:"type,omitempty" url:"type,omitempty"`
	// The amount of money involved in this payout entry.
	GrossAmountMoney *Money `json:"gross_amount_money,omitempty" url:"gross_amount_money,omitempty"`
	// The amount of Square fees associated with this payout entry.
	FeeAmountMoney *Money `json:"fee_amount_money,omitempty" url:"fee_amount_money,omitempty"`
	// The net proceeds from this transaction after any fees.
	NetAmountMoney *Money `json:"net_amount_money,omitempty" url:"net_amount_money,omitempty"`
	// Details of any developer app fee revenue generated on a payment.
	TypeAppFeeRevenueDetails *PaymentBalanceActivityAppFeeRevenueDetail `json:"type_app_fee_revenue_details,omitempty" url:"type_app_fee_revenue_details,omitempty"`
	// Details of a refund for an app fee on a payment.
	TypeAppFeeRefundDetails *PaymentBalanceActivityAppFeeRefundDetail `json:"type_app_fee_refund_details,omitempty" url:"type_app_fee_refund_details,omitempty"`
	// Details of any automatic transfer from the payment processing balance to the Square Savings account. These are, generally, proportional to the merchant's sales.
	TypeAutomaticSavingsDetails *PaymentBalanceActivityAutomaticSavingsDetail `json:"type_automatic_savings_details,omitempty" url:"type_automatic_savings_details,omitempty"`
	// Details of any automatic transfer from the Square Savings account back to the processing balance. These are, generally, proportional to the merchant's refunds.
	TypeAutomaticSavingsReversedDetails *PaymentBalanceActivityAutomaticSavingsReversedDetail `json:"type_automatic_savings_reversed_details,omitempty" url:"type_automatic_savings_reversed_details,omitempty"`
	// Details of credit card payment captures.
	TypeChargeDetails *PaymentBalanceActivityChargeDetail `json:"type_charge_details,omitempty" url:"type_charge_details,omitempty"`
	// Details of any fees involved with deposits such as for instant deposits.
	TypeDepositFeeDetails *PaymentBalanceActivityDepositFeeDetail `json:"type_deposit_fee_details,omitempty" url:"type_deposit_fee_details,omitempty"`
	// Details of any reversal or refund of fees involved with deposits such as for instant deposits.
	TypeDepositFeeReversedDetails *PaymentBalanceActivityDepositFeeReversedDetail `json:"type_deposit_fee_reversed_details,omitempty" url:"type_deposit_fee_reversed_details,omitempty"`
	// Details of any balance change due to a dispute event.
	TypeDisputeDetails *PaymentBalanceActivityDisputeDetail `json:"type_dispute_details,omitempty" url:"type_dispute_details,omitempty"`
	// Details of adjustments due to the Square processing fee.
	TypeFeeDetails *PaymentBalanceActivityFeeDetail `json:"type_fee_details,omitempty" url:"type_fee_details,omitempty"`
	// Square offers Free Payments Processing for a variety of business scenarios including seller referral or when Square wants to apologize for a bug, customer service, repricing complication, and so on. This entry represents details of any credit to the merchant for the purposes of Free Processing.
	TypeFreeProcessingDetails *PaymentBalanceActivityFreeProcessingDetail `json:"type_free_processing_details,omitempty" url:"type_free_processing_details,omitempty"`
	// Details of any adjustment made by Square related to the holding or releasing of a payment.
	TypeHoldAdjustmentDetails *PaymentBalanceActivityHoldAdjustmentDetail `json:"type_hold_adjustment_details,omitempty" url:"type_hold_adjustment_details,omitempty"`
	// Details of any open disputes.
	TypeOpenDisputeDetails *PaymentBalanceActivityOpenDisputeDetail `json:"type_open_dispute_details,omitempty" url:"type_open_dispute_details,omitempty"`
	// Details of any other type that does not belong in the rest of the types.
	TypeOtherDetails *PaymentBalanceActivityOtherDetail `json:"type_other_details,omitempty" url:"type_other_details,omitempty"`
	// Details of any other type of adjustments that don't fall under existing types.
	TypeOtherAdjustmentDetails *PaymentBalanceActivityOtherAdjustmentDetail `json:"type_other_adjustment_details,omitempty" url:"type_other_adjustment_details,omitempty"`
	// Details of a refund for an existing card payment.
	TypeRefundDetails *PaymentBalanceActivityRefundDetail `json:"type_refund_details,omitempty" url:"type_refund_details,omitempty"`
	// Details of fees released for adjustments.
	TypeReleaseAdjustmentDetails *PaymentBalanceActivityReleaseAdjustmentDetail `json:"type_release_adjustment_details,omitempty" url:"type_release_adjustment_details,omitempty"`
	// Details of fees paid for funding risk reserve.
	TypeReserveHoldDetails *PaymentBalanceActivityReserveHoldDetail `json:"type_reserve_hold_details,omitempty" url:"type_reserve_hold_details,omitempty"`
	// Details of fees released from risk reserve.
	TypeReserveReleaseDetails *PaymentBalanceActivityReserveReleaseDetail `json:"type_reserve_release_details,omitempty" url:"type_reserve_release_details,omitempty"`
	// Details of capital merchant cash advance (MCA) assessments. These are, generally, proportional to the merchant's sales but may be issued for other reasons related to the MCA.
	TypeSquareCapitalPaymentDetails *PaymentBalanceActivitySquareCapitalPaymentDetail `json:"type_square_capital_payment_details,omitempty" url:"type_square_capital_payment_details,omitempty"`
	// Details of capital merchant cash advance (MCA) assessment refunds. These are, generally, proportional to the merchant's refunds but may be issued for other reasons related to the MCA.
	TypeSquareCapitalReversedPaymentDetails *PaymentBalanceActivitySquareCapitalReversedPaymentDetail `json:"type_square_capital_reversed_payment_details,omitempty" url:"type_square_capital_reversed_payment_details,omitempty"`
	// Details of tax paid on fee amounts.
	TypeTaxOnFeeDetails *PaymentBalanceActivityTaxOnFeeDetail `json:"type_tax_on_fee_details,omitempty" url:"type_tax_on_fee_details,omitempty"`
	// Details of fees collected by a 3rd party platform.
	TypeThirdPartyFeeDetails *PaymentBalanceActivityThirdPartyFeeDetail `json:"type_third_party_fee_details,omitempty" url:"type_third_party_fee_details,omitempty"`
	// Details of refunded fees from a 3rd party platform.
	TypeThirdPartyFeeRefundDetails *PaymentBalanceActivityThirdPartyFeeRefundDetail `json:"type_third_party_fee_refund_details,omitempty" url:"type_third_party_fee_refund_details,omitempty"`
	// Details of a payroll payment that was transferred to a team member’s bank account.
	TypeSquarePayrollTransferDetails *PaymentBalanceActivitySquarePayrollTransferDetail `json:"type_square_payroll_transfer_details,omitempty" url:"type_square_payroll_transfer_details,omitempty"`
	// Details of a payroll payment to a team member’s bank account that was deposited back to the seller’s account by Square.
	TypeSquarePayrollTransferReversedDetails *PaymentBalanceActivitySquarePayrollTransferReversedDetail `json:"type_square_payroll_transfer_reversed_details,omitempty" url:"type_square_payroll_transfer_reversed_details,omitempty"`
	// contains filtered or unexported fields
}

One or more PayoutEntries that make up a Payout. Each one has a date, amount, and type of activity. The total amount of the payout will equal the sum of the payout entries for a batch payout

func (*PayoutEntry) GetEffectiveAt

func (p *PayoutEntry) GetEffectiveAt() *string

func (*PayoutEntry) GetExtraProperties

func (p *PayoutEntry) GetExtraProperties() map[string]interface{}

func (*PayoutEntry) GetFeeAmountMoney

func (p *PayoutEntry) GetFeeAmountMoney() *Money

func (*PayoutEntry) GetGrossAmountMoney

func (p *PayoutEntry) GetGrossAmountMoney() *Money

func (*PayoutEntry) GetID

func (p *PayoutEntry) GetID() string

func (*PayoutEntry) GetNetAmountMoney

func (p *PayoutEntry) GetNetAmountMoney() *Money

func (*PayoutEntry) GetPayoutID

func (p *PayoutEntry) GetPayoutID() string

func (*PayoutEntry) GetType

func (p *PayoutEntry) GetType() *ActivityType

func (*PayoutEntry) GetTypeAppFeeRefundDetails

func (p *PayoutEntry) GetTypeAppFeeRefundDetails() *PaymentBalanceActivityAppFeeRefundDetail

func (*PayoutEntry) GetTypeAppFeeRevenueDetails

func (p *PayoutEntry) GetTypeAppFeeRevenueDetails() *PaymentBalanceActivityAppFeeRevenueDetail

func (*PayoutEntry) GetTypeAutomaticSavingsDetails

func (p *PayoutEntry) GetTypeAutomaticSavingsDetails() *PaymentBalanceActivityAutomaticSavingsDetail

func (*PayoutEntry) GetTypeAutomaticSavingsReversedDetails

func (p *PayoutEntry) GetTypeAutomaticSavingsReversedDetails() *PaymentBalanceActivityAutomaticSavingsReversedDetail

func (*PayoutEntry) GetTypeChargeDetails

func (p *PayoutEntry) GetTypeChargeDetails() *PaymentBalanceActivityChargeDetail

func (*PayoutEntry) GetTypeDepositFeeDetails

func (p *PayoutEntry) GetTypeDepositFeeDetails() *PaymentBalanceActivityDepositFeeDetail

func (*PayoutEntry) GetTypeDepositFeeReversedDetails

func (p *PayoutEntry) GetTypeDepositFeeReversedDetails() *PaymentBalanceActivityDepositFeeReversedDetail

func (*PayoutEntry) GetTypeDisputeDetails

func (p *PayoutEntry) GetTypeDisputeDetails() *PaymentBalanceActivityDisputeDetail

func (*PayoutEntry) GetTypeFeeDetails

func (p *PayoutEntry) GetTypeFeeDetails() *PaymentBalanceActivityFeeDetail

func (*PayoutEntry) GetTypeFreeProcessingDetails

func (p *PayoutEntry) GetTypeFreeProcessingDetails() *PaymentBalanceActivityFreeProcessingDetail

func (*PayoutEntry) GetTypeHoldAdjustmentDetails

func (p *PayoutEntry) GetTypeHoldAdjustmentDetails() *PaymentBalanceActivityHoldAdjustmentDetail

func (*PayoutEntry) GetTypeOpenDisputeDetails

func (p *PayoutEntry) GetTypeOpenDisputeDetails() *PaymentBalanceActivityOpenDisputeDetail

func (*PayoutEntry) GetTypeOtherAdjustmentDetails

func (p *PayoutEntry) GetTypeOtherAdjustmentDetails() *PaymentBalanceActivityOtherAdjustmentDetail

func (*PayoutEntry) GetTypeOtherDetails

func (p *PayoutEntry) GetTypeOtherDetails() *PaymentBalanceActivityOtherDetail

func (*PayoutEntry) GetTypeRefundDetails

func (p *PayoutEntry) GetTypeRefundDetails() *PaymentBalanceActivityRefundDetail

func (*PayoutEntry) GetTypeReleaseAdjustmentDetails

func (p *PayoutEntry) GetTypeReleaseAdjustmentDetails() *PaymentBalanceActivityReleaseAdjustmentDetail

func (*PayoutEntry) GetTypeReserveHoldDetails

func (p *PayoutEntry) GetTypeReserveHoldDetails() *PaymentBalanceActivityReserveHoldDetail

func (*PayoutEntry) GetTypeReserveReleaseDetails

func (p *PayoutEntry) GetTypeReserveReleaseDetails() *PaymentBalanceActivityReserveReleaseDetail

func (*PayoutEntry) GetTypeSquareCapitalPaymentDetails

func (p *PayoutEntry) GetTypeSquareCapitalPaymentDetails() *PaymentBalanceActivitySquareCapitalPaymentDetail

func (*PayoutEntry) GetTypeSquareCapitalReversedPaymentDetails

func (p *PayoutEntry) GetTypeSquareCapitalReversedPaymentDetails() *PaymentBalanceActivitySquareCapitalReversedPaymentDetail

func (*PayoutEntry) GetTypeSquarePayrollTransferDetails

func (p *PayoutEntry) GetTypeSquarePayrollTransferDetails() *PaymentBalanceActivitySquarePayrollTransferDetail

func (*PayoutEntry) GetTypeSquarePayrollTransferReversedDetails

func (p *PayoutEntry) GetTypeSquarePayrollTransferReversedDetails() *PaymentBalanceActivitySquarePayrollTransferReversedDetail

func (*PayoutEntry) GetTypeTaxOnFeeDetails

func (p *PayoutEntry) GetTypeTaxOnFeeDetails() *PaymentBalanceActivityTaxOnFeeDetail

func (*PayoutEntry) GetTypeThirdPartyFeeDetails

func (p *PayoutEntry) GetTypeThirdPartyFeeDetails() *PaymentBalanceActivityThirdPartyFeeDetail

func (*PayoutEntry) GetTypeThirdPartyFeeRefundDetails

func (p *PayoutEntry) GetTypeThirdPartyFeeRefundDetails() *PaymentBalanceActivityThirdPartyFeeRefundDetail

func (*PayoutEntry) String

func (p *PayoutEntry) String() string

func (*PayoutEntry) UnmarshalJSON

func (p *PayoutEntry) UnmarshalJSON(data []byte) error

type PayoutFee

type PayoutFee struct {
	// The money amount of the payout fee.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// The timestamp of when the fee takes effect, in RFC 3339 format.
	EffectiveAt *string `json:"effective_at,omitempty" url:"effective_at,omitempty"`
	// The type of fee assessed as part of the payout.
	// See [PayoutFeeType](#type-payoutfeetype) for possible values
	Type *PayoutFeeType `json:"type,omitempty" url:"type,omitempty"`
	// contains filtered or unexported fields
}

Represents a payout fee that can incur as part of a payout.

func (*PayoutFee) GetAmountMoney

func (p *PayoutFee) GetAmountMoney() *Money

func (*PayoutFee) GetEffectiveAt

func (p *PayoutFee) GetEffectiveAt() *string

func (*PayoutFee) GetExtraProperties

func (p *PayoutFee) GetExtraProperties() map[string]interface{}

func (*PayoutFee) GetType

func (p *PayoutFee) GetType() *PayoutFeeType

func (*PayoutFee) String

func (p *PayoutFee) String() string

func (*PayoutFee) UnmarshalJSON

func (p *PayoutFee) UnmarshalJSON(data []byte) error

type PayoutFeeType

type PayoutFeeType string

Represents the type of payout fee that can incur as part of a payout.

const (
	PayoutFeeTypeTransferFee      PayoutFeeType = "TRANSFER_FEE"
	PayoutFeeTypeTaxOnTransferFee PayoutFeeType = "TAX_ON_TRANSFER_FEE"
)

func NewPayoutFeeTypeFromString

func NewPayoutFeeTypeFromString(s string) (PayoutFeeType, error)

func (PayoutFeeType) Ptr

func (p PayoutFeeType) Ptr() *PayoutFeeType

type PayoutStatus

type PayoutStatus string

Payout status types

const (
	PayoutStatusSent   PayoutStatus = "SENT"
	PayoutStatusFailed PayoutStatus = "FAILED"
	PayoutStatusPaid   PayoutStatus = "PAID"
)

func NewPayoutStatusFromString

func NewPayoutStatusFromString(s string) (PayoutStatus, error)

func (PayoutStatus) Ptr

func (p PayoutStatus) Ptr() *PayoutStatus

type PayoutType

type PayoutType string

The type of payout: “BATCH” or “SIMPLE”. BATCH payouts include a list of payout entries that can be considered settled. SIMPLE payouts do not have any payout entries associated with them and will show up as one of the payout entries in a future BATCH payout.

const (
	PayoutTypeBatch  PayoutType = "BATCH"
	PayoutTypeSimple PayoutType = "SIMPLE"
)

func NewPayoutTypeFromString

func NewPayoutTypeFromString(s string) (PayoutType, error)

func (PayoutType) Ptr

func (p PayoutType) Ptr() *PayoutType

type PayoutsGetRequest

type PayoutsGetRequest = GetPayoutsRequest

PayoutsGetRequest is an alias for GetPayoutsRequest.

type PayoutsListEntriesRequest

type PayoutsListEntriesRequest = ListEntriesPayoutsRequest

PayoutsListEntriesRequest is an alias for ListEntriesPayoutsRequest.

type PayoutsListRequest

type PayoutsListRequest = ListPayoutsRequest

PayoutsListRequest is an alias for ListPayoutsRequest.

type Phase

type Phase struct {
	// id of subscription phase
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// index of phase in total subscription plan
	Ordinal *int64 `json:"ordinal,omitempty" url:"ordinal,omitempty"`
	// id of order to be used in billing
	OrderTemplateID *string `json:"order_template_id,omitempty" url:"order_template_id,omitempty"`
	// the uid from the plan's phase in catalog
	PlanPhaseUID *string `json:"plan_phase_uid,omitempty" url:"plan_phase_uid,omitempty"`
	// contains filtered or unexported fields
}

Represents a phase, which can override subscription phases as defined by plan_id

func (*Phase) GetExtraProperties

func (p *Phase) GetExtraProperties() map[string]interface{}

func (*Phase) GetOrderTemplateID

func (p *Phase) GetOrderTemplateID() *string

func (*Phase) GetOrdinal

func (p *Phase) GetOrdinal() *int64

func (*Phase) GetPlanPhaseUID

func (p *Phase) GetPlanPhaseUID() *string

func (*Phase) GetUID

func (p *Phase) GetUID() *string

func (*Phase) String

func (p *Phase) String() string

func (*Phase) UnmarshalJSON

func (p *Phase) UnmarshalJSON(data []byte) error

type PhaseInput

type PhaseInput struct {
	// index of phase in total subscription plan
	Ordinal int64 `json:"ordinal" url:"ordinal"`
	// id of order to be used in billing
	OrderTemplateID *string `json:"order_template_id,omitempty" url:"order_template_id,omitempty"`
	// contains filtered or unexported fields
}

Represents the arguments used to construct a new phase.

func (*PhaseInput) GetExtraProperties

func (p *PhaseInput) GetExtraProperties() map[string]interface{}

func (*PhaseInput) GetOrderTemplateID

func (p *PhaseInput) GetOrderTemplateID() *string

func (*PhaseInput) GetOrdinal

func (p *PhaseInput) GetOrdinal() int64

func (*PhaseInput) String

func (p *PhaseInput) String() string

func (*PhaseInput) UnmarshalJSON

func (p *PhaseInput) UnmarshalJSON(data []byte) error

type PrePopulatedData

type PrePopulatedData struct {
	// The buyer email to prepopulate in the payment form.
	BuyerEmail *string `json:"buyer_email,omitempty" url:"buyer_email,omitempty"`
	// The buyer phone number to prepopulate in the payment form.
	BuyerPhoneNumber *string `json:"buyer_phone_number,omitempty" url:"buyer_phone_number,omitempty"`
	// The buyer address to prepopulate in the payment form.
	BuyerAddress *Address `json:"buyer_address,omitempty" url:"buyer_address,omitempty"`
	// contains filtered or unexported fields
}

Describes buyer data to prepopulate in the payment form. For more information, see [Optional Checkout Configurations](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations).

func (*PrePopulatedData) GetBuyerAddress

func (p *PrePopulatedData) GetBuyerAddress() *Address

func (*PrePopulatedData) GetBuyerEmail

func (p *PrePopulatedData) GetBuyerEmail() *string

func (*PrePopulatedData) GetBuyerPhoneNumber

func (p *PrePopulatedData) GetBuyerPhoneNumber() *string

func (*PrePopulatedData) GetExtraProperties

func (p *PrePopulatedData) GetExtraProperties() map[string]interface{}

func (*PrePopulatedData) String

func (p *PrePopulatedData) String() string

func (*PrePopulatedData) UnmarshalJSON

func (p *PrePopulatedData) UnmarshalJSON(data []byte) error

type ProcessingFee

type ProcessingFee struct {
	// The timestamp of when the fee takes effect, in RFC 3339 format.
	EffectiveAt *string `json:"effective_at,omitempty" url:"effective_at,omitempty"`
	// The type of fee assessed or adjusted. The fee type can be `INITIAL` or `ADJUSTMENT`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// 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" url:"amount_money,omitempty"`
	// contains filtered or unexported fields
}

Represents the Square processing fee.

func (*ProcessingFee) GetAmountMoney

func (p *ProcessingFee) GetAmountMoney() *Money

func (*ProcessingFee) GetEffectiveAt

func (p *ProcessingFee) GetEffectiveAt() *string

func (*ProcessingFee) GetExtraProperties

func (p *ProcessingFee) GetExtraProperties() map[string]interface{}

func (*ProcessingFee) GetType

func (p *ProcessingFee) GetType() *string

func (*ProcessingFee) String

func (p *ProcessingFee) String() string

func (*ProcessingFee) UnmarshalJSON

func (p *ProcessingFee) UnmarshalJSON(data []byte) error

type Product

type Product string

Indicates the Square product used to generate a change.

const (
	ProductSquarePos         Product = "SQUARE_POS"
	ProductExternalAPI       Product = "EXTERNAL_API"
	ProductBilling           Product = "BILLING"
	ProductAppointments      Product = "APPOINTMENTS"
	ProductInvoices          Product = "INVOICES"
	ProductOnlineStore       Product = "ONLINE_STORE"
	ProductPayroll           Product = "PAYROLL"
	ProductDashboard         Product = "DASHBOARD"
	ProductItemLibraryImport Product = "ITEM_LIBRARY_IMPORT"
	ProductOther             Product = "OTHER"
)

func NewProductFromString

func NewProductFromString(s string) (Product, error)

func (Product) Ptr

func (p Product) Ptr() *Product

type ProductType

type ProductType = string

type PublishInvoiceRequest

type PublishInvoiceRequest struct {
	// The ID of the invoice to publish.
	InvoiceID string `json:"-" url:"-"`
	// The version of the [invoice](entity:Invoice) to publish.
	// This must match the current version of the invoice; otherwise, the request is rejected.
	Version int `json:"version" url:"-"`
	// 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/build-basics/common-api-patterns/idempotency).
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"`
}

type PublishInvoiceResponse

type PublishInvoiceResponse struct {
	// The published invoice.
	Invoice *Invoice `json:"invoice,omitempty" url:"invoice,omitempty"`
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Describes a `PublishInvoice` response.

func (*PublishInvoiceResponse) GetErrors

func (p *PublishInvoiceResponse) GetErrors() []*Error

func (*PublishInvoiceResponse) GetExtraProperties

func (p *PublishInvoiceResponse) GetExtraProperties() map[string]interface{}

func (*PublishInvoiceResponse) GetInvoice

func (p *PublishInvoiceResponse) GetInvoice() *Invoice

func (*PublishInvoiceResponse) String

func (p *PublishInvoiceResponse) String() string

func (*PublishInvoiceResponse) UnmarshalJSON

func (p *PublishInvoiceResponse) UnmarshalJSON(data []byte) error

type QrCodeOptions

type QrCodeOptions struct {
	// The title text to display in the QR code flow on the Terminal.
	Title string `json:"title" url:"title"`
	// The body text to display in the QR code flow on the Terminal.
	Body string `json:"body" url:"body"`
	// The text representation of the data to show in the QR code
	// as UTF8-encoded data.
	BarcodeContents string `json:"barcode_contents" url:"barcode_contents"`
	// contains filtered or unexported fields
}

Fields to describe the action that displays QR-Codes.

func (*QrCodeOptions) GetBarcodeContents

func (q *QrCodeOptions) GetBarcodeContents() string

func (*QrCodeOptions) GetBody

func (q *QrCodeOptions) GetBody() string

func (*QrCodeOptions) GetExtraProperties

func (q *QrCodeOptions) GetExtraProperties() map[string]interface{}

func (*QrCodeOptions) GetTitle

func (q *QrCodeOptions) GetTitle() string

func (*QrCodeOptions) String

func (q *QrCodeOptions) String() string

func (*QrCodeOptions) UnmarshalJSON

func (q *QrCodeOptions) UnmarshalJSON(data []byte) error

type QuickPay

type QuickPay struct {
	// The ad hoc item name. In the resulting `Order`, this name appears as the line item name.
	Name string `json:"name" url:"name"`
	// The price of the item.
	PriceMoney *Money `json:"price_money,omitempty" url:"price_money,omitempty"`
	// The ID of the business location the checkout is associated with.
	LocationID string `json:"location_id" url:"location_id"`
	// contains filtered or unexported fields
}

Describes an ad hoc item and price to generate a quick pay checkout link. For more information, see [Quick Pay Checkout](https://developer.squareup.com/docs/checkout-api/quick-pay-checkout).

func (*QuickPay) GetExtraProperties

func (q *QuickPay) GetExtraProperties() map[string]interface{}

func (*QuickPay) GetLocationID

func (q *QuickPay) GetLocationID() string

func (*QuickPay) GetName

func (q *QuickPay) GetName() string

func (*QuickPay) GetPriceMoney

func (q *QuickPay) GetPriceMoney() *Money

func (*QuickPay) String

func (q *QuickPay) String() string

func (*QuickPay) UnmarshalJSON

func (q *QuickPay) UnmarshalJSON(data []byte) error

type Range

type Range struct {
	// The lower bound of the number range. At least one of `min` or `max` must be specified.
	// If unspecified, the results will have no minimum value.
	Min *string `json:"min,omitempty" url:"min,omitempty"`
	// The upper bound of the number range. At least one of `min` or `max` must be specified.
	// If unspecified, the results will have no maximum value.
	Max *string `json:"max,omitempty" url:"max,omitempty"`
	// contains filtered or unexported fields
}

The range of a number value between the specified lower and upper bounds.

func (*Range) GetExtraProperties

func (r *Range) GetExtraProperties() map[string]interface{}

func (*Range) GetMax

func (r *Range) GetMax() *string

func (*Range) GetMin

func (r *Range) GetMin() *string

func (*Range) String

func (r *Range) String() string

func (*Range) UnmarshalJSON

func (r *Range) UnmarshalJSON(data []byte) error

type ReceiptOptions

type ReceiptOptions struct {
	// The reference to the Square payment ID for the receipt.
	PaymentID string `json:"payment_id" url:"payment_id"`
	// Instructs the device to print the receipt without displaying the receipt selection screen.
	// Requires `printer_enabled` set to true.
	// Defaults to false.
	PrintOnly *bool `json:"print_only,omitempty" url:"print_only,omitempty"`
	// Identify the receipt as a reprint rather than an original receipt.
	// Defaults to false.
	IsDuplicate *bool `json:"is_duplicate,omitempty" url:"is_duplicate,omitempty"`
	// contains filtered or unexported fields
}

Describes receipt action fields.

func (*ReceiptOptions) GetExtraProperties

func (r *ReceiptOptions) GetExtraProperties() map[string]interface{}

func (*ReceiptOptions) GetIsDuplicate

func (r *ReceiptOptions) GetIsDuplicate() *bool

func (*ReceiptOptions) GetPaymentID

func (r *ReceiptOptions) GetPaymentID() string

func (*ReceiptOptions) GetPrintOnly

func (r *ReceiptOptions) GetPrintOnly() *bool

func (*ReceiptOptions) String

func (r *ReceiptOptions) String() string

func (*ReceiptOptions) UnmarshalJSON

func (r *ReceiptOptions) UnmarshalJSON(data []byte) error

type RedeemLoyaltyRewardResponse

type RedeemLoyaltyRewardResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The `LoyaltyEvent` for redeeming the reward.
	Event *LoyaltyEvent `json:"event,omitempty" url:"event,omitempty"`
	// contains filtered or unexported fields
}

A response that includes the `LoyaltyEvent` published for redeeming the reward.

func (*RedeemLoyaltyRewardResponse) GetErrors

func (r *RedeemLoyaltyRewardResponse) GetErrors() []*Error

func (*RedeemLoyaltyRewardResponse) GetEvent

func (*RedeemLoyaltyRewardResponse) GetExtraProperties

func (r *RedeemLoyaltyRewardResponse) GetExtraProperties() map[string]interface{}

func (*RedeemLoyaltyRewardResponse) String

func (r *RedeemLoyaltyRewardResponse) String() string

func (*RedeemLoyaltyRewardResponse) UnmarshalJSON

func (r *RedeemLoyaltyRewardResponse) UnmarshalJSON(data []byte) error

type Refund

type Refund struct {
	// The refund's unique ID.
	ID string `json:"id" url:"id"`
	// The ID of the refund's associated location.
	LocationID string `json:"location_id" url:"location_id"`
	// The ID of the transaction that the refunded tender is part of.
	TransactionID *string `json:"transaction_id,omitempty" url:"transaction_id,omitempty"`
	// The ID of the refunded tender.
	TenderID string `json:"tender_id" url:"tender_id"`
	// The timestamp for when the refund was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The reason for the refund being issued.
	Reason string `json:"reason" url:"reason"`
	// The amount of money refunded to the buyer.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// The current status of the refund (`PENDING`, `APPROVED`, `REJECTED`,
	// or `FAILED`).
	// See [RefundStatus](#type-refundstatus) for possible values
	Status RefundStatus `json:"status" url:"status"`
	// The amount of Square processing fee money refunded to the *merchant*.
	ProcessingFeeMoney *Money `json:"processing_fee_money,omitempty" url:"processing_fee_money,omitempty"`
	// 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,omitempty" url:"additional_recipients,omitempty"`
	// contains filtered or unexported fields
}

Represents a refund processed for a Square transaction.

func (*Refund) GetAdditionalRecipients

func (r *Refund) GetAdditionalRecipients() []*AdditionalRecipient

func (*Refund) GetAmountMoney

func (r *Refund) GetAmountMoney() *Money

func (*Refund) GetCreatedAt

func (r *Refund) GetCreatedAt() *string

func (*Refund) GetExtraProperties

func (r *Refund) GetExtraProperties() map[string]interface{}

func (*Refund) GetID

func (r *Refund) GetID() string

func (*Refund) GetLocationID

func (r *Refund) GetLocationID() string

func (*Refund) GetProcessingFeeMoney

func (r *Refund) GetProcessingFeeMoney() *Money

func (*Refund) GetReason

func (r *Refund) GetReason() string

func (*Refund) GetStatus

func (r *Refund) GetStatus() RefundStatus

func (*Refund) GetTenderID

func (r *Refund) GetTenderID() string

func (*Refund) GetTransactionID

func (r *Refund) GetTransactionID() *string

func (*Refund) String

func (r *Refund) String() string

func (*Refund) UnmarshalJSON

func (r *Refund) UnmarshalJSON(data []byte) error

type RefundPaymentRequest

type RefundPaymentRequest struct {
	//	A unique string that identifies this `RefundPayment` request. The key can be any valid string
	//
	// but must be unique for every `RefundPayment` request.
	//
	// Keys are limited to a max of 45 characters - however, the number of allowed characters might be
	// less than 45, if multi-byte characters are used.
	//
	// For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).
	IdempotencyKey string `json:"idempotency_key" url:"-"`
	// 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.
	AmountMoney *Money `json:"amount_money,omitempty" url:"-"`
	// 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).
	//
	// To set this field, `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required.
	// For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions).
	AppFeeMoney *Money `json:"app_fee_money,omitempty" url:"-"`
	// The unique ID of the payment being refunded.
	// Required when unlinked=false, otherwise must not be set.
	PaymentID *string `json:"payment_id,omitempty" url:"-"`
	// The ID indicating where funds will be refunded to. Required for unlinked refunds. For more
	// information, see [Process an Unlinked Refund](https://developer.squareup.com/docs/refunds-api/unlinked-refunds).
	//
	// For refunds linked to Square payments, `destination_id` is usually omitted; in this case, funds
	// will be returned to the original payment source. The field may be specified in order to request
	// a cross-method refund to a gift card. For more information,
	// see [Cross-method refunds to gift cards](https://developer.squareup.com/docs/payments-api/refund-payments#cross-method-refunds-to-gift-cards).
	DestinationID *string `json:"destination_id,omitempty" url:"-"`
	// Indicates that the refund is not linked to a Square payment.
	// If set to true, `destination_id` and `location_id` must be supplied while `payment_id` must not
	// be provided.
	Unlinked *bool `json:"unlinked,omitempty" url:"-"`
	// The location ID associated with the unlinked refund.
	// Required for requests specifying `unlinked=true`.
	// Otherwise, if included when `unlinked=false`, will throw an error.
	LocationID *string `json:"location_id,omitempty" url:"-"`
	// The [Customer](entity:Customer) ID of the customer associated with the refund.
	// This is required if the `destination_id` refers to a card on file created using the Cards
	// API. Only allowed when `unlinked=true`.
	CustomerID *string `json:"customer_id,omitempty" url:"-"`
	// A description of the reason for the refund.
	Reason *string `json:"reason,omitempty" url:"-"`
	//	Used for optimistic concurrency. This opaque token identifies the current `Payment`
	//
	// version that the caller expects. If the server has a different version of the Payment,
	// the update fails and a response with a VERSION_MISMATCH error is returned.
	// If the versions match, or the field is not provided, the refund proceeds as normal.
	PaymentVersionToken *string `json:"payment_version_token,omitempty" url:"-"`
	// An optional [TeamMember](entity:TeamMember) ID to associate with this refund.
	TeamMemberID *string `json:"team_member_id,omitempty" url:"-"`
	// Additional details required when recording an unlinked cash refund (`destination_id` is CASH).
	CashDetails *DestinationDetailsCashRefundDetails `json:"cash_details,omitempty" url:"-"`
	// Additional details required when recording an unlinked external refund
	// (`destination_id` is EXTERNAL).
	ExternalDetails *DestinationDetailsExternalRefundDetails `json:"external_details,omitempty" url:"-"`
}

type RefundPaymentResponse

type RefundPaymentResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The successfully created `PaymentRefund`.
	Refund *PaymentRefund `json:"refund,omitempty" url:"refund,omitempty"`
	// contains filtered or unexported fields
}

Defines the response returned by [RefundPayment](api-endpoint:Refunds-RefundPayment).

If there are errors processing the request, the `refund` field might not be present, or it might be present with a status of `FAILED`.

func (*RefundPaymentResponse) GetErrors

func (r *RefundPaymentResponse) GetErrors() []*Error

func (*RefundPaymentResponse) GetExtraProperties

func (r *RefundPaymentResponse) GetExtraProperties() map[string]interface{}

func (*RefundPaymentResponse) GetRefund

func (r *RefundPaymentResponse) GetRefund() *PaymentRefund

func (*RefundPaymentResponse) String

func (r *RefundPaymentResponse) String() string

func (*RefundPaymentResponse) UnmarshalJSON

func (r *RefundPaymentResponse) UnmarshalJSON(data []byte) error

type RefundStatus

type RefundStatus string

Indicates a refund's current status.

const (
	RefundStatusPending  RefundStatus = "PENDING"
	RefundStatusApproved RefundStatus = "APPROVED"
	RefundStatusRejected RefundStatus = "REJECTED"
	RefundStatusFailed   RefundStatus = "FAILED"
)

func NewRefundStatusFromString

func NewRefundStatusFromString(s string) (RefundStatus, error)

func (RefundStatus) Ptr

func (r RefundStatus) Ptr() *RefundStatus

type RefundsGetRequest

type RefundsGetRequest = GetRefundsRequest

RefundsGetRequest is an alias for GetRefundsRequest.

type RefundsListRequest

type RefundsListRequest = ListRefundsRequest

RefundsListRequest is an alias for ListRefundsRequest.

type RegisterDomainRequest

type RegisterDomainRequest struct {
	// A domain name as described in RFC-1034 that will be registered with ApplePay.
	DomainName string `json:"domain_name" url:"-"`
}

type RegisterDomainResponse

type RegisterDomainResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The status of the domain registration.
	//
	// See [RegisterDomainResponseStatus](entity:RegisterDomainResponseStatus) for possible values.
	// See [RegisterDomainResponseStatus](#type-registerdomainresponsestatus) for possible values
	Status *RegisterDomainResponseStatus `json:"status,omitempty" url:"status,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [RegisterDomain](api-endpoint:ApplePay-RegisterDomain) endpoint.

Either `errors` or `status` are present in a given response (never both).

func (*RegisterDomainResponse) GetErrors

func (r *RegisterDomainResponse) GetErrors() []*Error

func (*RegisterDomainResponse) GetExtraProperties

func (r *RegisterDomainResponse) GetExtraProperties() map[string]interface{}

func (*RegisterDomainResponse) GetStatus

func (*RegisterDomainResponse) String

func (r *RegisterDomainResponse) String() string

func (*RegisterDomainResponse) UnmarshalJSON

func (r *RegisterDomainResponse) UnmarshalJSON(data []byte) error

type RegisterDomainResponseStatus

type RegisterDomainResponseStatus string

The status of the domain registration.

const (
	RegisterDomainResponseStatusPending  RegisterDomainResponseStatus = "PENDING"
	RegisterDomainResponseStatusVerified RegisterDomainResponseStatus = "VERIFIED"
)

func NewRegisterDomainResponseStatusFromString

func NewRegisterDomainResponseStatusFromString(s string) (RegisterDomainResponseStatus, error)

func (RegisterDomainResponseStatus) Ptr

type RemoveGroupFromCustomerResponse

type RemoveGroupFromCustomerResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [RemoveGroupFromCustomer](api-endpoint:Customers-RemoveGroupFromCustomer) endpoint.

func (*RemoveGroupFromCustomerResponse) GetErrors

func (r *RemoveGroupFromCustomerResponse) GetErrors() []*Error

func (*RemoveGroupFromCustomerResponse) GetExtraProperties

func (r *RemoveGroupFromCustomerResponse) GetExtraProperties() map[string]interface{}

func (*RemoveGroupFromCustomerResponse) String

func (*RemoveGroupFromCustomerResponse) UnmarshalJSON

func (r *RemoveGroupFromCustomerResponse) UnmarshalJSON(data []byte) error

type ResumeSubscriptionRequest

type ResumeSubscriptionRequest struct {
	// The ID of the subscription to resume.
	SubscriptionID string `json:"-" url:"-"`
	// The `YYYY-MM-DD`-formatted date when the subscription reactivated.
	ResumeEffectiveDate *string `json:"resume_effective_date,omitempty" url:"-"`
	// The timing to resume a subscription, relative to the specified
	// `resume_effective_date` attribute value.
	// See [ChangeTiming](#type-changetiming) for possible values
	ResumeChangeTiming *ChangeTiming `json:"resume_change_timing,omitempty" url:"-"`
}

type ResumeSubscriptionResponse

type ResumeSubscriptionResponse struct {
	// Errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The resumed subscription.
	Subscription *Subscription `json:"subscription,omitempty" url:"subscription,omitempty"`
	// A list of `RESUME` actions created by the request and scheduled for the subscription.
	Actions []*SubscriptionAction `json:"actions,omitempty" url:"actions,omitempty"`
	// contains filtered or unexported fields
}

Defines output parameters in a response from the [ResumeSubscription](api-endpoint:Subscriptions-ResumeSubscription) endpoint.

func (*ResumeSubscriptionResponse) GetActions

func (*ResumeSubscriptionResponse) GetErrors

func (r *ResumeSubscriptionResponse) GetErrors() []*Error

func (*ResumeSubscriptionResponse) GetExtraProperties

func (r *ResumeSubscriptionResponse) GetExtraProperties() map[string]interface{}

func (*ResumeSubscriptionResponse) GetSubscription

func (r *ResumeSubscriptionResponse) GetSubscription() *Subscription

func (*ResumeSubscriptionResponse) String

func (r *ResumeSubscriptionResponse) String() string

func (*ResumeSubscriptionResponse) UnmarshalJSON

func (r *ResumeSubscriptionResponse) UnmarshalJSON(data []byte) error

type RetrieveBookingCustomAttributeDefinitionResponse

type RetrieveBookingCustomAttributeDefinitionResponse struct {
	// The retrieved custom attribute definition.
	CustomAttributeDefinition *CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"custom_attribute_definition,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [RetrieveBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttributeDefinition) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*RetrieveBookingCustomAttributeDefinitionResponse) GetCustomAttributeDefinition

func (*RetrieveBookingCustomAttributeDefinitionResponse) GetErrors

func (*RetrieveBookingCustomAttributeDefinitionResponse) GetExtraProperties

func (r *RetrieveBookingCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*RetrieveBookingCustomAttributeDefinitionResponse) String

func (*RetrieveBookingCustomAttributeDefinitionResponse) UnmarshalJSON

type RetrieveBookingCustomAttributeResponse

type RetrieveBookingCustomAttributeResponse struct {
	// The retrieved custom attribute. If `with_definition` was set to `true` in the request,
	// the custom attribute definition is returned in the `definition` field.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [RetrieveBookingCustomAttribute](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttribute) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*RetrieveBookingCustomAttributeResponse) GetCustomAttribute

func (*RetrieveBookingCustomAttributeResponse) GetErrors

func (*RetrieveBookingCustomAttributeResponse) GetExtraProperties

func (r *RetrieveBookingCustomAttributeResponse) GetExtraProperties() map[string]interface{}

func (*RetrieveBookingCustomAttributeResponse) String

func (*RetrieveBookingCustomAttributeResponse) UnmarshalJSON

func (r *RetrieveBookingCustomAttributeResponse) UnmarshalJSON(data []byte) error

type RetrieveJobRequest added in v1.0.0

type RetrieveJobRequest struct {
	// The ID of the job to retrieve.
	JobID string `json:"-" url:"-"`
}

type RetrieveJobResponse added in v1.0.0

type RetrieveJobResponse struct {
	// The retrieved job.
	Job *Job `json:"job,omitempty" url:"job,omitempty"`
	// The errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [RetrieveJob](api-endpoint:Team-RetrieveJob) response. Either `job` or `errors` is present in the response.

func (*RetrieveJobResponse) GetErrors added in v1.0.0

func (r *RetrieveJobResponse) GetErrors() []*Error

func (*RetrieveJobResponse) GetExtraProperties added in v1.0.0

func (r *RetrieveJobResponse) GetExtraProperties() map[string]interface{}

func (*RetrieveJobResponse) GetJob added in v1.0.0

func (r *RetrieveJobResponse) GetJob() *Job

func (*RetrieveJobResponse) String added in v1.0.0

func (r *RetrieveJobResponse) String() string

func (*RetrieveJobResponse) UnmarshalJSON added in v1.0.0

func (r *RetrieveJobResponse) UnmarshalJSON(data []byte) error

type RetrieveLocationBookingProfileRequest

type RetrieveLocationBookingProfileRequest struct {
	// The ID of the location to retrieve the booking profile.
	LocationID string `json:"-" url:"-"`
}

type RetrieveLocationBookingProfileResponse

type RetrieveLocationBookingProfileResponse struct {
	// The requested location booking profile.
	LocationBookingProfile *LocationBookingProfile `json:"location_booking_profile,omitempty" url:"location_booking_profile,omitempty"`
	// Errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*RetrieveLocationBookingProfileResponse) GetErrors

func (*RetrieveLocationBookingProfileResponse) GetExtraProperties

func (r *RetrieveLocationBookingProfileResponse) GetExtraProperties() map[string]interface{}

func (*RetrieveLocationBookingProfileResponse) GetLocationBookingProfile

func (r *RetrieveLocationBookingProfileResponse) GetLocationBookingProfile() *LocationBookingProfile

func (*RetrieveLocationBookingProfileResponse) String

func (*RetrieveLocationBookingProfileResponse) UnmarshalJSON

func (r *RetrieveLocationBookingProfileResponse) UnmarshalJSON(data []byte) error

type RetrieveLocationCustomAttributeDefinitionResponse

type RetrieveLocationCustomAttributeDefinitionResponse struct {
	// The retrieved custom attribute definition.
	CustomAttributeDefinition *CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"custom_attribute_definition,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [RetrieveLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-RetrieveLocationCustomAttributeDefinition) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*RetrieveLocationCustomAttributeDefinitionResponse) GetCustomAttributeDefinition

func (*RetrieveLocationCustomAttributeDefinitionResponse) GetErrors

func (*RetrieveLocationCustomAttributeDefinitionResponse) GetExtraProperties

func (r *RetrieveLocationCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*RetrieveLocationCustomAttributeDefinitionResponse) String

func (*RetrieveLocationCustomAttributeDefinitionResponse) UnmarshalJSON

type RetrieveLocationCustomAttributeResponse

type RetrieveLocationCustomAttributeResponse struct {
	// The retrieved custom attribute. If `with_definition` was set to `true` in the request,
	// the custom attribute definition is returned in the `definition` field.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [RetrieveLocationCustomAttribute](api-endpoint:LocationCustomAttributes-RetrieveLocationCustomAttribute) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*RetrieveLocationCustomAttributeResponse) GetCustomAttribute

func (*RetrieveLocationCustomAttributeResponse) GetErrors

func (*RetrieveLocationCustomAttributeResponse) GetExtraProperties

func (r *RetrieveLocationCustomAttributeResponse) GetExtraProperties() map[string]interface{}

func (*RetrieveLocationCustomAttributeResponse) String

func (*RetrieveLocationCustomAttributeResponse) UnmarshalJSON

func (r *RetrieveLocationCustomAttributeResponse) UnmarshalJSON(data []byte) error

type RetrieveLocationSettingsRequest

type RetrieveLocationSettingsRequest struct {
	// The ID of the location for which to retrieve settings.
	LocationID string `json:"-" url:"-"`
}

type RetrieveLocationSettingsResponse

type RetrieveLocationSettingsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The location settings.
	LocationSettings *CheckoutLocationSettings `json:"location_settings,omitempty" url:"location_settings,omitempty"`
	// contains filtered or unexported fields
}

func (*RetrieveLocationSettingsResponse) GetErrors

func (r *RetrieveLocationSettingsResponse) GetErrors() []*Error

func (*RetrieveLocationSettingsResponse) GetExtraProperties

func (r *RetrieveLocationSettingsResponse) GetExtraProperties() map[string]interface{}

func (*RetrieveLocationSettingsResponse) GetLocationSettings

func (*RetrieveLocationSettingsResponse) String

func (*RetrieveLocationSettingsResponse) UnmarshalJSON

func (r *RetrieveLocationSettingsResponse) UnmarshalJSON(data []byte) error

type RetrieveMerchantCustomAttributeDefinitionResponse

type RetrieveMerchantCustomAttributeDefinitionResponse struct {
	// The retrieved custom attribute definition.
	CustomAttributeDefinition *CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"custom_attribute_definition,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [RetrieveMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-RetrieveMerchantCustomAttributeDefinition) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*RetrieveMerchantCustomAttributeDefinitionResponse) GetCustomAttributeDefinition

func (*RetrieveMerchantCustomAttributeDefinitionResponse) GetErrors

func (*RetrieveMerchantCustomAttributeDefinitionResponse) GetExtraProperties

func (r *RetrieveMerchantCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*RetrieveMerchantCustomAttributeDefinitionResponse) String

func (*RetrieveMerchantCustomAttributeDefinitionResponse) UnmarshalJSON

type RetrieveMerchantCustomAttributeResponse

type RetrieveMerchantCustomAttributeResponse struct {
	// The retrieved custom attribute. If `with_definition` was set to `true` in the request,
	// the custom attribute definition is returned in the `definition` field.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [RetrieveMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-RetrieveMerchantCustomAttribute) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*RetrieveMerchantCustomAttributeResponse) GetCustomAttribute

func (*RetrieveMerchantCustomAttributeResponse) GetErrors

func (*RetrieveMerchantCustomAttributeResponse) GetExtraProperties

func (r *RetrieveMerchantCustomAttributeResponse) GetExtraProperties() map[string]interface{}

func (*RetrieveMerchantCustomAttributeResponse) String

func (*RetrieveMerchantCustomAttributeResponse) UnmarshalJSON

func (r *RetrieveMerchantCustomAttributeResponse) UnmarshalJSON(data []byte) error

type RetrieveMerchantSettingsResponse

type RetrieveMerchantSettingsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The merchant settings.
	MerchantSettings *CheckoutMerchantSettings `json:"merchant_settings,omitempty" url:"merchant_settings,omitempty"`
	// contains filtered or unexported fields
}

func (*RetrieveMerchantSettingsResponse) GetErrors

func (r *RetrieveMerchantSettingsResponse) GetErrors() []*Error

func (*RetrieveMerchantSettingsResponse) GetExtraProperties

func (r *RetrieveMerchantSettingsResponse) GetExtraProperties() map[string]interface{}

func (*RetrieveMerchantSettingsResponse) GetMerchantSettings

func (*RetrieveMerchantSettingsResponse) String

func (*RetrieveMerchantSettingsResponse) UnmarshalJSON

func (r *RetrieveMerchantSettingsResponse) UnmarshalJSON(data []byte) error

type RetrieveOrderCustomAttributeDefinitionResponse

type RetrieveOrderCustomAttributeDefinitionResponse struct {
	// The retrieved custom attribute definition.
	CustomAttributeDefinition *CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"custom_attribute_definition,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from getting an order custom attribute definition.

func (*RetrieveOrderCustomAttributeDefinitionResponse) GetCustomAttributeDefinition

func (*RetrieveOrderCustomAttributeDefinitionResponse) GetErrors

func (*RetrieveOrderCustomAttributeDefinitionResponse) GetExtraProperties

func (r *RetrieveOrderCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*RetrieveOrderCustomAttributeDefinitionResponse) String

func (*RetrieveOrderCustomAttributeDefinitionResponse) UnmarshalJSON

type RetrieveOrderCustomAttributeResponse

type RetrieveOrderCustomAttributeResponse struct {
	// The retrieved custom attribute. If `with_definition` was set to `true` in the request, the custom attribute definition is returned in the `definition field.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from getting an order custom attribute.

func (*RetrieveOrderCustomAttributeResponse) GetCustomAttribute

func (r *RetrieveOrderCustomAttributeResponse) GetCustomAttribute() *CustomAttribute

func (*RetrieveOrderCustomAttributeResponse) GetErrors

func (r *RetrieveOrderCustomAttributeResponse) GetErrors() []*Error

func (*RetrieveOrderCustomAttributeResponse) GetExtraProperties

func (r *RetrieveOrderCustomAttributeResponse) GetExtraProperties() map[string]interface{}

func (*RetrieveOrderCustomAttributeResponse) String

func (*RetrieveOrderCustomAttributeResponse) UnmarshalJSON

func (r *RetrieveOrderCustomAttributeResponse) UnmarshalJSON(data []byte) error

type RetrieveTokenStatusResponse

type RetrieveTokenStatusResponse struct {
	// The list of scopes associated with an access token.
	Scopes []string `json:"scopes,omitempty" url:"scopes,omitempty"`
	// The date and time when the `access_token` expires, in RFC 3339 format. Empty if the token never expires.
	ExpiresAt *string `json:"expires_at,omitempty" url:"expires_at,omitempty"`
	// The Square-issued application ID associated with the access token. This is the same application ID used to obtain the token.
	ClientID *string `json:"client_id,omitempty" url:"client_id,omitempty"`
	// The ID of the authorizing merchant's business.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the `RetrieveTokenStatus` endpoint.

func (*RetrieveTokenStatusResponse) GetClientID

func (r *RetrieveTokenStatusResponse) GetClientID() *string

func (*RetrieveTokenStatusResponse) GetErrors

func (r *RetrieveTokenStatusResponse) GetErrors() []*Error

func (*RetrieveTokenStatusResponse) GetExpiresAt

func (r *RetrieveTokenStatusResponse) GetExpiresAt() *string

func (*RetrieveTokenStatusResponse) GetExtraProperties

func (r *RetrieveTokenStatusResponse) GetExtraProperties() map[string]interface{}

func (*RetrieveTokenStatusResponse) GetMerchantID

func (r *RetrieveTokenStatusResponse) GetMerchantID() *string

func (*RetrieveTokenStatusResponse) GetScopes

func (r *RetrieveTokenStatusResponse) GetScopes() []string

func (*RetrieveTokenStatusResponse) String

func (r *RetrieveTokenStatusResponse) String() string

func (*RetrieveTokenStatusResponse) UnmarshalJSON

func (r *RetrieveTokenStatusResponse) UnmarshalJSON(data []byte) error

type RevokeTokenRequest

type RevokeTokenRequest struct {
	// The Square-issued ID for your application, which is available on the **OAuth** page in the
	// [Developer Dashboard](https://developer.squareup.com/apps).
	ClientID *string `json:"client_id,omitempty" url:"-"`
	// 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" url:"-"`
	// 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" url:"-"`
	// 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" url:"-"`
}

type RevokeTokenResponse

type RevokeTokenResponse struct {
	// If the request is successful, this is `true`.
	Success *bool `json:"success,omitempty" url:"success,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*RevokeTokenResponse) GetErrors

func (r *RevokeTokenResponse) GetErrors() []*Error

func (*RevokeTokenResponse) GetExtraProperties

func (r *RevokeTokenResponse) GetExtraProperties() map[string]interface{}

func (*RevokeTokenResponse) GetSuccess

func (r *RevokeTokenResponse) GetSuccess() *bool

func (*RevokeTokenResponse) String

func (r *RevokeTokenResponse) String() string

func (*RevokeTokenResponse) UnmarshalJSON

func (r *RevokeTokenResponse) UnmarshalJSON(data []byte) error

type RiskEvaluation

type RiskEvaluation struct {
	// The timestamp when payment risk was evaluated, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The risk level associated with the payment
	// See [RiskEvaluationRiskLevel](#type-riskevaluationrisklevel) for possible values
	RiskLevel *RiskEvaluationRiskLevel `json:"risk_level,omitempty" url:"risk_level,omitempty"`
	// contains filtered or unexported fields
}

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).

func (*RiskEvaluation) GetCreatedAt

func (r *RiskEvaluation) GetCreatedAt() *string

func (*RiskEvaluation) GetExtraProperties

func (r *RiskEvaluation) GetExtraProperties() map[string]interface{}

func (*RiskEvaluation) GetRiskLevel

func (r *RiskEvaluation) GetRiskLevel() *RiskEvaluationRiskLevel

func (*RiskEvaluation) String

func (r *RiskEvaluation) String() string

func (*RiskEvaluation) UnmarshalJSON

func (r *RiskEvaluation) UnmarshalJSON(data []byte) error

type RiskEvaluationRiskLevel

type RiskEvaluationRiskLevel string
const (
	RiskEvaluationRiskLevelPending  RiskEvaluationRiskLevel = "PENDING"
	RiskEvaluationRiskLevelNormal   RiskEvaluationRiskLevel = "NORMAL"
	RiskEvaluationRiskLevelModerate RiskEvaluationRiskLevel = "MODERATE"
	RiskEvaluationRiskLevelHigh     RiskEvaluationRiskLevel = "HIGH"
)

func NewRiskEvaluationRiskLevelFromString

func NewRiskEvaluationRiskLevelFromString(s string) (RiskEvaluationRiskLevel, error)

func (RiskEvaluationRiskLevel) Ptr

type SaveCardOptions

type SaveCardOptions struct {
	// The square-assigned ID of the customer linked to the saved card.
	CustomerID string `json:"customer_id" url:"customer_id"`
	// The id of the created card-on-file.
	CardID *string `json:"card_id,omitempty" url:"card_id,omitempty"`
	// An optional user-defined reference ID that can be used to associate
	// this `Card` to another entity in an external system. For example, a customer
	// ID generated by a third-party system.
	ReferenceID *string `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// contains filtered or unexported fields
}

Describes save-card action fields.

func (*SaveCardOptions) GetCardID

func (s *SaveCardOptions) GetCardID() *string

func (*SaveCardOptions) GetCustomerID

func (s *SaveCardOptions) GetCustomerID() string

func (*SaveCardOptions) GetExtraProperties

func (s *SaveCardOptions) GetExtraProperties() map[string]interface{}

func (*SaveCardOptions) GetReferenceID

func (s *SaveCardOptions) GetReferenceID() *string

func (*SaveCardOptions) String

func (s *SaveCardOptions) String() string

func (*SaveCardOptions) UnmarshalJSON

func (s *SaveCardOptions) UnmarshalJSON(data []byte) error

type SearchAvailabilityFilter

type SearchAvailabilityFilter struct {
	// The query expression to search for buy-accessible availabilities with their starting times falling within the specified time range.
	// The time range must be at least 24 hours and at most 32 days long.
	// For waitlist availabilities, the time range can be 0 or more up to 367 days long.
	StartAtRange *TimeRange `json:"start_at_range,omitempty" url:"start_at_range,omitempty"`
	// The query expression to search for buyer-accessible availabilities with their location IDs matching the specified location ID.
	// This query expression cannot be set if `booking_id` is set.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The query expression to search for buyer-accessible availabilities matching the specified list of segment filters.
	// If the size of the `segment_filters` list is `n`, the search returns availabilities with `n` segments per availability.
	//
	// This query expression cannot be set if `booking_id` is set.
	SegmentFilters []*SegmentFilter `json:"segment_filters,omitempty" url:"segment_filters,omitempty"`
	// The query expression to search for buyer-accessible availabilities for an existing booking by matching the specified `booking_id` value.
	// This is commonly used to reschedule an appointment.
	// If this expression is set, the `location_id` and `segment_filters` expressions cannot be set.
	BookingID *string `json:"booking_id,omitempty" url:"booking_id,omitempty"`
	// contains filtered or unexported fields
}

A query filter to search for buyer-accessible availabilities by.

func (*SearchAvailabilityFilter) GetBookingID

func (s *SearchAvailabilityFilter) GetBookingID() *string

func (*SearchAvailabilityFilter) GetExtraProperties

func (s *SearchAvailabilityFilter) GetExtraProperties() map[string]interface{}

func (*SearchAvailabilityFilter) GetLocationID

func (s *SearchAvailabilityFilter) GetLocationID() *string

func (*SearchAvailabilityFilter) GetSegmentFilters

func (s *SearchAvailabilityFilter) GetSegmentFilters() []*SegmentFilter

func (*SearchAvailabilityFilter) GetStartAtRange

func (s *SearchAvailabilityFilter) GetStartAtRange() *TimeRange

func (*SearchAvailabilityFilter) String

func (s *SearchAvailabilityFilter) String() string

func (*SearchAvailabilityFilter) UnmarshalJSON

func (s *SearchAvailabilityFilter) UnmarshalJSON(data []byte) error

type SearchAvailabilityQuery

type SearchAvailabilityQuery struct {
	// The query filter to search for buyer-accessible availabilities of existing bookings.
	Filter *SearchAvailabilityFilter `json:"filter,omitempty" url:"filter,omitempty"`
	// contains filtered or unexported fields
}

The query used to search for buyer-accessible availabilities of bookings.

func (*SearchAvailabilityQuery) GetExtraProperties

func (s *SearchAvailabilityQuery) GetExtraProperties() map[string]interface{}

func (*SearchAvailabilityQuery) GetFilter

func (*SearchAvailabilityQuery) String

func (s *SearchAvailabilityQuery) String() string

func (*SearchAvailabilityQuery) UnmarshalJSON

func (s *SearchAvailabilityQuery) UnmarshalJSON(data []byte) error

type SearchAvailabilityRequest

type SearchAvailabilityRequest struct {
	// Query conditions used to filter buyer-accessible booking availabilities.
	Query *SearchAvailabilityQuery `json:"query,omitempty" url:"-"`
}

type SearchAvailabilityResponse

type SearchAvailabilityResponse struct {
	// List of appointment slots available for booking.
	Availabilities []*Availability `json:"availabilities,omitempty" url:"availabilities,omitempty"`
	// Errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchAvailabilityResponse) GetAvailabilities

func (s *SearchAvailabilityResponse) GetAvailabilities() []*Availability

func (*SearchAvailabilityResponse) GetErrors

func (s *SearchAvailabilityResponse) GetErrors() []*Error

func (*SearchAvailabilityResponse) GetExtraProperties

func (s *SearchAvailabilityResponse) GetExtraProperties() map[string]interface{}

func (*SearchAvailabilityResponse) String

func (s *SearchAvailabilityResponse) String() string

func (*SearchAvailabilityResponse) UnmarshalJSON

func (s *SearchAvailabilityResponse) UnmarshalJSON(data []byte) error

type SearchCatalogItemsRequest

type SearchCatalogItemsRequest struct {
	// 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" url:"-"`
	// The category id query expression to return items containing the specified category IDs.
	CategoryIDs []string `json:"category_ids,omitempty" url:"-"`
	// The stock-level query expression to return item variations with the specified stock levels.
	// See [SearchCatalogItemsRequestStockLevel](#type-searchcatalogitemsrequeststocklevel) for possible values
	StockLevels []SearchCatalogItemsRequestStockLevel `json:"stock_levels,omitempty" url:"-"`
	// The enabled-location query expression to return items and item variations having specified enabled locations.
	EnabledLocationIDs []string `json:"enabled_location_ids,omitempty" url:"-"`
	// The pagination token, returned in the previous response, used to fetch the next batch of pending results.
	Cursor *string `json:"cursor,omitempty" url:"-"`
	// The maximum number of results to return per page. The default value is 100.
	Limit *int `json:"limit,omitempty" url:"-"`
	// The order to sort the results by item names. The default sort order is ascending (`ASC`).
	// See [SortOrder](#type-sortorder) for possible values
	SortOrder *SortOrder `json:"sort_order,omitempty" url:"-"`
	// The product types query expression to return items or item variations having the specified product types.
	ProductTypes []CatalogItemProductType `json:"product_types,omitempty" url:"-"`
	// 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](api-endpoint:Catalog-SearchCatalogItems) endpoint.
	CustomAttributeFilters []*CustomAttributeFilter `json:"custom_attribute_filters,omitempty" url:"-"`
	// The query filter to return not archived (`ARCHIVED_STATE_NOT_ARCHIVED`), archived (`ARCHIVED_STATE_ARCHIVED`), or either type (`ARCHIVED_STATE_ALL`) of items.
	ArchivedState *ArchivedState `json:"archived_state,omitempty" url:"-"`
}

type SearchCatalogItemsRequestStockLevel

type SearchCatalogItemsRequestStockLevel string

Defines supported stock levels of the item inventory.

const (
	SearchCatalogItemsRequestStockLevelOut SearchCatalogItemsRequestStockLevel = "OUT"
	SearchCatalogItemsRequestStockLevelLow SearchCatalogItemsRequestStockLevel = "LOW"
)

func NewSearchCatalogItemsRequestStockLevelFromString

func NewSearchCatalogItemsRequestStockLevelFromString(s string) (SearchCatalogItemsRequestStockLevel, error)

func (SearchCatalogItemsRequestStockLevel) Ptr

type SearchCatalogItemsResponse

type SearchCatalogItemsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// Returned items matching the specified query expressions.
	Items []*CatalogObject `json:"items,omitempty" url:"items,omitempty"`
	// Pagination token used in the next request to return more of the search result.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Ids of returned item variations matching the specified query expression.
	MatchedVariationIDs []string `json:"matched_variation_ids,omitempty" url:"matched_variation_ids,omitempty"`
	// contains filtered or unexported fields
}

Defines the response body returned from the [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) endpoint.

func (*SearchCatalogItemsResponse) GetCursor

func (s *SearchCatalogItemsResponse) GetCursor() *string

func (*SearchCatalogItemsResponse) GetErrors

func (s *SearchCatalogItemsResponse) GetErrors() []*Error

func (*SearchCatalogItemsResponse) GetExtraProperties

func (s *SearchCatalogItemsResponse) GetExtraProperties() map[string]interface{}

func (*SearchCatalogItemsResponse) GetItems

func (s *SearchCatalogItemsResponse) GetItems() []*CatalogObject

func (*SearchCatalogItemsResponse) GetMatchedVariationIDs

func (s *SearchCatalogItemsResponse) GetMatchedVariationIDs() []string

func (*SearchCatalogItemsResponse) String

func (s *SearchCatalogItemsResponse) String() string

func (*SearchCatalogItemsResponse) UnmarshalJSON

func (s *SearchCatalogItemsResponse) UnmarshalJSON(data []byte) error

type SearchCatalogObjectsRequest

type SearchCatalogObjectsRequest struct {
	// The pagination cursor returned in the previous response. Leave unset for an initial request.
	// See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.
	Cursor *string `json:"cursor,omitempty" url:"-"`
	// The desired set of object types to appear in the search results.
	//
	// If this is unspecified, the operation returns objects of all the top level types at the version
	// of the Square API used to make the request. Object types that are nested onto other object types
	// are not included in the defaults.
	//
	// At the current API version the default object types are:
	// ITEM, CATEGORY, TAX, DISCOUNT, MODIFIER_LIST,
	// PRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT,
	// SUBSCRIPTION_PLAN, ITEM_OPTION, CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNT_SETTINGS.
	//
	// Note that if you wish for the query to return objects belonging to nested types (i.e., COMPONENT, IMAGE,
	// ITEM_OPTION_VAL, ITEM_VARIATION, or MODIFIER), you must explicitly include all the types of interest
	// in this field.
	ObjectTypes []CatalogObjectType `json:"object_types,omitempty" url:"-"`
	// If `true`, deleted objects will be included in the results. Defaults to `false`. Deleted objects will have their `is_deleted` field set to `true`. If `include_deleted_objects` is `true`, then the `include_category_path_to_root` request parameter must be `false`. Both properties cannot be `true` at the same time.
	IncludeDeletedObjects *bool `json:"include_deleted_objects,omitempty" url:"-"`
	// If `true`, the response will include additional objects that are related to the
	// requested objects. Related objects are objects that are referenced by object ID by the objects
	// in the response. This is helpful if the objects are being fetched for immediate display to a user.
	// This process only goes one level deep. Objects referenced by the related objects will not be included.
	// For example:
	//
	// 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.
	//
	// Default value: `false`
	IncludeRelatedObjects *bool `json:"include_related_objects,omitempty" url:"-"`
	// 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" url:"-"`
	// 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" url:"-"`
	// 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 *int `json:"limit,omitempty" url:"-"`
	// Specifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists of `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned in the response payload. If `include_category_path_to_root` is `true`, then the `include_deleted_objects` request parameter must be `false`. Both properties cannot be `true` at the same time.
	IncludeCategoryPathToRoot *bool `json:"include_category_path_to_root,omitempty" url:"-"`
}

type SearchCatalogObjectsResponse

type SearchCatalogObjectsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The pagination cursor to be used in a subsequent request. If unset, this is the final response.
	// See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// The CatalogObjects returned.
	Objects []*CatalogObject `json:"objects,omitempty" url:"objects,omitempty"`
	// A list of CatalogObjects referenced by the objects in the `objects` field.
	RelatedObjects []*CatalogObject `json:"related_objects,omitempty" url:"related_objects,omitempty"`
	// 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" url:"latest_time,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchCatalogObjectsResponse) GetCursor

func (s *SearchCatalogObjectsResponse) GetCursor() *string

func (*SearchCatalogObjectsResponse) GetErrors

func (s *SearchCatalogObjectsResponse) GetErrors() []*Error

func (*SearchCatalogObjectsResponse) GetExtraProperties

func (s *SearchCatalogObjectsResponse) GetExtraProperties() map[string]interface{}

func (*SearchCatalogObjectsResponse) GetLatestTime

func (s *SearchCatalogObjectsResponse) GetLatestTime() *string

func (*SearchCatalogObjectsResponse) GetObjects

func (s *SearchCatalogObjectsResponse) GetObjects() []*CatalogObject

func (*SearchCatalogObjectsResponse) GetRelatedObjects

func (s *SearchCatalogObjectsResponse) GetRelatedObjects() []*CatalogObject

func (*SearchCatalogObjectsResponse) String

func (*SearchCatalogObjectsResponse) UnmarshalJSON

func (s *SearchCatalogObjectsResponse) UnmarshalJSON(data []byte) error

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.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"-"`
	// The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.
	// If the specified limit is invalid, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 100.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Limit *int64 `json:"limit,omitempty" url:"-"`
	// The filtering and sorting criteria for the search request. If a query is not specified,
	// Square returns all customer profiles ordered alphabetically by `given_name` and `family_name`.
	Query *CustomerQuery `json:"query,omitempty" url:"-"`
	// Indicates whether to return the total count of matching customers in the `count` field of the response.
	//
	// The default value is `false`.
	Count *bool `json:"count,omitempty" url:"-"`
}

type SearchCustomersResponse

type SearchCustomersResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The customer profiles that match the search query. If any search condition is not met, the result is an empty object (`{}`).
	// Only customer profiles with public information (`given_name`, `family_name`, `company_name`, `email_address`, or `phone_number`)
	// are included in the response.
	Customers []*Customer `json:"customers,omitempty" url:"customers,omitempty"`
	// 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.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// The total count of customers associated with the Square account that match the search query. Only customer profiles with
	// public information (`given_name`, `family_name`, `company_name`, `email_address`, or `phone_number`) are counted. This field is
	// present only if `count` is set to `true` in the request.
	Count *int64 `json:"count,omitempty" url:"count,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the `SearchCustomers` endpoint.

Either `errors` or `customers` is present in a given response (never both).

func (*SearchCustomersResponse) GetCount

func (s *SearchCustomersResponse) GetCount() *int64

func (*SearchCustomersResponse) GetCursor

func (s *SearchCustomersResponse) GetCursor() *string

func (*SearchCustomersResponse) GetCustomers

func (s *SearchCustomersResponse) GetCustomers() []*Customer

func (*SearchCustomersResponse) GetErrors

func (s *SearchCustomersResponse) GetErrors() []*Error

func (*SearchCustomersResponse) GetExtraProperties

func (s *SearchCustomersResponse) GetExtraProperties() map[string]interface{}

func (*SearchCustomersResponse) String

func (s *SearchCustomersResponse) String() string

func (*SearchCustomersResponse) UnmarshalJSON

func (s *SearchCustomersResponse) UnmarshalJSON(data []byte) error

type SearchEventsFilter

type SearchEventsFilter struct {
	// Filter events by event types.
	EventTypes []string `json:"event_types,omitempty" url:"event_types,omitempty"`
	// Filter events by merchant.
	MerchantIDs []string `json:"merchant_ids,omitempty" url:"merchant_ids,omitempty"`
	// Filter events by location.
	LocationIDs []string `json:"location_ids,omitempty" url:"location_ids,omitempty"`
	// Filter events by when they were created.
	CreatedAt *TimeRange `json:"created_at,omitempty" url:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Criteria to filter events by.

func (*SearchEventsFilter) GetCreatedAt

func (s *SearchEventsFilter) GetCreatedAt() *TimeRange

func (*SearchEventsFilter) GetEventTypes

func (s *SearchEventsFilter) GetEventTypes() []string

func (*SearchEventsFilter) GetExtraProperties

func (s *SearchEventsFilter) GetExtraProperties() map[string]interface{}

func (*SearchEventsFilter) GetLocationIDs

func (s *SearchEventsFilter) GetLocationIDs() []string

func (*SearchEventsFilter) GetMerchantIDs

func (s *SearchEventsFilter) GetMerchantIDs() []string

func (*SearchEventsFilter) String

func (s *SearchEventsFilter) String() string

func (*SearchEventsFilter) UnmarshalJSON

func (s *SearchEventsFilter) UnmarshalJSON(data []byte) error

type SearchEventsQuery

type SearchEventsQuery struct {
	// Criteria to filter events by.
	Filter *SearchEventsFilter `json:"filter,omitempty" url:"filter,omitempty"`
	// Criteria to sort events by.
	Sort *SearchEventsSort `json:"sort,omitempty" url:"sort,omitempty"`
	// contains filtered or unexported fields
}

Contains query criteria for the search.

func (*SearchEventsQuery) GetExtraProperties

func (s *SearchEventsQuery) GetExtraProperties() map[string]interface{}

func (*SearchEventsQuery) GetFilter

func (s *SearchEventsQuery) GetFilter() *SearchEventsFilter

func (*SearchEventsQuery) GetSort

func (s *SearchEventsQuery) GetSort() *SearchEventsSort

func (*SearchEventsQuery) String

func (s *SearchEventsQuery) String() string

func (*SearchEventsQuery) UnmarshalJSON

func (s *SearchEventsQuery) UnmarshalJSON(data []byte) error

type SearchEventsRequest

type SearchEventsRequest struct {
	// A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of events for your original query.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"-"`
	// The maximum number of events to return in a single page. The response might contain fewer events. The default value is 100, which is also the maximum allowed value.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	//
	// Default: 100
	Limit *int `json:"limit,omitempty" url:"-"`
	// The filtering and sorting criteria for the search request. To retrieve additional pages using a cursor, you must use the original query.
	Query *SearchEventsQuery `json:"query,omitempty" url:"-"`
}

type SearchEventsResponse

type SearchEventsResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The list of [Event](entity:Event)s returned by the search.
	Events []*Event `json:"events,omitempty" url:"events,omitempty"`
	// Contains the metadata of an event. For more information, see [Event](entity:Event).
	Metadata []*EventMetadata `json:"metadata,omitempty" url:"metadata,omitempty"`
	// 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [SearchEvents](api-endpoint:Events-SearchEvents) endpoint.

Note: if there are errors processing the request, the events field will not be present.

func (*SearchEventsResponse) GetCursor

func (s *SearchEventsResponse) GetCursor() *string

func (*SearchEventsResponse) GetErrors

func (s *SearchEventsResponse) GetErrors() []*Error

func (*SearchEventsResponse) GetEvents

func (s *SearchEventsResponse) GetEvents() []*Event

func (*SearchEventsResponse) GetExtraProperties

func (s *SearchEventsResponse) GetExtraProperties() map[string]interface{}

func (*SearchEventsResponse) GetMetadata

func (s *SearchEventsResponse) GetMetadata() []*EventMetadata

func (*SearchEventsResponse) String

func (s *SearchEventsResponse) String() string

func (*SearchEventsResponse) UnmarshalJSON

func (s *SearchEventsResponse) UnmarshalJSON(data []byte) error

type SearchEventsSort

type SearchEventsSort struct {
	// Sort events by event types.
	// See [SearchEventsSortField](#type-searcheventssortfield) for possible values
	Field *SearchEventsSortField `json:"field,omitempty" url:"field,omitempty"`
	// The order to use for sorting the events.
	// See [SortOrder](#type-sortorder) for possible values
	Order *SortOrder `json:"order,omitempty" url:"order,omitempty"`
	// contains filtered or unexported fields
}

Criteria to sort events by.

func (*SearchEventsSort) GetExtraProperties

func (s *SearchEventsSort) GetExtraProperties() map[string]interface{}

func (*SearchEventsSort) GetOrder

func (s *SearchEventsSort) GetOrder() *SortOrder

func (*SearchEventsSort) String

func (s *SearchEventsSort) String() string

func (*SearchEventsSort) UnmarshalJSON

func (s *SearchEventsSort) UnmarshalJSON(data []byte) error

type SearchEventsSortField

type SearchEventsSortField = string

Specifies the sort key for events returned from a search.

type SearchInvoicesRequest

type SearchInvoicesRequest struct {
	// Describes the query criteria for searching invoices.
	Query *InvoiceQuery `json:"query,omitempty" url:"-"`
	// 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 *int `json:"limit,omitempty" url:"-"`
	// 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"-"`
}

type SearchInvoicesResponse

type SearchInvoicesResponse struct {
	// The list of invoices returned by the search.
	Invoices []*Invoice `json:"invoices,omitempty" url:"invoices,omitempty"`
	// 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Describes a `SearchInvoices` response.

func (*SearchInvoicesResponse) GetCursor

func (s *SearchInvoicesResponse) GetCursor() *string

func (*SearchInvoicesResponse) GetErrors

func (s *SearchInvoicesResponse) GetErrors() []*Error

func (*SearchInvoicesResponse) GetExtraProperties

func (s *SearchInvoicesResponse) GetExtraProperties() map[string]interface{}

func (*SearchInvoicesResponse) GetInvoices

func (s *SearchInvoicesResponse) GetInvoices() []*Invoice

func (*SearchInvoicesResponse) String

func (s *SearchInvoicesResponse) String() string

func (*SearchInvoicesResponse) UnmarshalJSON

func (s *SearchInvoicesResponse) UnmarshalJSON(data []byte) error

type SearchLoyaltyAccountsRequestLoyaltyAccountQuery

type SearchLoyaltyAccountsRequestLoyaltyAccountQuery struct {
	// 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,omitempty" url:"mappings,omitempty"`
	// 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,omitempty" url:"customer_ids,omitempty"`
	// contains filtered or unexported fields
}

The search criteria for the loyalty accounts.

func (*SearchLoyaltyAccountsRequestLoyaltyAccountQuery) GetCustomerIDs

func (*SearchLoyaltyAccountsRequestLoyaltyAccountQuery) GetExtraProperties

func (s *SearchLoyaltyAccountsRequestLoyaltyAccountQuery) GetExtraProperties() map[string]interface{}

func (*SearchLoyaltyAccountsRequestLoyaltyAccountQuery) GetMappings

func (*SearchLoyaltyAccountsRequestLoyaltyAccountQuery) String

func (*SearchLoyaltyAccountsRequestLoyaltyAccountQuery) UnmarshalJSON

type SearchLoyaltyAccountsResponse

type SearchLoyaltyAccountsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The loyalty accounts that met the search criteria,
	// in order of creation date.
	LoyaltyAccounts []*LoyaltyAccount `json:"loyalty_accounts,omitempty" url:"loyalty_accounts,omitempty"`
	// 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

A response that includes loyalty accounts that satisfy the search criteria.

func (*SearchLoyaltyAccountsResponse) GetCursor

func (s *SearchLoyaltyAccountsResponse) GetCursor() *string

func (*SearchLoyaltyAccountsResponse) GetErrors

func (s *SearchLoyaltyAccountsResponse) GetErrors() []*Error

func (*SearchLoyaltyAccountsResponse) GetExtraProperties

func (s *SearchLoyaltyAccountsResponse) GetExtraProperties() map[string]interface{}

func (*SearchLoyaltyAccountsResponse) GetLoyaltyAccounts

func (s *SearchLoyaltyAccountsResponse) GetLoyaltyAccounts() []*LoyaltyAccount

func (*SearchLoyaltyAccountsResponse) String

func (*SearchLoyaltyAccountsResponse) UnmarshalJSON

func (s *SearchLoyaltyAccountsResponse) UnmarshalJSON(data []byte) error

type SearchLoyaltyEventsRequest

type SearchLoyaltyEventsRequest struct {
	// 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" url:"-"`
	// The maximum number of results to include in the response.
	// The last page might contain fewer events.
	// The default is 30 events.
	Limit *int `json:"limit,omitempty" url:"-"`
	// 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"-"`
}

type SearchLoyaltyEventsResponse

type SearchLoyaltyEventsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The loyalty events that satisfy the search criteria.
	Events []*LoyaltyEvent `json:"events,omitempty" url:"events,omitempty"`
	// 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

A response that contains loyalty events that satisfy the search criteria, in order by the `created_at` date.

func (*SearchLoyaltyEventsResponse) GetCursor

func (s *SearchLoyaltyEventsResponse) GetCursor() *string

func (*SearchLoyaltyEventsResponse) GetErrors

func (s *SearchLoyaltyEventsResponse) GetErrors() []*Error

func (*SearchLoyaltyEventsResponse) GetEvents

func (s *SearchLoyaltyEventsResponse) GetEvents() []*LoyaltyEvent

func (*SearchLoyaltyEventsResponse) GetExtraProperties

func (s *SearchLoyaltyEventsResponse) GetExtraProperties() map[string]interface{}

func (*SearchLoyaltyEventsResponse) String

func (s *SearchLoyaltyEventsResponse) String() string

func (*SearchLoyaltyEventsResponse) UnmarshalJSON

func (s *SearchLoyaltyEventsResponse) UnmarshalJSON(data []byte) error

type SearchLoyaltyRewardsRequestLoyaltyRewardQuery

type SearchLoyaltyRewardsRequestLoyaltyRewardQuery struct {
	// The ID of the [loyalty account](entity:LoyaltyAccount) to which the loyalty reward belongs.
	LoyaltyAccountID string `json:"loyalty_account_id" url:"loyalty_account_id"`
	// The status of the loyalty reward.
	// See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible values
	Status *LoyaltyRewardStatus `json:"status,omitempty" url:"status,omitempty"`
	// contains filtered or unexported fields
}

The set of search requirements.

func (*SearchLoyaltyRewardsRequestLoyaltyRewardQuery) GetExtraProperties

func (s *SearchLoyaltyRewardsRequestLoyaltyRewardQuery) GetExtraProperties() map[string]interface{}

func (*SearchLoyaltyRewardsRequestLoyaltyRewardQuery) GetLoyaltyAccountID

func (s *SearchLoyaltyRewardsRequestLoyaltyRewardQuery) GetLoyaltyAccountID() string

func (*SearchLoyaltyRewardsRequestLoyaltyRewardQuery) GetStatus

func (*SearchLoyaltyRewardsRequestLoyaltyRewardQuery) String

func (*SearchLoyaltyRewardsRequestLoyaltyRewardQuery) UnmarshalJSON

func (s *SearchLoyaltyRewardsRequestLoyaltyRewardQuery) UnmarshalJSON(data []byte) error

type SearchLoyaltyRewardsResponse

type SearchLoyaltyRewardsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The loyalty rewards that satisfy the search criteria.
	// These are returned in descending order by `updated_at`.
	Rewards []*LoyaltyReward `json:"rewards,omitempty" url:"rewards,omitempty"`
	// The pagination cursor to be used in a subsequent
	// request. If empty, this is the final response.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

A response that includes the loyalty rewards satisfying the search criteria.

func (*SearchLoyaltyRewardsResponse) GetCursor

func (s *SearchLoyaltyRewardsResponse) GetCursor() *string

func (*SearchLoyaltyRewardsResponse) GetErrors

func (s *SearchLoyaltyRewardsResponse) GetErrors() []*Error

func (*SearchLoyaltyRewardsResponse) GetExtraProperties

func (s *SearchLoyaltyRewardsResponse) GetExtraProperties() map[string]interface{}

func (*SearchLoyaltyRewardsResponse) GetRewards

func (s *SearchLoyaltyRewardsResponse) GetRewards() []*LoyaltyReward

func (*SearchLoyaltyRewardsResponse) String

func (*SearchLoyaltyRewardsResponse) UnmarshalJSON

func (s *SearchLoyaltyRewardsResponse) UnmarshalJSON(data []byte) error

type SearchOrdersCustomerFilter

type SearchOrdersCustomerFilter struct {
	// A list of customer IDs to filter by.
	//
	// Max: 10 customer ids.
	CustomerIDs []string `json:"customer_ids,omitempty" url:"customer_ids,omitempty"`
	// contains filtered or unexported fields
}

A filter based on the order `customer_id` and any tender `customer_id` associated with the order. It does not filter based on the FulfillmentRecipient(entity:FulfillmentRecipient) `customer_id`.

func (*SearchOrdersCustomerFilter) GetCustomerIDs

func (s *SearchOrdersCustomerFilter) GetCustomerIDs() []string

func (*SearchOrdersCustomerFilter) GetExtraProperties

func (s *SearchOrdersCustomerFilter) GetExtraProperties() map[string]interface{}

func (*SearchOrdersCustomerFilter) String

func (s *SearchOrdersCustomerFilter) String() string

func (*SearchOrdersCustomerFilter) UnmarshalJSON

func (s *SearchOrdersCustomerFilter) UnmarshalJSON(data []byte) error

type SearchOrdersDateTimeFilter

type SearchOrdersDateTimeFilter struct {
	// The time range for filtering on the `created_at` timestamp. If you use this
	// value, you must set the `sort_field` in the `OrdersSearchSort` object to
	// `CREATED_AT`.
	CreatedAt *TimeRange `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The time range for filtering on the `updated_at` timestamp. If you use this
	// value, you must set the `sort_field` in the `OrdersSearchSort` object to
	// `UPDATED_AT`.
	UpdatedAt *TimeRange `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The time range for filtering on the `closed_at` timestamp. If you use this
	// value, you must set the `sort_field` in the `OrdersSearchSort` object to
	// `CLOSED_AT`.
	ClosedAt *TimeRange `json:"closed_at,omitempty" url:"closed_at,omitempty"`
	// contains filtered or unexported fields
}

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 set the `sort_field` in [OrdersSort](entity:SearchOrdersSort) to the same field you filter for. For example, if you set the `CLOSED_AT` field in `DateTimeFilter`, you must set the `sort_field` in `SearchOrdersSort` to `CLOSED_AT`. Otherwise, `SearchOrders` throws an error. [Learn more about filtering orders by time range.](https://developer.squareup.com/docs/orders-api/manage-orders/search-orders#important-note-about-filtering-orders-by-time-range)

func (*SearchOrdersDateTimeFilter) GetClosedAt

func (s *SearchOrdersDateTimeFilter) GetClosedAt() *TimeRange

func (*SearchOrdersDateTimeFilter) GetCreatedAt

func (s *SearchOrdersDateTimeFilter) GetCreatedAt() *TimeRange

func (*SearchOrdersDateTimeFilter) GetExtraProperties

func (s *SearchOrdersDateTimeFilter) GetExtraProperties() map[string]interface{}

func (*SearchOrdersDateTimeFilter) GetUpdatedAt

func (s *SearchOrdersDateTimeFilter) GetUpdatedAt() *TimeRange

func (*SearchOrdersDateTimeFilter) String

func (s *SearchOrdersDateTimeFilter) String() string

func (*SearchOrdersDateTimeFilter) UnmarshalJSON

func (s *SearchOrdersDateTimeFilter) UnmarshalJSON(data []byte) error

type SearchOrdersFilter

type SearchOrdersFilter struct {
	// Filter by [OrderState](entity:OrderState).
	StateFilter *SearchOrdersStateFilter `json:"state_filter,omitempty" url:"state_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/search-orders#important-note-about-filtering-orders-by-time-range)
	DateTimeFilter *SearchOrdersDateTimeFilter `json:"date_time_filter,omitempty" url:"date_time_filter,omitempty"`
	// Filter by the fulfillment type or state.
	FulfillmentFilter *SearchOrdersFulfillmentFilter `json:"fulfillment_filter,omitempty" url:"fulfillment_filter,omitempty"`
	// Filter by the source of the order.
	SourceFilter *SearchOrdersSourceFilter `json:"source_filter,omitempty" url:"source_filter,omitempty"`
	// Filter by customers associated with the order.
	CustomerFilter *SearchOrdersCustomerFilter `json:"customer_filter,omitempty" url:"customer_filter,omitempty"`
	// contains filtered or unexported fields
}

Filtering criteria to use for a `SearchOrders` request. Multiple filters are ANDed together.

func (*SearchOrdersFilter) GetCustomerFilter

func (s *SearchOrdersFilter) GetCustomerFilter() *SearchOrdersCustomerFilter

func (*SearchOrdersFilter) GetDateTimeFilter

func (s *SearchOrdersFilter) GetDateTimeFilter() *SearchOrdersDateTimeFilter

func (*SearchOrdersFilter) GetExtraProperties

func (s *SearchOrdersFilter) GetExtraProperties() map[string]interface{}

func (*SearchOrdersFilter) GetFulfillmentFilter

func (s *SearchOrdersFilter) GetFulfillmentFilter() *SearchOrdersFulfillmentFilter

func (*SearchOrdersFilter) GetSourceFilter

func (s *SearchOrdersFilter) GetSourceFilter() *SearchOrdersSourceFilter

func (*SearchOrdersFilter) GetStateFilter

func (s *SearchOrdersFilter) GetStateFilter() *SearchOrdersStateFilter

func (*SearchOrdersFilter) String

func (s *SearchOrdersFilter) String() string

func (*SearchOrdersFilter) UnmarshalJSON

func (s *SearchOrdersFilter) UnmarshalJSON(data []byte) error

type SearchOrdersFulfillmentFilter

type SearchOrdersFulfillmentFilter struct {
	// A list of [fulfillment types](entity:FulfillmentType) to filter
	// for. The list returns orders if any of its fulfillments match any of the fulfillment types
	// listed in this field.
	// See [FulfillmentType](#type-fulfillmenttype) for possible values
	FulfillmentTypes []FulfillmentType `json:"fulfillment_types,omitempty" url:"fulfillment_types,omitempty"`
	// A list of [fulfillment states](entity:FulfillmentState) to filter
	// for. The list returns orders if any of its fulfillments match any of the
	// fulfillment states listed in this field.
	// See [FulfillmentState](#type-fulfillmentstate) for possible values
	FulfillmentStates []FulfillmentState `json:"fulfillment_states,omitempty" url:"fulfillment_states,omitempty"`
	// contains filtered or unexported fields
}

Filter based on [order fulfillment](entity:Fulfillment) information.

func (*SearchOrdersFulfillmentFilter) GetExtraProperties

func (s *SearchOrdersFulfillmentFilter) GetExtraProperties() map[string]interface{}

func (*SearchOrdersFulfillmentFilter) GetFulfillmentStates

func (s *SearchOrdersFulfillmentFilter) GetFulfillmentStates() []FulfillmentState

func (*SearchOrdersFulfillmentFilter) GetFulfillmentTypes

func (s *SearchOrdersFulfillmentFilter) GetFulfillmentTypes() []FulfillmentType

func (*SearchOrdersFulfillmentFilter) String

func (*SearchOrdersFulfillmentFilter) UnmarshalJSON

func (s *SearchOrdersFulfillmentFilter) UnmarshalJSON(data []byte) error

type SearchOrdersQuery

type SearchOrdersQuery struct {
	// Criteria to filter results by.
	Filter *SearchOrdersFilter `json:"filter,omitempty" url:"filter,omitempty"`
	// Criteria to sort results by.
	Sort *SearchOrdersSort `json:"sort,omitempty" url:"sort,omitempty"`
	// contains filtered or unexported fields
}

Contains query criteria for the search.

func (*SearchOrdersQuery) GetExtraProperties

func (s *SearchOrdersQuery) GetExtraProperties() map[string]interface{}

func (*SearchOrdersQuery) GetFilter

func (s *SearchOrdersQuery) GetFilter() *SearchOrdersFilter

func (*SearchOrdersQuery) GetSort

func (s *SearchOrdersQuery) GetSort() *SearchOrdersSort

func (*SearchOrdersQuery) String

func (s *SearchOrdersQuery) String() string

func (*SearchOrdersQuery) UnmarshalJSON

func (s *SearchOrdersQuery) UnmarshalJSON(data []byte) error

type SearchOrdersRequest

type SearchOrdersRequest struct {
	// The location IDs for the orders to query. All locations must belong to
	// the same merchant.
	//
	// Max: 10 location IDs.
	LocationIDs []string `json:"location_ids,omitempty" url:"-"`
	// 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"-"`
	// Query conditions used to filter or sort the results. Note that when
	// retrieving additional pages using a cursor, you must use the original query.
	Query *SearchOrdersQuery `json:"query,omitempty" url:"-"`
	// The maximum number of results to be returned in a single page.
	//
	// Default: `500`
	// Max: `1000`
	Limit *int `json:"limit,omitempty" url:"-"`
	// A Boolean that controls the format of the search results. If `true`,
	// `SearchOrders` returns [OrderEntry](entity:OrderEntry) objects. If `false`, `SearchOrders`
	// returns complete order objects.
	//
	// Default: `false`.
	ReturnEntries *bool `json:"return_entries,omitempty" url:"-"`
}

type SearchOrdersResponse

type SearchOrdersResponse struct {
	// A list of [OrderEntries](entity:OrderEntry) that fit the query
	// conditions. The list is populated only if `return_entries` is set to `true` in the request.
	OrderEntries []*OrderEntry `json:"order_entries,omitempty" url:"order_entries,omitempty"`
	// A list of
	// [Order](entity:Order) objects that match the query conditions. The list is populated only if
	// `return_entries` is set to `false` in the request.
	Orders []*Order `json:"orders,omitempty" url:"orders,omitempty"`
	// 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/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// [Errors](entity:Error) encountered during the search.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Either the `order_entries` or `orders` field is set, depending on whether `return_entries` is set on the SearchOrdersRequest(api-endpoint:Orders-SearchOrders).

func (*SearchOrdersResponse) GetCursor

func (s *SearchOrdersResponse) GetCursor() *string

func (*SearchOrdersResponse) GetErrors

func (s *SearchOrdersResponse) GetErrors() []*Error

func (*SearchOrdersResponse) GetExtraProperties

func (s *SearchOrdersResponse) GetExtraProperties() map[string]interface{}

func (*SearchOrdersResponse) GetOrderEntries

func (s *SearchOrdersResponse) GetOrderEntries() []*OrderEntry

func (*SearchOrdersResponse) GetOrders

func (s *SearchOrdersResponse) GetOrders() []*Order

func (*SearchOrdersResponse) String

func (s *SearchOrdersResponse) String() string

func (*SearchOrdersResponse) UnmarshalJSON

func (s *SearchOrdersResponse) UnmarshalJSON(data []byte) error

type SearchOrdersSort

type SearchOrdersSort struct {
	// The field to sort by.
	//
	// __Important:__ When using a [DateTimeFilter](entity:SearchOrdersFilter),
	// `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` returns an error.
	//
	// Default: `CREATED_AT`.
	// See [SearchOrdersSortField](#type-searchorderssortfield) for possible values
	SortField SearchOrdersSortField `json:"sort_field" url:"sort_field"`
	// The chronological order in which results are returned. Defaults to `DESC`.
	// See [SortOrder](#type-sortorder) for possible values
	SortOrder *SortOrder `json:"sort_order,omitempty" url:"sort_order,omitempty"`
	// contains filtered or unexported fields
}

Sorting criteria for a `SearchOrders` request. Results can only be sorted by a timestamp field.

func (*SearchOrdersSort) GetExtraProperties

func (s *SearchOrdersSort) GetExtraProperties() map[string]interface{}

func (*SearchOrdersSort) GetSortField

func (s *SearchOrdersSort) GetSortField() SearchOrdersSortField

func (*SearchOrdersSort) GetSortOrder

func (s *SearchOrdersSort) GetSortOrder() *SortOrder

func (*SearchOrdersSort) String

func (s *SearchOrdersSort) String() string

func (*SearchOrdersSort) UnmarshalJSON

func (s *SearchOrdersSort) UnmarshalJSON(data []byte) error

type SearchOrdersSortField

type SearchOrdersSortField string

Specifies which timestamp to use to sort `SearchOrder` results.

const (
	SearchOrdersSortFieldCreatedAt SearchOrdersSortField = "CREATED_AT"
	SearchOrdersSortFieldUpdatedAt SearchOrdersSortField = "UPDATED_AT"
	SearchOrdersSortFieldClosedAt  SearchOrdersSortField = "CLOSED_AT"
)

func NewSearchOrdersSortFieldFromString

func NewSearchOrdersSortFieldFromString(s string) (SearchOrdersSortField, error)

func (SearchOrdersSortField) Ptr

type SearchOrdersSourceFilter

type SearchOrdersSourceFilter struct {
	// Filters by the [Source](entity:OrderSource) `name`. The filter returns any orders
	// with a `source.name` that matches any of the listed source names.
	//
	// Max: 10 source names.
	SourceNames []string `json:"source_names,omitempty" url:"source_names,omitempty"`
	// contains filtered or unexported fields
}

A filter based on order `source` information.

func (*SearchOrdersSourceFilter) GetExtraProperties

func (s *SearchOrdersSourceFilter) GetExtraProperties() map[string]interface{}

func (*SearchOrdersSourceFilter) GetSourceNames

func (s *SearchOrdersSourceFilter) GetSourceNames() []string

func (*SearchOrdersSourceFilter) String

func (s *SearchOrdersSourceFilter) String() string

func (*SearchOrdersSourceFilter) UnmarshalJSON

func (s *SearchOrdersSourceFilter) UnmarshalJSON(data []byte) error

type SearchOrdersStateFilter

type SearchOrdersStateFilter struct {
	// States to filter for.
	// See [OrderState](#type-orderstate) for possible values
	States []OrderState `json:"states,omitempty" url:"states,omitempty"`
	// contains filtered or unexported fields
}

Filter by the current order `state`.

func (*SearchOrdersStateFilter) GetExtraProperties

func (s *SearchOrdersStateFilter) GetExtraProperties() map[string]interface{}

func (*SearchOrdersStateFilter) GetStates

func (s *SearchOrdersStateFilter) GetStates() []OrderState

func (*SearchOrdersStateFilter) String

func (s *SearchOrdersStateFilter) String() string

func (*SearchOrdersStateFilter) UnmarshalJSON

func (s *SearchOrdersStateFilter) UnmarshalJSON(data []byte) error

type SearchShiftsResponse

type SearchShiftsResponse struct {
	// Shifts.
	Shifts []*Shift `json:"shifts,omitempty" url:"shifts,omitempty"`
	// An opaque cursor for fetching the next page.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response to a request for `Shift` objects. The response contains the requested `Shift` objects and might contain a set of `Error` objects if the request resulted in errors.

func (*SearchShiftsResponse) GetCursor

func (s *SearchShiftsResponse) GetCursor() *string

func (*SearchShiftsResponse) GetErrors

func (s *SearchShiftsResponse) GetErrors() []*Error

func (*SearchShiftsResponse) GetExtraProperties

func (s *SearchShiftsResponse) GetExtraProperties() map[string]interface{}

func (*SearchShiftsResponse) GetShifts

func (s *SearchShiftsResponse) GetShifts() []*Shift

func (*SearchShiftsResponse) String

func (s *SearchShiftsResponse) String() string

func (*SearchShiftsResponse) UnmarshalJSON

func (s *SearchShiftsResponse) UnmarshalJSON(data []byte) error

type SearchSubscriptionsFilter

type SearchSubscriptionsFilter struct {
	// A filter to select subscriptions based on the subscribing customer IDs.
	CustomerIDs []string `json:"customer_ids,omitempty" url:"customer_ids,omitempty"`
	// A filter to select subscriptions based on the location.
	LocationIDs []string `json:"location_ids,omitempty" url:"location_ids,omitempty"`
	// A filter to select subscriptions based on the source application.
	SourceNames []string `json:"source_names,omitempty" url:"source_names,omitempty"`
	// contains filtered or unexported fields
}

Represents a set of query expressions (filters) to narrow the scope of targeted subscriptions returned by the [SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) endpoint.

func (*SearchSubscriptionsFilter) GetCustomerIDs

func (s *SearchSubscriptionsFilter) GetCustomerIDs() []string

func (*SearchSubscriptionsFilter) GetExtraProperties

func (s *SearchSubscriptionsFilter) GetExtraProperties() map[string]interface{}

func (*SearchSubscriptionsFilter) GetLocationIDs

func (s *SearchSubscriptionsFilter) GetLocationIDs() []string

func (*SearchSubscriptionsFilter) GetSourceNames

func (s *SearchSubscriptionsFilter) GetSourceNames() []string

func (*SearchSubscriptionsFilter) String

func (s *SearchSubscriptionsFilter) String() string

func (*SearchSubscriptionsFilter) UnmarshalJSON

func (s *SearchSubscriptionsFilter) UnmarshalJSON(data []byte) error

type SearchSubscriptionsQuery

type SearchSubscriptionsQuery struct {
	// A list of query expressions.
	Filter *SearchSubscriptionsFilter `json:"filter,omitempty" url:"filter,omitempty"`
	// contains filtered or unexported fields
}

Represents a query, consisting of specified query expressions, used to search for subscriptions.

func (*SearchSubscriptionsQuery) GetExtraProperties

func (s *SearchSubscriptionsQuery) GetExtraProperties() map[string]interface{}

func (*SearchSubscriptionsQuery) GetFilter

func (*SearchSubscriptionsQuery) String

func (s *SearchSubscriptionsQuery) String() string

func (*SearchSubscriptionsQuery) UnmarshalJSON

func (s *SearchSubscriptionsQuery) UnmarshalJSON(data []byte) error

type SearchSubscriptionsRequest

type SearchSubscriptionsRequest struct {
	// When the total number of resulting subscriptions exceeds the limit of a paged response,
	// specify the cursor returned from a preceding response here to fetch the next set of results.
	// If the cursor is unset, the response contains the last page of the results.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"-"`
	// The upper limit on the number of subscriptions to return
	// in a paged response.
	Limit *int `json:"limit,omitempty" url:"-"`
	// A subscription query consisting of specified filtering conditions.
	//
	// If this `query` field is unspecified, the `SearchSubscriptions` call will return all subscriptions.
	Query *SearchSubscriptionsQuery `json:"query,omitempty" url:"-"`
	// An option to include related information in the response.
	//
	// The supported values are:
	//
	// - `actions`: to include scheduled actions on the targeted subscriptions.
	Include []string `json:"include,omitempty" url:"-"`
}

type SearchSubscriptionsResponse

type SearchSubscriptionsResponse struct {
	// Errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The subscriptions matching the specified query expressions.
	Subscriptions []*Subscription `json:"subscriptions,omitempty" url:"subscriptions,omitempty"`
	// When the total number of resulting subscription exceeds the limit of a paged response,
	// the response includes a cursor for you to use in a subsequent request to fetch the next set of results.
	// If the cursor is unset, the response contains the last page of the results.
	//
	// For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Defines output parameters in a response from the [SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) endpoint.

func (*SearchSubscriptionsResponse) GetCursor

func (s *SearchSubscriptionsResponse) GetCursor() *string

func (*SearchSubscriptionsResponse) GetErrors

func (s *SearchSubscriptionsResponse) GetErrors() []*Error

func (*SearchSubscriptionsResponse) GetExtraProperties

func (s *SearchSubscriptionsResponse) GetExtraProperties() map[string]interface{}

func (*SearchSubscriptionsResponse) GetSubscriptions

func (s *SearchSubscriptionsResponse) GetSubscriptions() []*Subscription

func (*SearchSubscriptionsResponse) String

func (s *SearchSubscriptionsResponse) String() string

func (*SearchSubscriptionsResponse) UnmarshalJSON

func (s *SearchSubscriptionsResponse) UnmarshalJSON(data []byte) error

type SearchTeamMembersFilter

type SearchTeamMembersFilter struct {
	// When present, filters by team members assigned to the specified locations.
	// When empty, includes team members assigned to any location.
	LocationIDs []string `json:"location_ids,omitempty" url:"location_ids,omitempty"`
	// When present, filters by team members who match the given status.
	// When empty, includes team members of all statuses.
	// See [TeamMemberStatus](#type-teammemberstatus) for possible values
	Status *TeamMemberStatus `json:"status,omitempty" url:"status,omitempty"`
	// When present and set to true, returns the team member who is the owner of the Square account.
	IsOwner *bool `json:"is_owner,omitempty" url:"is_owner,omitempty"`
	// contains filtered or unexported fields
}

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".

func (*SearchTeamMembersFilter) GetExtraProperties

func (s *SearchTeamMembersFilter) GetExtraProperties() map[string]interface{}

func (*SearchTeamMembersFilter) GetIsOwner

func (s *SearchTeamMembersFilter) GetIsOwner() *bool

func (*SearchTeamMembersFilter) GetLocationIDs

func (s *SearchTeamMembersFilter) GetLocationIDs() []string

func (*SearchTeamMembersFilter) GetStatus

func (s *SearchTeamMembersFilter) GetStatus() *TeamMemberStatus

func (*SearchTeamMembersFilter) String

func (s *SearchTeamMembersFilter) String() string

func (*SearchTeamMembersFilter) UnmarshalJSON

func (s *SearchTeamMembersFilter) UnmarshalJSON(data []byte) error

type SearchTeamMembersQuery

type SearchTeamMembersQuery struct {
	// The options to filter by.
	Filter *SearchTeamMembersFilter `json:"filter,omitempty" url:"filter,omitempty"`
	// contains filtered or unexported fields
}

Represents the parameters in a search for `TeamMember` objects.

func (*SearchTeamMembersQuery) GetExtraProperties

func (s *SearchTeamMembersQuery) GetExtraProperties() map[string]interface{}

func (*SearchTeamMembersQuery) GetFilter

func (*SearchTeamMembersQuery) String

func (s *SearchTeamMembersQuery) String() string

func (*SearchTeamMembersQuery) UnmarshalJSON

func (s *SearchTeamMembersQuery) UnmarshalJSON(data []byte) error

type SearchTeamMembersRequest

type SearchTeamMembersRequest struct {
	// The query parameters.
	Query *SearchTeamMembersQuery `json:"query,omitempty" url:"-"`
	// The maximum number of `TeamMember` objects in a page (100 by default).
	Limit *int `json:"limit,omitempty" url:"-"`
	// The opaque cursor for fetching the next page. For more information, see
	// [pagination](https://developer.squareup.com/docs/working-with-apis/pagination).
	Cursor *string `json:"cursor,omitempty" url:"-"`
}

type SearchTeamMembersResponse

type SearchTeamMembersResponse struct {
	// The filtered list of `TeamMember` objects.
	TeamMembers []*TeamMember `json:"team_members,omitempty" url:"team_members,omitempty"`
	// The opaque cursor for fetching the next page. For more information, see
	// [pagination](https://developer.squareup.com/docs/working-with-apis/pagination).
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// The errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from a search request containing a filtered list of `TeamMember` objects.

func (*SearchTeamMembersResponse) GetCursor

func (s *SearchTeamMembersResponse) GetCursor() *string

func (*SearchTeamMembersResponse) GetErrors

func (s *SearchTeamMembersResponse) GetErrors() []*Error

func (*SearchTeamMembersResponse) GetExtraProperties

func (s *SearchTeamMembersResponse) GetExtraProperties() map[string]interface{}

func (*SearchTeamMembersResponse) GetTeamMembers

func (s *SearchTeamMembersResponse) GetTeamMembers() []*TeamMember

func (*SearchTeamMembersResponse) String

func (s *SearchTeamMembersResponse) String() string

func (*SearchTeamMembersResponse) UnmarshalJSON

func (s *SearchTeamMembersResponse) UnmarshalJSON(data []byte) error

type SearchTerminalActionsResponse

type SearchTerminalActionsResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested search result of `TerminalAction`s.
	Action []*TerminalAction `json:"action,omitempty" url:"action,omitempty"`
	// The pagination cursor to be used in a subsequent request. If empty,
	// this is the final response.
	//
	// See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more
	// information.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchTerminalActionsResponse) GetAction

func (*SearchTerminalActionsResponse) GetCursor

func (s *SearchTerminalActionsResponse) GetCursor() *string

func (*SearchTerminalActionsResponse) GetErrors

func (s *SearchTerminalActionsResponse) GetErrors() []*Error

func (*SearchTerminalActionsResponse) GetExtraProperties

func (s *SearchTerminalActionsResponse) GetExtraProperties() map[string]interface{}

func (*SearchTerminalActionsResponse) String

func (*SearchTerminalActionsResponse) UnmarshalJSON

func (s *SearchTerminalActionsResponse) UnmarshalJSON(data []byte) error

type SearchTerminalCheckoutsResponse

type SearchTerminalCheckoutsResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested search result of `TerminalCheckout` objects.
	Checkouts []*TerminalCheckout `json:"checkouts,omitempty" url:"checkouts,omitempty"`
	// The pagination cursor to be used in a subsequent request. If empty,
	// this is the final response.
	//
	// See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchTerminalCheckoutsResponse) GetCheckouts

func (*SearchTerminalCheckoutsResponse) GetCursor

func (s *SearchTerminalCheckoutsResponse) GetCursor() *string

func (*SearchTerminalCheckoutsResponse) GetErrors

func (s *SearchTerminalCheckoutsResponse) GetErrors() []*Error

func (*SearchTerminalCheckoutsResponse) GetExtraProperties

func (s *SearchTerminalCheckoutsResponse) GetExtraProperties() map[string]interface{}

func (*SearchTerminalCheckoutsResponse) String

func (*SearchTerminalCheckoutsResponse) UnmarshalJSON

func (s *SearchTerminalCheckoutsResponse) UnmarshalJSON(data []byte) error

type SearchTerminalRefundsResponse

type SearchTerminalRefundsResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The requested search result of `TerminalRefund` objects.
	Refunds []*TerminalRefund `json:"refunds,omitempty" url:"refunds,omitempty"`
	// The pagination cursor to be used in a subsequent request. If empty,
	// this is the final response.
	//
	// See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.
	Cursor *string `json:"cursor,omitempty" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchTerminalRefundsResponse) GetCursor

func (s *SearchTerminalRefundsResponse) GetCursor() *string

func (*SearchTerminalRefundsResponse) GetErrors

func (s *SearchTerminalRefundsResponse) GetErrors() []*Error

func (*SearchTerminalRefundsResponse) GetExtraProperties

func (s *SearchTerminalRefundsResponse) GetExtraProperties() map[string]interface{}

func (*SearchTerminalRefundsResponse) GetRefunds

func (s *SearchTerminalRefundsResponse) GetRefunds() []*TerminalRefund

func (*SearchTerminalRefundsResponse) String

func (*SearchTerminalRefundsResponse) UnmarshalJSON

func (s *SearchTerminalRefundsResponse) UnmarshalJSON(data []byte) error

type SearchVendorsRequest

type SearchVendorsRequest struct {
	// Specifies a filter used to search for vendors.
	Filter *SearchVendorsRequestFilter `json:"filter,omitempty" url:"-"`
	// Specifies a sorter used to sort the returned vendors.
	Sort *SearchVendorsRequestSort `json:"sort,omitempty" url:"-"`
	// 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" url:"-"`
}

type SearchVendorsRequestFilter

type SearchVendorsRequestFilter struct {
	// The names of the [Vendor](entity:Vendor) objects to retrieve.
	Name []string `json:"name,omitempty" url:"name,omitempty"`
	// The statuses of the [Vendor](entity:Vendor) objects to retrieve.
	// See [VendorStatus](#type-vendorstatus) for possible values
	Status []VendorStatus `json:"status,omitempty" url:"status,omitempty"`
	// contains filtered or unexported fields
}

Defines supported query expressions to search for vendors by.

func (*SearchVendorsRequestFilter) GetExtraProperties

func (s *SearchVendorsRequestFilter) GetExtraProperties() map[string]interface{}

func (*SearchVendorsRequestFilter) GetName

func (s *SearchVendorsRequestFilter) GetName() []string

func (*SearchVendorsRequestFilter) GetStatus

func (s *SearchVendorsRequestFilter) GetStatus() []VendorStatus

func (*SearchVendorsRequestFilter) String

func (s *SearchVendorsRequestFilter) String() string

func (*SearchVendorsRequestFilter) UnmarshalJSON

func (s *SearchVendorsRequestFilter) UnmarshalJSON(data []byte) error

type SearchVendorsRequestSort

type SearchVendorsRequestSort struct {
	// Specifies the sort key to sort the returned vendors.
	// See [Field](#type-field) for possible values
	Field *SearchVendorsRequestSortField `json:"field,omitempty" url:"field,omitempty"`
	// Specifies the sort order for the returned vendors.
	// See [SortOrder](#type-sortorder) for possible values
	Order *SortOrder `json:"order,omitempty" url:"order,omitempty"`
	// contains filtered or unexported fields
}

Defines a sorter used to sort results from [SearchVendors](api-endpoint:Vendors-SearchVendors).

func (*SearchVendorsRequestSort) GetExtraProperties

func (s *SearchVendorsRequestSort) GetExtraProperties() map[string]interface{}

func (*SearchVendorsRequestSort) GetField

func (*SearchVendorsRequestSort) GetOrder

func (s *SearchVendorsRequestSort) GetOrder() *SortOrder

func (*SearchVendorsRequestSort) String

func (s *SearchVendorsRequestSort) String() string

func (*SearchVendorsRequestSort) UnmarshalJSON

func (s *SearchVendorsRequestSort) UnmarshalJSON(data []byte) error

type SearchVendorsRequestSortField

type SearchVendorsRequestSortField string

The field to sort the returned Vendor(entity:Vendor) objects by.

const (
	SearchVendorsRequestSortFieldName      SearchVendorsRequestSortField = "NAME"
	SearchVendorsRequestSortFieldCreatedAt SearchVendorsRequestSortField = "CREATED_AT"
)

func NewSearchVendorsRequestSortFieldFromString

func NewSearchVendorsRequestSortFieldFromString(s string) (SearchVendorsRequestSortField, error)

func (SearchVendorsRequestSortField) Ptr

type SearchVendorsResponse

type SearchVendorsResponse struct {
	// Errors encountered when the request fails.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The [Vendor](entity:Vendor) objects matching the specified search filter.
	Vendors []*Vendor `json:"vendors,omitempty" url:"vendors,omitempty"`
	// 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" url:"cursor,omitempty"`
	// contains filtered or unexported fields
}

Represents an output from a call to [SearchVendors](api-endpoint:Vendors-SearchVendors).

func (*SearchVendorsResponse) GetCursor

func (s *SearchVendorsResponse) GetCursor() *string

func (*SearchVendorsResponse) GetErrors

func (s *SearchVendorsResponse) GetErrors() []*Error

func (*SearchVendorsResponse) GetExtraProperties

func (s *SearchVendorsResponse) GetExtraProperties() map[string]interface{}

func (*SearchVendorsResponse) GetVendors

func (s *SearchVendorsResponse) GetVendors() []*Vendor

func (*SearchVendorsResponse) String

func (s *SearchVendorsResponse) String() string

func (*SearchVendorsResponse) UnmarshalJSON

func (s *SearchVendorsResponse) UnmarshalJSON(data []byte) error

type SegmentFilter

type SegmentFilter struct {
	// The ID of the [CatalogItemVariation](entity:CatalogItemVariation) object representing the service booked in this segment.
	ServiceVariationID string `json:"service_variation_id" url:"service_variation_id"`
	// A query filter to search for buyer-accessible appointment segments with service-providing team members matching the specified list of team member IDs.  Supported query expressions are
	// - `ANY`: return the appointment segments with team members whose IDs match any member in this list.
	// - `NONE`: return the appointment segments with team members whose IDs are not in this list.
	// - `ALL`: not supported.
	//
	// When no expression is specified, any service-providing team member is eligible to fulfill the Booking.
	TeamMemberIDFilter *FilterValue `json:"team_member_id_filter,omitempty" url:"team_member_id_filter,omitempty"`
	// contains filtered or unexported fields
}

A query filter to search for buyer-accessible appointment segments by.

func (*SegmentFilter) GetExtraProperties

func (s *SegmentFilter) GetExtraProperties() map[string]interface{}

func (*SegmentFilter) GetServiceVariationID

func (s *SegmentFilter) GetServiceVariationID() string

func (*SegmentFilter) GetTeamMemberIDFilter

func (s *SegmentFilter) GetTeamMemberIDFilter() *FilterValue

func (*SegmentFilter) String

func (s *SegmentFilter) String() string

func (*SegmentFilter) UnmarshalJSON

func (s *SegmentFilter) UnmarshalJSON(data []byte) error

type SelectOption

type SelectOption struct {
	// The reference id for the option.
	ReferenceID string `json:"reference_id" url:"reference_id"`
	// The title text that displays in the select option button.
	Title string `json:"title" url:"title"`
	// contains filtered or unexported fields
}

func (*SelectOption) GetExtraProperties

func (s *SelectOption) GetExtraProperties() map[string]interface{}

func (*SelectOption) GetReferenceID

func (s *SelectOption) GetReferenceID() string

func (*SelectOption) GetTitle

func (s *SelectOption) GetTitle() string

func (*SelectOption) String

func (s *SelectOption) String() string

func (*SelectOption) UnmarshalJSON

func (s *SelectOption) UnmarshalJSON(data []byte) error

type SelectOptions

type SelectOptions struct {
	// The title text to display in the select flow on the Terminal.
	Title string `json:"title" url:"title"`
	// The body text to display in the select flow on the Terminal.
	Body string `json:"body" url:"body"`
	// Represents the buttons/options that should be displayed in the select flow on the Terminal.
	Options []*SelectOption `json:"options,omitempty" url:"options,omitempty"`
	// The buyer’s selected option.
	SelectedOption *SelectOption `json:"selected_option,omitempty" url:"selected_option,omitempty"`
	// contains filtered or unexported fields
}

func (*SelectOptions) GetBody

func (s *SelectOptions) GetBody() string

func (*SelectOptions) GetExtraProperties

func (s *SelectOptions) GetExtraProperties() map[string]interface{}

func (*SelectOptions) GetOptions

func (s *SelectOptions) GetOptions() []*SelectOption

func (*SelectOptions) GetSelectedOption

func (s *SelectOptions) GetSelectedOption() *SelectOption

func (*SelectOptions) GetTitle

func (s *SelectOptions) GetTitle() string

func (*SelectOptions) String

func (s *SelectOptions) String() string

func (*SelectOptions) UnmarshalJSON

func (s *SelectOptions) UnmarshalJSON(data []byte) error

type Shift

type Shift struct {
	// The UUID for this object.
	ID *string `json:"id,omitempty" url:"id,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" url:"employee_id,omitempty"`
	// The ID of the location this shift occurred at. The location should be based on
	// where the employee clocked in.
	LocationID string `json:"location_id" url:"location_id"`
	// The read-only convenience value that is calculated from the location based
	// on the `location_id`. Format: the IANA timezone database identifier for the
	// location timezone.
	Timezone *string `json:"timezone,omitempty" url:"timezone,omitempty"`
	// RFC 3339; shifted to the location timezone + offset. Precision up to the
	// minute is respected; seconds are truncated.
	StartAt string `json:"start_at" url:"start_at"`
	// RFC 3339; shifted to the timezone + offset. Precision up to the minute is
	// respected; seconds are truncated.
	EndAt *string `json:"end_at,omitempty" url:"end_at,omitempty"`
	// Job and pay related information. If the wage is not set on create, it defaults to a wage
	// of zero. If the title is not set on create, it defaults to the name of the role the employee
	// is assigned to, if any.
	Wage *ShiftWage `json:"wage,omitempty" url:"wage,omitempty"`
	// A list of all the paid or unpaid breaks that were taken during this shift.
	Breaks []*Break `json:"breaks,omitempty" url:"breaks,omitempty"`
	// Describes the working state of the current `Shift`.
	// See [ShiftStatus](#type-shiftstatus) for possible values
	Status *ShiftStatus `json:"status,omitempty" url:"status,omitempty"`
	// Used for resolving concurrency issues. The request fails if the version
	// provided does not match the server version at the time of the request. If not provided,
	// Square executes a blind write; potentially overwriting data from another
	// write.
	Version *int `json:"version,omitempty" url:"version,omitempty"`
	// A read-only timestamp in RFC 3339 format; presented in UTC.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// A read-only timestamp in RFC 3339 format; presented in UTC.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,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" url:"team_member_id,omitempty"`
	// The tips declared by the team member for the shift.
	DeclaredCashTipMoney *Money `json:"declared_cash_tip_money,omitempty" url:"declared_cash_tip_money,omitempty"`
	// contains filtered or unexported fields
}

A record of the hourly rate, start, and end times for a single work shift for an employee. This might include a record of the start and end times for breaks taken during the shift.

func (*Shift) GetBreaks

func (s *Shift) GetBreaks() []*Break

func (*Shift) GetCreatedAt

func (s *Shift) GetCreatedAt() *string

func (*Shift) GetDeclaredCashTipMoney

func (s *Shift) GetDeclaredCashTipMoney() *Money

func (*Shift) GetEmployeeID

func (s *Shift) GetEmployeeID() *string

func (*Shift) GetEndAt

func (s *Shift) GetEndAt() *string

func (*Shift) GetExtraProperties

func (s *Shift) GetExtraProperties() map[string]interface{}

func (*Shift) GetID

func (s *Shift) GetID() *string

func (*Shift) GetLocationID

func (s *Shift) GetLocationID() string

func (*Shift) GetStartAt

func (s *Shift) GetStartAt() string

func (*Shift) GetStatus

func (s *Shift) GetStatus() *ShiftStatus

func (*Shift) GetTeamMemberID

func (s *Shift) GetTeamMemberID() *string

func (*Shift) GetTimezone

func (s *Shift) GetTimezone() *string

func (*Shift) GetUpdatedAt

func (s *Shift) GetUpdatedAt() *string

func (*Shift) GetVersion

func (s *Shift) GetVersion() *int

func (*Shift) GetWage

func (s *Shift) GetWage() *ShiftWage

func (*Shift) String

func (s *Shift) String() string

func (*Shift) UnmarshalJSON

func (s *Shift) UnmarshalJSON(data []byte) error

type ShiftFilter

type ShiftFilter struct {
	// Fetch shifts for the specified location.
	LocationIDs []string `json:"location_ids,omitempty" url:"location_ids,omitempty"`
	// Fetch shifts for the specified employees. DEPRECATED at version 2020-08-26. Use `team_member_ids` instead.
	EmployeeIDs []string `json:"employee_ids,omitempty" url:"employee_ids,omitempty"`
	// Fetch a `Shift` instance by `Shift.status`.
	// See [ShiftFilterStatus](#type-shiftfilterstatus) for possible values
	Status *ShiftFilterStatus `json:"status,omitempty" url:"status,omitempty"`
	// Fetch `Shift` instances that start in the time range - Inclusive.
	Start *TimeRange `json:"start,omitempty" url:"start,omitempty"`
	// Fetch the `Shift` instances that end in the time range - Inclusive.
	End *TimeRange `json:"end,omitempty" url:"end,omitempty"`
	// Fetch the `Shift` instances based on the workday date range.
	Workday *ShiftWorkday `json:"workday,omitempty" url:"workday,omitempty"`
	// Fetch shifts for the specified team members. Replaced `employee_ids` at version "2020-08-26".
	TeamMemberIDs []string `json:"team_member_ids,omitempty" url:"team_member_ids,omitempty"`
	// contains filtered or unexported fields
}

Defines a filter used in a search for `Shift` records. `AND` logic is used by Square's servers to apply each filter property specified.

func (*ShiftFilter) GetEmployeeIDs

func (s *ShiftFilter) GetEmployeeIDs() []string

func (*ShiftFilter) GetEnd

func (s *ShiftFilter) GetEnd() *TimeRange

func (*ShiftFilter) GetExtraProperties

func (s *ShiftFilter) GetExtraProperties() map[string]interface{}

func (*ShiftFilter) GetLocationIDs

func (s *ShiftFilter) GetLocationIDs() []string

func (*ShiftFilter) GetStart

func (s *ShiftFilter) GetStart() *TimeRange

func (*ShiftFilter) GetStatus

func (s *ShiftFilter) GetStatus() *ShiftFilterStatus

func (*ShiftFilter) GetTeamMemberIDs

func (s *ShiftFilter) GetTeamMemberIDs() []string

func (*ShiftFilter) GetWorkday

func (s *ShiftFilter) GetWorkday() *ShiftWorkday

func (*ShiftFilter) String

func (s *ShiftFilter) String() string

func (*ShiftFilter) UnmarshalJSON

func (s *ShiftFilter) UnmarshalJSON(data []byte) error

type ShiftFilterStatus

type ShiftFilterStatus string

Specifies the `status` of `Shift` records to be returned.

const (
	ShiftFilterStatusOpen   ShiftFilterStatus = "OPEN"
	ShiftFilterStatusClosed ShiftFilterStatus = "CLOSED"
)

func NewShiftFilterStatusFromString

func NewShiftFilterStatusFromString(s string) (ShiftFilterStatus, error)

func (ShiftFilterStatus) Ptr

type ShiftQuery

type ShiftQuery struct {
	// Query filter options.
	Filter *ShiftFilter `json:"filter,omitempty" url:"filter,omitempty"`
	// Sort order details.
	Sort *ShiftSort `json:"sort,omitempty" url:"sort,omitempty"`
	// contains filtered or unexported fields
}

The parameters of a `Shift` search query, which includes filter and sort options.

func (*ShiftQuery) GetExtraProperties

func (s *ShiftQuery) GetExtraProperties() map[string]interface{}

func (*ShiftQuery) GetFilter

func (s *ShiftQuery) GetFilter() *ShiftFilter

func (*ShiftQuery) GetSort

func (s *ShiftQuery) GetSort() *ShiftSort

func (*ShiftQuery) String

func (s *ShiftQuery) String() string

func (*ShiftQuery) UnmarshalJSON

func (s *ShiftQuery) UnmarshalJSON(data []byte) error

type ShiftSort

type ShiftSort struct {
	// The field to sort on.
	// See [ShiftSortField](#type-shiftsortfield) for possible values
	Field *ShiftSortField `json:"field,omitempty" url:"field,omitempty"`
	// The order in which results are returned. Defaults to DESC.
	// See [SortOrder](#type-sortorder) for possible values
	Order *SortOrder `json:"order,omitempty" url:"order,omitempty"`
	// contains filtered or unexported fields
}

Sets the sort order of search results.

func (*ShiftSort) GetExtraProperties

func (s *ShiftSort) GetExtraProperties() map[string]interface{}

func (*ShiftSort) GetField

func (s *ShiftSort) GetField() *ShiftSortField

func (*ShiftSort) GetOrder

func (s *ShiftSort) GetOrder() *SortOrder

func (*ShiftSort) String

func (s *ShiftSort) String() string

func (*ShiftSort) UnmarshalJSON

func (s *ShiftSort) UnmarshalJSON(data []byte) error

type ShiftSortField

type ShiftSortField string

Enumerates the `Shift` fields to sort on.

const (
	ShiftSortFieldStartAt   ShiftSortField = "START_AT"
	ShiftSortFieldEndAt     ShiftSortField = "END_AT"
	ShiftSortFieldCreatedAt ShiftSortField = "CREATED_AT"
	ShiftSortFieldUpdatedAt ShiftSortField = "UPDATED_AT"
)

func NewShiftSortFieldFromString

func NewShiftSortFieldFromString(s string) (ShiftSortField, error)

func (ShiftSortField) Ptr

func (s ShiftSortField) Ptr() *ShiftSortField

type ShiftStatus

type ShiftStatus string

Enumerates the possible status of a `Shift`.

const (
	ShiftStatusOpen   ShiftStatus = "OPEN"
	ShiftStatusClosed ShiftStatus = "CLOSED"
)

func NewShiftStatusFromString

func NewShiftStatusFromString(s string) (ShiftStatus, error)

func (ShiftStatus) Ptr

func (s ShiftStatus) Ptr() *ShiftStatus

type ShiftWage

type ShiftWage struct {
	// The name of the job performed during this shift.
	Title *string `json:"title,omitempty" url:"title,omitempty"`
	// Can be a custom-set hourly wage or the calculated effective hourly
	// wage based on the annual wage and hours worked per week.
	HourlyRate *Money `json:"hourly_rate,omitempty" url:"hourly_rate,omitempty"`
	// The id of the job performed during this shift. Square
	// labor-reporting UIs might group shifts together by id. This cannot be used to retrieve the job.
	JobID *string `json:"job_id,omitempty" url:"job_id,omitempty"`
	// Whether team members are eligible for tips when working this job.
	TipEligible *bool `json:"tip_eligible,omitempty" url:"tip_eligible,omitempty"`
	// contains filtered or unexported fields
}

The hourly wage rate used to compensate an employee for this shift.

func (*ShiftWage) GetExtraProperties

func (s *ShiftWage) GetExtraProperties() map[string]interface{}

func (*ShiftWage) GetHourlyRate

func (s *ShiftWage) GetHourlyRate() *Money

func (*ShiftWage) GetJobID

func (s *ShiftWage) GetJobID() *string

func (*ShiftWage) GetTipEligible

func (s *ShiftWage) GetTipEligible() *bool

func (*ShiftWage) GetTitle

func (s *ShiftWage) GetTitle() *string

func (*ShiftWage) String

func (s *ShiftWage) String() string

func (*ShiftWage) UnmarshalJSON

func (s *ShiftWage) UnmarshalJSON(data []byte) error

type ShiftWorkday

type ShiftWorkday struct {
	// Dates for fetching the shifts.
	DateRange *DateRange `json:"date_range,omitempty" url:"date_range,omitempty"`
	// The strategy on which the dates are applied.
	// See [ShiftWorkdayMatcher](#type-shiftworkdaymatcher) for possible values
	MatchShiftsBy *ShiftWorkdayMatcher `json:"match_shifts_by,omitempty" url:"match_shifts_by,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" url:"default_timezone,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*ShiftWorkday) GetDateRange

func (s *ShiftWorkday) GetDateRange() *DateRange

func (*ShiftWorkday) GetDefaultTimezone

func (s *ShiftWorkday) GetDefaultTimezone() *string

func (*ShiftWorkday) GetExtraProperties

func (s *ShiftWorkday) GetExtraProperties() map[string]interface{}

func (*ShiftWorkday) GetMatchShiftsBy

func (s *ShiftWorkday) GetMatchShiftsBy() *ShiftWorkdayMatcher

func (*ShiftWorkday) String

func (s *ShiftWorkday) String() string

func (*ShiftWorkday) UnmarshalJSON

func (s *ShiftWorkday) UnmarshalJSON(data []byte) error

type ShiftWorkdayMatcher

type ShiftWorkdayMatcher string

Defines the logic used to apply a workday filter.

const (
	ShiftWorkdayMatcherStartAt      ShiftWorkdayMatcher = "START_AT"
	ShiftWorkdayMatcherEndAt        ShiftWorkdayMatcher = "END_AT"
	ShiftWorkdayMatcherIntersection ShiftWorkdayMatcher = "INTERSECTION"
)

func NewShiftWorkdayMatcherFromString

func NewShiftWorkdayMatcherFromString(s string) (ShiftWorkdayMatcher, error)

func (ShiftWorkdayMatcher) Ptr

type ShippingFee

type ShippingFee struct {
	// The name for the shipping fee.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The amount and currency for the shipping fee.
	Charge *Money `json:"charge,omitempty" url:"charge,omitempty"`
	// contains filtered or unexported fields
}

func (*ShippingFee) GetCharge

func (s *ShippingFee) GetCharge() *Money

func (*ShippingFee) GetExtraProperties

func (s *ShippingFee) GetExtraProperties() map[string]interface{}

func (*ShippingFee) GetName

func (s *ShippingFee) GetName() *string

func (*ShippingFee) String

func (s *ShippingFee) String() string

func (*ShippingFee) UnmarshalJSON

func (s *ShippingFee) UnmarshalJSON(data []byte) error

type SignatureImage

type SignatureImage struct {
	// The mime/type of the image data.
	// Use `image/png;base64` for png.
	ImageType *string `json:"image_type,omitempty" url:"image_type,omitempty"`
	// The base64 representation of the image.
	Data *string `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*SignatureImage) GetData

func (s *SignatureImage) GetData() *string

func (*SignatureImage) GetExtraProperties

func (s *SignatureImage) GetExtraProperties() map[string]interface{}

func (*SignatureImage) GetImageType

func (s *SignatureImage) GetImageType() *string

func (*SignatureImage) String

func (s *SignatureImage) String() string

func (*SignatureImage) UnmarshalJSON

func (s *SignatureImage) UnmarshalJSON(data []byte) error

type SignatureOptions

type SignatureOptions struct {
	// The title text to display in the signature capture flow on the Terminal.
	Title string `json:"title" url:"title"`
	// The body text to display in the signature capture flow on the Terminal.
	Body string `json:"body" url:"body"`
	// An image representation of the collected signature.
	Signature []*SignatureImage `json:"signature,omitempty" url:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*SignatureOptions) GetBody

func (s *SignatureOptions) GetBody() string

func (*SignatureOptions) GetExtraProperties

func (s *SignatureOptions) GetExtraProperties() map[string]interface{}

func (*SignatureOptions) GetSignature

func (s *SignatureOptions) GetSignature() []*SignatureImage

func (*SignatureOptions) GetTitle

func (s *SignatureOptions) GetTitle() string

func (*SignatureOptions) String

func (s *SignatureOptions) String() string

func (*SignatureOptions) UnmarshalJSON

func (s *SignatureOptions) UnmarshalJSON(data []byte) error

type Site

type Site struct {
	// The Square-assigned ID of the site.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The title of the site.
	SiteTitle *string `json:"site_title,omitempty" url:"site_title,omitempty"`
	// The domain of the site (without the protocol). For example, `mysite1.square.site`.
	Domain *string `json:"domain,omitempty" url:"domain,omitempty"`
	// Indicates whether the site is published.
	IsPublished *bool `json:"is_published,omitempty" url:"is_published,omitempty"`
	// The timestamp of when the site was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp of when the site was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Represents a Square Online site, which is an online store for a Square seller.

func (*Site) GetCreatedAt

func (s *Site) GetCreatedAt() *string

func (*Site) GetDomain

func (s *Site) GetDomain() *string

func (*Site) GetExtraProperties

func (s *Site) GetExtraProperties() map[string]interface{}

func (*Site) GetID

func (s *Site) GetID() *string

func (*Site) GetIsPublished

func (s *Site) GetIsPublished() *bool

func (*Site) GetSiteTitle

func (s *Site) GetSiteTitle() *string

func (*Site) GetUpdatedAt

func (s *Site) GetUpdatedAt() *string

func (*Site) String

func (s *Site) String() string

func (*Site) UnmarshalJSON

func (s *Site) UnmarshalJSON(data []byte) error

type Snippet

type Snippet struct {
	// The Square-assigned ID for the snippet.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The ID of the site that contains the snippet.
	SiteID *string `json:"site_id,omitempty" url:"site_id,omitempty"`
	// The snippet code, which can contain valid HTML, JavaScript, or both.
	Content string `json:"content" url:"content"`
	// The timestamp of when the snippet was initially added to the site, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp of when the snippet was last updated on the site, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Represents the snippet that is added to a Square Online site. The snippet code is injected into the `head` element of all pages on the site, except for checkout pages.

func (*Snippet) GetContent

func (s *Snippet) GetContent() string

func (*Snippet) GetCreatedAt

func (s *Snippet) GetCreatedAt() *string

func (*Snippet) GetExtraProperties

func (s *Snippet) GetExtraProperties() map[string]interface{}

func (*Snippet) GetID

func (s *Snippet) GetID() *string

func (*Snippet) GetSiteID

func (s *Snippet) GetSiteID() *string

func (*Snippet) GetUpdatedAt

func (s *Snippet) GetUpdatedAt() *string

func (*Snippet) String

func (s *Snippet) String() string

func (*Snippet) UnmarshalJSON

func (s *Snippet) UnmarshalJSON(data []byte) error

type SnippetsDeleteRequest

type SnippetsDeleteRequest = DeleteSnippetsRequest

SnippetsDeleteRequest is an alias for DeleteSnippetsRequest.

type SnippetsGetRequest

type SnippetsGetRequest = GetSnippetsRequest

SnippetsGetRequest is an alias for GetSnippetsRequest.

type SortOrder

type SortOrder string

The order (e.g., chronological or alphabetical) in which results from a request are returned.

const (
	SortOrderDesc SortOrder = "DESC"
	SortOrderAsc  SortOrder = "ASC"
)

func NewSortOrderFromString

func NewSortOrderFromString(s string) (SortOrder, error)

func (SortOrder) Ptr

func (s SortOrder) Ptr() *SortOrder

type SourceApplication

type SourceApplication struct {
	// __Read only__ The [product](entity:Product) type of the application.
	// See [Product](#type-product) for possible values
	Product *Product `json:"product,omitempty" url:"product,omitempty"`
	// __Read only__ The Square-assigned ID of the application. This field is used only if the
	// [product](entity:Product) type is `EXTERNAL_API`.
	ApplicationID *string `json:"application_id,omitempty" url:"application_id,omitempty"`
	// __Read only__ The display name of the application
	// (for example, `"Custom Application"` or `"Square POS 4.74 for Android"`).
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// contains filtered or unexported fields
}

Represents information about the application used to generate a change.

func (*SourceApplication) GetApplicationID

func (s *SourceApplication) GetApplicationID() *string

func (*SourceApplication) GetExtraProperties

func (s *SourceApplication) GetExtraProperties() map[string]interface{}

func (*SourceApplication) GetName

func (s *SourceApplication) GetName() *string

func (*SourceApplication) GetProduct

func (s *SourceApplication) GetProduct() *Product

func (*SourceApplication) String

func (s *SourceApplication) String() string

func (*SourceApplication) UnmarshalJSON

func (s *SourceApplication) UnmarshalJSON(data []byte) error

type SquareAccountDetails

type SquareAccountDetails struct {
	// Unique identifier for the payment source used for this payment.
	PaymentSourceToken *string `json:"payment_source_token,omitempty" url:"payment_source_token,omitempty"`
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Additional details about Square Account payments.

func (*SquareAccountDetails) GetErrors

func (s *SquareAccountDetails) GetErrors() []*Error

func (*SquareAccountDetails) GetExtraProperties

func (s *SquareAccountDetails) GetExtraProperties() map[string]interface{}

func (*SquareAccountDetails) GetPaymentSourceToken

func (s *SquareAccountDetails) GetPaymentSourceToken() *string

func (*SquareAccountDetails) String

func (s *SquareAccountDetails) String() string

func (*SquareAccountDetails) UnmarshalJSON

func (s *SquareAccountDetails) UnmarshalJSON(data []byte) error

type StandardUnitDescription

type StandardUnitDescription struct {
	// Identifies the measurement unit being described.
	Unit *MeasurementUnit `json:"unit,omitempty" url:"unit,omitempty"`
	// UI display name of the measurement unit. For example, 'Pound'.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// UI display abbreviation for the measurement unit. For example, 'lb'.
	Abbreviation *string `json:"abbreviation,omitempty" url:"abbreviation,omitempty"`
	// contains filtered or unexported fields
}

Contains the name and abbreviation for standard measurement unit.

func (*StandardUnitDescription) GetAbbreviation

func (s *StandardUnitDescription) GetAbbreviation() *string

func (*StandardUnitDescription) GetExtraProperties

func (s *StandardUnitDescription) GetExtraProperties() map[string]interface{}

func (*StandardUnitDescription) GetName

func (s *StandardUnitDescription) GetName() *string

func (*StandardUnitDescription) GetUnit

func (*StandardUnitDescription) String

func (s *StandardUnitDescription) String() string

func (*StandardUnitDescription) UnmarshalJSON

func (s *StandardUnitDescription) UnmarshalJSON(data []byte) error

type StandardUnitDescriptionGroup

type StandardUnitDescriptionGroup struct {
	// List of standard (non-custom) measurement units in this description group.
	StandardUnitDescriptions []*StandardUnitDescription `json:"standard_unit_descriptions,omitempty" url:"standard_unit_descriptions,omitempty"`
	// IETF language tag.
	LanguageCode *string `json:"language_code,omitempty" url:"language_code,omitempty"`
	// contains filtered or unexported fields
}

Group of standard measurement units.

func (*StandardUnitDescriptionGroup) GetExtraProperties

func (s *StandardUnitDescriptionGroup) GetExtraProperties() map[string]interface{}

func (*StandardUnitDescriptionGroup) GetLanguageCode

func (s *StandardUnitDescriptionGroup) GetLanguageCode() *string

func (*StandardUnitDescriptionGroup) GetStandardUnitDescriptions

func (s *StandardUnitDescriptionGroup) GetStandardUnitDescriptions() []*StandardUnitDescription

func (*StandardUnitDescriptionGroup) String

func (*StandardUnitDescriptionGroup) UnmarshalJSON

func (s *StandardUnitDescriptionGroup) UnmarshalJSON(data []byte) error

type SubmitEvidenceDisputesRequest added in v1.2.0

type SubmitEvidenceDisputesRequest struct {
	// The ID of the dispute for which you want to submit evidence.
	DisputeID string `json:"-" url:"-"`
}

type SubmitEvidenceResponse

type SubmitEvidenceResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The `Dispute` for which evidence was submitted.
	Dispute *Dispute `json:"dispute,omitempty" url:"dispute,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields in a `SubmitEvidence` response.

func (*SubmitEvidenceResponse) GetDispute

func (s *SubmitEvidenceResponse) GetDispute() *Dispute

func (*SubmitEvidenceResponse) GetErrors

func (s *SubmitEvidenceResponse) GetErrors() []*Error

func (*SubmitEvidenceResponse) GetExtraProperties

func (s *SubmitEvidenceResponse) GetExtraProperties() map[string]interface{}

func (*SubmitEvidenceResponse) String

func (s *SubmitEvidenceResponse) String() string

func (*SubmitEvidenceResponse) UnmarshalJSON

func (s *SubmitEvidenceResponse) UnmarshalJSON(data []byte) error

type Subscription

type Subscription struct {
	// The Square-assigned ID of the subscription.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The ID of the location associated with the subscription.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The ID of the subscribed-to [subscription plan variation](entity:CatalogSubscriptionPlanVariation).
	PlanVariationID *string `json:"plan_variation_id,omitempty" url:"plan_variation_id,omitempty"`
	// The ID of the subscribing [customer](entity:Customer) profile.
	CustomerID *string `json:"customer_id,omitempty" url:"customer_id,omitempty"`
	// The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to start the subscription.
	StartDate *string `json:"start_date,omitempty" url:"start_date,omitempty"`
	// The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to cancel the subscription,
	// when the subscription status changes to `CANCELED` and the subscription billing stops.
	//
	// If this field is not set, the subscription ends according its subscription plan.
	//
	// This field cannot be updated, other than being cleared.
	CanceledDate *string `json:"canceled_date,omitempty" url:"canceled_date,omitempty"`
	// The `YYYY-MM-DD`-formatted date up to when the subscriber is invoiced for the
	// subscription.
	//
	// After the invoice is sent 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 subscriber gets an invoice
	// (or charged the card) on May 1. For the monthly billing scenario,
	// this date is then set to May 31.
	ChargedThroughDate *string `json:"charged_through_date,omitempty" url:"charged_through_date,omitempty"`
	// The current status of the subscription.
	// See [SubscriptionStatus](#type-subscriptionstatus) for possible values
	Status *SubscriptionStatus `json:"status,omitempty" url:"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" url:"tax_percentage,omitempty"`
	// The IDs of the [invoices](entity:Invoice) created for the
	// subscription, listed in order when the invoices were created
	// (newest invoices appear first).
	InvoiceIDs []string `json:"invoice_ids,omitempty" url:"invoice_ids,omitempty"`
	// A custom price which overrides the cost of a subscription plan variation with `STATIC` pricing.
	// This field does not affect itemized subscriptions with `RELATIVE` pricing. Instead,
	// you should edit the Subscription's [order template](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#phases-and-order-templates).
	PriceOverrideMoney *Money `json:"price_override_money,omitempty" url:"price_override_money,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" url:"version,omitempty"`
	// The timestamp when the subscription was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The ID of the [subscriber's](entity:Customer) [card](entity:Card)
	// used to charge for the subscription.
	CardID *string `json:"card_id,omitempty" url:"card_id,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" url:"timezone,omitempty"`
	// The origination details of the subscription.
	Source *SubscriptionSource `json:"source,omitempty" url:"source,omitempty"`
	// The list of scheduled actions on this subscription. It is set only in the response from
	// [RetrieveSubscription](api-endpoint:Subscriptions-RetrieveSubscription) with the query parameter
	// of `include=actions` or from
	// [SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) with the input parameter
	// of `include:["actions"]`.
	Actions []*SubscriptionAction `json:"actions,omitempty" url:"actions,omitempty"`
	// The day of the month on which the subscription will issue invoices and publish orders.
	MonthlyBillingAnchorDate *int `json:"monthly_billing_anchor_date,omitempty" url:"monthly_billing_anchor_date,omitempty"`
	// array of phases for this subscription
	Phases []*Phase `json:"phases,omitempty" url:"phases,omitempty"`
	// contains filtered or unexported fields
}

Represents a subscription purchased by a customer.

For more information, see [Manage Subscriptions](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions).

func (*Subscription) GetActions

func (s *Subscription) GetActions() []*SubscriptionAction

func (*Subscription) GetCanceledDate

func (s *Subscription) GetCanceledDate() *string

func (*Subscription) GetCardID

func (s *Subscription) GetCardID() *string

func (*Subscription) GetChargedThroughDate

func (s *Subscription) GetChargedThroughDate() *string

func (*Subscription) GetCreatedAt

func (s *Subscription) GetCreatedAt() *string

func (*Subscription) GetCustomerID

func (s *Subscription) GetCustomerID() *string

func (*Subscription) GetExtraProperties

func (s *Subscription) GetExtraProperties() map[string]interface{}

func (*Subscription) GetID

func (s *Subscription) GetID() *string

func (*Subscription) GetInvoiceIDs

func (s *Subscription) GetInvoiceIDs() []string

func (*Subscription) GetLocationID

func (s *Subscription) GetLocationID() *string

func (*Subscription) GetMonthlyBillingAnchorDate

func (s *Subscription) GetMonthlyBillingAnchorDate() *int

func (*Subscription) GetPhases

func (s *Subscription) GetPhases() []*Phase

func (*Subscription) GetPlanVariationID

func (s *Subscription) GetPlanVariationID() *string

func (*Subscription) GetPriceOverrideMoney

func (s *Subscription) GetPriceOverrideMoney() *Money

func (*Subscription) GetSource

func (s *Subscription) GetSource() *SubscriptionSource

func (*Subscription) GetStartDate

func (s *Subscription) GetStartDate() *string

func (*Subscription) GetStatus

func (s *Subscription) GetStatus() *SubscriptionStatus

func (*Subscription) GetTaxPercentage

func (s *Subscription) GetTaxPercentage() *string

func (*Subscription) GetTimezone

func (s *Subscription) GetTimezone() *string

func (*Subscription) GetVersion

func (s *Subscription) GetVersion() *int64

func (*Subscription) String

func (s *Subscription) String() string

func (*Subscription) UnmarshalJSON

func (s *Subscription) UnmarshalJSON(data []byte) error

type SubscriptionAction

type SubscriptionAction struct {
	// The ID of an action scoped to a subscription.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The type of the action.
	// See [SubscriptionActionType](#type-subscriptionactiontype) for possible values
	Type *SubscriptionActionType `json:"type,omitempty" url:"type,omitempty"`
	// The `YYYY-MM-DD`-formatted date when the action occurs on the subscription.
	EffectiveDate *string `json:"effective_date,omitempty" url:"effective_date,omitempty"`
	// The new billing anchor day value, for a `CHANGE_BILLING_ANCHOR_DATE` action.
	MonthlyBillingAnchorDate *int `json:"monthly_billing_anchor_date,omitempty" url:"monthly_billing_anchor_date,omitempty"`
	// A list of Phases, to pass phase-specific information used in the swap.
	Phases []*Phase `json:"phases,omitempty" url:"phases,omitempty"`
	// The target subscription plan variation that a subscription switches to, for a `SWAP_PLAN` action.
	NewPlanVariationID *string `json:"new_plan_variation_id,omitempty" url:"new_plan_variation_id,omitempty"`
	// contains filtered or unexported fields
}

Represents an action as a pending change to a subscription.

func (*SubscriptionAction) GetEffectiveDate

func (s *SubscriptionAction) GetEffectiveDate() *string

func (*SubscriptionAction) GetExtraProperties

func (s *SubscriptionAction) GetExtraProperties() map[string]interface{}

func (*SubscriptionAction) GetID

func (s *SubscriptionAction) GetID() *string

func (*SubscriptionAction) GetMonthlyBillingAnchorDate

func (s *SubscriptionAction) GetMonthlyBillingAnchorDate() *int

func (*SubscriptionAction) GetNewPlanVariationID

func (s *SubscriptionAction) GetNewPlanVariationID() *string

func (*SubscriptionAction) GetPhases

func (s *SubscriptionAction) GetPhases() []*Phase

func (*SubscriptionAction) GetType

func (*SubscriptionAction) String

func (s *SubscriptionAction) String() string

func (*SubscriptionAction) UnmarshalJSON

func (s *SubscriptionAction) UnmarshalJSON(data []byte) error

type SubscriptionActionType

type SubscriptionActionType string

Supported types of an action as a pending change to a subscription.

const (
	SubscriptionActionTypeCancel                  SubscriptionActionType = "CANCEL"
	SubscriptionActionTypePause                   SubscriptionActionType = "PAUSE"
	SubscriptionActionTypeResume                  SubscriptionActionType = "RESUME"
	SubscriptionActionTypeSwapPlan                SubscriptionActionType = "SWAP_PLAN"
	SubscriptionActionTypeChangeBillingAnchorDate SubscriptionActionType = "CHANGE_BILLING_ANCHOR_DATE"
)

func NewSubscriptionActionTypeFromString

func NewSubscriptionActionTypeFromString(s string) (SubscriptionActionType, error)

func (SubscriptionActionType) Ptr

type SubscriptionCadence

type SubscriptionCadence string

Determines the billing cadence of a Subscription(entity:Subscription)

const (
	SubscriptionCadenceDaily           SubscriptionCadence = "DAILY"
	SubscriptionCadenceWeekly          SubscriptionCadence = "WEEKLY"
	SubscriptionCadenceEveryTwoWeeks   SubscriptionCadence = "EVERY_TWO_WEEKS"
	SubscriptionCadenceThirtyDays      SubscriptionCadence = "THIRTY_DAYS"
	SubscriptionCadenceSixtyDays       SubscriptionCadence = "SIXTY_DAYS"
	SubscriptionCadenceNinetyDays      SubscriptionCadence = "NINETY_DAYS"
	SubscriptionCadenceMonthly         SubscriptionCadence = "MONTHLY"
	SubscriptionCadenceEveryTwoMonths  SubscriptionCadence = "EVERY_TWO_MONTHS"
	SubscriptionCadenceQuarterly       SubscriptionCadence = "QUARTERLY"
	SubscriptionCadenceEveryFourMonths SubscriptionCadence = "EVERY_FOUR_MONTHS"
	SubscriptionCadenceEverySixMonths  SubscriptionCadence = "EVERY_SIX_MONTHS"
	SubscriptionCadenceAnnual          SubscriptionCadence = "ANNUAL"
	SubscriptionCadenceEveryTwoYears   SubscriptionCadence = "EVERY_TWO_YEARS"
)

func NewSubscriptionCadenceFromString

func NewSubscriptionCadenceFromString(s string) (SubscriptionCadence, error)

func (SubscriptionCadence) Ptr

type SubscriptionEvent

type SubscriptionEvent struct {
	// The ID of the subscription event.
	ID string `json:"id" url:"id"`
	// Type of the subscription event.
	// See [SubscriptionEventSubscriptionEventType](#type-subscriptioneventsubscriptioneventtype) for possible values
	SubscriptionEventType SubscriptionEventSubscriptionEventType `json:"subscription_event_type" url:"subscription_event_type"`
	// The `YYYY-MM-DD`-formatted date (for example, 2013-01-15) when the subscription event occurred.
	EffectiveDate string `json:"effective_date" url:"effective_date"`
	// The day-of-the-month the billing anchor date was changed to, if applicable.
	MonthlyBillingAnchorDate *int `json:"monthly_billing_anchor_date,omitempty" url:"monthly_billing_anchor_date,omitempty"`
	// Additional information about the subscription event.
	Info *SubscriptionEventInfo `json:"info,omitempty" url:"info,omitempty"`
	// A list of Phases, to pass phase-specific information used in the swap.
	Phases []*Phase `json:"phases,omitempty" url:"phases,omitempty"`
	// The ID of the subscription plan variation associated with the subscription.
	PlanVariationID string `json:"plan_variation_id" url:"plan_variation_id"`
	// contains filtered or unexported fields
}

Describes changes to a subscription and the subscription status.

func (*SubscriptionEvent) GetEffectiveDate

func (s *SubscriptionEvent) GetEffectiveDate() string

func (*SubscriptionEvent) GetExtraProperties

func (s *SubscriptionEvent) GetExtraProperties() map[string]interface{}

func (*SubscriptionEvent) GetID

func (s *SubscriptionEvent) GetID() string

func (*SubscriptionEvent) GetInfo

func (*SubscriptionEvent) GetMonthlyBillingAnchorDate

func (s *SubscriptionEvent) GetMonthlyBillingAnchorDate() *int

func (*SubscriptionEvent) GetPhases

func (s *SubscriptionEvent) GetPhases() []*Phase

func (*SubscriptionEvent) GetPlanVariationID

func (s *SubscriptionEvent) GetPlanVariationID() string

func (*SubscriptionEvent) GetSubscriptionEventType

func (s *SubscriptionEvent) GetSubscriptionEventType() SubscriptionEventSubscriptionEventType

func (*SubscriptionEvent) String

func (s *SubscriptionEvent) String() string

func (*SubscriptionEvent) UnmarshalJSON

func (s *SubscriptionEvent) UnmarshalJSON(data []byte) error

type SubscriptionEventInfo

type SubscriptionEventInfo struct {
	// A human-readable explanation for the event.
	Detail *string `json:"detail,omitempty" url:"detail,omitempty"`
	// An info code indicating the subscription event that occurred.
	// See [InfoCode](#type-infocode) for possible values
	Code *SubscriptionEventInfoCode `json:"code,omitempty" url:"code,omitempty"`
	// contains filtered or unexported fields
}

Provides information about the subscription event.

func (*SubscriptionEventInfo) GetCode

func (*SubscriptionEventInfo) GetDetail

func (s *SubscriptionEventInfo) GetDetail() *string

func (*SubscriptionEventInfo) GetExtraProperties

func (s *SubscriptionEventInfo) GetExtraProperties() map[string]interface{}

func (*SubscriptionEventInfo) String

func (s *SubscriptionEventInfo) String() string

func (*SubscriptionEventInfo) UnmarshalJSON

func (s *SubscriptionEventInfo) UnmarshalJSON(data []byte) error

type SubscriptionEventInfoCode

type SubscriptionEventInfoCode string

Supported info codes of a subscription event.

const (
	SubscriptionEventInfoCodeLocationNotActive           SubscriptionEventInfoCode = "LOCATION_NOT_ACTIVE"
	SubscriptionEventInfoCodeLocationCannotAcceptPayment SubscriptionEventInfoCode = "LOCATION_CANNOT_ACCEPT_PAYMENT"
	SubscriptionEventInfoCodeCustomerDeleted             SubscriptionEventInfoCode = "CUSTOMER_DELETED"
	SubscriptionEventInfoCodeCustomerNoEmail             SubscriptionEventInfoCode = "CUSTOMER_NO_EMAIL"
	SubscriptionEventInfoCodeCustomerNoName              SubscriptionEventInfoCode = "CUSTOMER_NO_NAME"
	SubscriptionEventInfoCodeUserProvided                SubscriptionEventInfoCode = "USER_PROVIDED"
)

func NewSubscriptionEventInfoCodeFromString

func NewSubscriptionEventInfoCodeFromString(s string) (SubscriptionEventInfoCode, error)

func (SubscriptionEventInfoCode) Ptr

type SubscriptionEventSubscriptionEventType

type SubscriptionEventSubscriptionEventType string

Supported types of an event occurred to a subscription.

const (
	SubscriptionEventSubscriptionEventTypeStartSubscription        SubscriptionEventSubscriptionEventType = "START_SUBSCRIPTION"
	SubscriptionEventSubscriptionEventTypePlanChange               SubscriptionEventSubscriptionEventType = "PLAN_CHANGE"
	SubscriptionEventSubscriptionEventTypeStopSubscription         SubscriptionEventSubscriptionEventType = "STOP_SUBSCRIPTION"
	SubscriptionEventSubscriptionEventTypeDeactivateSubscription   SubscriptionEventSubscriptionEventType = "DEACTIVATE_SUBSCRIPTION"
	SubscriptionEventSubscriptionEventTypeResumeSubscription       SubscriptionEventSubscriptionEventType = "RESUME_SUBSCRIPTION"
	SubscriptionEventSubscriptionEventTypePauseSubscription        SubscriptionEventSubscriptionEventType = "PAUSE_SUBSCRIPTION"
	SubscriptionEventSubscriptionEventTypeBillingAnchorDateChanged SubscriptionEventSubscriptionEventType = "BILLING_ANCHOR_DATE_CHANGED"
)

func NewSubscriptionEventSubscriptionEventTypeFromString

func NewSubscriptionEventSubscriptionEventTypeFromString(s string) (SubscriptionEventSubscriptionEventType, error)

func (SubscriptionEventSubscriptionEventType) Ptr

type SubscriptionPhase

type SubscriptionPhase struct {
	// The Square-assigned ID of the subscription phase. This field cannot be changed after a `SubscriptionPhase` is created.
	UID *string `json:"uid,omitempty" url:"uid,omitempty"`
	// 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
	Cadence SubscriptionCadence `json:"cadence" url:"cadence"`
	// 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 *int `json:"periods,omitempty" url:"periods,omitempty"`
	// The amount to bill for each `cadence`. Failure to specify this field results in a `MISSING_REQUIRED_PARAMETER` error at runtime.
	RecurringPriceMoney *Money `json:"recurring_price_money,omitempty" url:"recurring_price_money,omitempty"`
	// 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" url:"ordinal,omitempty"`
	// The subscription pricing.
	Pricing *SubscriptionPricing `json:"pricing,omitempty" url:"pricing,omitempty"`
	// contains filtered or unexported fields
}

Describes a phase in a subscription plan variation. For more information, see [Subscription Plans and Variations](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations).

func (*SubscriptionPhase) GetCadence

func (s *SubscriptionPhase) GetCadence() SubscriptionCadence

func (*SubscriptionPhase) GetExtraProperties

func (s *SubscriptionPhase) GetExtraProperties() map[string]interface{}

func (*SubscriptionPhase) GetOrdinal

func (s *SubscriptionPhase) GetOrdinal() *int64

func (*SubscriptionPhase) GetPeriods

func (s *SubscriptionPhase) GetPeriods() *int

func (*SubscriptionPhase) GetPricing

func (s *SubscriptionPhase) GetPricing() *SubscriptionPricing

func (*SubscriptionPhase) GetRecurringPriceMoney

func (s *SubscriptionPhase) GetRecurringPriceMoney() *Money

func (*SubscriptionPhase) GetUID

func (s *SubscriptionPhase) GetUID() *string

func (*SubscriptionPhase) String

func (s *SubscriptionPhase) String() string

func (*SubscriptionPhase) UnmarshalJSON

func (s *SubscriptionPhase) UnmarshalJSON(data []byte) error

type SubscriptionPricing

type SubscriptionPricing struct {
	// RELATIVE or STATIC
	// See [SubscriptionPricingType](#type-subscriptionpricingtype) for possible values
	Type *SubscriptionPricingType `json:"type,omitempty" url:"type,omitempty"`
	// The ids of the discount catalog objects
	DiscountIDs []string `json:"discount_ids,omitempty" url:"discount_ids,omitempty"`
	// The price of the subscription, if STATIC
	PriceMoney *Money `json:"price_money,omitempty" url:"price_money,omitempty"`
	// contains filtered or unexported fields
}

Describes the pricing for the subscription.

func (*SubscriptionPricing) GetDiscountIDs

func (s *SubscriptionPricing) GetDiscountIDs() []string

func (*SubscriptionPricing) GetExtraProperties

func (s *SubscriptionPricing) GetExtraProperties() map[string]interface{}

func (*SubscriptionPricing) GetPriceMoney

func (s *SubscriptionPricing) GetPriceMoney() *Money

func (*SubscriptionPricing) GetType

func (*SubscriptionPricing) String

func (s *SubscriptionPricing) String() string

func (*SubscriptionPricing) UnmarshalJSON

func (s *SubscriptionPricing) UnmarshalJSON(data []byte) error

type SubscriptionPricingType

type SubscriptionPricingType string

Determines the pricing of a Subscription(entity:Subscription)

const (
	SubscriptionPricingTypeStatic   SubscriptionPricingType = "STATIC"
	SubscriptionPricingTypeRelative SubscriptionPricingType = "RELATIVE"
)

func NewSubscriptionPricingTypeFromString

func NewSubscriptionPricingTypeFromString(s string) (SubscriptionPricingType, error)

func (SubscriptionPricingType) Ptr

type SubscriptionSource

type SubscriptionSource struct {
	// The name used to identify the place (physical or digital) that
	// a subscription originates. If unset, the name defaults to the name
	// of the application that created the subscription.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// contains filtered or unexported fields
}

The origination details of the subscription.

func (*SubscriptionSource) GetExtraProperties

func (s *SubscriptionSource) GetExtraProperties() map[string]interface{}

func (*SubscriptionSource) GetName

func (s *SubscriptionSource) GetName() *string

func (*SubscriptionSource) String

func (s *SubscriptionSource) String() string

func (*SubscriptionSource) UnmarshalJSON

func (s *SubscriptionSource) UnmarshalJSON(data []byte) error

type SubscriptionStatus

type SubscriptionStatus string

Supported subscription statuses.

const (
	SubscriptionStatusPending     SubscriptionStatus = "PENDING"
	SubscriptionStatusActive      SubscriptionStatus = "ACTIVE"
	SubscriptionStatusCanceled    SubscriptionStatus = "CANCELED"
	SubscriptionStatusDeactivated SubscriptionStatus = "DEACTIVATED"
	SubscriptionStatusPaused      SubscriptionStatus = "PAUSED"
)

func NewSubscriptionStatusFromString

func NewSubscriptionStatusFromString(s string) (SubscriptionStatus, error)

func (SubscriptionStatus) Ptr

type SubscriptionTestResult

type SubscriptionTestResult struct {
	// A Square-generated unique ID for the subscription test result.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The status code returned by the subscription notification URL.
	StatusCode *int `json:"status_code,omitempty" url:"status_code,omitempty"`
	// An object containing the payload of the test event. For example, a `payment.created` event.
	Payload *string `json:"payload,omitempty" url:"payload,omitempty"`
	// The timestamp of when the subscription was created, in RFC 3339 format.
	// For example, "2016-09-04T23:59:33.123Z".
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp of when the subscription was updated, in RFC 3339 format. For example, "2016-09-04T23:59:33.123Z".
	// Because a subscription test result is unique, this field is the same as the `created_at` field.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Represents the details of a webhook subscription, including notification URL, event types, and signature key.

func (*SubscriptionTestResult) GetCreatedAt

func (s *SubscriptionTestResult) GetCreatedAt() *string

func (*SubscriptionTestResult) GetExtraProperties

func (s *SubscriptionTestResult) GetExtraProperties() map[string]interface{}

func (*SubscriptionTestResult) GetID

func (s *SubscriptionTestResult) GetID() *string

func (*SubscriptionTestResult) GetPayload

func (s *SubscriptionTestResult) GetPayload() *string

func (*SubscriptionTestResult) GetStatusCode

func (s *SubscriptionTestResult) GetStatusCode() *int

func (*SubscriptionTestResult) GetUpdatedAt

func (s *SubscriptionTestResult) GetUpdatedAt() *string

func (*SubscriptionTestResult) String

func (s *SubscriptionTestResult) String() string

func (*SubscriptionTestResult) UnmarshalJSON

func (s *SubscriptionTestResult) UnmarshalJSON(data []byte) error

type SubscriptionsCancelRequest

type SubscriptionsCancelRequest = CancelSubscriptionsRequest

SubscriptionsCancelRequest is an alias for CancelSubscriptionsRequest.

type SubscriptionsDeleteActionRequest

type SubscriptionsDeleteActionRequest = DeleteActionSubscriptionsRequest

SubscriptionsDeleteActionRequest is an alias for DeleteActionSubscriptionsRequest.

type SubscriptionsGetRequest

type SubscriptionsGetRequest = GetSubscriptionsRequest

SubscriptionsGetRequest is an alias for GetSubscriptionsRequest.

type SubscriptionsListEventsRequest

type SubscriptionsListEventsRequest = ListEventsSubscriptionsRequest

SubscriptionsListEventsRequest is an alias for ListEventsSubscriptionsRequest.

type SwapPlanRequest

type SwapPlanRequest struct {
	// The ID of the subscription to swap the subscription plan for.
	SubscriptionID string `json:"-" url:"-"`
	// The ID of the new subscription plan variation.
	//
	// This field is required.
	NewPlanVariationID *string `json:"new_plan_variation_id,omitempty" url:"-"`
	// A list of PhaseInputs, to pass phase-specific information used in the swap.
	Phases []*PhaseInput `json:"phases,omitempty" url:"-"`
}

type SwapPlanResponse

type SwapPlanResponse struct {
	// Errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The subscription with the updated subscription plan.
	Subscription *Subscription `json:"subscription,omitempty" url:"subscription,omitempty"`
	// A list of a `SWAP_PLAN` action created by the request.
	Actions []*SubscriptionAction `json:"actions,omitempty" url:"actions,omitempty"`
	// contains filtered or unexported fields
}

Defines output parameters in a response of the [SwapPlan](api-endpoint:Subscriptions-SwapPlan) endpoint.

func (*SwapPlanResponse) GetActions

func (s *SwapPlanResponse) GetActions() []*SubscriptionAction

func (*SwapPlanResponse) GetErrors

func (s *SwapPlanResponse) GetErrors() []*Error

func (*SwapPlanResponse) GetExtraProperties

func (s *SwapPlanResponse) GetExtraProperties() map[string]interface{}

func (*SwapPlanResponse) GetSubscription

func (s *SwapPlanResponse) GetSubscription() *Subscription

func (*SwapPlanResponse) String

func (s *SwapPlanResponse) String() string

func (*SwapPlanResponse) UnmarshalJSON

func (s *SwapPlanResponse) UnmarshalJSON(data []byte) error

type TaxCalculationPhase

type TaxCalculationPhase string

When to calculate the taxes due on a cart.

const (
	TaxCalculationPhaseTaxSubtotalPhase TaxCalculationPhase = "TAX_SUBTOTAL_PHASE"
	TaxCalculationPhaseTaxTotalPhase    TaxCalculationPhase = "TAX_TOTAL_PHASE"
)

func NewTaxCalculationPhaseFromString

func NewTaxCalculationPhaseFromString(s string) (TaxCalculationPhase, error)

func (TaxCalculationPhase) Ptr

type TaxIDs

type TaxIDs struct {
	// The EU VAT number for this location. For example, `IE3426675K`.
	// If the EU VAT number is present, it is well-formed and has been
	// validated with VIES, the VAT Information Exchange System.
	EuVat *string `json:"eu_vat,omitempty" url:"eu_vat,omitempty"`
	// The SIRET (Système d'Identification du Répertoire des Entreprises et de leurs Etablissements)
	// number is a 14-digit code issued by the French INSEE. For example, `39922799000021`.
	FrSiret *string `json:"fr_siret,omitempty" url:"fr_siret,omitempty"`
	// The French government uses the NAF (Nomenclature des Activités Françaises) to display and
	// track economic statistical data. This is also called the APE (Activite Principale de l’Entreprise) code.
	// For example, `6910Z`.
	FrNaf *string `json:"fr_naf,omitempty" url:"fr_naf,omitempty"`
	// The NIF (Numero de Identificacion Fiscal) number is a nine-character tax identifier used in Spain.
	// If it is present, it has been validated. For example, `73628495A`.
	EsNif *string `json:"es_nif,omitempty" url:"es_nif,omitempty"`
	// The QII (Qualified Invoice Issuer) number is a 14-character tax identifier used in Japan.
	// For example, `T1234567890123`.
	JpQii *string `json:"jp_qii,omitempty" url:"jp_qii,omitempty"`
	// contains filtered or unexported fields
}

Identifiers for the location used by various governments for tax purposes.

func (*TaxIDs) GetEsNif

func (t *TaxIDs) GetEsNif() *string

func (*TaxIDs) GetEuVat

func (t *TaxIDs) GetEuVat() *string

func (*TaxIDs) GetExtraProperties

func (t *TaxIDs) GetExtraProperties() map[string]interface{}

func (*TaxIDs) GetFrNaf

func (t *TaxIDs) GetFrNaf() *string

func (*TaxIDs) GetFrSiret

func (t *TaxIDs) GetFrSiret() *string

func (*TaxIDs) GetJpQii

func (t *TaxIDs) GetJpQii() *string

func (*TaxIDs) String

func (t *TaxIDs) String() string

func (*TaxIDs) UnmarshalJSON

func (t *TaxIDs) UnmarshalJSON(data []byte) error

type TaxInclusionType

type TaxInclusionType string

Whether to the tax amount should be additional to or included in the CatalogItem price.

const (
	TaxInclusionTypeAdditive  TaxInclusionType = "ADDITIVE"
	TaxInclusionTypeInclusive TaxInclusionType = "INCLUSIVE"
)

func NewTaxInclusionTypeFromString

func NewTaxInclusionTypeFromString(s string) (TaxInclusionType, error)

func (TaxInclusionType) Ptr

type TeamMember

type TeamMember struct {
	// The unique ID for the team member.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// A second ID used to associate the team member with an entity in another system.
	ReferenceID *string `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// Whether the team member is the owner of the Square account.
	IsOwner *bool `json:"is_owner,omitempty" url:"is_owner,omitempty"`
	// Describes the status of the team member.
	// See [TeamMemberStatus](#type-teammemberstatus) for possible values
	Status *TeamMemberStatus `json:"status,omitempty" url:"status,omitempty"`
	// The given name (that is, the first name) associated with the team member.
	GivenName *string `json:"given_name,omitempty" url:"given_name,omitempty"`
	// The family name (that is, the last name) associated with the team member.
	FamilyName *string `json:"family_name,omitempty" url:"family_name,omitempty"`
	// The email address associated with the team member. After accepting the invitation
	// from Square, only the team member can change this value.
	EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"`
	// The team member's phone number, in E.164 format. For example:
	// +14155552671 - the country code is 1 for US
	// +551155256325 - the country code is 55 for BR
	PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"`
	// The timestamp when the team member was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp when the team member was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// Describes the team member's assigned locations.
	AssignedLocations *TeamMemberAssignedLocations `json:"assigned_locations,omitempty" url:"assigned_locations,omitempty"`
	// Information about the team member's overtime exemption status, job assignments, and compensation.
	WageSetting *WageSetting `json:"wage_setting,omitempty" url:"wage_setting,omitempty"`
	// contains filtered or unexported fields
}

A record representing an individual team member for a business.

func (*TeamMember) GetAssignedLocations

func (t *TeamMember) GetAssignedLocations() *TeamMemberAssignedLocations

func (*TeamMember) GetCreatedAt

func (t *TeamMember) GetCreatedAt() *string

func (*TeamMember) GetEmailAddress

func (t *TeamMember) GetEmailAddress() *string

func (*TeamMember) GetExtraProperties

func (t *TeamMember) GetExtraProperties() map[string]interface{}

func (*TeamMember) GetFamilyName

func (t *TeamMember) GetFamilyName() *string

func (*TeamMember) GetGivenName

func (t *TeamMember) GetGivenName() *string

func (*TeamMember) GetID

func (t *TeamMember) GetID() *string

func (*TeamMember) GetIsOwner

func (t *TeamMember) GetIsOwner() *bool

func (*TeamMember) GetPhoneNumber

func (t *TeamMember) GetPhoneNumber() *string

func (*TeamMember) GetReferenceID

func (t *TeamMember) GetReferenceID() *string

func (*TeamMember) GetStatus

func (t *TeamMember) GetStatus() *TeamMemberStatus

func (*TeamMember) GetUpdatedAt

func (t *TeamMember) GetUpdatedAt() *string

func (*TeamMember) GetWageSetting added in v1.0.0

func (t *TeamMember) GetWageSetting() *WageSetting

func (*TeamMember) String

func (t *TeamMember) String() string

func (*TeamMember) UnmarshalJSON

func (t *TeamMember) UnmarshalJSON(data []byte) error

type TeamMemberAssignedLocations

type TeamMemberAssignedLocations struct {
	// The current assignment type of the team member.
	// See [TeamMemberAssignedLocationsAssignmentType](#type-teammemberassignedlocationsassignmenttype) for possible values
	AssignmentType *TeamMemberAssignedLocationsAssignmentType `json:"assignment_type,omitempty" url:"assignment_type,omitempty"`
	// The explicit locations that the team member is assigned to.
	LocationIDs []string `json:"location_ids,omitempty" url:"location_ids,omitempty"`
	// contains filtered or unexported fields
}

An object that represents a team member's assignment to locations.

func (*TeamMemberAssignedLocations) GetAssignmentType

func (*TeamMemberAssignedLocations) GetExtraProperties

func (t *TeamMemberAssignedLocations) GetExtraProperties() map[string]interface{}

func (*TeamMemberAssignedLocations) GetLocationIDs

func (t *TeamMemberAssignedLocations) GetLocationIDs() []string

func (*TeamMemberAssignedLocations) String

func (t *TeamMemberAssignedLocations) String() string

func (*TeamMemberAssignedLocations) UnmarshalJSON

func (t *TeamMemberAssignedLocations) UnmarshalJSON(data []byte) error

type TeamMemberAssignedLocationsAssignmentType

type TeamMemberAssignedLocationsAssignmentType string

Enumerates the possible assignment types that the team member can have.

const (
	TeamMemberAssignedLocationsAssignmentTypeAllCurrentAndFutureLocations TeamMemberAssignedLocationsAssignmentType = "ALL_CURRENT_AND_FUTURE_LOCATIONS"
	TeamMemberAssignedLocationsAssignmentTypeExplicitLocations            TeamMemberAssignedLocationsAssignmentType = "EXPLICIT_LOCATIONS"
)

func NewTeamMemberAssignedLocationsAssignmentTypeFromString

func NewTeamMemberAssignedLocationsAssignmentTypeFromString(s string) (TeamMemberAssignedLocationsAssignmentType, error)

func (TeamMemberAssignedLocationsAssignmentType) Ptr

type TeamMemberBookingProfile

type TeamMemberBookingProfile struct {
	// The ID of the [TeamMember](entity:TeamMember) object for the team member associated with the booking profile.
	TeamMemberID *string `json:"team_member_id,omitempty" url:"team_member_id,omitempty"`
	// The description of the team member.
	Description *string `json:"description,omitempty" url:"description,omitempty"`
	// The display name of the team member.
	DisplayName *string `json:"display_name,omitempty" url:"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" url:"is_bookable,omitempty"`
	// The URL of the team member's image for the bookings profile.
	ProfileImageURL *string `json:"profile_image_url,omitempty" url:"profile_image_url,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*TeamMemberBookingProfile) GetDescription

func (t *TeamMemberBookingProfile) GetDescription() *string

func (*TeamMemberBookingProfile) GetDisplayName

func (t *TeamMemberBookingProfile) GetDisplayName() *string

func (*TeamMemberBookingProfile) GetExtraProperties

func (t *TeamMemberBookingProfile) GetExtraProperties() map[string]interface{}

func (*TeamMemberBookingProfile) GetIsBookable

func (t *TeamMemberBookingProfile) GetIsBookable() *bool

func (*TeamMemberBookingProfile) GetProfileImageURL

func (t *TeamMemberBookingProfile) GetProfileImageURL() *string

func (*TeamMemberBookingProfile) GetTeamMemberID

func (t *TeamMemberBookingProfile) GetTeamMemberID() *string

func (*TeamMemberBookingProfile) String

func (t *TeamMemberBookingProfile) String() string

func (*TeamMemberBookingProfile) UnmarshalJSON

func (t *TeamMemberBookingProfile) UnmarshalJSON(data []byte) error

type TeamMemberStatus

type TeamMemberStatus string

Enumerates the possible statuses the team member can have within a business.

const (
	TeamMemberStatusActive   TeamMemberStatus = "ACTIVE"
	TeamMemberStatusInactive TeamMemberStatus = "INACTIVE"
)

func NewTeamMemberStatusFromString

func NewTeamMemberStatusFromString(s string) (TeamMemberStatus, error)

func (TeamMemberStatus) Ptr

type TeamMemberWage

type TeamMemberWage struct {
	// The UUID for this object.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The `TeamMember` that this wage is assigned to.
	TeamMemberID *string `json:"team_member_id,omitempty" url:"team_member_id,omitempty"`
	// The job title that this wage relates to.
	Title *string `json:"title,omitempty" url:"title,omitempty"`
	// Can be a custom-set hourly wage or the calculated effective hourly
	// wage based on the annual wage and hours worked per week.
	HourlyRate *Money `json:"hourly_rate,omitempty" url:"hourly_rate,omitempty"`
	// An identifier for the job that this wage relates to. This cannot be
	// used to retrieve the job.
	JobID *string `json:"job_id,omitempty" url:"job_id,omitempty"`
	// Whether team members are eligible for tips when working this job.
	TipEligible *bool `json:"tip_eligible,omitempty" url:"tip_eligible,omitempty"`
	// contains filtered or unexported fields
}

The hourly wage rate that a team member earns on a `Shift` for doing the job specified by the `title` property of this object.

func (*TeamMemberWage) GetExtraProperties

func (t *TeamMemberWage) GetExtraProperties() map[string]interface{}

func (*TeamMemberWage) GetHourlyRate

func (t *TeamMemberWage) GetHourlyRate() *Money

func (*TeamMemberWage) GetID

func (t *TeamMemberWage) GetID() *string

func (*TeamMemberWage) GetJobID

func (t *TeamMemberWage) GetJobID() *string

func (*TeamMemberWage) GetTeamMemberID

func (t *TeamMemberWage) GetTeamMemberID() *string

func (*TeamMemberWage) GetTipEligible

func (t *TeamMemberWage) GetTipEligible() *bool

func (*TeamMemberWage) GetTitle

func (t *TeamMemberWage) GetTitle() *string

func (*TeamMemberWage) String

func (t *TeamMemberWage) String() string

func (*TeamMemberWage) UnmarshalJSON

func (t *TeamMemberWage) UnmarshalJSON(data []byte) error

type TeamMembersGetRequest

type TeamMembersGetRequest = GetTeamMembersRequest

TeamMembersGetRequest is an alias for GetTeamMembersRequest.

type TeamMembersUpdateRequest

type TeamMembersUpdateRequest = UpdateTeamMembersRequest

TeamMembersUpdateRequest is an alias for UpdateTeamMembersRequest.

type Tender

type Tender struct {
	// The tender's unique ID. It is the associated payment ID.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The ID of the transaction's associated location.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The ID of the tender's associated transaction.
	TransactionID *string `json:"transaction_id,omitempty" url:"transaction_id,omitempty"`
	// The timestamp for when the tender was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// An optional note associated with the tender at the time of payment.
	Note *string `json:"note,omitempty" url:"note,omitempty"`
	// The total amount of the tender, including `tip_money`. If the tender has a `payment_id`,
	// the `total_money` of the corresponding [Payment](entity:Payment) will be equal to the
	// `amount_money` of the tender.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// The tip's amount of the tender.
	TipMoney *Money `json:"tip_money,omitempty" url:"tip_money,omitempty"`
	// The amount of any Square processing fees applied to the tender.
	//
	// This field is not immediately populated when a new transaction is created.
	// It is usually available after about ten seconds.
	ProcessingFeeMoney *Money `json:"processing_fee_money,omitempty" url:"processing_fee_money,omitempty"`
	// If the tender is associated with a customer or represents a customer's card on file,
	// this is the ID of the associated customer.
	CustomerID *string `json:"customer_id,omitempty" url:"customer_id,omitempty"`
	// The type of tender, such as `CARD` or `CASH`.
	// See [TenderType](#type-tendertype) for possible values
	Type TenderType `json:"type" url:"type"`
	// The details of the card tender.
	//
	// This value is present only if the value of `type` is `CARD`.
	CardDetails *TenderCardDetails `json:"card_details,omitempty" url:"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" url:"cash_details,omitempty"`
	// The details of the bank account tender.
	//
	// This value is present only if the value of `type` is `BANK_ACCOUNT`.
	BankAccountDetails *TenderBankAccountDetails `json:"bank_account_details,omitempty" url:"bank_account_details,omitempty"`
	// The details of a Buy Now Pay Later tender.
	//
	// This value is present only if the value of `type` is `BUY_NOW_PAY_LATER`.
	BuyNowPayLaterDetails *TenderBuyNowPayLaterDetails `json:"buy_now_pay_later_details,omitempty" url:"buy_now_pay_later_details,omitempty"`
	// The details of a Square Account tender.
	//
	// This value is present only if the value of `type` is `SQUARE_ACCOUNT`.
	SquareAccountDetails *TenderSquareAccountDetails `json:"square_account_details,omitempty" url:"square_account_details,omitempty"`
	// Additional recipients (other than the merchant) receiving a portion of this tender.
	// For example, fees assessed on the purchase by a third party integration.
	AdditionalRecipients []*AdditionalRecipient `json:"additional_recipients,omitempty" url:"additional_recipients,omitempty"`
	// The ID of the [Payment](entity:Payment) that corresponds to this tender.
	// This value is only present for payments created with the v2 Payments API.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// contains filtered or unexported fields
}

Represents a tender (i.e., a method of payment) used in a Square transaction.

func (*Tender) GetAdditionalRecipients

func (t *Tender) GetAdditionalRecipients() []*AdditionalRecipient

func (*Tender) GetAmountMoney

func (t *Tender) GetAmountMoney() *Money

func (*Tender) GetBankAccountDetails

func (t *Tender) GetBankAccountDetails() *TenderBankAccountDetails

func (*Tender) GetBuyNowPayLaterDetails

func (t *Tender) GetBuyNowPayLaterDetails() *TenderBuyNowPayLaterDetails

func (*Tender) GetCardDetails

func (t *Tender) GetCardDetails() *TenderCardDetails

func (*Tender) GetCashDetails

func (t *Tender) GetCashDetails() *TenderCashDetails

func (*Tender) GetCreatedAt

func (t *Tender) GetCreatedAt() *string

func (*Tender) GetCustomerID

func (t *Tender) GetCustomerID() *string

func (*Tender) GetExtraProperties

func (t *Tender) GetExtraProperties() map[string]interface{}

func (*Tender) GetID

func (t *Tender) GetID() *string

func (*Tender) GetLocationID

func (t *Tender) GetLocationID() *string

func (*Tender) GetNote

func (t *Tender) GetNote() *string

func (*Tender) GetPaymentID

func (t *Tender) GetPaymentID() *string

func (*Tender) GetProcessingFeeMoney

func (t *Tender) GetProcessingFeeMoney() *Money

func (*Tender) GetSquareAccountDetails

func (t *Tender) GetSquareAccountDetails() *TenderSquareAccountDetails

func (*Tender) GetTipMoney

func (t *Tender) GetTipMoney() *Money

func (*Tender) GetTransactionID

func (t *Tender) GetTransactionID() *string

func (*Tender) GetType

func (t *Tender) GetType() TenderType

func (*Tender) String

func (t *Tender) String() string

func (*Tender) UnmarshalJSON

func (t *Tender) UnmarshalJSON(data []byte) error

type TenderBankAccountDetails

type TenderBankAccountDetails struct {
	// The bank account payment's current state.
	//
	// See [TenderBankAccountPaymentDetailsStatus](entity:TenderBankAccountDetailsStatus) for possible values.
	// See [TenderBankAccountDetailsStatus](#type-tenderbankaccountdetailsstatus) for possible values
	Status *TenderBankAccountDetailsStatus `json:"status,omitempty" url:"status,omitempty"`
	// contains filtered or unexported fields
}

Represents the details of a tender with `type` `BANK_ACCOUNT`.

See BankAccountPaymentDetails(entity:BankAccountPaymentDetails) for more exposed details of a bank account payment.

func (*TenderBankAccountDetails) GetExtraProperties

func (t *TenderBankAccountDetails) GetExtraProperties() map[string]interface{}

func (*TenderBankAccountDetails) GetStatus

func (*TenderBankAccountDetails) String

func (t *TenderBankAccountDetails) String() string

func (*TenderBankAccountDetails) UnmarshalJSON

func (t *TenderBankAccountDetails) UnmarshalJSON(data []byte) error

type TenderBankAccountDetailsStatus

type TenderBankAccountDetailsStatus string

Indicates the bank account payment's current status.

const (
	TenderBankAccountDetailsStatusPending   TenderBankAccountDetailsStatus = "PENDING"
	TenderBankAccountDetailsStatusCompleted TenderBankAccountDetailsStatus = "COMPLETED"
	TenderBankAccountDetailsStatusFailed    TenderBankAccountDetailsStatus = "FAILED"
)

func NewTenderBankAccountDetailsStatusFromString

func NewTenderBankAccountDetailsStatusFromString(s string) (TenderBankAccountDetailsStatus, error)

func (TenderBankAccountDetailsStatus) Ptr

type TenderBuyNowPayLaterDetails

type TenderBuyNowPayLaterDetails struct {
	// The Buy Now Pay Later brand.
	// See [Brand](#type-brand) for possible values
	BuyNowPayLaterBrand *TenderBuyNowPayLaterDetailsBrand `json:"buy_now_pay_later_brand,omitempty" url:"buy_now_pay_later_brand,omitempty"`
	// The buy now pay later payment's current state (such as `AUTHORIZED` or
	// `CAPTURED`). See [TenderBuyNowPayLaterDetailsStatus](entity:TenderBuyNowPayLaterDetailsStatus)
	// for possible values.
	// See [Status](#type-status) for possible values
	Status *TenderBuyNowPayLaterDetailsStatus `json:"status,omitempty" url:"status,omitempty"`
	// contains filtered or unexported fields
}

Represents the details of a tender with `type` `BUY_NOW_PAY_LATER`.

func (*TenderBuyNowPayLaterDetails) GetBuyNowPayLaterBrand

func (*TenderBuyNowPayLaterDetails) GetExtraProperties

func (t *TenderBuyNowPayLaterDetails) GetExtraProperties() map[string]interface{}

func (*TenderBuyNowPayLaterDetails) GetStatus

func (*TenderBuyNowPayLaterDetails) String

func (t *TenderBuyNowPayLaterDetails) String() string

func (*TenderBuyNowPayLaterDetails) UnmarshalJSON

func (t *TenderBuyNowPayLaterDetails) UnmarshalJSON(data []byte) error

type TenderBuyNowPayLaterDetailsBrand

type TenderBuyNowPayLaterDetailsBrand string
const (
	TenderBuyNowPayLaterDetailsBrandOtherBrand TenderBuyNowPayLaterDetailsBrand = "OTHER_BRAND"
	TenderBuyNowPayLaterDetailsBrandAfterpay   TenderBuyNowPayLaterDetailsBrand = "AFTERPAY"
)

func NewTenderBuyNowPayLaterDetailsBrandFromString

func NewTenderBuyNowPayLaterDetailsBrandFromString(s string) (TenderBuyNowPayLaterDetailsBrand, error)

func (TenderBuyNowPayLaterDetailsBrand) Ptr

type TenderBuyNowPayLaterDetailsStatus

type TenderBuyNowPayLaterDetailsStatus string
const (
	TenderBuyNowPayLaterDetailsStatusAuthorized TenderBuyNowPayLaterDetailsStatus = "AUTHORIZED"
	TenderBuyNowPayLaterDetailsStatusCaptured   TenderBuyNowPayLaterDetailsStatus = "CAPTURED"
	TenderBuyNowPayLaterDetailsStatusVoided     TenderBuyNowPayLaterDetailsStatus = "VOIDED"
	TenderBuyNowPayLaterDetailsStatusFailed     TenderBuyNowPayLaterDetailsStatus = "FAILED"
)

func NewTenderBuyNowPayLaterDetailsStatusFromString

func NewTenderBuyNowPayLaterDetailsStatusFromString(s string) (TenderBuyNowPayLaterDetailsStatus, error)

func (TenderBuyNowPayLaterDetailsStatus) Ptr

type TenderCardDetails

type TenderCardDetails struct {
	// The credit card payment's current state (such as `AUTHORIZED` or
	// `CAPTURED`). See [TenderCardDetailsStatus](entity:TenderCardDetailsStatus)
	// for possible values.
	// See [TenderCardDetailsStatus](#type-tendercarddetailsstatus) for possible values
	Status *TenderCardDetailsStatus `json:"status,omitempty" url:"status,omitempty"`
	// The credit card's non-confidential details.
	Card *Card `json:"card,omitempty" url:"card,omitempty"`
	// The method used to enter the card's details for the transaction.
	// See [TenderCardDetailsEntryMethod](#type-tendercarddetailsentrymethod) for possible values
	EntryMethod *TenderCardDetailsEntryMethod `json:"entry_method,omitempty" url:"entry_method,omitempty"`
	// contains filtered or unexported fields
}

Represents additional details of a tender with `type` `CARD` or `SQUARE_GIFT_CARD`

func (*TenderCardDetails) GetCard

func (t *TenderCardDetails) GetCard() *Card

func (*TenderCardDetails) GetEntryMethod

func (t *TenderCardDetails) GetEntryMethod() *TenderCardDetailsEntryMethod

func (*TenderCardDetails) GetExtraProperties

func (t *TenderCardDetails) GetExtraProperties() map[string]interface{}

func (*TenderCardDetails) GetStatus

func (*TenderCardDetails) String

func (t *TenderCardDetails) String() string

func (*TenderCardDetails) UnmarshalJSON

func (t *TenderCardDetails) UnmarshalJSON(data []byte) error

type TenderCardDetailsEntryMethod

type TenderCardDetailsEntryMethod string

Indicates the method used to enter the card's details.

const (
	TenderCardDetailsEntryMethodSwiped      TenderCardDetailsEntryMethod = "SWIPED"
	TenderCardDetailsEntryMethodKeyed       TenderCardDetailsEntryMethod = "KEYED"
	TenderCardDetailsEntryMethodEmv         TenderCardDetailsEntryMethod = "EMV"
	TenderCardDetailsEntryMethodOnFile      TenderCardDetailsEntryMethod = "ON_FILE"
	TenderCardDetailsEntryMethodContactless TenderCardDetailsEntryMethod = "CONTACTLESS"
)

func NewTenderCardDetailsEntryMethodFromString

func NewTenderCardDetailsEntryMethodFromString(s string) (TenderCardDetailsEntryMethod, error)

func (TenderCardDetailsEntryMethod) Ptr

type TenderCardDetailsStatus

type TenderCardDetailsStatus string

Indicates the card transaction's current status.

const (
	TenderCardDetailsStatusAuthorized TenderCardDetailsStatus = "AUTHORIZED"
	TenderCardDetailsStatusCaptured   TenderCardDetailsStatus = "CAPTURED"
	TenderCardDetailsStatusVoided     TenderCardDetailsStatus = "VOIDED"
	TenderCardDetailsStatusFailed     TenderCardDetailsStatus = "FAILED"
)

func NewTenderCardDetailsStatusFromString

func NewTenderCardDetailsStatusFromString(s string) (TenderCardDetailsStatus, error)

func (TenderCardDetailsStatus) Ptr

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" url:"buyer_tendered_money,omitempty"`
	// The amount of change returned to the buyer.
	ChangeBackMoney *Money `json:"change_back_money,omitempty" url:"change_back_money,omitempty"`
	// contains filtered or unexported fields
}

Represents the details of a tender with `type` `CASH`.

func (*TenderCashDetails) GetBuyerTenderedMoney

func (t *TenderCashDetails) GetBuyerTenderedMoney() *Money

func (*TenderCashDetails) GetChangeBackMoney

func (t *TenderCashDetails) GetChangeBackMoney() *Money

func (*TenderCashDetails) GetExtraProperties

func (t *TenderCashDetails) GetExtraProperties() map[string]interface{}

func (*TenderCashDetails) String

func (t *TenderCashDetails) String() string

func (*TenderCashDetails) UnmarshalJSON

func (t *TenderCashDetails) UnmarshalJSON(data []byte) error

type TenderSquareAccountDetails

type TenderSquareAccountDetails struct {
	// The Square Account payment's current state (such as `AUTHORIZED` or
	// `CAPTURED`). See [TenderSquareAccountDetailsStatus](entity:TenderSquareAccountDetailsStatus)
	// for possible values.
	// See [Status](#type-status) for possible values
	Status *TenderSquareAccountDetailsStatus `json:"status,omitempty" url:"status,omitempty"`
	// contains filtered or unexported fields
}

Represents the details of a tender with `type` `SQUARE_ACCOUNT`.

func (*TenderSquareAccountDetails) GetExtraProperties

func (t *TenderSquareAccountDetails) GetExtraProperties() map[string]interface{}

func (*TenderSquareAccountDetails) GetStatus

func (*TenderSquareAccountDetails) String

func (t *TenderSquareAccountDetails) String() string

func (*TenderSquareAccountDetails) UnmarshalJSON

func (t *TenderSquareAccountDetails) UnmarshalJSON(data []byte) error

type TenderSquareAccountDetailsStatus

type TenderSquareAccountDetailsStatus string
const (
	TenderSquareAccountDetailsStatusAuthorized TenderSquareAccountDetailsStatus = "AUTHORIZED"
	TenderSquareAccountDetailsStatusCaptured   TenderSquareAccountDetailsStatus = "CAPTURED"
	TenderSquareAccountDetailsStatusVoided     TenderSquareAccountDetailsStatus = "VOIDED"
	TenderSquareAccountDetailsStatusFailed     TenderSquareAccountDetailsStatus = "FAILED"
)

func NewTenderSquareAccountDetailsStatusFromString

func NewTenderSquareAccountDetailsStatusFromString(s string) (TenderSquareAccountDetailsStatus, error)

func (TenderSquareAccountDetailsStatus) Ptr

type TenderType

type TenderType string

Indicates a tender's type.

const (
	TenderTypeCard           TenderType = "CARD"
	TenderTypeCash           TenderType = "CASH"
	TenderTypeThirdPartyCard TenderType = "THIRD_PARTY_CARD"
	TenderTypeSquareGiftCard TenderType = "SQUARE_GIFT_CARD"
	TenderTypeNoSale         TenderType = "NO_SALE"
	TenderTypeBankAccount    TenderType = "BANK_ACCOUNT"
	TenderTypeWallet         TenderType = "WALLET"
	TenderTypeBuyNowPayLater TenderType = "BUY_NOW_PAY_LATER"
	TenderTypeSquareAccount  TenderType = "SQUARE_ACCOUNT"
	TenderTypeOther          TenderType = "OTHER"
)

func NewTenderTypeFromString

func NewTenderTypeFromString(s string) (TenderType, error)

func (TenderType) Ptr

func (t TenderType) Ptr() *TenderType

type TerminalAction

type TerminalAction struct {
	// A unique ID for this `TerminalAction`.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The unique Id of the device intended for this `TerminalAction`.
	// The Id can be retrieved from /v2/devices api.
	DeviceID *string `json:"device_id,omitempty" url:"device_id,omitempty"`
	// The duration as an RFC 3339 duration, after which the action will be automatically canceled.
	// TerminalActions 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" url:"deadline_duration,omitempty"`
	// The status of the `TerminalAction`.
	// Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED`
	Status *string `json:"status,omitempty" url:"status,omitempty"`
	// The reason why `TerminalAction` is canceled. Present if the status is `CANCELED`.
	// See [ActionCancelReason](#type-actioncancelreason) for possible values
	CancelReason *ActionCancelReason `json:"cancel_reason,omitempty" url:"cancel_reason,omitempty"`
	// The time when the `TerminalAction` was created as an RFC 3339 timestamp.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The time when the `TerminalAction` was last updated as an RFC 3339 timestamp.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The ID of the application that created the action.
	AppID *string `json:"app_id,omitempty" url:"app_id,omitempty"`
	// The location id the action is attached to, if a link can be made.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// Represents the type of the action.
	// See [ActionType](#type-actiontype) for possible values
	Type *TerminalActionActionType `json:"type,omitempty" url:"type,omitempty"`
	// Describes configuration for the QR code action. Requires `QR_CODE` type.
	QrCodeOptions *QrCodeOptions `json:"qr_code_options,omitempty" url:"qr_code_options,omitempty"`
	// Describes configuration for the save-card action. Requires `SAVE_CARD` type.
	SaveCardOptions *SaveCardOptions `json:"save_card_options,omitempty" url:"save_card_options,omitempty"`
	// Describes configuration for the signature capture action. Requires `SIGNATURE` type.
	SignatureOptions *SignatureOptions `json:"signature_options,omitempty" url:"signature_options,omitempty"`
	// Describes configuration for the confirmation action. Requires `CONFIRMATION` type.
	ConfirmationOptions *ConfirmationOptions `json:"confirmation_options,omitempty" url:"confirmation_options,omitempty"`
	// Describes configuration for the receipt action. Requires `RECEIPT` type.
	ReceiptOptions *ReceiptOptions `json:"receipt_options,omitempty" url:"receipt_options,omitempty"`
	// Describes configuration for the data collection action. Requires `DATA_COLLECTION` type.
	DataCollectionOptions *DataCollectionOptions `json:"data_collection_options,omitempty" url:"data_collection_options,omitempty"`
	// Describes configuration for the select action. Requires `SELECT` type.
	SelectOptions *SelectOptions `json:"select_options,omitempty" url:"select_options,omitempty"`
	// Details about the Terminal that received the action request (such as battery level,
	// operating system version, and network connection settings).
	//
	// Only available for `PING` action type.
	DeviceMetadata *DeviceMetadata `json:"device_metadata,omitempty" url:"device_metadata,omitempty"`
	// Indicates the action will be linked to another action and requires a waiting dialog to be
	// displayed instead of returning to the idle screen on completion of the action.
	//
	// Only supported on SIGNATURE, CONFIRMATION, DATA_COLLECTION, and SELECT types.
	AwaitNextAction *bool `json:"await_next_action,omitempty" url:"await_next_action,omitempty"`
	// The timeout duration of the waiting dialog as an RFC 3339 duration, after which the
	// waiting dialog will no longer be displayed and the Terminal will return to the idle screen.
	//
	// Default: 5 minutes from when the waiting dialog is displayed
	//
	// Maximum: 5 minutes
	AwaitNextActionDuration *string `json:"await_next_action_duration,omitempty" url:"await_next_action_duration,omitempty"`
	// contains filtered or unexported fields
}

Represents an action processed by the Square Terminal.

func (*TerminalAction) GetAppID

func (t *TerminalAction) GetAppID() *string

func (*TerminalAction) GetAwaitNextAction

func (t *TerminalAction) GetAwaitNextAction() *bool

func (*TerminalAction) GetAwaitNextActionDuration

func (t *TerminalAction) GetAwaitNextActionDuration() *string

func (*TerminalAction) GetCancelReason

func (t *TerminalAction) GetCancelReason() *ActionCancelReason

func (*TerminalAction) GetConfirmationOptions

func (t *TerminalAction) GetConfirmationOptions() *ConfirmationOptions

func (*TerminalAction) GetCreatedAt

func (t *TerminalAction) GetCreatedAt() *string

func (*TerminalAction) GetDataCollectionOptions

func (t *TerminalAction) GetDataCollectionOptions() *DataCollectionOptions

func (*TerminalAction) GetDeadlineDuration

func (t *TerminalAction) GetDeadlineDuration() *string

func (*TerminalAction) GetDeviceID

func (t *TerminalAction) GetDeviceID() *string

func (*TerminalAction) GetDeviceMetadata

func (t *TerminalAction) GetDeviceMetadata() *DeviceMetadata

func (*TerminalAction) GetExtraProperties

func (t *TerminalAction) GetExtraProperties() map[string]interface{}

func (*TerminalAction) GetID

func (t *TerminalAction) GetID() *string

func (*TerminalAction) GetLocationID

func (t *TerminalAction) GetLocationID() *string

func (*TerminalAction) GetQrCodeOptions

func (t *TerminalAction) GetQrCodeOptions() *QrCodeOptions

func (*TerminalAction) GetReceiptOptions

func (t *TerminalAction) GetReceiptOptions() *ReceiptOptions

func (*TerminalAction) GetSaveCardOptions

func (t *TerminalAction) GetSaveCardOptions() *SaveCardOptions

func (*TerminalAction) GetSelectOptions

func (t *TerminalAction) GetSelectOptions() *SelectOptions

func (*TerminalAction) GetSignatureOptions

func (t *TerminalAction) GetSignatureOptions() *SignatureOptions

func (*TerminalAction) GetStatus

func (t *TerminalAction) GetStatus() *string

func (*TerminalAction) GetType

func (*TerminalAction) GetUpdatedAt

func (t *TerminalAction) GetUpdatedAt() *string

func (*TerminalAction) String

func (t *TerminalAction) String() string

func (*TerminalAction) UnmarshalJSON

func (t *TerminalAction) UnmarshalJSON(data []byte) error

type TerminalActionActionType

type TerminalActionActionType string

Describes the type of this unit and indicates which field contains the unit information. This is an ‘open’ enum.

const (
	TerminalActionActionTypeQrCode         TerminalActionActionType = "QR_CODE"
	TerminalActionActionTypePing           TerminalActionActionType = "PING"
	TerminalActionActionTypeSaveCard       TerminalActionActionType = "SAVE_CARD"
	TerminalActionActionTypeSignature      TerminalActionActionType = "SIGNATURE"
	TerminalActionActionTypeConfirmation   TerminalActionActionType = "CONFIRMATION"
	TerminalActionActionTypeReceipt        TerminalActionActionType = "RECEIPT"
	TerminalActionActionTypeDataCollection TerminalActionActionType = "DATA_COLLECTION"
	TerminalActionActionTypeSelect         TerminalActionActionType = "SELECT"
)

func NewTerminalActionActionTypeFromString

func NewTerminalActionActionTypeFromString(s string) (TerminalActionActionType, error)

func (TerminalActionActionType) Ptr

type TerminalActionQuery

type TerminalActionQuery struct {
	// Options for filtering returned `TerminalAction`s
	Filter *TerminalActionQueryFilter `json:"filter,omitempty" url:"filter,omitempty"`
	// Option for sorting returned `TerminalAction` objects.
	Sort *TerminalActionQuerySort `json:"sort,omitempty" url:"sort,omitempty"`
	// contains filtered or unexported fields
}

func (*TerminalActionQuery) GetExtraProperties

func (t *TerminalActionQuery) GetExtraProperties() map[string]interface{}

func (*TerminalActionQuery) GetFilter

func (*TerminalActionQuery) GetSort

func (*TerminalActionQuery) String

func (t *TerminalActionQuery) String() string

func (*TerminalActionQuery) UnmarshalJSON

func (t *TerminalActionQuery) UnmarshalJSON(data []byte) error

type TerminalActionQueryFilter

type TerminalActionQueryFilter struct {
	// `TerminalAction`s associated with a specific device. If no device is specified then all
	// `TerminalAction`s for the merchant will be displayed.
	DeviceID *string `json:"device_id,omitempty" url:"device_id,omitempty"`
	// Time range for the beginning of the reporting period. Inclusive.
	// Default value: The current time minus one day.
	// Note that `TerminalAction`s are available for 30 days after creation.
	CreatedAt *TimeRange `json:"created_at,omitempty" url:"created_at,omitempty"`
	// Filter results with the desired status of the `TerminalAction`
	// Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED`
	Status *string `json:"status,omitempty" url:"status,omitempty"`
	// Filter results with the requested ActionType.
	// See [TerminalActionActionType](#type-terminalactionactiontype) for possible values
	Type *TerminalActionActionType `json:"type,omitempty" url:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*TerminalActionQueryFilter) GetCreatedAt

func (t *TerminalActionQueryFilter) GetCreatedAt() *TimeRange

func (*TerminalActionQueryFilter) GetDeviceID

func (t *TerminalActionQueryFilter) GetDeviceID() *string

func (*TerminalActionQueryFilter) GetExtraProperties

func (t *TerminalActionQueryFilter) GetExtraProperties() map[string]interface{}

func (*TerminalActionQueryFilter) GetStatus

func (t *TerminalActionQueryFilter) GetStatus() *string

func (*TerminalActionQueryFilter) GetType

func (*TerminalActionQueryFilter) String

func (t *TerminalActionQueryFilter) String() string

func (*TerminalActionQueryFilter) UnmarshalJSON

func (t *TerminalActionQueryFilter) UnmarshalJSON(data []byte) error

type TerminalActionQuerySort

type TerminalActionQuerySort struct {
	// The order in which results are listed.
	// - `ASC` - Oldest to newest.
	// - `DESC` - Newest to oldest (default).
	// See [SortOrder](#type-sortorder) for possible values
	SortOrder *SortOrder `json:"sort_order,omitempty" url:"sort_order,omitempty"`
	// contains filtered or unexported fields
}

func (*TerminalActionQuerySort) GetExtraProperties

func (t *TerminalActionQuerySort) GetExtraProperties() map[string]interface{}

func (*TerminalActionQuerySort) GetSortOrder

func (t *TerminalActionQuerySort) GetSortOrder() *SortOrder

func (*TerminalActionQuerySort) String

func (t *TerminalActionQuerySort) String() string

func (*TerminalActionQuerySort) UnmarshalJSON

func (t *TerminalActionQuerySort) UnmarshalJSON(data []byte) error

type TerminalCheckout

type TerminalCheckout struct {
	// A unique ID for this `TerminalCheckout`.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The amount of money (including the tax amount) that the Square Terminal device should try to collect.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// An optional user-defined reference ID that 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. The ID is also associated with any payments
	// used to complete the checkout.
	ReferenceID *string `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// An optional note to associate with the checkout, as well as with any payments used to complete the checkout.
	// Note: maximum 500 characters
	Note *string `json:"note,omitempty" url:"note,omitempty"`
	// The reference to the Square order ID for the checkout request.
	OrderID *string `json:"order_id,omitempty" url:"order_id,omitempty"`
	// Payment-specific options for the checkout request.
	PaymentOptions *PaymentOptions `json:"payment_options,omitempty" url:"payment_options,omitempty"`
	// Options to control the display and behavior of the Square Terminal device.
	DeviceOptions *DeviceCheckoutOptions `json:"device_options,omitempty" url:"device_options,omitempty"`
	// An RFC 3339 duration, after which the checkout is automatically canceled.
	// A `TerminalCheckout` that is `PENDING` is automatically `CANCELED` and has a cancellation reason
	// of `TIMED_OUT`.
	//
	// Default: 5 minutes from creation
	//
	// Maximum: 5 minutes
	DeadlineDuration *string `json:"deadline_duration,omitempty" url:"deadline_duration,omitempty"`
	// The status of the `TerminalCheckout`.
	// Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED`
	Status *string `json:"status,omitempty" url:"status,omitempty"`
	// The reason why `TerminalCheckout` is canceled. Present if the status is `CANCELED`.
	// See [ActionCancelReason](#type-actioncancelreason) for possible values
	CancelReason *ActionCancelReason `json:"cancel_reason,omitempty" url:"cancel_reason,omitempty"`
	// A list of IDs for payments created by this `TerminalCheckout`.
	PaymentIDs []string `json:"payment_ids,omitempty" url:"payment_ids,omitempty"`
	// The time when the `TerminalCheckout` was created, as an RFC 3339 timestamp.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The time when the `TerminalCheckout` was last updated, as an RFC 3339 timestamp.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The ID of the application that created the checkout.
	AppID *string `json:"app_id,omitempty" url:"app_id,omitempty"`
	// The location of the device where the `TerminalCheckout` was directed.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The type of payment the terminal should attempt to capture from. Defaults to `CARD_PRESENT`.
	// See [CheckoutOptionsPaymentType](#type-checkoutoptionspaymenttype) for possible values
	PaymentType *CheckoutOptionsPaymentType `json:"payment_type,omitempty" url:"payment_type,omitempty"`
	// An optional ID of the team member associated with creating the checkout.
	TeamMemberID *string `json:"team_member_id,omitempty" url:"team_member_id,omitempty"`
	// An optional ID of the customer associated with the checkout.
	CustomerID *string `json:"customer_id,omitempty" url:"customer_id,omitempty"`
	// The amount 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).
	//
	// To set this field, PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS OAuth permission is required. For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions).
	AppFeeMoney *Money `json:"app_fee_money,omitempty" url:"app_fee_money,omitempty"`
	// 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.
	StatementDescriptionIdentifier *string `json:"statement_description_identifier,omitempty" url:"statement_description_identifier,omitempty"`
	// The amount designated as a tip, in addition to `amount_money`. This may only be set for a
	// checkout that has tipping disabled (`tip_settings.allow_tipping` is `false`).
	TipMoney *Money `json:"tip_money,omitempty" url:"tip_money,omitempty"`
	// contains filtered or unexported fields
}

Represents a checkout processed by the Square Terminal.

func (*TerminalCheckout) GetAmountMoney

func (t *TerminalCheckout) GetAmountMoney() *Money

func (*TerminalCheckout) GetAppFeeMoney

func (t *TerminalCheckout) GetAppFeeMoney() *Money

func (*TerminalCheckout) GetAppID

func (t *TerminalCheckout) GetAppID() *string

func (*TerminalCheckout) GetCancelReason

func (t *TerminalCheckout) GetCancelReason() *ActionCancelReason

func (*TerminalCheckout) GetCreatedAt

func (t *TerminalCheckout) GetCreatedAt() *string

func (*TerminalCheckout) GetCustomerID

func (t *TerminalCheckout) GetCustomerID() *string

func (*TerminalCheckout) GetDeadlineDuration

func (t *TerminalCheckout) GetDeadlineDuration() *string

func (*TerminalCheckout) GetDeviceOptions

func (t *TerminalCheckout) GetDeviceOptions() *DeviceCheckoutOptions

func (*TerminalCheckout) GetExtraProperties

func (t *TerminalCheckout) GetExtraProperties() map[string]interface{}

func (*TerminalCheckout) GetID

func (t *TerminalCheckout) GetID() *string

func (*TerminalCheckout) GetLocationID

func (t *TerminalCheckout) GetLocationID() *string

func (*TerminalCheckout) GetNote

func (t *TerminalCheckout) GetNote() *string

func (*TerminalCheckout) GetOrderID

func (t *TerminalCheckout) GetOrderID() *string

func (*TerminalCheckout) GetPaymentIDs

func (t *TerminalCheckout) GetPaymentIDs() []string

func (*TerminalCheckout) GetPaymentOptions

func (t *TerminalCheckout) GetPaymentOptions() *PaymentOptions

func (*TerminalCheckout) GetPaymentType

func (t *TerminalCheckout) GetPaymentType() *CheckoutOptionsPaymentType

func (*TerminalCheckout) GetReferenceID

func (t *TerminalCheckout) GetReferenceID() *string

func (*TerminalCheckout) GetStatementDescriptionIdentifier

func (t *TerminalCheckout) GetStatementDescriptionIdentifier() *string

func (*TerminalCheckout) GetStatus

func (t *TerminalCheckout) GetStatus() *string

func (*TerminalCheckout) GetTeamMemberID

func (t *TerminalCheckout) GetTeamMemberID() *string

func (*TerminalCheckout) GetTipMoney

func (t *TerminalCheckout) GetTipMoney() *Money

func (*TerminalCheckout) GetUpdatedAt

func (t *TerminalCheckout) GetUpdatedAt() *string

func (*TerminalCheckout) String

func (t *TerminalCheckout) String() string

func (*TerminalCheckout) UnmarshalJSON

func (t *TerminalCheckout) UnmarshalJSON(data []byte) error

type TerminalCheckoutQuery

type TerminalCheckoutQuery struct {
	// Options for filtering returned `TerminalCheckout` objects.
	Filter *TerminalCheckoutQueryFilter `json:"filter,omitempty" url:"filter,omitempty"`
	// Option for sorting returned `TerminalCheckout` objects.
	Sort *TerminalCheckoutQuerySort `json:"sort,omitempty" url:"sort,omitempty"`
	// contains filtered or unexported fields
}

func (*TerminalCheckoutQuery) GetExtraProperties

func (t *TerminalCheckoutQuery) GetExtraProperties() map[string]interface{}

func (*TerminalCheckoutQuery) GetFilter

func (*TerminalCheckoutQuery) GetSort

func (*TerminalCheckoutQuery) String

func (t *TerminalCheckoutQuery) String() string

func (*TerminalCheckoutQuery) UnmarshalJSON

func (t *TerminalCheckoutQuery) UnmarshalJSON(data []byte) error

type TerminalCheckoutQueryFilter

type TerminalCheckoutQueryFilter struct {
	// The `TerminalCheckout` objects associated with a specific device. If no device is specified, then all
	// `TerminalCheckout` objects for the merchant are displayed.
	DeviceID *string `json:"device_id,omitempty" url:"device_id,omitempty"`
	// The time range for the beginning of the reporting period, which is inclusive.
	// Default value: The current time minus one day.
	// Note that `TerminalCheckout`s are available for 30 days after creation.
	CreatedAt *TimeRange `json:"created_at,omitempty" url:"created_at,omitempty"`
	// Filtered results with the desired status of the `TerminalCheckout`.
	// Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED`
	Status *string `json:"status,omitempty" url:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*TerminalCheckoutQueryFilter) GetCreatedAt

func (t *TerminalCheckoutQueryFilter) GetCreatedAt() *TimeRange

func (*TerminalCheckoutQueryFilter) GetDeviceID

func (t *TerminalCheckoutQueryFilter) GetDeviceID() *string

func (*TerminalCheckoutQueryFilter) GetExtraProperties

func (t *TerminalCheckoutQueryFilter) GetExtraProperties() map[string]interface{}

func (*TerminalCheckoutQueryFilter) GetStatus

func (t *TerminalCheckoutQueryFilter) GetStatus() *string

func (*TerminalCheckoutQueryFilter) String

func (t *TerminalCheckoutQueryFilter) String() string

func (*TerminalCheckoutQueryFilter) UnmarshalJSON

func (t *TerminalCheckoutQueryFilter) UnmarshalJSON(data []byte) error

type TerminalCheckoutQuerySort

type TerminalCheckoutQuerySort struct {
	// The order in which results are listed.
	// Default: `DESC`
	// See [SortOrder](#type-sortorder) for possible values
	SortOrder *SortOrder `json:"sort_order,omitempty" url:"sort_order,omitempty"`
	// contains filtered or unexported fields
}

func (*TerminalCheckoutQuerySort) GetExtraProperties

func (t *TerminalCheckoutQuerySort) GetExtraProperties() map[string]interface{}

func (*TerminalCheckoutQuerySort) GetSortOrder

func (t *TerminalCheckoutQuerySort) GetSortOrder() *SortOrder

func (*TerminalCheckoutQuerySort) String

func (t *TerminalCheckoutQuerySort) String() string

func (*TerminalCheckoutQuerySort) UnmarshalJSON

func (t *TerminalCheckoutQuerySort) UnmarshalJSON(data []byte) error

type TerminalRefund

type TerminalRefund struct {
	// A unique ID for this `TerminalRefund`.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The reference to the payment refund created by completing this `TerminalRefund`.
	RefundID *string `json:"refund_id,omitempty" url:"refund_id,omitempty"`
	// The unique ID of the payment being refunded.
	PaymentID string `json:"payment_id" url:"payment_id"`
	// The reference to the Square order ID for the payment identified by the `payment_id`.
	OrderID *string `json:"order_id,omitempty" url:"order_id,omitempty"`
	// 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.
	AmountMoney *Money `json:"amount_money,omitempty" url:"amount_money,omitempty"`
	// A description of the reason for the refund.
	Reason string `json:"reason" url:"reason"`
	// The unique ID of the device intended for this `TerminalRefund`.
	// The Id can be retrieved from /v2/devices api.
	DeviceID string `json:"device_id" url:"device_id"`
	// The RFC 3339 duration, after which the refund is automatically canceled.
	// A `TerminalRefund` that is `PENDING` is automatically `CANCELED` and has a cancellation reason
	// of `TIMED_OUT`.
	//
	// Default: 5 minutes from creation.
	//
	// Maximum: 5 minutes
	DeadlineDuration *string `json:"deadline_duration,omitempty" url:"deadline_duration,omitempty"`
	// The status of the `TerminalRefund`.
	// Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, or `COMPLETED`.
	Status *string `json:"status,omitempty" url:"status,omitempty"`
	// Present if the status is `CANCELED`.
	// See [ActionCancelReason](#type-actioncancelreason) for possible values
	CancelReason *ActionCancelReason `json:"cancel_reason,omitempty" url:"cancel_reason,omitempty"`
	// The time when the `TerminalRefund` was created, as an RFC 3339 timestamp.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The time when the `TerminalRefund` was last updated, as an RFC 3339 timestamp.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The ID of the application that created the refund.
	AppID *string `json:"app_id,omitempty" url:"app_id,omitempty"`
	// The location of the device where the `TerminalRefund` was directed.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// contains filtered or unexported fields
}

Represents a payment refund processed by the Square Terminal. Only supports Interac (Canadian debit network) payment refunds.

func (*TerminalRefund) GetAmountMoney

func (t *TerminalRefund) GetAmountMoney() *Money

func (*TerminalRefund) GetAppID

func (t *TerminalRefund) GetAppID() *string

func (*TerminalRefund) GetCancelReason

func (t *TerminalRefund) GetCancelReason() *ActionCancelReason

func (*TerminalRefund) GetCreatedAt

func (t *TerminalRefund) GetCreatedAt() *string

func (*TerminalRefund) GetDeadlineDuration

func (t *TerminalRefund) GetDeadlineDuration() *string

func (*TerminalRefund) GetDeviceID

func (t *TerminalRefund) GetDeviceID() string

func (*TerminalRefund) GetExtraProperties

func (t *TerminalRefund) GetExtraProperties() map[string]interface{}

func (*TerminalRefund) GetID

func (t *TerminalRefund) GetID() *string

func (*TerminalRefund) GetLocationID

func (t *TerminalRefund) GetLocationID() *string

func (*TerminalRefund) GetOrderID

func (t *TerminalRefund) GetOrderID() *string

func (*TerminalRefund) GetPaymentID

func (t *TerminalRefund) GetPaymentID() string

func (*TerminalRefund) GetReason

func (t *TerminalRefund) GetReason() string

func (*TerminalRefund) GetRefundID

func (t *TerminalRefund) GetRefundID() *string

func (*TerminalRefund) GetStatus

func (t *TerminalRefund) GetStatus() *string

func (*TerminalRefund) GetUpdatedAt

func (t *TerminalRefund) GetUpdatedAt() *string

func (*TerminalRefund) String

func (t *TerminalRefund) String() string

func (*TerminalRefund) UnmarshalJSON

func (t *TerminalRefund) UnmarshalJSON(data []byte) error

type TerminalRefundQuery

type TerminalRefundQuery struct {
	// The filter for the Terminal refund query.
	Filter *TerminalRefundQueryFilter `json:"filter,omitempty" url:"filter,omitempty"`
	// The sort order for the Terminal refund query.
	Sort *TerminalRefundQuerySort `json:"sort,omitempty" url:"sort,omitempty"`
	// contains filtered or unexported fields
}

func (*TerminalRefundQuery) GetExtraProperties

func (t *TerminalRefundQuery) GetExtraProperties() map[string]interface{}

func (*TerminalRefundQuery) GetFilter

func (*TerminalRefundQuery) GetSort

func (*TerminalRefundQuery) String

func (t *TerminalRefundQuery) String() string

func (*TerminalRefundQuery) UnmarshalJSON

func (t *TerminalRefundQuery) UnmarshalJSON(data []byte) error

type TerminalRefundQueryFilter

type TerminalRefundQueryFilter struct {
	// `TerminalRefund` objects associated with a specific device. If no device is specified, then all
	// `TerminalRefund` objects for the signed-in account are displayed.
	DeviceID *string `json:"device_id,omitempty" url:"device_id,omitempty"`
	// The timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive.
	// Default value: The current time minus one day.
	// Note that `TerminalRefund`s are available for 30 days after creation.
	CreatedAt *TimeRange `json:"created_at,omitempty" url:"created_at,omitempty"`
	// Filtered results with the desired status of the `TerminalRefund`.
	// Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, or `COMPLETED`.
	Status *string `json:"status,omitempty" url:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*TerminalRefundQueryFilter) GetCreatedAt

func (t *TerminalRefundQueryFilter) GetCreatedAt() *TimeRange

func (*TerminalRefundQueryFilter) GetDeviceID

func (t *TerminalRefundQueryFilter) GetDeviceID() *string

func (*TerminalRefundQueryFilter) GetExtraProperties

func (t *TerminalRefundQueryFilter) GetExtraProperties() map[string]interface{}

func (*TerminalRefundQueryFilter) GetStatus

func (t *TerminalRefundQueryFilter) GetStatus() *string

func (*TerminalRefundQueryFilter) String

func (t *TerminalRefundQueryFilter) String() string

func (*TerminalRefundQueryFilter) UnmarshalJSON

func (t *TerminalRefundQueryFilter) UnmarshalJSON(data []byte) error

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" url:"sort_order,omitempty"`
	// contains filtered or unexported fields
}

func (*TerminalRefundQuerySort) GetExtraProperties

func (t *TerminalRefundQuerySort) GetExtraProperties() map[string]interface{}

func (*TerminalRefundQuerySort) GetSortOrder

func (t *TerminalRefundQuerySort) GetSortOrder() *string

func (*TerminalRefundQuerySort) String

func (t *TerminalRefundQuerySort) String() string

func (*TerminalRefundQuerySort) UnmarshalJSON

func (t *TerminalRefundQuerySort) UnmarshalJSON(data []byte) error

type TestWebhookSubscriptionResponse

type TestWebhookSubscriptionResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The [SubscriptionTestResult](entity:SubscriptionTestResult).
	SubscriptionTestResult *SubscriptionTestResult `json:"subscription_test_result,omitempty" url:"subscription_test_result,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [TestWebhookSubscription](api-endpoint:WebhookSubscriptions-TestWebhookSubscription) endpoint.

Note: If there are errors processing the request, the SubscriptionTestResult(entity:SubscriptionTestResult) field is not present.

func (*TestWebhookSubscriptionResponse) GetErrors

func (t *TestWebhookSubscriptionResponse) GetErrors() []*Error

func (*TestWebhookSubscriptionResponse) GetExtraProperties

func (t *TestWebhookSubscriptionResponse) GetExtraProperties() map[string]interface{}

func (*TestWebhookSubscriptionResponse) GetSubscriptionTestResult

func (t *TestWebhookSubscriptionResponse) GetSubscriptionTestResult() *SubscriptionTestResult

func (*TestWebhookSubscriptionResponse) String

func (*TestWebhookSubscriptionResponse) UnmarshalJSON

func (t *TestWebhookSubscriptionResponse) UnmarshalJSON(data []byte) error

type TimeRange

type TimeRange struct {
	// A datetime value in RFC 3339 format indicating when the time range
	// starts.
	StartAt *string `json:"start_at,omitempty" url:"start_at,omitempty"`
	// A datetime value in RFC 3339 format indicating when the time range
	// ends.
	EndAt *string `json:"end_at,omitempty" url:"end_at,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*TimeRange) GetEndAt

func (t *TimeRange) GetEndAt() *string

func (*TimeRange) GetExtraProperties

func (t *TimeRange) GetExtraProperties() map[string]interface{}

func (*TimeRange) GetStartAt

func (t *TimeRange) GetStartAt() *string

func (*TimeRange) String

func (t *TimeRange) String() string

func (*TimeRange) UnmarshalJSON

func (t *TimeRange) UnmarshalJSON(data []byte) error

type TipSettings

type TipSettings struct {
	// Indicates whether tipping is enabled for this checkout. Defaults to false.
	AllowTipping *bool `json:"allow_tipping,omitempty" url:"allow_tipping,omitempty"`
	// Indicates whether tip options should be presented on the screen before presenting
	// the signature screen during card payment. Defaults to false.
	SeparateTipScreen *bool `json:"separate_tip_screen,omitempty" url:"separate_tip_screen,omitempty"`
	// Indicates whether custom tip amounts are allowed during the checkout flow. Defaults to false.
	CustomTipField *bool `json:"custom_tip_field,omitempty" url:"custom_tip_field,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, and 25.
	TipPercentages []int `json:"tip_percentages,omitempty" url:"tip_percentages,omitempty"`
	// Enables the "Smart Tip Amounts" behavior.
	// Exact tipping options depend on the region in which the Square seller is active.
	//
	// For payments under 10.00, in the Australia, Canada, Ireland, United Kingdom, and United States, tipping options are presented as no tip, .50, 1.00 or 2.00.
	//
	// For payment amounts of 10.00 or greater, tipping options are presented as the following percentages: 0%, 5%, 10%, 15%.
	//
	// 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" url:"smart_tipping,omitempty"`
	// contains filtered or unexported fields
}

func (*TipSettings) GetAllowTipping

func (t *TipSettings) GetAllowTipping() *bool

func (*TipSettings) GetCustomTipField

func (t *TipSettings) GetCustomTipField() *bool

func (*TipSettings) GetExtraProperties

func (t *TipSettings) GetExtraProperties() map[string]interface{}

func (*TipSettings) GetSeparateTipScreen

func (t *TipSettings) GetSeparateTipScreen() *bool

func (*TipSettings) GetSmartTipping

func (t *TipSettings) GetSmartTipping() *bool

func (*TipSettings) GetTipPercentages

func (t *TipSettings) GetTipPercentages() []int

func (*TipSettings) String

func (t *TipSettings) String() string

func (*TipSettings) UnmarshalJSON

func (t *TipSettings) UnmarshalJSON(data []byte) error

type Transaction

type Transaction struct {
	// The transaction's unique ID, issued by Square payments servers.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The ID of the transaction's associated location.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The timestamp for when the transaction was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The tenders used to pay in the transaction.
	Tenders []*Tender `json:"tenders,omitempty" url:"tenders,omitempty"`
	// Refunds that have been applied to any tender in the transaction.
	Refunds []*Refund `json:"refunds,omitempty" url:"refunds,omitempty"`
	// If the transaction was created with the [Charge](api-endpoint:Transactions-Charge)
	// endpoint, this value is the same as the value provided for the `reference_id`
	// parameter in the request to that endpoint. Otherwise, it is not set.
	ReferenceID *string `json:"reference_id,omitempty" url:"reference_id,omitempty"`
	// The Square product that processed the transaction.
	// See [TransactionProduct](#type-transactionproduct) for possible values
	Product *TransactionProduct `json:"product,omitempty" url:"product,omitempty"`
	// If the transaction was created in the Square Point of Sale app, this value
	// is the ID generated for the transaction by Square Point of Sale.
	//
	// This ID has no relationship to the transaction's canonical `id`, which is
	// generated by Square's backend servers. This value is generated for bookkeeping
	// purposes, in case the transaction cannot immediately be completed (for example,
	// if the transaction is processed in offline mode).
	//
	// It is not currently possible with the Connect API to perform a transaction
	// lookup by this value.
	ClientID *string `json:"client_id,omitempty" url:"client_id,omitempty"`
	// The shipping address provided in the request, if any.
	ShippingAddress *Address `json:"shipping_address,omitempty" url:"shipping_address,omitempty"`
	// The order_id is an identifier for the order associated with this transaction, if any.
	OrderID *string `json:"order_id,omitempty" url:"order_id,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*Transaction) GetClientID

func (t *Transaction) GetClientID() *string

func (*Transaction) GetCreatedAt

func (t *Transaction) GetCreatedAt() *string

func (*Transaction) GetExtraProperties

func (t *Transaction) GetExtraProperties() map[string]interface{}

func (*Transaction) GetID

func (t *Transaction) GetID() *string

func (*Transaction) GetLocationID

func (t *Transaction) GetLocationID() *string

func (*Transaction) GetOrderID

func (t *Transaction) GetOrderID() *string

func (*Transaction) GetProduct

func (t *Transaction) GetProduct() *TransactionProduct

func (*Transaction) GetReferenceID

func (t *Transaction) GetReferenceID() *string

func (*Transaction) GetRefunds

func (t *Transaction) GetRefunds() []*Refund

func (*Transaction) GetShippingAddress

func (t *Transaction) GetShippingAddress() *Address

func (*Transaction) GetTenders

func (t *Transaction) GetTenders() []*Tender

func (*Transaction) String

func (t *Transaction) String() string

func (*Transaction) UnmarshalJSON

func (t *Transaction) UnmarshalJSON(data []byte) error

type TransactionProduct

type TransactionProduct string

Indicates the Square product used to process a transaction.

const (
	TransactionProductRegister     TransactionProduct = "REGISTER"
	TransactionProductExternalAPI  TransactionProduct = "EXTERNAL_API"
	TransactionProductBilling      TransactionProduct = "BILLING"
	TransactionProductAppointments TransactionProduct = "APPOINTMENTS"
	TransactionProductInvoices     TransactionProduct = "INVOICES"
	TransactionProductOnlineStore  TransactionProduct = "ONLINE_STORE"
	TransactionProductPayroll      TransactionProduct = "PAYROLL"
	TransactionProductOther        TransactionProduct = "OTHER"
)

func NewTransactionProductFromString

func NewTransactionProductFromString(s string) (TransactionProduct, error)

func (TransactionProduct) Ptr

type UnlinkCustomerFromGiftCardRequest

type UnlinkCustomerFromGiftCardRequest struct {
	// The ID of the gift card to be unlinked.
	GiftCardID string `json:"-" url:"-"`
	// The ID of the customer to unlink from the gift card.
	CustomerID string `json:"customer_id" url:"-"`
}

type UnlinkCustomerFromGiftCardResponse

type UnlinkCustomerFromGiftCardResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The gift card with the ID of the unlinked customer removed from the `customer_ids` field.
	// If no other customers are linked, the `customer_ids` field is also removed.
	GiftCard *GiftCard `json:"gift_card,omitempty" url:"gift_card,omitempty"`
	// contains filtered or unexported fields
}

A response that contains the unlinked `GiftCard` object. If the request resulted in errors, the response contains a set of `Error` objects.

func (*UnlinkCustomerFromGiftCardResponse) GetErrors

func (u *UnlinkCustomerFromGiftCardResponse) GetErrors() []*Error

func (*UnlinkCustomerFromGiftCardResponse) GetExtraProperties

func (u *UnlinkCustomerFromGiftCardResponse) GetExtraProperties() map[string]interface{}

func (*UnlinkCustomerFromGiftCardResponse) GetGiftCard

func (u *UnlinkCustomerFromGiftCardResponse) GetGiftCard() *GiftCard

func (*UnlinkCustomerFromGiftCardResponse) String

func (*UnlinkCustomerFromGiftCardResponse) UnmarshalJSON

func (u *UnlinkCustomerFromGiftCardResponse) UnmarshalJSON(data []byte) error

type UpdateBookingCustomAttributeDefinitionResponse

type UpdateBookingCustomAttributeDefinitionResponse struct {
	// The updated custom attribute definition.
	CustomAttributeDefinition *CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"custom_attribute_definition,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents an [UpdateBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-UpdateBookingCustomAttributeDefinition) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*UpdateBookingCustomAttributeDefinitionResponse) GetCustomAttributeDefinition

func (*UpdateBookingCustomAttributeDefinitionResponse) GetErrors

func (*UpdateBookingCustomAttributeDefinitionResponse) GetExtraProperties

func (u *UpdateBookingCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*UpdateBookingCustomAttributeDefinitionResponse) String

func (*UpdateBookingCustomAttributeDefinitionResponse) UnmarshalJSON

type UpdateBookingRequest

type UpdateBookingRequest struct {
	// The ID of the [Booking](entity:Booking) object representing the to-be-updated booking.
	BookingID string `json:"-" url:"-"`
	// A unique key to make this request an idempotent operation.
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"`
	// The booking to be updated. Individual attributes explicitly specified here override the corresponding values of the existing booking.
	Booking *Booking `json:"booking,omitempty" url:"-"`
}

type UpdateBookingResponse

type UpdateBookingResponse struct {
	// The booking that was updated.
	Booking *Booking `json:"booking,omitempty" url:"booking,omitempty"`
	// Errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateBookingResponse) GetBooking

func (u *UpdateBookingResponse) GetBooking() *Booking

func (*UpdateBookingResponse) GetErrors

func (u *UpdateBookingResponse) GetErrors() []*Error

func (*UpdateBookingResponse) GetExtraProperties

func (u *UpdateBookingResponse) GetExtraProperties() map[string]interface{}

func (*UpdateBookingResponse) String

func (u *UpdateBookingResponse) String() string

func (*UpdateBookingResponse) UnmarshalJSON

func (u *UpdateBookingResponse) UnmarshalJSON(data []byte) error

type UpdateBreakTypeResponse

type UpdateBreakTypeResponse struct {
	// The response object.
	BreakType *BreakType `json:"break_type,omitempty" url:"break_type,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

A response to a request to update a `BreakType`. The response contains the requested `BreakType` objects and might contain a set of `Error` objects if the request resulted in errors.

func (*UpdateBreakTypeResponse) GetBreakType

func (u *UpdateBreakTypeResponse) GetBreakType() *BreakType

func (*UpdateBreakTypeResponse) GetErrors

func (u *UpdateBreakTypeResponse) GetErrors() []*Error

func (*UpdateBreakTypeResponse) GetExtraProperties

func (u *UpdateBreakTypeResponse) GetExtraProperties() map[string]interface{}

func (*UpdateBreakTypeResponse) String

func (u *UpdateBreakTypeResponse) String() string

func (*UpdateBreakTypeResponse) UnmarshalJSON

func (u *UpdateBreakTypeResponse) UnmarshalJSON(data []byte) error

type UpdateCatalogImageRequest

type UpdateCatalogImageRequest struct {
	// A unique string that identifies this UpdateCatalogImage request.
	// Keys can be any valid string but must be unique for every UpdateCatalogImage request.
	//
	// See [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more information.
	IdempotencyKey string `json:"idempotency_key" url:"idempotency_key"`
	// contains filtered or unexported fields
}

func (*UpdateCatalogImageRequest) GetExtraProperties

func (u *UpdateCatalogImageRequest) GetExtraProperties() map[string]interface{}

func (*UpdateCatalogImageRequest) GetIdempotencyKey

func (u *UpdateCatalogImageRequest) GetIdempotencyKey() string

func (*UpdateCatalogImageRequest) String

func (u *UpdateCatalogImageRequest) String() string

func (*UpdateCatalogImageRequest) UnmarshalJSON

func (u *UpdateCatalogImageRequest) UnmarshalJSON(data []byte) error

type UpdateCatalogImageResponse

type UpdateCatalogImageResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The newly updated `CatalogImage` including a Square-generated
	// URL for the encapsulated image file.
	Image *CatalogObject `json:"image,omitempty" url:"image,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateCatalogImageResponse) GetErrors

func (u *UpdateCatalogImageResponse) GetErrors() []*Error

func (*UpdateCatalogImageResponse) GetExtraProperties

func (u *UpdateCatalogImageResponse) GetExtraProperties() map[string]interface{}

func (*UpdateCatalogImageResponse) GetImage

func (*UpdateCatalogImageResponse) String

func (u *UpdateCatalogImageResponse) String() string

func (*UpdateCatalogImageResponse) UnmarshalJSON

func (u *UpdateCatalogImageResponse) UnmarshalJSON(data []byte) error

type UpdateCustomerCustomAttributeDefinitionResponse

type UpdateCustomerCustomAttributeDefinitionResponse struct {
	// The updated custom attribute definition.
	CustomAttributeDefinition *CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"custom_attribute_definition,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents an [UpdateCustomerCustomAttributeDefinition](api-endpoint:CustomerCustomAttributes-UpdateCustomerCustomAttributeDefinition) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*UpdateCustomerCustomAttributeDefinitionResponse) GetCustomAttributeDefinition

func (*UpdateCustomerCustomAttributeDefinitionResponse) GetErrors

func (*UpdateCustomerCustomAttributeDefinitionResponse) GetExtraProperties

func (u *UpdateCustomerCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*UpdateCustomerCustomAttributeDefinitionResponse) String

func (*UpdateCustomerCustomAttributeDefinitionResponse) UnmarshalJSON

type UpdateCustomerGroupResponse

type UpdateCustomerGroupResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The successfully updated customer group.
	Group *CustomerGroup `json:"group,omitempty" url:"group,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [UpdateCustomerGroup](api-endpoint:CustomerGroups-UpdateCustomerGroup) endpoint.

Either `errors` or `group` is present in a given response (never both).

func (*UpdateCustomerGroupResponse) GetErrors

func (u *UpdateCustomerGroupResponse) GetErrors() []*Error

func (*UpdateCustomerGroupResponse) GetExtraProperties

func (u *UpdateCustomerGroupResponse) GetExtraProperties() map[string]interface{}

func (*UpdateCustomerGroupResponse) GetGroup

func (*UpdateCustomerGroupResponse) String

func (u *UpdateCustomerGroupResponse) String() string

func (*UpdateCustomerGroupResponse) UnmarshalJSON

func (u *UpdateCustomerGroupResponse) UnmarshalJSON(data []byte) error

type UpdateCustomerRequest

type UpdateCustomerRequest struct {
	// The ID of the customer to update.
	CustomerID string `json:"-" url:"-"`
	// The given name (that is, the first name) associated with the customer profile.
	//
	// The maximum length for this value is 300 characters.
	GivenName *string `json:"given_name,omitempty" url:"-"`
	// The family name (that is, the last name) associated with the customer profile.
	//
	// The maximum length for this value is 300 characters.
	FamilyName *string `json:"family_name,omitempty" url:"-"`
	// A business name associated with the customer profile.
	//
	// The maximum length for this value is 500 characters.
	CompanyName *string `json:"company_name,omitempty" url:"-"`
	// A nickname for the customer profile.
	//
	// The maximum length for this value is 100 characters.
	Nickname *string `json:"nickname,omitempty" url:"-"`
	// The email address associated with the customer profile.
	//
	// The maximum length for this value is 254 characters.
	EmailAddress *string `json:"email_address,omitempty" url:"-"`
	// The physical address associated with the customer profile. Only new or changed fields are required in the request.
	//
	// For maximum length constraints, see [Customer addresses](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#address).
	// The `first_name` and `last_name` fields are ignored if they are present in the request.
	Address *Address `json:"address,omitempty" url:"-"`
	// The phone number associated with the customer profile. The phone number must be valid and can contain
	// 9–16 digits, with an optional `+` prefix and country code. For more information, see
	// [Customer phone numbers](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#phone-number).
	PhoneNumber *string `json:"phone_number,omitempty" url:"-"`
	// An optional second ID used to associate the customer profile with an
	// entity in another system.
	//
	// The maximum length for this value is 100 characters.
	ReferenceID *string `json:"reference_id,omitempty" url:"-"`
	// A custom note associated with the customer profile.
	Note *string `json:"note,omitempty" url:"-"`
	// The birthday associated with the customer profile, in `YYYY-MM-DD` or `MM-DD` format. For example,
	// specify `1998-09-21` for September 21, 1998, or `09-21` for September 21. Birthdays are returned in `YYYY-MM-DD`
	// format, where `YYYY` is the specified birth year or `0000` if a birth year is not specified.
	Birthday *string `json:"birthday,omitempty" url:"-"`
	// The current version of the customer profile.
	//
	// As a best practice, you should include this field to enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) control. For more information, see [Update a customer profile](https://developer.squareup.com/docs/customers-api/use-the-api/keep-records#update-a-customer-profile).
	Version *int64 `json:"version,omitempty" url:"-"`
	// The tax ID associated with the customer profile. This field is available only for customers of sellers
	// in EU countries or the United Kingdom. For more information,
	// see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids).
	TaxIDs *CustomerTaxIDs `json:"tax_ids,omitempty" url:"-"`
}

type UpdateCustomerResponse

type UpdateCustomerResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The updated customer.
	Customer *Customer `json:"customer,omitempty" url:"customer,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [UpdateCustomer](api-endpoint:Customers-UpdateCustomer) or [BulkUpdateCustomers](api-endpoint:Customers-BulkUpdateCustomers) endpoint.

Either `errors` or `customer` is present in a given response (never both).

func (*UpdateCustomerResponse) GetCustomer

func (u *UpdateCustomerResponse) GetCustomer() *Customer

func (*UpdateCustomerResponse) GetErrors

func (u *UpdateCustomerResponse) GetErrors() []*Error

func (*UpdateCustomerResponse) GetExtraProperties

func (u *UpdateCustomerResponse) GetExtraProperties() map[string]interface{}

func (*UpdateCustomerResponse) String

func (u *UpdateCustomerResponse) String() string

func (*UpdateCustomerResponse) UnmarshalJSON

func (u *UpdateCustomerResponse) UnmarshalJSON(data []byte) error

type UpdateInvoiceRequest

type UpdateInvoiceRequest struct {
	// The ID of the invoice to update.
	InvoiceID string `json:"-" url:"-"`
	// The invoice fields to add, change, or clear. Fields can be cleared using
	// null values or the `remove` field (for individual payment requests or reminders).
	// The current invoice `version` is also required. For more information, including requirements,
	// limitations, and more examples, see [Update an Invoice](https://developer.squareup.com/docs/invoices-api/update-invoices).
	Invoice *Invoice `json:"invoice,omitempty" url:"-"`
	// 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/build-basics/common-api-patterns/idempotency).
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"`
	// The list of fields to clear. Although this field is currently supported, we
	// recommend using null values or the `remove` field when possible. For examples, see
	// [Update an Invoice](https://developer.squareup.com/docs/invoices-api/update-invoices).
	FieldsToClear []string `json:"fields_to_clear,omitempty" url:"-"`
}

type UpdateInvoiceResponse

type UpdateInvoiceResponse struct {
	// The updated invoice.
	Invoice *Invoice `json:"invoice,omitempty" url:"invoice,omitempty"`
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Describes a `UpdateInvoice` response.

func (*UpdateInvoiceResponse) GetErrors

func (u *UpdateInvoiceResponse) GetErrors() []*Error

func (*UpdateInvoiceResponse) GetExtraProperties

func (u *UpdateInvoiceResponse) GetExtraProperties() map[string]interface{}

func (*UpdateInvoiceResponse) GetInvoice

func (u *UpdateInvoiceResponse) GetInvoice() *Invoice

func (*UpdateInvoiceResponse) String

func (u *UpdateInvoiceResponse) String() string

func (*UpdateInvoiceResponse) UnmarshalJSON

func (u *UpdateInvoiceResponse) UnmarshalJSON(data []byte) error

type UpdateItemModifierListsRequest

type UpdateItemModifierListsRequest struct {
	// The IDs of the catalog items associated with the CatalogModifierList objects being updated.
	ItemIDs []string `json:"item_ids,omitempty" url:"-"`
	// The IDs of the CatalogModifierList objects to enable for the CatalogItem.
	// At least one of `modifier_lists_to_enable` or `modifier_lists_to_disable` must be specified.
	ModifierListsToEnable []string `json:"modifier_lists_to_enable,omitempty" url:"-"`
	// The IDs of the CatalogModifierList objects to disable for the CatalogItem.
	// At least one of `modifier_lists_to_enable` or `modifier_lists_to_disable` must be specified.
	ModifierListsToDisable []string `json:"modifier_lists_to_disable,omitempty" url:"-"`
}

type UpdateItemModifierListsResponse

type UpdateItemModifierListsResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The database [timestamp](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-dates) of this update in RFC 3339 format, e.g., `2016-09-04T23:59:33.123Z`.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateItemModifierListsResponse) GetErrors

func (u *UpdateItemModifierListsResponse) GetErrors() []*Error

func (*UpdateItemModifierListsResponse) GetExtraProperties

func (u *UpdateItemModifierListsResponse) GetExtraProperties() map[string]interface{}

func (*UpdateItemModifierListsResponse) GetUpdatedAt

func (u *UpdateItemModifierListsResponse) GetUpdatedAt() *string

func (*UpdateItemModifierListsResponse) String

func (*UpdateItemModifierListsResponse) UnmarshalJSON

func (u *UpdateItemModifierListsResponse) UnmarshalJSON(data []byte) error

type UpdateItemTaxesRequest

type UpdateItemTaxesRequest struct {
	// IDs for the CatalogItems associated with the CatalogTax objects being updated.
	// No more than 1,000 IDs may be provided.
	ItemIDs []string `json:"item_ids,omitempty" url:"-"`
	// IDs of the CatalogTax objects to enable.
	// At least one of `taxes_to_enable` or `taxes_to_disable` must be specified.
	TaxesToEnable []string `json:"taxes_to_enable,omitempty" url:"-"`
	// IDs of the CatalogTax objects to disable.
	// At least one of `taxes_to_enable` or `taxes_to_disable` must be specified.
	TaxesToDisable []string `json:"taxes_to_disable,omitempty" url:"-"`
}

type UpdateItemTaxesResponse

type UpdateItemTaxesResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// 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" url:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateItemTaxesResponse) GetErrors

func (u *UpdateItemTaxesResponse) GetErrors() []*Error

func (*UpdateItemTaxesResponse) GetExtraProperties

func (u *UpdateItemTaxesResponse) GetExtraProperties() map[string]interface{}

func (*UpdateItemTaxesResponse) GetUpdatedAt

func (u *UpdateItemTaxesResponse) GetUpdatedAt() *string

func (*UpdateItemTaxesResponse) String

func (u *UpdateItemTaxesResponse) String() string

func (*UpdateItemTaxesResponse) UnmarshalJSON

func (u *UpdateItemTaxesResponse) UnmarshalJSON(data []byte) error

type UpdateJobRequest added in v1.0.0

type UpdateJobRequest struct {
	// The ID of the job to update.
	JobID string `json:"-" url:"-"`
	// The job with the updated fields, either `title`, `is_tip_eligible`, or both. Only changed fields need
	// to be included in the request. Optionally include `version` to enable optimistic concurrency control.
	Job *Job `json:"job,omitempty" url:"-"`
}

type UpdateJobResponse added in v1.0.0

type UpdateJobResponse struct {
	// The updated job.
	Job *Job `json:"job,omitempty" url:"job,omitempty"`
	// The errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents an [UpdateJob](api-endpoint:Team-UpdateJob) response. Either `job` or `errors` is present in the response.

func (*UpdateJobResponse) GetErrors added in v1.0.0

func (u *UpdateJobResponse) GetErrors() []*Error

func (*UpdateJobResponse) GetExtraProperties added in v1.0.0

func (u *UpdateJobResponse) GetExtraProperties() map[string]interface{}

func (*UpdateJobResponse) GetJob added in v1.0.0

func (u *UpdateJobResponse) GetJob() *Job

func (*UpdateJobResponse) String added in v1.0.0

func (u *UpdateJobResponse) String() string

func (*UpdateJobResponse) UnmarshalJSON added in v1.0.0

func (u *UpdateJobResponse) UnmarshalJSON(data []byte) error

type UpdateLocationCustomAttributeDefinitionResponse

type UpdateLocationCustomAttributeDefinitionResponse struct {
	// The updated custom attribute definition.
	CustomAttributeDefinition *CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"custom_attribute_definition,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents an [UpdateLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-UpdateLocationCustomAttributeDefinition) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*UpdateLocationCustomAttributeDefinitionResponse) GetCustomAttributeDefinition

func (*UpdateLocationCustomAttributeDefinitionResponse) GetErrors

func (*UpdateLocationCustomAttributeDefinitionResponse) GetExtraProperties

func (u *UpdateLocationCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*UpdateLocationCustomAttributeDefinitionResponse) String

func (*UpdateLocationCustomAttributeDefinitionResponse) UnmarshalJSON

type UpdateLocationRequest

type UpdateLocationRequest struct {
	// The ID of the location to update.
	LocationID string `json:"-" url:"-"`
	// The `Location` object with only the fields to update.
	Location *Location `json:"location,omitempty" url:"-"`
}

type UpdateLocationResponse

type UpdateLocationResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The updated `Location` object.
	Location *Location `json:"location,omitempty" url:"location,omitempty"`
	// contains filtered or unexported fields
}

The response object returned by the [UpdateLocation](api-endpoint:Locations-UpdateLocation) endpoint.

func (*UpdateLocationResponse) GetErrors

func (u *UpdateLocationResponse) GetErrors() []*Error

func (*UpdateLocationResponse) GetExtraProperties

func (u *UpdateLocationResponse) GetExtraProperties() map[string]interface{}

func (*UpdateLocationResponse) GetLocation

func (u *UpdateLocationResponse) GetLocation() *Location

func (*UpdateLocationResponse) String

func (u *UpdateLocationResponse) String() string

func (*UpdateLocationResponse) UnmarshalJSON

func (u *UpdateLocationResponse) UnmarshalJSON(data []byte) error

type UpdateLocationSettingsRequest

type UpdateLocationSettingsRequest struct {
	// The ID of the location for which to retrieve settings.
	LocationID string `json:"-" url:"-"`
	// Describe your updates using the `location_settings` object. Make sure it contains only the fields that have changed.
	LocationSettings *CheckoutLocationSettings `json:"location_settings,omitempty" url:"-"`
}

type UpdateLocationSettingsResponse

type UpdateLocationSettingsResponse struct {
	// Any errors that occurred when updating the location settings.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The updated location settings.
	LocationSettings *CheckoutLocationSettings `json:"location_settings,omitempty" url:"location_settings,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateLocationSettingsResponse) GetErrors

func (u *UpdateLocationSettingsResponse) GetErrors() []*Error

func (*UpdateLocationSettingsResponse) GetExtraProperties

func (u *UpdateLocationSettingsResponse) GetExtraProperties() map[string]interface{}

func (*UpdateLocationSettingsResponse) GetLocationSettings

func (u *UpdateLocationSettingsResponse) GetLocationSettings() *CheckoutLocationSettings

func (*UpdateLocationSettingsResponse) String

func (*UpdateLocationSettingsResponse) UnmarshalJSON

func (u *UpdateLocationSettingsResponse) UnmarshalJSON(data []byte) error

type UpdateMerchantCustomAttributeDefinitionResponse

type UpdateMerchantCustomAttributeDefinitionResponse struct {
	// The updated custom attribute definition.
	CustomAttributeDefinition *CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"custom_attribute_definition,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents an [UpdateMerchantCustomAttributeDefinition](api-endpoint:MerchantCustomAttributes-UpdateMerchantCustomAttributeDefinition) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*UpdateMerchantCustomAttributeDefinitionResponse) GetCustomAttributeDefinition

func (*UpdateMerchantCustomAttributeDefinitionResponse) GetErrors

func (*UpdateMerchantCustomAttributeDefinitionResponse) GetExtraProperties

func (u *UpdateMerchantCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*UpdateMerchantCustomAttributeDefinitionResponse) String

func (*UpdateMerchantCustomAttributeDefinitionResponse) UnmarshalJSON

type UpdateMerchantSettingsRequest

type UpdateMerchantSettingsRequest struct {
	// Describe your updates using the `merchant_settings` object. Make sure it contains only the fields that have changed.
	MerchantSettings *CheckoutMerchantSettings `json:"merchant_settings,omitempty" url:"-"`
}

type UpdateMerchantSettingsResponse

type UpdateMerchantSettingsResponse struct {
	// Any errors that occurred when updating the merchant settings.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The updated merchant settings.
	MerchantSettings *CheckoutMerchantSettings `json:"merchant_settings,omitempty" url:"merchant_settings,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateMerchantSettingsResponse) GetErrors

func (u *UpdateMerchantSettingsResponse) GetErrors() []*Error

func (*UpdateMerchantSettingsResponse) GetExtraProperties

func (u *UpdateMerchantSettingsResponse) GetExtraProperties() map[string]interface{}

func (*UpdateMerchantSettingsResponse) GetMerchantSettings

func (u *UpdateMerchantSettingsResponse) GetMerchantSettings() *CheckoutMerchantSettings

func (*UpdateMerchantSettingsResponse) String

func (*UpdateMerchantSettingsResponse) UnmarshalJSON

func (u *UpdateMerchantSettingsResponse) UnmarshalJSON(data []byte) error

type UpdateOrderCustomAttributeDefinitionResponse

type UpdateOrderCustomAttributeDefinitionResponse struct {
	// The updated order custom attribute definition.
	CustomAttributeDefinition *CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"custom_attribute_definition,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from updating an order custom attribute definition.

func (*UpdateOrderCustomAttributeDefinitionResponse) GetCustomAttributeDefinition

func (*UpdateOrderCustomAttributeDefinitionResponse) GetErrors

func (*UpdateOrderCustomAttributeDefinitionResponse) GetExtraProperties

func (u *UpdateOrderCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{}

func (*UpdateOrderCustomAttributeDefinitionResponse) String

func (*UpdateOrderCustomAttributeDefinitionResponse) UnmarshalJSON

func (u *UpdateOrderCustomAttributeDefinitionResponse) UnmarshalJSON(data []byte) error

type UpdateOrderRequest

type UpdateOrderRequest struct {
	// The ID of the order to update.
	OrderID string `json:"-" url:"-"`
	// The [sparse order](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#sparse-order-objects)
	// containing only the fields to update and the version to which the update is
	// being applied.
	Order *Order `json:"order,omitempty" url:"-"`
	// The [dot notation paths](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#identifying-fields-to-delete)
	// fields to clear. For example, `line_items[uid].note`.
	// For more information, see [Deleting fields](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#deleting-fields).
	FieldsToClear []string `json:"fields_to_clear,omitempty" url:"-"`
	// A value you specify that uniquely identifies this update request.
	//
	// If you are 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 is returned.
	//
	// For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"`
}

type UpdateOrderResponse

type UpdateOrderResponse struct {
	// The updated order.
	Order *Order `json:"order,omitempty" url:"order,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [UpdateOrder](api-endpoint:Orders-UpdateOrder) endpoint.

func (*UpdateOrderResponse) GetErrors

func (u *UpdateOrderResponse) GetErrors() []*Error

func (*UpdateOrderResponse) GetExtraProperties

func (u *UpdateOrderResponse) GetExtraProperties() map[string]interface{}

func (*UpdateOrderResponse) GetOrder

func (u *UpdateOrderResponse) GetOrder() *Order

func (*UpdateOrderResponse) String

func (u *UpdateOrderResponse) String() string

func (*UpdateOrderResponse) UnmarshalJSON

func (u *UpdateOrderResponse) UnmarshalJSON(data []byte) error

type UpdatePaymentLinkResponse

type UpdatePaymentLinkResponse struct {
	// Any errors that occurred when updating the payment link.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The updated payment link.
	PaymentLink *PaymentLink `json:"payment_link,omitempty" url:"payment_link,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdatePaymentLinkResponse) GetErrors

func (u *UpdatePaymentLinkResponse) GetErrors() []*Error

func (*UpdatePaymentLinkResponse) GetExtraProperties

func (u *UpdatePaymentLinkResponse) GetExtraProperties() map[string]interface{}
func (u *UpdatePaymentLinkResponse) GetPaymentLink() *PaymentLink

func (*UpdatePaymentLinkResponse) String

func (u *UpdatePaymentLinkResponse) String() string

func (*UpdatePaymentLinkResponse) UnmarshalJSON

func (u *UpdatePaymentLinkResponse) UnmarshalJSON(data []byte) error

type UpdatePaymentRequest

type UpdatePaymentRequest struct {
	// The ID of the payment to update.
	PaymentID string `json:"-" url:"-"`
	// The updated `Payment` object.
	Payment *Payment `json:"payment,omitempty" url:"-"`
	// A unique string that identifies this `UpdatePayment` request. Keys can be any valid string
	// but must be unique for every `UpdatePayment` request.
	//
	// For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
	IdempotencyKey string `json:"idempotency_key" url:"-"`
}

type UpdatePaymentResponse

type UpdatePaymentResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The updated payment.
	Payment *Payment `json:"payment,omitempty" url:"payment,omitempty"`
	// contains filtered or unexported fields
}

Defines the response returned by [UpdatePayment](api-endpoint:Payments-UpdatePayment).

func (*UpdatePaymentResponse) GetErrors

func (u *UpdatePaymentResponse) GetErrors() []*Error

func (*UpdatePaymentResponse) GetExtraProperties

func (u *UpdatePaymentResponse) GetExtraProperties() map[string]interface{}

func (*UpdatePaymentResponse) GetPayment

func (u *UpdatePaymentResponse) GetPayment() *Payment

func (*UpdatePaymentResponse) String

func (u *UpdatePaymentResponse) String() string

func (*UpdatePaymentResponse) UnmarshalJSON

func (u *UpdatePaymentResponse) UnmarshalJSON(data []byte) error

type UpdateShiftResponse

type UpdateShiftResponse struct {
	// The updated `Shift`.
	Shift *Shift `json:"shift,omitempty" url:"shift,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response to a request to update a `Shift`. The response contains the updated `Shift` object and might contain a set of `Error` objects if the request resulted in errors.

func (*UpdateShiftResponse) GetErrors

func (u *UpdateShiftResponse) GetErrors() []*Error

func (*UpdateShiftResponse) GetExtraProperties

func (u *UpdateShiftResponse) GetExtraProperties() map[string]interface{}

func (*UpdateShiftResponse) GetShift

func (u *UpdateShiftResponse) GetShift() *Shift

func (*UpdateShiftResponse) String

func (u *UpdateShiftResponse) String() string

func (*UpdateShiftResponse) UnmarshalJSON

func (u *UpdateShiftResponse) UnmarshalJSON(data []byte) error

type UpdateSubscriptionRequest

type UpdateSubscriptionRequest struct {
	// The ID of the subscription to update.
	SubscriptionID string `json:"-" url:"-"`
	// 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" url:"-"`
}

type UpdateSubscriptionResponse

type UpdateSubscriptionResponse struct {
	// Errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The updated subscription.
	Subscription *Subscription `json:"subscription,omitempty" url:"subscription,omitempty"`
	// contains filtered or unexported fields
}

Defines output parameters in a response from the [UpdateSubscription](api-endpoint:Subscriptions-UpdateSubscription) endpoint.

func (*UpdateSubscriptionResponse) GetErrors

func (u *UpdateSubscriptionResponse) GetErrors() []*Error

func (*UpdateSubscriptionResponse) GetExtraProperties

func (u *UpdateSubscriptionResponse) GetExtraProperties() map[string]interface{}

func (*UpdateSubscriptionResponse) GetSubscription

func (u *UpdateSubscriptionResponse) GetSubscription() *Subscription

func (*UpdateSubscriptionResponse) String

func (u *UpdateSubscriptionResponse) String() string

func (*UpdateSubscriptionResponse) UnmarshalJSON

func (u *UpdateSubscriptionResponse) UnmarshalJSON(data []byte) error

type UpdateTeamMemberRequest

type UpdateTeamMemberRequest struct {
	// The team member fields to add, change, or clear. Fields can be cleared using a null value. To update
	// `wage_setting.job_assignments`, you must provide the complete list of job assignments. If needed, call
	// [ListJobs](api-endpoint:Team-ListJobs) to get the required `job_id` values.
	TeamMember *TeamMember `json:"team_member,omitempty" url:"team_member,omitempty"`
	// contains filtered or unexported fields
}

Represents an update request for a `TeamMember` object.

func (*UpdateTeamMemberRequest) GetExtraProperties

func (u *UpdateTeamMemberRequest) GetExtraProperties() map[string]interface{}

func (*UpdateTeamMemberRequest) GetTeamMember

func (u *UpdateTeamMemberRequest) GetTeamMember() *TeamMember

func (*UpdateTeamMemberRequest) String

func (u *UpdateTeamMemberRequest) String() string

func (*UpdateTeamMemberRequest) UnmarshalJSON

func (u *UpdateTeamMemberRequest) UnmarshalJSON(data []byte) error

type UpdateTeamMemberResponse

type UpdateTeamMemberResponse struct {
	// The successfully updated `TeamMember` object.
	TeamMember *TeamMember `json:"team_member,omitempty" url:"team_member,omitempty"`
	// The errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from an update request containing the updated `TeamMember` object or error messages.

func (*UpdateTeamMemberResponse) GetErrors

func (u *UpdateTeamMemberResponse) GetErrors() []*Error

func (*UpdateTeamMemberResponse) GetExtraProperties

func (u *UpdateTeamMemberResponse) GetExtraProperties() map[string]interface{}

func (*UpdateTeamMemberResponse) GetTeamMember

func (u *UpdateTeamMemberResponse) GetTeamMember() *TeamMember

func (*UpdateTeamMemberResponse) String

func (u *UpdateTeamMemberResponse) String() string

func (*UpdateTeamMemberResponse) UnmarshalJSON

func (u *UpdateTeamMemberResponse) UnmarshalJSON(data []byte) error

type UpdateTeamMembersRequest added in v1.2.0

type UpdateTeamMembersRequest struct {
	// The ID of the team member to update.
	TeamMemberID string                   `json:"-" url:"-"`
	Body         *UpdateTeamMemberRequest `json:"-" url:"-"`
}

func (*UpdateTeamMembersRequest) MarshalJSON added in v1.2.0

func (u *UpdateTeamMembersRequest) MarshalJSON() ([]byte, error)

func (*UpdateTeamMembersRequest) UnmarshalJSON added in v1.2.0

func (u *UpdateTeamMembersRequest) UnmarshalJSON(data []byte) error

type UpdateVendorRequest

type UpdateVendorRequest struct {
	// A client-supplied, universally unique identifier (UUID) for the
	// request.
	//
	// See [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) in the
	// [API Development 101](https://developer.squareup.com/docs/buildbasics) section for more
	// information.
	IdempotencyKey *string `json:"idempotency_key,omitempty" url:"idempotency_key,omitempty"`
	// The specified [Vendor](entity:Vendor) to be updated.
	Vendor *Vendor `json:"vendor,omitempty" url:"vendor,omitempty"`
	// contains filtered or unexported fields
}

Represents an input to a call to [UpdateVendor](api-endpoint:Vendors-UpdateVendor).

func (*UpdateVendorRequest) GetExtraProperties

func (u *UpdateVendorRequest) GetExtraProperties() map[string]interface{}

func (*UpdateVendorRequest) GetIdempotencyKey

func (u *UpdateVendorRequest) GetIdempotencyKey() *string

func (*UpdateVendorRequest) GetVendor

func (u *UpdateVendorRequest) GetVendor() *Vendor

func (*UpdateVendorRequest) String

func (u *UpdateVendorRequest) String() string

func (*UpdateVendorRequest) UnmarshalJSON

func (u *UpdateVendorRequest) UnmarshalJSON(data []byte) error

type UpdateVendorResponse

type UpdateVendorResponse struct {
	// Errors occurred when the request fails.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The [Vendor](entity:Vendor) that has been updated.
	Vendor *Vendor `json:"vendor,omitempty" url:"vendor,omitempty"`
	// contains filtered or unexported fields
}

Represents an output from a call to [UpdateVendor](api-endpoint:Vendors-UpdateVendor).

func (*UpdateVendorResponse) GetErrors

func (u *UpdateVendorResponse) GetErrors() []*Error

func (*UpdateVendorResponse) GetExtraProperties

func (u *UpdateVendorResponse) GetExtraProperties() map[string]interface{}

func (*UpdateVendorResponse) GetVendor

func (u *UpdateVendorResponse) GetVendor() *Vendor

func (*UpdateVendorResponse) String

func (u *UpdateVendorResponse) String() string

func (*UpdateVendorResponse) UnmarshalJSON

func (u *UpdateVendorResponse) UnmarshalJSON(data []byte) error

type UpdateVendorsRequest added in v1.2.0

type UpdateVendorsRequest struct {
	// ID of the [Vendor](entity:Vendor) to retrieve.
	VendorID string               `json:"-" url:"-"`
	Body     *UpdateVendorRequest `json:"-" url:"-"`
}

func (*UpdateVendorsRequest) MarshalJSON added in v1.2.0

func (u *UpdateVendorsRequest) MarshalJSON() ([]byte, error)

func (*UpdateVendorsRequest) UnmarshalJSON added in v1.2.0

func (u *UpdateVendorsRequest) UnmarshalJSON(data []byte) error

type UpdateWageSettingResponse

type UpdateWageSettingResponse struct {
	// The successfully updated `WageSetting` object.
	WageSetting *WageSetting `json:"wage_setting,omitempty" url:"wage_setting,omitempty"`
	// The errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from an update request containing the updated `WageSetting` object or error messages.

func (*UpdateWageSettingResponse) GetErrors

func (u *UpdateWageSettingResponse) GetErrors() []*Error

func (*UpdateWageSettingResponse) GetExtraProperties

func (u *UpdateWageSettingResponse) GetExtraProperties() map[string]interface{}

func (*UpdateWageSettingResponse) GetWageSetting

func (u *UpdateWageSettingResponse) GetWageSetting() *WageSetting

func (*UpdateWageSettingResponse) String

func (u *UpdateWageSettingResponse) String() string

func (*UpdateWageSettingResponse) UnmarshalJSON

func (u *UpdateWageSettingResponse) UnmarshalJSON(data []byte) error

type UpdateWebhookSubscriptionResponse

type UpdateWebhookSubscriptionResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The updated [Subscription](entity:WebhookSubscription).
	Subscription *WebhookSubscription `json:"subscription,omitempty" url:"subscription,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [UpdateWebhookSubscription](api-endpoint:WebhookSubscriptions-UpdateWebhookSubscription) endpoint.

Note: If there are errors processing the request, the Subscription(entity:WebhookSubscription) is not present.

func (*UpdateWebhookSubscriptionResponse) GetErrors

func (u *UpdateWebhookSubscriptionResponse) GetErrors() []*Error

func (*UpdateWebhookSubscriptionResponse) GetExtraProperties

func (u *UpdateWebhookSubscriptionResponse) GetExtraProperties() map[string]interface{}

func (*UpdateWebhookSubscriptionResponse) GetSubscription

func (*UpdateWebhookSubscriptionResponse) String

func (*UpdateWebhookSubscriptionResponse) UnmarshalJSON

func (u *UpdateWebhookSubscriptionResponse) UnmarshalJSON(data []byte) error

type UpdateWebhookSubscriptionSignatureKeyResponse

type UpdateWebhookSubscriptionSignatureKeyResponse struct {
	// Information on errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The new Square-generated signature key used to validate the origin of the webhook event.
	SignatureKey *string `json:"signature_key,omitempty" url:"signature_key,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [UpdateWebhookSubscriptionSignatureKey](api-endpoint:WebhookSubscriptions-UpdateWebhookSubscriptionSignatureKey) endpoint.

Note: If there are errors processing the request, the Subscription(entity:WebhookSubscription) is not present.

func (*UpdateWebhookSubscriptionSignatureKeyResponse) GetErrors

func (*UpdateWebhookSubscriptionSignatureKeyResponse) GetExtraProperties

func (u *UpdateWebhookSubscriptionSignatureKeyResponse) GetExtraProperties() map[string]interface{}

func (*UpdateWebhookSubscriptionSignatureKeyResponse) GetSignatureKey

func (*UpdateWebhookSubscriptionSignatureKeyResponse) String

func (*UpdateWebhookSubscriptionSignatureKeyResponse) UnmarshalJSON

func (u *UpdateWebhookSubscriptionSignatureKeyResponse) UnmarshalJSON(data []byte) error

type UpdateWorkweekConfigResponse

type UpdateWorkweekConfigResponse struct {
	// The response object.
	WorkweekConfig *WorkweekConfig `json:"workweek_config,omitempty" url:"workweek_config,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response to a request to update a `WorkweekConfig` object. The response contains the updated `WorkweekConfig` object and might contain a set of `Error` objects if the request resulted in errors.

func (*UpdateWorkweekConfigResponse) GetErrors

func (u *UpdateWorkweekConfigResponse) GetErrors() []*Error

func (*UpdateWorkweekConfigResponse) GetExtraProperties

func (u *UpdateWorkweekConfigResponse) GetExtraProperties() map[string]interface{}

func (*UpdateWorkweekConfigResponse) GetWorkweekConfig

func (u *UpdateWorkweekConfigResponse) GetWorkweekConfig() *WorkweekConfig

func (*UpdateWorkweekConfigResponse) String

func (*UpdateWorkweekConfigResponse) UnmarshalJSON

func (u *UpdateWorkweekConfigResponse) UnmarshalJSON(data []byte) error

type UpsertBookingCustomAttributeResponse

type UpsertBookingCustomAttributeResponse struct {
	// The new or updated custom attribute.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents an [UpsertBookingCustomAttribute](api-endpoint:BookingCustomAttributes-UpsertBookingCustomAttribute) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*UpsertBookingCustomAttributeResponse) GetCustomAttribute

func (u *UpsertBookingCustomAttributeResponse) GetCustomAttribute() *CustomAttribute

func (*UpsertBookingCustomAttributeResponse) GetErrors

func (u *UpsertBookingCustomAttributeResponse) GetErrors() []*Error

func (*UpsertBookingCustomAttributeResponse) GetExtraProperties

func (u *UpsertBookingCustomAttributeResponse) GetExtraProperties() map[string]interface{}

func (*UpsertBookingCustomAttributeResponse) String

func (*UpsertBookingCustomAttributeResponse) UnmarshalJSON

func (u *UpsertBookingCustomAttributeResponse) UnmarshalJSON(data []byte) error

type UpsertCatalogObjectResponse

type UpsertCatalogObjectResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The successfully created or updated CatalogObject.
	CatalogObject *CatalogObject `json:"catalog_object,omitempty" url:"catalog_object,omitempty"`
	// The mapping between client and server IDs for this upsert.
	IDMappings []*CatalogIDMapping `json:"id_mappings,omitempty" url:"id_mappings,omitempty"`
	// contains filtered or unexported fields
}

func (*UpsertCatalogObjectResponse) GetCatalogObject

func (u *UpsertCatalogObjectResponse) GetCatalogObject() *CatalogObject

func (*UpsertCatalogObjectResponse) GetErrors

func (u *UpsertCatalogObjectResponse) GetErrors() []*Error

func (*UpsertCatalogObjectResponse) GetExtraProperties

func (u *UpsertCatalogObjectResponse) GetExtraProperties() map[string]interface{}

func (*UpsertCatalogObjectResponse) GetIDMappings

func (u *UpsertCatalogObjectResponse) GetIDMappings() []*CatalogIDMapping

func (*UpsertCatalogObjectResponse) String

func (u *UpsertCatalogObjectResponse) String() string

func (*UpsertCatalogObjectResponse) UnmarshalJSON

func (u *UpsertCatalogObjectResponse) UnmarshalJSON(data []byte) error

type UpsertCustomerCustomAttributeResponse

type UpsertCustomerCustomAttributeResponse struct {
	// The new or updated custom attribute.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents an [UpsertCustomerCustomAttribute](api-endpoint:CustomerCustomAttributes-UpsertCustomerCustomAttribute) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*UpsertCustomerCustomAttributeResponse) GetCustomAttribute

func (u *UpsertCustomerCustomAttributeResponse) GetCustomAttribute() *CustomAttribute

func (*UpsertCustomerCustomAttributeResponse) GetErrors

func (u *UpsertCustomerCustomAttributeResponse) GetErrors() []*Error

func (*UpsertCustomerCustomAttributeResponse) GetExtraProperties

func (u *UpsertCustomerCustomAttributeResponse) GetExtraProperties() map[string]interface{}

func (*UpsertCustomerCustomAttributeResponse) String

func (*UpsertCustomerCustomAttributeResponse) UnmarshalJSON

func (u *UpsertCustomerCustomAttributeResponse) UnmarshalJSON(data []byte) error

type UpsertLocationCustomAttributeResponse

type UpsertLocationCustomAttributeResponse struct {
	// The new or updated custom attribute.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents an [UpsertLocationCustomAttribute](api-endpoint:LocationCustomAttributes-UpsertLocationCustomAttribute) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*UpsertLocationCustomAttributeResponse) GetCustomAttribute

func (u *UpsertLocationCustomAttributeResponse) GetCustomAttribute() *CustomAttribute

func (*UpsertLocationCustomAttributeResponse) GetErrors

func (u *UpsertLocationCustomAttributeResponse) GetErrors() []*Error

func (*UpsertLocationCustomAttributeResponse) GetExtraProperties

func (u *UpsertLocationCustomAttributeResponse) GetExtraProperties() map[string]interface{}

func (*UpsertLocationCustomAttributeResponse) String

func (*UpsertLocationCustomAttributeResponse) UnmarshalJSON

func (u *UpsertLocationCustomAttributeResponse) UnmarshalJSON(data []byte) error

type UpsertMerchantCustomAttributeResponse

type UpsertMerchantCustomAttributeResponse struct {
	// The new or updated custom attribute.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents an [UpsertMerchantCustomAttribute](api-endpoint:MerchantCustomAttributes-UpsertMerchantCustomAttribute) response. Either `custom_attribute_definition` or `errors` is present in the response.

func (*UpsertMerchantCustomAttributeResponse) GetCustomAttribute

func (u *UpsertMerchantCustomAttributeResponse) GetCustomAttribute() *CustomAttribute

func (*UpsertMerchantCustomAttributeResponse) GetErrors

func (u *UpsertMerchantCustomAttributeResponse) GetErrors() []*Error

func (*UpsertMerchantCustomAttributeResponse) GetExtraProperties

func (u *UpsertMerchantCustomAttributeResponse) GetExtraProperties() map[string]interface{}

func (*UpsertMerchantCustomAttributeResponse) String

func (*UpsertMerchantCustomAttributeResponse) UnmarshalJSON

func (u *UpsertMerchantCustomAttributeResponse) UnmarshalJSON(data []byte) error

type UpsertOrderCustomAttributeResponse

type UpsertOrderCustomAttributeResponse struct {
	// The order custom attribute that was created or modified.
	CustomAttribute *CustomAttribute `json:"custom_attribute,omitempty" url:"custom_attribute,omitempty"`
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a response from upserting order custom attribute definitions.

func (*UpsertOrderCustomAttributeResponse) GetCustomAttribute

func (u *UpsertOrderCustomAttributeResponse) GetCustomAttribute() *CustomAttribute

func (*UpsertOrderCustomAttributeResponse) GetErrors

func (u *UpsertOrderCustomAttributeResponse) GetErrors() []*Error

func (*UpsertOrderCustomAttributeResponse) GetExtraProperties

func (u *UpsertOrderCustomAttributeResponse) GetExtraProperties() map[string]interface{}

func (*UpsertOrderCustomAttributeResponse) String

func (*UpsertOrderCustomAttributeResponse) UnmarshalJSON

func (u *UpsertOrderCustomAttributeResponse) UnmarshalJSON(data []byte) error

type UpsertSnippetRequest

type UpsertSnippetRequest struct {
	// The ID of the site where you want to add or update the snippet.
	SiteID string `json:"-" url:"-"`
	// The snippet for the site.
	Snippet *Snippet `json:"snippet,omitempty" url:"-"`
}

type UpsertSnippetResponse

type UpsertSnippetResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The new or updated snippet.
	Snippet *Snippet `json:"snippet,omitempty" url:"snippet,omitempty"`
	// contains filtered or unexported fields
}

Represents an `UpsertSnippet` response. The response can include either `snippet` or `errors`.

func (*UpsertSnippetResponse) GetErrors

func (u *UpsertSnippetResponse) GetErrors() []*Error

func (*UpsertSnippetResponse) GetExtraProperties

func (u *UpsertSnippetResponse) GetExtraProperties() map[string]interface{}

func (*UpsertSnippetResponse) GetSnippet

func (u *UpsertSnippetResponse) GetSnippet() *Snippet

func (*UpsertSnippetResponse) String

func (u *UpsertSnippetResponse) String() string

func (*UpsertSnippetResponse) UnmarshalJSON

func (u *UpsertSnippetResponse) UnmarshalJSON(data []byte) error

type V1ListOrdersRequest

type V1ListOrdersRequest struct {
	// The ID of the location to list online store orders for.
	LocationID string `json:"-" url:"-"`
	// The order in which payments are listed in the response.
	Order *SortOrder `json:"-" url:"order,omitempty"`
	// The maximum number of payments to return in a single response. This value cannot exceed 200.
	Limit *int `json:"-" url:"limit,omitempty"`
	// A pagination cursor to retrieve the next set of results for your
	// original query to the endpoint.
	BatchToken *string `json:"-" url:"batch_token,omitempty"`
}

type V1Money

type V1Money struct {
	// Amount in the lowest denominated value of this Currency. E.g. in USD
	// these are cents, in JPY they are Yen (which do not have a 'cent' concept).
	Amount *int `json:"amount,omitempty" url:"amount,omitempty"`
	// See [Currency](#type-currency) for possible values
	CurrencyCode *Currency `json:"currency_code,omitempty" url:"currency_code,omitempty"`
	// contains filtered or unexported fields
}

func (*V1Money) GetAmount

func (v *V1Money) GetAmount() *int

func (*V1Money) GetCurrencyCode

func (v *V1Money) GetCurrencyCode() *Currency

func (*V1Money) GetExtraProperties

func (v *V1Money) GetExtraProperties() map[string]interface{}

func (*V1Money) String

func (v *V1Money) String() string

func (*V1Money) UnmarshalJSON

func (v *V1Money) UnmarshalJSON(data []byte) error

type V1Order

type V1Order struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// The order's unique identifier.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The email address of the order's buyer.
	BuyerEmail *string `json:"buyer_email,omitempty" url:"buyer_email,omitempty"`
	// The name of the order's buyer.
	RecipientName *string `json:"recipient_name,omitempty" url:"recipient_name,omitempty"`
	// The phone number to use for the order's delivery.
	RecipientPhoneNumber *string `json:"recipient_phone_number,omitempty" url:"recipient_phone_number,omitempty"`
	// Whether the tax is an ADDITIVE tax or an INCLUSIVE tax.
	// See [V1OrderState](#type-v1orderstate) for possible values
	State *V1OrderState `json:"state,omitempty" url:"state,omitempty"`
	// The address to ship the order to.
	ShippingAddress *Address `json:"shipping_address,omitempty" url:"shipping_address,omitempty"`
	// The amount of all items purchased in the order, before taxes and shipping.
	SubtotalMoney *V1Money `json:"subtotal_money,omitempty" url:"subtotal_money,omitempty"`
	// The shipping cost for the order.
	TotalShippingMoney *V1Money `json:"total_shipping_money,omitempty" url:"total_shipping_money,omitempty"`
	// The total of all taxes applied to the order.
	TotalTaxMoney *V1Money `json:"total_tax_money,omitempty" url:"total_tax_money,omitempty"`
	// The total cost of the order.
	TotalPriceMoney *V1Money `json:"total_price_money,omitempty" url:"total_price_money,omitempty"`
	// The total of all discounts applied to the order.
	TotalDiscountMoney *V1Money `json:"total_discount_money,omitempty" url:"total_discount_money,omitempty"`
	// The time when the order was created, in ISO 8601 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The time when the order was last modified, in ISO 8601 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The time when the order expires if no action is taken, in ISO 8601 format.
	ExpiresAt *string `json:"expires_at,omitempty" url:"expires_at,omitempty"`
	// The unique identifier of the payment associated with the order.
	PaymentID *string `json:"payment_id,omitempty" url:"payment_id,omitempty"`
	// A note provided by the buyer when the order was created, if any.
	BuyerNote *string `json:"buyer_note,omitempty" url:"buyer_note,omitempty"`
	// A note provided by the merchant when the order's state was set to COMPLETED, if any
	CompletedNote *string `json:"completed_note,omitempty" url:"completed_note,omitempty"`
	// A note provided by the merchant when the order's state was set to REFUNDED, if any.
	RefundedNote *string `json:"refunded_note,omitempty" url:"refunded_note,omitempty"`
	// A note provided by the merchant when the order's state was set to CANCELED, if any.
	CanceledNote *string `json:"canceled_note,omitempty" url:"canceled_note,omitempty"`
	// The tender used to pay for the order.
	Tender *V1Tender `json:"tender,omitempty" url:"tender,omitempty"`
	// The history of actions associated with the order.
	OrderHistory []*V1OrderHistoryEntry `json:"order_history,omitempty" url:"order_history,omitempty"`
	// The promo code provided by the buyer, if any.
	PromoCode *string `json:"promo_code,omitempty" url:"promo_code,omitempty"`
	// For Bitcoin transactions, the address that the buyer sent Bitcoin to.
	BtcReceiveAddress *string `json:"btc_receive_address,omitempty" url:"btc_receive_address,omitempty"`
	// For Bitcoin transactions, the price of the buyer's order in satoshi (100 million satoshi equals 1 BTC).
	BtcPriceSatoshi *float64 `json:"btc_price_satoshi,omitempty" url:"btc_price_satoshi,omitempty"`
	// contains filtered or unexported fields
}

V1Order

func (*V1Order) GetBtcPriceSatoshi

func (v *V1Order) GetBtcPriceSatoshi() *float64

func (*V1Order) GetBtcReceiveAddress

func (v *V1Order) GetBtcReceiveAddress() *string

func (*V1Order) GetBuyerEmail

func (v *V1Order) GetBuyerEmail() *string

func (*V1Order) GetBuyerNote

func (v *V1Order) GetBuyerNote() *string

func (*V1Order) GetCanceledNote

func (v *V1Order) GetCanceledNote() *string

func (*V1Order) GetCompletedNote

func (v *V1Order) GetCompletedNote() *string

func (*V1Order) GetCreatedAt

func (v *V1Order) GetCreatedAt() *string

func (*V1Order) GetErrors

func (v *V1Order) GetErrors() []*Error

func (*V1Order) GetExpiresAt

func (v *V1Order) GetExpiresAt() *string

func (*V1Order) GetExtraProperties

func (v *V1Order) GetExtraProperties() map[string]interface{}

func (*V1Order) GetID

func (v *V1Order) GetID() *string

func (*V1Order) GetOrderHistory

func (v *V1Order) GetOrderHistory() []*V1OrderHistoryEntry

func (*V1Order) GetPaymentID

func (v *V1Order) GetPaymentID() *string

func (*V1Order) GetPromoCode

func (v *V1Order) GetPromoCode() *string

func (*V1Order) GetRecipientName

func (v *V1Order) GetRecipientName() *string

func (*V1Order) GetRecipientPhoneNumber

func (v *V1Order) GetRecipientPhoneNumber() *string

func (*V1Order) GetRefundedNote

func (v *V1Order) GetRefundedNote() *string

func (*V1Order) GetShippingAddress

func (v *V1Order) GetShippingAddress() *Address

func (*V1Order) GetState

func (v *V1Order) GetState() *V1OrderState

func (*V1Order) GetSubtotalMoney

func (v *V1Order) GetSubtotalMoney() *V1Money

func (*V1Order) GetTender

func (v *V1Order) GetTender() *V1Tender

func (*V1Order) GetTotalDiscountMoney

func (v *V1Order) GetTotalDiscountMoney() *V1Money

func (*V1Order) GetTotalPriceMoney

func (v *V1Order) GetTotalPriceMoney() *V1Money

func (*V1Order) GetTotalShippingMoney

func (v *V1Order) GetTotalShippingMoney() *V1Money

func (*V1Order) GetTotalTaxMoney

func (v *V1Order) GetTotalTaxMoney() *V1Money

func (*V1Order) GetUpdatedAt

func (v *V1Order) GetUpdatedAt() *string

func (*V1Order) String

func (v *V1Order) String() string

func (*V1Order) UnmarshalJSON

func (v *V1Order) UnmarshalJSON(data []byte) error

type V1OrderHistoryEntry

type V1OrderHistoryEntry struct {
	// The type of action performed on the order.
	// See [V1OrderHistoryEntryAction](#type-v1orderhistoryentryaction) for possible values
	Action *V1OrderHistoryEntryAction `json:"action,omitempty" url:"action,omitempty"`
	// The time when the action was performed, in ISO 8601 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// contains filtered or unexported fields
}

V1OrderHistoryEntry

func (*V1OrderHistoryEntry) GetAction

func (*V1OrderHistoryEntry) GetCreatedAt

func (v *V1OrderHistoryEntry) GetCreatedAt() *string

func (*V1OrderHistoryEntry) GetExtraProperties

func (v *V1OrderHistoryEntry) GetExtraProperties() map[string]interface{}

func (*V1OrderHistoryEntry) String

func (v *V1OrderHistoryEntry) String() string

func (*V1OrderHistoryEntry) UnmarshalJSON

func (v *V1OrderHistoryEntry) UnmarshalJSON(data []byte) error

type V1OrderHistoryEntryAction

type V1OrderHistoryEntryAction string
const (
	V1OrderHistoryEntryActionOrderPlaced     V1OrderHistoryEntryAction = "ORDER_PLACED"
	V1OrderHistoryEntryActionDeclined        V1OrderHistoryEntryAction = "DECLINED"
	V1OrderHistoryEntryActionPaymentReceived V1OrderHistoryEntryAction = "PAYMENT_RECEIVED"
	V1OrderHistoryEntryActionCanceled        V1OrderHistoryEntryAction = "CANCELED"
	V1OrderHistoryEntryActionCompleted       V1OrderHistoryEntryAction = "COMPLETED"
	V1OrderHistoryEntryActionRefunded        V1OrderHistoryEntryAction = "REFUNDED"
	V1OrderHistoryEntryActionExpired         V1OrderHistoryEntryAction = "EXPIRED"
)

func NewV1OrderHistoryEntryActionFromString

func NewV1OrderHistoryEntryActionFromString(s string) (V1OrderHistoryEntryAction, error)

func (V1OrderHistoryEntryAction) Ptr

type V1OrderState

type V1OrderState string
const (
	V1OrderStatePending   V1OrderState = "PENDING"
	V1OrderStateOpen      V1OrderState = "OPEN"
	V1OrderStateCompleted V1OrderState = "COMPLETED"
	V1OrderStateCanceled  V1OrderState = "CANCELED"
	V1OrderStateRefunded  V1OrderState = "REFUNDED"
	V1OrderStateRejected  V1OrderState = "REJECTED"
)

func NewV1OrderStateFromString

func NewV1OrderStateFromString(s string) (V1OrderState, error)

func (V1OrderState) Ptr

func (v V1OrderState) Ptr() *V1OrderState

type V1RetrieveOrderRequest

type V1RetrieveOrderRequest struct {
	// The ID of the order's associated location.
	LocationID string `json:"-" url:"-"`
	// The order's Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint
	OrderID string `json:"-" url:"-"`
}

type V1Tender

type V1Tender struct {
	// The tender's unique ID.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The type of tender.
	// See [V1TenderType](#type-v1tendertype) for possible values
	Type *V1TenderType `json:"type,omitempty" url:"type,omitempty"`
	// A human-readable description of the tender.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The ID of the employee that processed the tender.
	EmployeeID *string `json:"employee_id,omitempty" url:"employee_id,omitempty"`
	// The URL of the receipt for the tender.
	ReceiptURL *string `json:"receipt_url,omitempty" url:"receipt_url,omitempty"`
	// The brand of credit card provided.
	// See [V1TenderCardBrand](#type-v1tendercardbrand) for possible values
	CardBrand *V1TenderCardBrand `json:"card_brand,omitempty" url:"card_brand,omitempty"`
	// The last four digits of the provided credit card's account number.
	PanSuffix *string `json:"pan_suffix,omitempty" url:"pan_suffix,omitempty"`
	// The tender's unique ID.
	// See [V1TenderEntryMethod](#type-v1tenderentrymethod) for possible values
	EntryMethod *V1TenderEntryMethod `json:"entry_method,omitempty" url:"entry_method,omitempty"`
	// Notes entered by the merchant about the tender at the time of payment, if any. Typically only present for tender with the type: OTHER.
	PaymentNote *string `json:"payment_note,omitempty" url:"payment_note,omitempty"`
	// The total amount of money provided in this form of tender.
	TotalMoney *V1Money `json:"total_money,omitempty" url:"total_money,omitempty"`
	// The amount of total_money applied to the payment.
	TenderedMoney *V1Money `json:"tendered_money,omitempty" url:"tendered_money,omitempty"`
	// The time when the tender was created, in ISO 8601 format.
	TenderedAt *string `json:"tendered_at,omitempty" url:"tendered_at,omitempty"`
	// The time when the tender was settled, in ISO 8601 format.
	SettledAt *string `json:"settled_at,omitempty" url:"settled_at,omitempty"`
	// The amount of total_money returned to the buyer as change.
	ChangeBackMoney *V1Money `json:"change_back_money,omitempty" url:"change_back_money,omitempty"`
	// The total of all refunds applied to this tender. This amount is always negative or zero.
	RefundedMoney *V1Money `json:"refunded_money,omitempty" url:"refunded_money,omitempty"`
	// Indicates whether or not the tender is associated with an exchange. If is_exchange is true, the tender represents the value of goods returned in an exchange not the actual money paid. The exchange value reduces the tender amounts needed to pay for items purchased in the exchange.
	IsExchange *bool `json:"is_exchange,omitempty" url:"is_exchange,omitempty"`
	// contains filtered or unexported fields
}

A tender represents a discrete monetary exchange. Square represents this exchange as a money object with a specific currency and amount, where the amount is given in the smallest denomination of the given currency.

Square POS can accept more than one form of tender for a single payment (such as by splitting a bill between a credit card and a gift card). The `tender` field of the Payment object lists all forms of tender used for the payment.

Split tender payments behave slightly differently from single tender payments:

The receipt_url for a split tender corresponds only to the first tender listed in the tender field. To get the receipt URLs for the remaining tenders, use the receipt_url fields of the corresponding Tender objects.

*A note on gift cards**: when a customer purchases a Square gift card from a merchant, the merchant receives the full amount of the gift card in the associated payment.

When that gift card is used as a tender, the balance of the gift card is reduced and the merchant receives no funds. A `Tender` object with a type of `SQUARE_GIFT_CARD` indicates a gift card was used for some or all of the associated payment.

func (*V1Tender) GetCardBrand

func (v *V1Tender) GetCardBrand() *V1TenderCardBrand

func (*V1Tender) GetChangeBackMoney

func (v *V1Tender) GetChangeBackMoney() *V1Money

func (*V1Tender) GetEmployeeID

func (v *V1Tender) GetEmployeeID() *string

func (*V1Tender) GetEntryMethod

func (v *V1Tender) GetEntryMethod() *V1TenderEntryMethod

func (*V1Tender) GetExtraProperties

func (v *V1Tender) GetExtraProperties() map[string]interface{}

func (*V1Tender) GetID

func (v *V1Tender) GetID() *string

func (*V1Tender) GetIsExchange

func (v *V1Tender) GetIsExchange() *bool

func (*V1Tender) GetName

func (v *V1Tender) GetName() *string

func (*V1Tender) GetPanSuffix

func (v *V1Tender) GetPanSuffix() *string

func (*V1Tender) GetPaymentNote

func (v *V1Tender) GetPaymentNote() *string

func (*V1Tender) GetReceiptURL

func (v *V1Tender) GetReceiptURL() *string

func (*V1Tender) GetRefundedMoney

func (v *V1Tender) GetRefundedMoney() *V1Money

func (*V1Tender) GetSettledAt

func (v *V1Tender) GetSettledAt() *string

func (*V1Tender) GetTenderedAt

func (v *V1Tender) GetTenderedAt() *string

func (*V1Tender) GetTenderedMoney

func (v *V1Tender) GetTenderedMoney() *V1Money

func (*V1Tender) GetTotalMoney

func (v *V1Tender) GetTotalMoney() *V1Money

func (*V1Tender) GetType

func (v *V1Tender) GetType() *V1TenderType

func (*V1Tender) String

func (v *V1Tender) String() string

func (*V1Tender) UnmarshalJSON

func (v *V1Tender) UnmarshalJSON(data []byte) error

type V1TenderCardBrand

type V1TenderCardBrand string

The brand of a credit card.

const (
	V1TenderCardBrandOtherBrand      V1TenderCardBrand = "OTHER_BRAND"
	V1TenderCardBrandVisa            V1TenderCardBrand = "VISA"
	V1TenderCardBrandMasterCard      V1TenderCardBrand = "MASTER_CARD"
	V1TenderCardBrandAmericanExpress V1TenderCardBrand = "AMERICAN_EXPRESS"
	V1TenderCardBrandDiscover        V1TenderCardBrand = "DISCOVER"
	V1TenderCardBrandDiscoverDiners  V1TenderCardBrand = "DISCOVER_DINERS"
	V1TenderCardBrandJcb             V1TenderCardBrand = "JCB"
	V1TenderCardBrandChinaUnionpay   V1TenderCardBrand = "CHINA_UNIONPAY"
	V1TenderCardBrandSquareGiftCard  V1TenderCardBrand = "SQUARE_GIFT_CARD"
)

func NewV1TenderCardBrandFromString

func NewV1TenderCardBrandFromString(s string) (V1TenderCardBrand, error)

func (V1TenderCardBrand) Ptr

type V1TenderEntryMethod

type V1TenderEntryMethod string
const (
	V1TenderEntryMethodManual       V1TenderEntryMethod = "MANUAL"
	V1TenderEntryMethodScanned      V1TenderEntryMethod = "SCANNED"
	V1TenderEntryMethodSquareCash   V1TenderEntryMethod = "SQUARE_CASH"
	V1TenderEntryMethodSquareWallet V1TenderEntryMethod = "SQUARE_WALLET"
	V1TenderEntryMethodSwiped       V1TenderEntryMethod = "SWIPED"
	V1TenderEntryMethodWebForm      V1TenderEntryMethod = "WEB_FORM"
	V1TenderEntryMethodOther        V1TenderEntryMethod = "OTHER"
)

func NewV1TenderEntryMethodFromString

func NewV1TenderEntryMethodFromString(s string) (V1TenderEntryMethod, error)

func (V1TenderEntryMethod) Ptr

type V1TenderType

type V1TenderType string
const (
	V1TenderTypeCreditCard     V1TenderType = "CREDIT_CARD"
	V1TenderTypeCash           V1TenderType = "CASH"
	V1TenderTypeThirdPartyCard V1TenderType = "THIRD_PARTY_CARD"
	V1TenderTypeNoSale         V1TenderType = "NO_SALE"
	V1TenderTypeSquareWallet   V1TenderType = "SQUARE_WALLET"
	V1TenderTypeSquareGiftCard V1TenderType = "SQUARE_GIFT_CARD"
	V1TenderTypeUnknown        V1TenderType = "UNKNOWN"
	V1TenderTypeOther          V1TenderType = "OTHER"
)

func NewV1TenderTypeFromString

func NewV1TenderTypeFromString(s string) (V1TenderType, error)

func (V1TenderType) Ptr

func (v V1TenderType) Ptr() *V1TenderType

type V1UpdateOrderRequest

type V1UpdateOrderRequest struct {
	// The ID of the order's associated location.
	LocationID string `json:"-" url:"-"`
	// The order's Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint
	OrderID string `json:"-" url:"-"`
	// The action to perform on the order (COMPLETE, CANCEL, or REFUND).
	// See [V1UpdateOrderRequestAction](#type-v1updateorderrequestaction) for possible values
	Action V1UpdateOrderRequestAction `json:"action" url:"-"`
	// The tracking number of the shipment associated with the order. Only valid if action is COMPLETE.
	ShippedTrackingNumber *string `json:"shipped_tracking_number,omitempty" url:"-"`
	// A merchant-specified note about the completion of the order. Only valid if action is COMPLETE.
	CompletedNote *string `json:"completed_note,omitempty" url:"-"`
	// A merchant-specified note about the refunding of the order. Only valid if action is REFUND.
	RefundedNote *string `json:"refunded_note,omitempty" url:"-"`
	// A merchant-specified note about the canceling of the order. Only valid if action is CANCEL.
	CanceledNote *string `json:"canceled_note,omitempty" url:"-"`
}

type V1UpdateOrderRequestAction

type V1UpdateOrderRequestAction string
const (
	V1UpdateOrderRequestActionComplete V1UpdateOrderRequestAction = "COMPLETE"
	V1UpdateOrderRequestActionCancel   V1UpdateOrderRequestAction = "CANCEL"
	V1UpdateOrderRequestActionRefund   V1UpdateOrderRequestAction = "REFUND"
)

func NewV1UpdateOrderRequestActionFromString

func NewV1UpdateOrderRequestActionFromString(s string) (V1UpdateOrderRequestAction, error)

func (V1UpdateOrderRequestAction) Ptr

type Vendor

type Vendor struct {
	// A unique Square-generated ID for the [Vendor](entity:Vendor).
	// This field is required when attempting to update a [Vendor](entity:Vendor).
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// An RFC 3339-formatted timestamp that indicates when the
	// [Vendor](entity:Vendor) was created.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// An RFC 3339-formatted timestamp that indicates when the
	// [Vendor](entity:Vendor) was last updated.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// The name of the [Vendor](entity:Vendor).
	// This field is required when attempting to create or update a [Vendor](entity:Vendor).
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The address of the [Vendor](entity:Vendor).
	Address *Address `json:"address,omitempty" url:"address,omitempty"`
	// The contacts of the [Vendor](entity:Vendor).
	Contacts []*VendorContact `json:"contacts,omitempty" url:"contacts,omitempty"`
	// The account number of the [Vendor](entity:Vendor).
	AccountNumber *string `json:"account_number,omitempty" url:"account_number,omitempty"`
	// A note detailing information about the [Vendor](entity:Vendor).
	Note *string `json:"note,omitempty" url:"note,omitempty"`
	// The version of the [Vendor](entity:Vendor).
	Version *int `json:"version,omitempty" url:"version,omitempty"`
	// The status of the [Vendor](entity:Vendor).
	// See [Status](#type-status) for possible values
	Status *VendorStatus `json:"status,omitempty" url:"status,omitempty"`
	// contains filtered or unexported fields
}

Represents a supplier to a seller.

func (*Vendor) GetAccountNumber

func (v *Vendor) GetAccountNumber() *string

func (*Vendor) GetAddress

func (v *Vendor) GetAddress() *Address

func (*Vendor) GetContacts

func (v *Vendor) GetContacts() []*VendorContact

func (*Vendor) GetCreatedAt

func (v *Vendor) GetCreatedAt() *string

func (*Vendor) GetExtraProperties

func (v *Vendor) GetExtraProperties() map[string]interface{}

func (*Vendor) GetID

func (v *Vendor) GetID() *string

func (*Vendor) GetName

func (v *Vendor) GetName() *string

func (*Vendor) GetNote

func (v *Vendor) GetNote() *string

func (*Vendor) GetStatus

func (v *Vendor) GetStatus() *VendorStatus

func (*Vendor) GetUpdatedAt

func (v *Vendor) GetUpdatedAt() *string

func (*Vendor) GetVersion

func (v *Vendor) GetVersion() *int

func (*Vendor) String

func (v *Vendor) String() string

func (*Vendor) UnmarshalJSON

func (v *Vendor) UnmarshalJSON(data []byte) error

type VendorContact

type VendorContact struct {
	// A unique Square-generated ID for the [VendorContact](entity:VendorContact).
	// This field is required when attempting to update a [VendorContact](entity:VendorContact).
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The name of the [VendorContact](entity:VendorContact).
	// This field is required when attempting to create a [Vendor](entity:Vendor).
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The email address of the [VendorContact](entity:VendorContact).
	EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"`
	// The phone number of the [VendorContact](entity:VendorContact).
	PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"`
	// The state of the [VendorContact](entity:VendorContact).
	Removed *bool `json:"removed,omitempty" url:"removed,omitempty"`
	// The ordinal of the [VendorContact](entity:VendorContact).
	Ordinal int `json:"ordinal" url:"ordinal"`
	// contains filtered or unexported fields
}

Represents a contact of a Vendor(entity:Vendor).

func (*VendorContact) GetEmailAddress

func (v *VendorContact) GetEmailAddress() *string

func (*VendorContact) GetExtraProperties

func (v *VendorContact) GetExtraProperties() map[string]interface{}

func (*VendorContact) GetID

func (v *VendorContact) GetID() *string

func (*VendorContact) GetName

func (v *VendorContact) GetName() *string

func (*VendorContact) GetOrdinal

func (v *VendorContact) GetOrdinal() int

func (*VendorContact) GetPhoneNumber

func (v *VendorContact) GetPhoneNumber() *string

func (*VendorContact) GetRemoved

func (v *VendorContact) GetRemoved() *bool

func (*VendorContact) String

func (v *VendorContact) String() string

func (*VendorContact) UnmarshalJSON

func (v *VendorContact) UnmarshalJSON(data []byte) error

type VendorStatus

type VendorStatus string

The status of the Vendor(entity:Vendor), whether a Vendor(entity:Vendor) is active or inactive.

const (
	VendorStatusActive   VendorStatus = "ACTIVE"
	VendorStatusInactive VendorStatus = "INACTIVE"
)

func NewVendorStatusFromString

func NewVendorStatusFromString(s string) (VendorStatus, error)

func (VendorStatus) Ptr

func (v VendorStatus) Ptr() *VendorStatus

type VendorsGetRequest

type VendorsGetRequest = GetVendorsRequest

VendorsGetRequest is an alias for GetVendorsRequest.

type VendorsUpdateRequest

type VendorsUpdateRequest = UpdateVendorsRequest

VendorsUpdateRequest is an alias for UpdateVendorsRequest.

type VerifySignatureRequest

type VerifySignatureRequest struct {
	RequestBody     string
	SignatureHeader string
	SignatureKey    string
	NotificationURL string
}

type VisibilityFilter

type VisibilityFilter string

Enumeration of visibility-filter values used to set the ability to view custom attributes or custom attribute definitions.

const (
	VisibilityFilterAll       VisibilityFilter = "ALL"
	VisibilityFilterRead      VisibilityFilter = "READ"
	VisibilityFilterReadWrite VisibilityFilter = "READ_WRITE"
)

func NewVisibilityFilterFromString

func NewVisibilityFilterFromString(s string) (VisibilityFilter, error)

func (VisibilityFilter) Ptr

type VoidTransactionResponse

type VoidTransactionResponse struct {
	// Any errors that occurred during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the response body of a request to the [VoidTransaction](api-endpoint:Transactions-VoidTransaction) endpoint.

func (*VoidTransactionResponse) GetErrors

func (v *VoidTransactionResponse) GetErrors() []*Error

func (*VoidTransactionResponse) GetExtraProperties

func (v *VoidTransactionResponse) GetExtraProperties() map[string]interface{}

func (*VoidTransactionResponse) String

func (v *VoidTransactionResponse) String() string

func (*VoidTransactionResponse) UnmarshalJSON

func (v *VoidTransactionResponse) UnmarshalJSON(data []byte) error

type WageSetting

type WageSetting struct {
	// The ID of the team member associated with the wage setting.
	TeamMemberID *string `json:"team_member_id,omitempty" url:"team_member_id,omitempty"`
	// **Required** The ordered list of jobs that the team member is assigned to.
	// The first job assignment is considered the team member's primary job.
	JobAssignments []*JobAssignment `json:"job_assignments,omitempty" url:"job_assignments,omitempty"`
	// Whether the team member is exempt from the overtime rules of the seller's country.
	IsOvertimeExempt *bool `json:"is_overtime_exempt,omitempty" url:"is_overtime_exempt,omitempty"`
	// **Read only** Used for resolving concurrency issues. The request fails if the version
	// provided does not match the server version at the time of the request. If not provided,
	// Square executes a blind write, potentially overwriting data from another write. For more information,
	// see [optimistic concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency).
	Version *int `json:"version,omitempty" url:"version,omitempty"`
	// The timestamp when the wage setting was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp when the wage setting was last updated, in RFC 3339 format.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Represents information about the overtime exemption status, job assignments, and compensation for a [team member](entity:TeamMember).

func (*WageSetting) GetCreatedAt

func (w *WageSetting) GetCreatedAt() *string

func (*WageSetting) GetExtraProperties

func (w *WageSetting) GetExtraProperties() map[string]interface{}

func (*WageSetting) GetIsOvertimeExempt

func (w *WageSetting) GetIsOvertimeExempt() *bool

func (*WageSetting) GetJobAssignments

func (w *WageSetting) GetJobAssignments() []*JobAssignment

func (*WageSetting) GetTeamMemberID

func (w *WageSetting) GetTeamMemberID() *string

func (*WageSetting) GetUpdatedAt

func (w *WageSetting) GetUpdatedAt() *string

func (*WageSetting) GetVersion

func (w *WageSetting) GetVersion() *int

func (*WageSetting) String

func (w *WageSetting) String() string

func (*WageSetting) UnmarshalJSON

func (w *WageSetting) UnmarshalJSON(data []byte) error

type WebhookSubscription

type WebhookSubscription struct {
	// A Square-generated unique ID for the subscription.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The name of this subscription.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Indicates whether the subscription is enabled (`true`) or not (`false`).
	Enabled *bool `json:"enabled,omitempty" url:"enabled,omitempty"`
	// The event types associated with this subscription.
	EventTypes []string `json:"event_types,omitempty" url:"event_types,omitempty"`
	// The URL to which webhooks are sent.
	NotificationURL *string `json:"notification_url,omitempty" url:"notification_url,omitempty"`
	// The API version of the subscription.
	// This field is optional for `CreateWebhookSubscription`.
	// The value defaults to the API version used by the application.
	APIVersion *string `json:"api_version,omitempty" url:"api_version,omitempty"`
	// The Square-generated signature key used to validate the origin of the webhook event.
	SignatureKey *string `json:"signature_key,omitempty" url:"signature_key,omitempty"`
	// The timestamp of when the subscription was created, in RFC 3339 format. For example, "2016-09-04T23:59:33.123Z".
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The timestamp of when the subscription was last updated, in RFC 3339 format.
	// For example, "2016-09-04T23:59:33.123Z".
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Represents the details of a webhook subscription, including notification URL, event types, and signature key.

func (*WebhookSubscription) GetAPIVersion

func (w *WebhookSubscription) GetAPIVersion() *string

func (*WebhookSubscription) GetCreatedAt

func (w *WebhookSubscription) GetCreatedAt() *string

func (*WebhookSubscription) GetEnabled

func (w *WebhookSubscription) GetEnabled() *bool

func (*WebhookSubscription) GetEventTypes

func (w *WebhookSubscription) GetEventTypes() []string

func (*WebhookSubscription) GetExtraProperties

func (w *WebhookSubscription) GetExtraProperties() map[string]interface{}

func (*WebhookSubscription) GetID

func (w *WebhookSubscription) GetID() *string

func (*WebhookSubscription) GetName

func (w *WebhookSubscription) GetName() *string

func (*WebhookSubscription) GetNotificationURL

func (w *WebhookSubscription) GetNotificationURL() *string

func (*WebhookSubscription) GetSignatureKey

func (w *WebhookSubscription) GetSignatureKey() *string

func (*WebhookSubscription) GetUpdatedAt

func (w *WebhookSubscription) GetUpdatedAt() *string

func (*WebhookSubscription) String

func (w *WebhookSubscription) String() string

func (*WebhookSubscription) UnmarshalJSON

func (w *WebhookSubscription) UnmarshalJSON(data []byte) error

type Weekday

type Weekday string

The days of the week.

const (
	WeekdayMon Weekday = "MON"
	WeekdayTue Weekday = "TUE"
	WeekdayWed Weekday = "WED"
	WeekdayThu Weekday = "THU"
	WeekdayFri Weekday = "FRI"
	WeekdaySat Weekday = "SAT"
	WeekdaySun Weekday = "SUN"
)

func NewWeekdayFromString

func NewWeekdayFromString(s string) (Weekday, error)

func (Weekday) Ptr

func (w Weekday) Ptr() *Weekday

type WorkweekConfig

type WorkweekConfig struct {
	// The UUID for this object.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The day of the week on which a business week starts for
	// compensation purposes.
	// See [Weekday](#type-weekday) for possible values
	StartOfWeek Weekday `json:"start_of_week" url:"start_of_week"`
	// The local time at which a business week starts. Represented as a
	// string in `HH:MM` format (`HH:MM:SS` is also accepted, but seconds are
	// truncated).
	StartOfDayLocalTime string `json:"start_of_day_local_time" url:"start_of_day_local_time"`
	// Used for resolving concurrency issues. The request fails if the version
	// provided does not match the server version at the time of the request. If not provided,
	// Square executes a blind write; potentially overwriting data from another
	// write.
	Version *int `json:"version,omitempty" url:"version,omitempty"`
	// A read-only timestamp in RFC 3339 format; presented in UTC.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// A read-only timestamp in RFC 3339 format; presented in UTC.
	UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Sets the day of the week and hour of the day that a business starts a workweek. This is used to calculate overtime pay.

func (*WorkweekConfig) GetCreatedAt

func (w *WorkweekConfig) GetCreatedAt() *string

func (*WorkweekConfig) GetExtraProperties

func (w *WorkweekConfig) GetExtraProperties() map[string]interface{}

func (*WorkweekConfig) GetID

func (w *WorkweekConfig) GetID() *string

func (*WorkweekConfig) GetStartOfDayLocalTime

func (w *WorkweekConfig) GetStartOfDayLocalTime() string

func (*WorkweekConfig) GetStartOfWeek

func (w *WorkweekConfig) GetStartOfWeek() Weekday

func (*WorkweekConfig) GetUpdatedAt

func (w *WorkweekConfig) GetUpdatedAt() *string

func (*WorkweekConfig) GetVersion

func (w *WorkweekConfig) GetVersion() *int

func (*WorkweekConfig) String

func (w *WorkweekConfig) String() string

func (*WorkweekConfig) UnmarshalJSON

func (w *WorkweekConfig) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL