square

package module
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 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 the [timecard](entity:Timecard). 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 the [timecard](entity:Timecard). Precision up to
	// the minute is respected; seconds are truncated.
	EndAt *string `json:"end_at,omitempty" url:"end_at,omitempty"`
	// The [BreakType](entity: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.
	//
	// Example for break expected duration of 15 minutes: PT15M
	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 a team member's break on a [timecard](entity:Timecard).

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
	// team members 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: PT15M
	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 template for a type of [break](entity:Break) that can be added to a [timecard](entity:Timecard), including the expected duration and paid status.

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 BulkPublishScheduledShiftsData added in v1.5.0

type BulkPublishScheduledShiftsData struct {
	// The current version of the scheduled shift, used to enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)
	// control. If the provided version doesn't match the server version, the request fails.
	// If omitted, Square executes a blind write, potentially overwriting data from another publish request.
	Version *int `json:"version,omitempty" url:"version,omitempty"`
	// contains filtered or unexported fields
}

Represents options for an individual publish request in a [BulkPublishScheduledShifts](api-endpoint:Labor-BulkPublishScheduledShifts) operation, provided as the value in a key-value pair.

func (*BulkPublishScheduledShiftsData) GetExtraProperties added in v1.5.0

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

func (*BulkPublishScheduledShiftsData) GetVersion added in v1.5.0

func (b *BulkPublishScheduledShiftsData) GetVersion() *int

func (*BulkPublishScheduledShiftsData) String added in v1.5.0

func (*BulkPublishScheduledShiftsData) UnmarshalJSON added in v1.5.0

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

type BulkPublishScheduledShiftsRequest added in v1.5.0

type BulkPublishScheduledShiftsRequest struct {
	// A map of 1 to 100 key-value pairs that represent individual publish requests.
	//
	// - Each key is the ID of a scheduled shift you want to publish.
	// - Each value is a `BulkPublishScheduledShiftsData` object that contains the
	// `version` field or is an empty object.
	ScheduledShifts map[string]*BulkPublishScheduledShiftsData `json:"scheduled_shifts,omitempty" url:"-"`
	// Indicates whether Square should send email notifications to team members and
	// which team members should receive the notifications. This setting applies to all shifts
	// specified in the bulk operation. The default value is `AFFECTED`.
	// See [ScheduledShiftNotificationAudience](#type-scheduledshiftnotificationaudience) for possible values
	ScheduledShiftNotificationAudience *ScheduledShiftNotificationAudience `json:"scheduled_shift_notification_audience,omitempty" url:"-"`
}

type BulkPublishScheduledShiftsResponse added in v1.5.0

type BulkPublishScheduledShiftsResponse struct {
	// A map of key-value pairs that represent responses for individual publish requests.
	// The order of responses might differ from the order in which the requests were provided.
	//
	// - Each key is the scheduled shift ID that was specified for a publish request.
	// - Each value is the corresponding response. If the request succeeds, the value is the
	// published scheduled shift. If the request fails, the value is an `errors` array containing
	// any errors that occurred while processing the request.
	Responses map[string]*PublishScheduledShiftResponse `json:"responses,omitempty" url:"responses,omitempty"`
	// Any top-level errors that prevented the bulk operation from succeeding.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// contains filtered or unexported fields
}

Represents a [BulkPublishScheduledShifts](api-endpoint:Labor-BulkPublishScheduledShifts) response. Either `scheduled_shifts` or `errors` is present in the response.

func (*BulkPublishScheduledShiftsResponse) GetErrors added in v1.5.0

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

func (*BulkPublishScheduledShiftsResponse) GetExtraProperties added in v1.5.0

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

func (*BulkPublishScheduledShiftsResponse) GetResponses added in v1.5.0

func (*BulkPublishScheduledShiftsResponse) String added in v1.5.0

func (*BulkPublishScheduledShiftsResponse) UnmarshalJSON added in v1.5.0

func (b *BulkPublishScheduledShiftsResponse) 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. A URI pointing to a published e-commerce product page for the Item.
	EcomURI *string `json:"ecom_uri,omitempty" url:"ecom_uri,omitempty"`
	// Deprecated. 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 default modifier settings for this item.
	ModifierOverrides []*CatalogModifierOverride `json:"modifier_overrides,omitempty" url:"modifier_overrides,omitempty"`
	// The minimum number of modifiers that must be selected from this modifier list.
	// Values:
	//
	// - 0: No selection is required.
	// - -1: Default value, the attribute was not set by the client. When `max_selected_modifiers` is
	// also -1, use the minimum and maximum selection values set on the `CatalogItemModifierList`.
	// - &gt;0: The required minimum modifier selections. This can be larger than the total `CatalogModifiers` when `allow_quantities` is enabled.
	// - &lt; -1: Invalid. Treated as no selection required.
	MinSelectedModifiers *int `json:"min_selected_modifiers,omitempty" url:"min_selected_modifiers,omitempty"`
	// The maximum number of modifiers that can be selected.
	// Values:
	//
	// - 0: No maximum limit.
	// - -1: Default value, the attribute was not set by the client. When `min_selected_modifiers` is
	// also -1, use the minimum and maximum selection values set on the `CatalogItemModifierList`.
	// - &gt;0: The maximum total modifier selections. This can be larger than the total `CatalogModifiers` when `allow_quantities` is enabled.
	// - &lt; -1: Invalid. Treated as no maximum limit.
	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"`
	AllowQuantities            interface{} `json:"allow_quantities,omitempty" url:"allow_quantities,omitempty"`
	IsConversational           interface{} `json:"is_conversational,omitempty" url:"is_conversational,omitempty"`
	HiddenFromCustomerOverride interface{} `json:"hidden_from_customer_override,omitempty" url:"hidden_from_customer_override,omitempty"`
	// contains filtered or unexported fields
}

Controls how a modifier list is applied to a specific item. This object allows for item-specific customization of modifier list behavior and provides the ability to override global modifier list settings.

func (*CatalogItemModifierListInfo) GetAllowQuantities added in v1.5.0

func (c *CatalogItemModifierListInfo) GetAllowQuantities() interface{}

func (*CatalogItemModifierListInfo) GetEnabled

func (c *CatalogItemModifierListInfo) GetEnabled() *bool

func (*CatalogItemModifierListInfo) GetExtraProperties

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

func (*CatalogItemModifierListInfo) GetHiddenFromCustomerOverride added in v1.5.0

func (c *CatalogItemModifierListInfo) GetHiddenFromCustomerOverride() interface{}

func (*CatalogItemModifierListInfo) GetIsConversational added in v1.5.0

func (c *CatalogItemModifierListInfo) GetIsConversational() 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"`
	// When `true`, this modifier is selected by default when displaying the modifier list.
	// This setting can be overridden at the item level using `CatalogModifierListInfo.modifier_overrides`.
	OnByDefault *bool `json:"on_by_default,omitempty" url:"on_by_default,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"`
	// When `true`, this modifier is hidden from online ordering channels. This setting can be overridden at the item level using `CatalogModifierListInfo.modifier_overrides`.
	HiddenOnline *bool `json:"hidden_online,omitempty" url:"hidden_online,omitempty"`
	// contains filtered or unexported fields
}

A modifier that can be applied to items at the time of sale. For example, a cheese modifier for a burger, or a flavor modifier for a serving of ice cream.

func (*CatalogModifier) GetExtraProperties

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

func (*CatalogModifier) GetHiddenOnline added in v1.5.0

func (c *CatalogModifier) GetHiddenOnline() *bool

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) GetOnByDefault added in v1.5.0

func (c *CatalogModifier) GetOnByDefault() *bool

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"`
	// __Deprecated__: Indicates whether a single (`SINGLE`) modifier or multiple (`MULTIPLE`) modifiers can be selected. Use
	// `min_selected_modifiers` and `max_selected_modifiers` instead.
	// 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"`
	// When `true`, allows multiple quantities of the same modifier to be selected.
	AllowQuantities *bool `json:"allow_quantities,omitempty" url:"allow_quantities,omitempty"`
	// True if modifiers belonging to this list can be used conversationally.
	IsConversational *bool `json:"is_conversational,omitempty" url:"is_conversational,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"`
	// The minimum number of modifiers that must be selected from this list. The value can be overridden with `CatalogItemModifierListInfo`.
	//
	// Values:
	//
	// - 0: No selection is required.
	// - -1: Default value, the attribute was not set by the client. Treated as no selection required.
	// - &gt;0: The required minimum modifier selections. This can be larger than the total `CatalogModifiers` when `allow_quantities` is enabled.
	// - &lt; -1: Invalid. Treated as no selection required.
	MinSelectedModifiers *int64 `json:"min_selected_modifiers,omitempty" url:"min_selected_modifiers,omitempty"`
	// The maximum number of modifiers that must be selected from this list. The value can be overridden with `CatalogItemModifierListInfo`.
	//
	// Values:
	//
	// - 0: No maximum limit.
	// - -1: Default value, the attribute was not set by the client. Treated as no maximum limit.
	// - &gt;0: The maximum total modifier selections. This can be larger than the total `CatalogModifiers` when `allow_quantities` is enabled.
	// - &lt; -1: Invalid. Treated as no maximum limit.
	MaxSelectedModifiers *int64 `json:"max_selected_modifiers,omitempty" url:"max_selected_modifiers,omitempty"`
	// If `true`, modifiers from this list are hidden from customer receipts. The default value is `false`.
	// This setting can be overridden with `CatalogItemModifierListInfo.hidden_from_customer_override`.
	HiddenFromCustomer *bool `json:"hidden_from_customer,omitempty" url:"hidden_from_customer,omitempty"`
	// contains filtered or unexported fields
}

A container for a list of modifiers, or a text-based modifier. For text-based modifiers, this represents text configuration for an item. (For example, custom text to print on a t-shirt). For non text-based modifiers, this represents a list of modifiers that can be applied to items at the time of sale. (For example, a list of condiments for a hot dog, or a list of ice cream flavors). Each element of the modifier list is a `CatalogObject` instance of the `MODIFIER` type.

func (*CatalogModifierList) GetAllowQuantities added in v1.5.0

func (c *CatalogModifierList) GetAllowQuantities() *bool

func (*CatalogModifierList) GetExtraProperties

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

func (*CatalogModifierList) GetHiddenFromCustomer added in v1.5.0

func (c *CatalogModifierList) GetHiddenFromCustomer() *bool

func (*CatalogModifierList) GetImageIDs

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

func (*CatalogModifierList) GetInternalName

func (c *CatalogModifierList) GetInternalName() *string

func (*CatalogModifierList) GetIsConversational added in v1.5.0

func (c *CatalogModifierList) GetIsConversational() *bool

func (*CatalogModifierList) GetMaxLength

func (c *CatalogModifierList) GetMaxLength() *int

func (*CatalogModifierList) GetMaxSelectedModifiers added in v1.5.0

func (c *CatalogModifierList) GetMaxSelectedModifiers() *int64

func (*CatalogModifierList) GetMinSelectedModifiers added in v1.5.0

func (c *CatalogModifierList) GetMinSelectedModifiers() *int64

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"`
	// __Deprecated__: Use `on_by_default_override` instead.
	OnByDefault          *bool       `json:"on_by_default,omitempty" url:"on_by_default,omitempty"`
	HiddenOnlineOverride interface{} `json:"hidden_online_override,omitempty" url:"hidden_online_override,omitempty"`
	OnByDefaultOverride  interface{} `json:"on_by_default_override,omitempty" url:"on_by_default_override,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) GetHiddenOnlineOverride added in v1.5.0

func (c *CatalogModifierOverride) GetHiddenOnlineOverride() interface{}

func (*CatalogModifierOverride) GetModifierID

func (c *CatalogModifierOverride) GetModifierID() string

func (*CatalogModifierOverride) GetOnByDefault

func (c *CatalogModifierOverride) GetOnByDefault() *bool

func (*CatalogModifierOverride) GetOnByDefaultOverride added in v1.5.0

func (c *CatalogModifierOverride) GetOnByDefaultOverride() interface{}

func (*CatalogModifierOverride) String

func (c *CatalogModifierOverride) String() string

func (*CatalogModifierOverride) UnmarshalJSON

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

type CatalogObject

type CatalogObject struct {
	Type                      string
	Item                      *CatalogObjectItem
	Image                     *CatalogObjectImage
	Category                  *CatalogObjectCategory
	ItemVariation             *CatalogObjectItemVariation
	Tax                       *CatalogObjectTax
	Discount                  *CatalogObjectDiscount
	ModifierList              *CatalogObjectModifierList
	Modifier                  *CatalogObjectModifier
	PricingRule               *CatalogObjectPricingRule
	ProductSet                *CatalogObjectProductSet
	TimePeriod                *CatalogObjectTimePeriod
	MeasurementUnit           *CatalogObjectMeasurementUnit
	SubscriptionPlanVariation *CatalogObjectSubscriptionPlanVariation
	ItemOption                *CatalogObjectItemOption
	ItemOptionVal             *CatalogObjectItemOptionValue
	CustomAttributeDefinition *CatalogObjectCustomAttributeDefinition
	QuickAmountsSettings      *CatalogObjectQuickAmountsSettings
	SubscriptionPlan          *CatalogObjectSubscriptionPlan
	AvailabilityPeriod        *CatalogObjectAvailabilityPeriod
}

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) GetAvailabilityPeriod added in v1.4.0

func (c *CatalogObject) GetAvailabilityPeriod() *CatalogObjectAvailabilityPeriod

func (*CatalogObject) GetCategory

func (c *CatalogObject) GetCategory() *CatalogObjectCategory

func (*CatalogObject) GetCustomAttributeDefinition

func (c *CatalogObject) GetCustomAttributeDefinition() *CatalogObjectCustomAttributeDefinition

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

func (c *CatalogObject) GetSubscriptionPlan() *CatalogObjectSubscriptionPlan

func (*CatalogObject) GetSubscriptionPlanVariation added in v1.4.0

func (c *CatalogObject) GetSubscriptionPlanVariation() *CatalogObjectSubscriptionPlanVariation

func (*CatalogObject) GetTax

func (c *CatalogObject) GetTax() *CatalogObjectTax

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 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 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 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 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 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 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
	VisitPricingRule(*CatalogObjectPricingRule) error
	VisitProductSet(*CatalogObjectProductSet) error
	VisitTimePeriod(*CatalogObjectTimePeriod) error
	VisitMeasurementUnit(*CatalogObjectMeasurementUnit) error
	VisitSubscriptionPlanVariation(*CatalogObjectSubscriptionPlanVariation) error
	VisitItemOption(*CatalogObjectItemOption) error
	VisitItemOptionVal(*CatalogObjectItemOptionValue) error
	VisitCustomAttributeDefinition(*CatalogObjectCustomAttributeDefinition) error
	VisitQuickAmountsSettings(*CatalogObjectQuickAmountsSettings) error
	VisitSubscriptionPlan(*CatalogObjectSubscriptionPlan) 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)