square

package module
v2.2.0 Latest Latest
Warning

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

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

README

Square Go Library

fern shield go shield

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

Requirements

This module requires Go version >= 1.18.

Installation

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

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

Usage

package main

import (
    "context"
    "fmt"

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


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

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

	fmt.Println(response.Payment)
}

Optional Parameters

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

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

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

Environments

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

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

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

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

Automatic Pagination

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

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

You can also iterate page-by-page:

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

Timeouts

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

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

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

Errors

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

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

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

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

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

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

Webhook Signature Verification

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

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

Advanced

Request Options

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

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

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

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

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

Send Extra Properties

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

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

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

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

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

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

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

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

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

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

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

This can be done for an individual request, too:

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

Contributing

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

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

Documentation

Index

Constants

This section is empty.

Variables

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

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

Functions

func Bool

func Bool(b bool) *bool

Bool returns a pointer to the given bool value.

func Byte

func Byte(b byte) *byte

Byte returns a pointer to the given byte value.

func Complex64

func Complex64(c complex64) *complex64

Complex64 returns a pointer to the given complex64 value.

func Complex128

func Complex128(c complex128) *complex128

Complex128 returns a pointer to the given complex128 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 Int8

func Int8(i int8) *int8

Int8 returns a pointer to the given int8 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 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 Uint8

func Uint8(u uint8) *uint8

Uint8 returns a pointer to the given uint8 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 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

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" url:"amount_money"`
	// 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 BankAccountCreatedEvent

type BankAccountCreatedEvent struct {
	// The ID of the target merchant associated with the event.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The ID of the target location associated with the event.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The type of event this represents, `"bank_account.created"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// A unique ID for the event.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// Timestamp of when the event was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// Data associated with the event.
	Data *BankAccountCreatedEventData `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

Published when you link an external bank account to a Square account in the Seller Dashboard. Square sets the initial status to `VERIFICATION_IN_PROGRESS` and publishes the event.

func (*BankAccountCreatedEvent) GetCreatedAt

func (b *BankAccountCreatedEvent) GetCreatedAt() *string

func (*BankAccountCreatedEvent) GetData

func (*BankAccountCreatedEvent) GetEventID

func (b *BankAccountCreatedEvent) GetEventID() *string

func (*BankAccountCreatedEvent) GetExtraProperties

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

func (*BankAccountCreatedEvent) GetLocationID

func (b *BankAccountCreatedEvent) GetLocationID() *string

func (*BankAccountCreatedEvent) GetMerchantID

func (b *BankAccountCreatedEvent) GetMerchantID() *string

func (*BankAccountCreatedEvent) GetType

func (b *BankAccountCreatedEvent) GetType() *string

func (*BankAccountCreatedEvent) String

func (b *BankAccountCreatedEvent) String() string

func (*BankAccountCreatedEvent) UnmarshalJSON

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

type BankAccountCreatedEventData

type BankAccountCreatedEventData struct {
	// Name of the affected object’s type, `"bank_account"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// ID of the affected bank account.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// An object containing the created bank account.
	Object *BankAccountCreatedEventObject `json:"object,omitempty" url:"object,omitempty"`
	// contains filtered or unexported fields
}

func (*BankAccountCreatedEventData) GetExtraProperties

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

func (*BankAccountCreatedEventData) GetID

func (b *BankAccountCreatedEventData) GetID() *string

func (*BankAccountCreatedEventData) GetObject

func (*BankAccountCreatedEventData) GetType

func (b *BankAccountCreatedEventData) GetType() *string

func (*BankAccountCreatedEventData) String

func (b *BankAccountCreatedEventData) String() string

func (*BankAccountCreatedEventData) UnmarshalJSON

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

type BankAccountCreatedEventObject

type BankAccountCreatedEventObject struct {
	// The created bank account.
	BankAccount *BankAccount `json:"bank_account,omitempty" url:"bank_account,omitempty"`
	// contains filtered or unexported fields
}

func (*BankAccountCreatedEventObject) GetBankAccount

func (b *BankAccountCreatedEventObject) GetBankAccount() *BankAccount

func (*BankAccountCreatedEventObject) GetExtraProperties

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

func (*BankAccountCreatedEventObject) String

func (*BankAccountCreatedEventObject) UnmarshalJSON

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

type BankAccountDisabledEvent

type BankAccountDisabledEvent struct {
	// The ID of the target merchant associated with the event.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The ID of the target location associated with the event.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The type of event this represents, `"bank_account.disabled"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// A unique ID for the event.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// Timestamp of when the event was disabled, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// Data associated with the event.
	Data *BankAccountDisabledEventData `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

Published when Square sets the status of a BankAccount(entity:BankAccount) to `DISABLED`.

func (*BankAccountDisabledEvent) GetCreatedAt

func (b *BankAccountDisabledEvent) GetCreatedAt() *string

func (*BankAccountDisabledEvent) GetData

func (*BankAccountDisabledEvent) GetEventID

func (b *BankAccountDisabledEvent) GetEventID() *string

func (*BankAccountDisabledEvent) GetExtraProperties

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

func (*BankAccountDisabledEvent) GetLocationID

func (b *BankAccountDisabledEvent) GetLocationID() *string

func (*BankAccountDisabledEvent) GetMerchantID

func (b *BankAccountDisabledEvent) GetMerchantID() *string

func (*BankAccountDisabledEvent) GetType

func (b *BankAccountDisabledEvent) GetType() *string

func (*BankAccountDisabledEvent) String

func (b *BankAccountDisabledEvent) String() string

func (*BankAccountDisabledEvent) UnmarshalJSON

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

type BankAccountDisabledEventData

type BankAccountDisabledEventData struct {
	// Name of the affected object’s type, `"bank_account"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// ID of the affected bank account.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// An object containing the disabled bank account.
	Object *BankAccountDisabledEventObject `json:"object,omitempty" url:"object,omitempty"`
	// contains filtered or unexported fields
}

func (*BankAccountDisabledEventData) GetExtraProperties

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

func (*BankAccountDisabledEventData) GetID

func (*BankAccountDisabledEventData) GetObject

func (*BankAccountDisabledEventData) GetType

func (b *BankAccountDisabledEventData) GetType() *string

func (*BankAccountDisabledEventData) String

func (*BankAccountDisabledEventData) UnmarshalJSON

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

type BankAccountDisabledEventObject

type BankAccountDisabledEventObject struct {
	// The disabled bank account.
	BankAccount *BankAccount `json:"bank_account,omitempty" url:"bank_account,omitempty"`
	// contains filtered or unexported fields
}

func (*BankAccountDisabledEventObject) GetBankAccount

func (b *BankAccountDisabledEventObject) GetBankAccount() *BankAccount

func (*BankAccountDisabledEventObject) GetExtraProperties

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

func (*BankAccountDisabledEventObject) String

func (*BankAccountDisabledEventObject) UnmarshalJSON

func (b *BankAccountDisabledEventObject) 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 BankAccountVerifiedEvent

type BankAccountVerifiedEvent struct {
	// The ID of the target merchant associated with the event.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The ID of the target location associated with the event.
	LocationID *string `json:"location_id,omitempty" url:"location_id,omitempty"`
	// The type of event this represents, `"bank_account.verified"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// A unique ID for the event.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// Timestamp of when the event was verified, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// Data associated with the event.
	Data *BankAccountVerifiedEventData `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

Published when Square sets the status of a BankAccount(entity:BankAccount) to `VERIFIED`.

func (*BankAccountVerifiedEvent) GetCreatedAt

func (b *BankAccountVerifiedEvent) GetCreatedAt() *string

func (*BankAccountVerifiedEvent) GetData

func (*BankAccountVerifiedEvent) GetEventID

func (b *BankAccountVerifiedEvent) GetEventID() *string

func (*BankAccountVerifiedEvent) GetExtraProperties

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

func (*BankAccountVerifiedEvent) GetLocationID

func (b *BankAccountVerifiedEvent) GetLocationID() *string

func (*BankAccountVerifiedEvent) GetMerchantID

func (b *BankAccountVerifiedEvent) GetMerchantID() *string

func (*BankAccountVerifiedEvent) GetType

func (b *BankAccountVerifiedEvent) GetType() *string

func (*BankAccountVerifiedEvent) String

func (b *BankAccountVerifiedEvent) String() string

func (*BankAccountVerifiedEvent) UnmarshalJSON

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

type BankAccountVerifiedEventData

type BankAccountVerifiedEventData struct {
	// Name of the affected object’s type, `"bank_account"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// ID of the affected bank account.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// An object containing the verified bank account.
	Object *BankAccountVerifiedEventObject `json:"object,omitempty" url:"object,omitempty"`
	// contains filtered or unexported fields
}

func (*BankAccountVerifiedEventData) GetExtraProperties

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

func (*BankAccountVerifiedEventData) GetID

func (*BankAccountVerifiedEventData) GetObject

func (*BankAccountVerifiedEventData) GetType

func (b *BankAccountVerifiedEventData) GetType() *string

func (*BankAccountVerifiedEventData) String

func (*BankAccountVerifiedEventData) UnmarshalJSON

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

type BankAccountVerifiedEventObject

type BankAccountVerifiedEventObject struct {
	// The verified bank account.
	BankAccount *BankAccount `json:"bank_account,omitempty" url:"bank_account,omitempty"`
	// contains filtered or unexported fields
}

func (*BankAccountVerifiedEventObject) GetBankAccount

func (b *BankAccountVerifiedEventObject) GetBankAccount() *BankAccount

func (*BankAccountVerifiedEventObject) GetExtraProperties

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

func (*BankAccountVerifiedEventObject) String

func (*BankAccountVerifiedEventObject) UnmarshalJSON

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

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" url:"custom_attribute"`
	// 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 BookingCreatedEvent

type BookingCreatedEvent struct {
	// The ID of the target seller associated with the event.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The type of this event. The value is `"booking.created"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// A unique ID for the event.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// The timestamp of when the event was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The data associated with the event.
	Data *BookingCreatedEventData `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

Published when a booking is created.

To receive this event with buyer-level permissions, you must have `APPOINTMENTS_READ` set for the OAuth scope. To receive this event with seller-level permissions, you must have `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` set for the OAuth scope.

func (*BookingCreatedEvent) GetCreatedAt

func (b *BookingCreatedEvent) GetCreatedAt() *string

func (*BookingCreatedEvent) GetData

func (*BookingCreatedEvent) GetEventID

func (b *BookingCreatedEvent) GetEventID() *string

func (*BookingCreatedEvent) GetExtraProperties

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

func (*BookingCreatedEvent) GetMerchantID

func (b *BookingCreatedEvent) GetMerchantID() *string

func (*BookingCreatedEvent) GetType

func (b *BookingCreatedEvent) GetType() *string

func (*BookingCreatedEvent) String

func (b *BookingCreatedEvent) String() string

func (*BookingCreatedEvent) UnmarshalJSON

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

type BookingCreatedEventData

type BookingCreatedEventData struct {
	// The type of the event data object. The value is `"booking"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// The ID of the event data object.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// An object containing the created booking.
	Object *BookingCreatedEventObject `json:"object,omitempty" url:"object,omitempty"`
	// contains filtered or unexported fields
}

func (*BookingCreatedEventData) GetExtraProperties

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

func (*BookingCreatedEventData) GetID

func (b *BookingCreatedEventData) GetID() *string

func (*BookingCreatedEventData) GetObject

func (*BookingCreatedEventData) GetType

func (b *BookingCreatedEventData) GetType() *string

func (*BookingCreatedEventData) String

func (b *BookingCreatedEventData) String() string

func (*BookingCreatedEventData) UnmarshalJSON

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

type BookingCreatedEventObject

type BookingCreatedEventObject struct {
	// The created booking.
	Booking *Booking `json:"booking,omitempty" url:"booking,omitempty"`
	// contains filtered or unexported fields
}

func (*BookingCreatedEventObject) GetBooking

func (b *BookingCreatedEventObject) GetBooking() *Booking

func (*BookingCreatedEventObject) GetExtraProperties

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

func (*BookingCreatedEventObject) String

func (b *BookingCreatedEventObject) String() string

func (*BookingCreatedEventObject) UnmarshalJSON

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

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 BookingCustomAttributeDefinitionOwnedCreatedEvent

type BookingCustomAttributeDefinitionOwnedCreatedEvent struct {
	// The ID of the seller associated with the event that triggered the event notification.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The type of this event. The value is `"booking.custom_attribute_definition.owned.created"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// A unique ID for the event notification.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// The timestamp that indicates when the event notification was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The data associated with the event that triggered the event notification.
	Data *CustomAttributeDefinitionEventData `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) is created by the subscribing application. Subscribe to this event to be notified when your application creates a booking custom attribute definition.

func (*BookingCustomAttributeDefinitionOwnedCreatedEvent) GetCreatedAt

func (*BookingCustomAttributeDefinitionOwnedCreatedEvent) GetData

func (*BookingCustomAttributeDefinitionOwnedCreatedEvent) GetEventID

func (*BookingCustomAttributeDefinitionOwnedCreatedEvent) GetExtraProperties

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

func (*BookingCustomAttributeDefinitionOwnedCreatedEvent) GetMerchantID

func (*BookingCustomAttributeDefinitionOwnedCreatedEvent) GetType

func (*BookingCustomAttributeDefinitionOwnedCreatedEvent) String

func (*BookingCustomAttributeDefinitionOwnedCreatedEvent) UnmarshalJSON

type BookingCustomAttributeDefinitionOwnedDeletedEvent

type BookingCustomAttributeDefinitionOwnedDeletedEvent struct {
	// The ID of the seller associated with the event that triggered the event notification.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The type of this event. The value is `"booking.custom_attribute_definition.owned.deleted"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// A unique ID for the event notification.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// The timestamp that indicates when the event notification was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The data associated with the event that triggered the event notification.
	Data *CustomAttributeDefinitionEventData `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) is deleted by the subscribing application. Subscribe to this event to be notified when your application deletes a booking custom attribute definition.

func (*BookingCustomAttributeDefinitionOwnedDeletedEvent) GetCreatedAt

func (*BookingCustomAttributeDefinitionOwnedDeletedEvent) GetData

func (*BookingCustomAttributeDefinitionOwnedDeletedEvent) GetEventID

func (*BookingCustomAttributeDefinitionOwnedDeletedEvent) GetExtraProperties

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

func (*BookingCustomAttributeDefinitionOwnedDeletedEvent) GetMerchantID

func (*BookingCustomAttributeDefinitionOwnedDeletedEvent) GetType

func (*BookingCustomAttributeDefinitionOwnedDeletedEvent) String

func (*BookingCustomAttributeDefinitionOwnedDeletedEvent) UnmarshalJSON

type BookingCustomAttributeDefinitionOwnedUpdatedEvent

type BookingCustomAttributeDefinitionOwnedUpdatedEvent struct {
	// The ID of the seller associated with the event that triggered the event notification.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The type of this event. The value is `"booking.custom_attribute_definition.owned.updated"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// A unique ID for the event notification.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// The timestamp that indicates when the event notification was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The data associated with the event that triggered the event notification.
	Data *CustomAttributeDefinitionEventData `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) is updated by the subscribing application. Subscribe to this event to be notified when your application updates a booking custom attribute definition.

func (*BookingCustomAttributeDefinitionOwnedUpdatedEvent) GetCreatedAt

func (*BookingCustomAttributeDefinitionOwnedUpdatedEvent) GetData

func (*BookingCustomAttributeDefinitionOwnedUpdatedEvent) GetEventID

func (*BookingCustomAttributeDefinitionOwnedUpdatedEvent) GetExtraProperties

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

func (*BookingCustomAttributeDefinitionOwnedUpdatedEvent) GetMerchantID

func (*BookingCustomAttributeDefinitionOwnedUpdatedEvent) GetType

func (*BookingCustomAttributeDefinitionOwnedUpdatedEvent) String

func (*BookingCustomAttributeDefinitionOwnedUpdatedEvent) UnmarshalJSON

type BookingCustomAttributeDefinitionVisibleCreatedEvent

type BookingCustomAttributeDefinitionVisibleCreatedEvent struct {
	// The ID of the seller associated with the event that triggered the event notification.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The type of this event. The value is `"booking.custom_attribute_definition.visible.created"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// A unique ID for the event notification.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// The timestamp that indicates when the event notification was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The data associated with the event that triggered the event notification.
	Data *CustomAttributeDefinitionEventData `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) with the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is created. An application that subscribes to this event is notified when a booking custom attribute definition is created by any application for which the subscribing application has read access to the booking custom attribute definition.

func (*BookingCustomAttributeDefinitionVisibleCreatedEvent) GetCreatedAt

func (*BookingCustomAttributeDefinitionVisibleCreatedEvent) GetData

func (*BookingCustomAttributeDefinitionVisibleCreatedEvent) GetEventID

func (*BookingCustomAttributeDefinitionVisibleCreatedEvent) GetExtraProperties

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

func (*BookingCustomAttributeDefinitionVisibleCreatedEvent) GetMerchantID

func (*BookingCustomAttributeDefinitionVisibleCreatedEvent) GetType

func (*BookingCustomAttributeDefinitionVisibleCreatedEvent) String

func (*BookingCustomAttributeDefinitionVisibleCreatedEvent) UnmarshalJSON

type BookingCustomAttributeDefinitionVisibleDeletedEvent

type BookingCustomAttributeDefinitionVisibleDeletedEvent struct {
	// The ID of the seller associated with the event that triggered the event notification.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The type of this event. The value is `"booking.custom_attribute_definition.visible.deleted"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// A unique ID for the event notification.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// The timestamp that indicates when the event notification was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The data associated with the event that triggered the event notification.
	Data *CustomAttributeDefinitionEventData `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) with the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is deleted. An application that subscribes to this event is notified when a booking custom attribute definition is deleted by any application for which the subscribing application has read access to the booking custom attribute definition.

func (*BookingCustomAttributeDefinitionVisibleDeletedEvent) GetCreatedAt

func (*BookingCustomAttributeDefinitionVisibleDeletedEvent) GetData

func (*BookingCustomAttributeDefinitionVisibleDeletedEvent) GetEventID

func (*BookingCustomAttributeDefinitionVisibleDeletedEvent) GetExtraProperties

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

func (*BookingCustomAttributeDefinitionVisibleDeletedEvent) GetMerchantID

func (*BookingCustomAttributeDefinitionVisibleDeletedEvent) GetType

func (*BookingCustomAttributeDefinitionVisibleDeletedEvent) String

func (*BookingCustomAttributeDefinitionVisibleDeletedEvent) UnmarshalJSON

type BookingCustomAttributeDefinitionVisibleUpdatedEvent

type BookingCustomAttributeDefinitionVisibleUpdatedEvent struct {
	// The ID of the seller associated with the event that triggered the event notification.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The type of this event. The value is `"booking.custom_attribute_definition.visible.updated"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// A unique ID for the event notification.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// The timestamp that indicates when the event notification was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The data associated with the event that triggered the event notification.
	Data *CustomAttributeDefinitionEventData `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

Published when a booking [custom attribute definition](entity:CustomAttributeDefinition) with the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is updated. An application that subscribes to this event is notified when a booking custom attribute definition is updated by any application for which the subscribing application has read access to the booking custom attribute definition.

func (*BookingCustomAttributeDefinitionVisibleUpdatedEvent) GetCreatedAt

func (*BookingCustomAttributeDefinitionVisibleUpdatedEvent) GetData

func (*BookingCustomAttributeDefinitionVisibleUpdatedEvent) GetEventID

func (*BookingCustomAttributeDefinitionVisibleUpdatedEvent) GetExtraProperties

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

func (*BookingCustomAttributeDefinitionVisibleUpdatedEvent) GetMerchantID

func (*BookingCustomAttributeDefinitionVisibleUpdatedEvent) GetType

func (*BookingCustomAttributeDefinitionVisibleUpdatedEvent) String

func (*BookingCustomAttributeDefinitionVisibleUpdatedEvent) UnmarshalJSON

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 BookingCustomAttributeOwnedDeletedEvent

type BookingCustomAttributeOwnedDeletedEvent struct {
	// The ID of the seller associated with the event that triggered the event notification.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The type of this event. The value is `"booking.custom_attribute.owned.deleted"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// A unique ID for the event notification.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// The timestamp that indicates when the event notification was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The data associated with the event that triggered the event notification.
	Data *CustomAttributeEventData `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

Published when a booking [custom attribute](entity:CustomAttribute) associated with a [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the subscribing application is deleted. Subscribe to this event to be notified when your application deletes a booking custom attribute.

func (*BookingCustomAttributeOwnedDeletedEvent) GetCreatedAt

func (*BookingCustomAttributeOwnedDeletedEvent) GetData

func (*BookingCustomAttributeOwnedDeletedEvent) GetEventID

func (*BookingCustomAttributeOwnedDeletedEvent) GetExtraProperties

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

func (*BookingCustomAttributeOwnedDeletedEvent) GetMerchantID

func (b *BookingCustomAttributeOwnedDeletedEvent) GetMerchantID() *string

func (*BookingCustomAttributeOwnedDeletedEvent) GetType

func (*BookingCustomAttributeOwnedDeletedEvent) String

func (*BookingCustomAttributeOwnedDeletedEvent) UnmarshalJSON

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

type BookingCustomAttributeOwnedUpdatedEvent

type BookingCustomAttributeOwnedUpdatedEvent struct {
	// The ID of the seller associated with the event that triggered the event notification.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The type of this event. The value is `"booking.custom_attribute.owned.updated"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// A unique ID for the event notification.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// The timestamp that indicates when the event notification was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The data associated with the event that triggered the event notification.
	Data *CustomAttributeEventData `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

Published when a booking [custom attribute](entity:CustomAttribute) is updated by the subscribing application. Subscribe to this event to be notified when your application updates a booking custom attribute.

func (*BookingCustomAttributeOwnedUpdatedEvent) GetCreatedAt

func (*BookingCustomAttributeOwnedUpdatedEvent) GetData

func (*BookingCustomAttributeOwnedUpdatedEvent) GetEventID

func (*BookingCustomAttributeOwnedUpdatedEvent) GetExtraProperties

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

func (*BookingCustomAttributeOwnedUpdatedEvent) GetMerchantID

func (b *BookingCustomAttributeOwnedUpdatedEvent) GetMerchantID() *string

func (*BookingCustomAttributeOwnedUpdatedEvent) GetType

func (*BookingCustomAttributeOwnedUpdatedEvent) String

func (*BookingCustomAttributeOwnedUpdatedEvent) UnmarshalJSON

func (b *BookingCustomAttributeOwnedUpdatedEvent) 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" url:"custom_attribute"`
	// 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 BookingCustomAttributeVisibleDeletedEvent

type BookingCustomAttributeVisibleDeletedEvent struct {
	// The ID of the seller associated with the event that triggered the event notification.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The type of this event. The value is `"booking.custom_attribute.visible.deleted"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// A unique ID for the event notification.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// The timestamp that indicates when the event notification was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The data associated with the event that triggered the event notification.
	Data *CustomAttributeEventData `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

Published when a booking [custom attribute](entity:CustomAttribute) with the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is deleted. An application that subscribes to this event is notified when a booking custom attribute is deleted by any application for which the subscribing application has read access to the booking custom attribute.

func (*BookingCustomAttributeVisibleDeletedEvent) GetCreatedAt

func (*BookingCustomAttributeVisibleDeletedEvent) GetData

func (*BookingCustomAttributeVisibleDeletedEvent) GetEventID

func (*BookingCustomAttributeVisibleDeletedEvent) GetExtraProperties

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

func (*BookingCustomAttributeVisibleDeletedEvent) GetMerchantID

func (*BookingCustomAttributeVisibleDeletedEvent) GetType

func (*BookingCustomAttributeVisibleDeletedEvent) String

func (*BookingCustomAttributeVisibleDeletedEvent) UnmarshalJSON

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

type BookingCustomAttributeVisibleUpdatedEvent

type BookingCustomAttributeVisibleUpdatedEvent struct {
	// The ID of the seller associated with the event that triggered the event notification.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The type of this event. The value is `"booking.custom_attribute.visible.updated"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// A unique ID for the event notification.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// The timestamp that indicates when the event notification was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The data associated with the event that triggered the event notification.
	Data *CustomAttributeEventData `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

Published when a booking [custom attribute](entity:CustomAttribute) with the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is updated. An application that subscribes to this event is notified when a booking custom attribute is updated by any application for which the subscribing application has read access to the booking custom attribute.

func (*BookingCustomAttributeVisibleUpdatedEvent) GetCreatedAt

func (*BookingCustomAttributeVisibleUpdatedEvent) GetData

func (*BookingCustomAttributeVisibleUpdatedEvent) GetEventID

func (*BookingCustomAttributeVisibleUpdatedEvent) GetExtraProperties

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

func (*BookingCustomAttributeVisibleUpdatedEvent) GetMerchantID

func (*BookingCustomAttributeVisibleUpdatedEvent) GetType

func (*BookingCustomAttributeVisibleUpdatedEvent) String

func (*BookingCustomAttributeVisibleUpdatedEvent) UnmarshalJSON

func (b *BookingCustomAttributeVisibleUpdatedEvent) 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 BookingUpdatedEvent

type BookingUpdatedEvent struct {
	// The ID of the target seller associated with the event.
	MerchantID *string `json:"merchant_id,omitempty" url:"merchant_id,omitempty"`
	// The type of this event. The value is `"booking.updated"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// A unique ID for the event.
	EventID *string `json:"event_id,omitempty" url:"event_id,omitempty"`
	// The timestamp of when the event was created, in RFC 3339 format.
	CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The data associated with the event.
	Data *BookingUpdatedEventData `json:"data,omitempty" url:"data,omitempty"`
	// contains filtered or unexported fields
}

Published when a booking is updated or cancelled.

To receive this event with buyer-level permissions, you must have `APPOINTMENTS_READ` set for the OAuth scope. To receive this event with seller-level permissions, you must have `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` set for the OAuth scope.

func (*BookingUpdatedEvent) GetCreatedAt

func (b *BookingUpdatedEvent) GetCreatedAt() *string

func (*BookingUpdatedEvent) GetData

func (*BookingUpdatedEvent) GetEventID

func (b *BookingUpdatedEvent) GetEventID() *string

func (*BookingUpdatedEvent) GetExtraProperties

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

func (*BookingUpdatedEvent) GetMerchantID

func (b *BookingUpdatedEvent) GetMerchantID() *string

func (*BookingUpdatedEvent) GetType

func (b *BookingUpdatedEvent) GetType() *string

func (*BookingUpdatedEvent) String

func (b *BookingUpdatedEvent) String() string

func (*BookingUpdatedEvent) UnmarshalJSON

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

type BookingUpdatedEventData

type BookingUpdatedEventData struct {
	// The type of the event data object. The value is `"booking"`.
	Type *string `json:"type,omitempty" url:"type,omitempty"`
	// The ID of the event data object.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// An object containing the updated booking.
	Object *BookingUpdatedEventObject `json:"object,omitempty" url:"object,omitempty"`
	// contains filtered or unexported fields
}

func (*BookingUpdatedEventData) GetExtraProperties

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

func (*BookingUpdatedEventData) GetID

func (b *BookingUpdatedEventData) GetID() *string

func (*BookingUpdatedEventData) GetObject

func (*BookingUpdatedEventData) GetType

func (b *BookingUpdatedEventData) GetType() *string

func (*BookingUpdatedEventData) String

func (b *BookingUpdatedEventData) String() string

func (*BookingUpdatedEventData) UnmarshalJSON

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

type BookingUpdatedEventObject

type BookingUpdatedEventObject struct {
	// The updated booking.
	Booking *Booking `json:"booking,omitempty" url:"booking,omitempty"`
	// contains filtered or unexported fields
}

func (*BookingUpdatedEventObject) GetBooking

func (b *BookingUpdatedEventObject) GetBooking() *Booking

func (*BookingUpdatedEventObject) GetExtraProperties

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

func (*BookingUpdatedEventObject) String

func (b *BookingUpdatedEventObject) String() string

func (*BookingUpdatedEventObject) UnmarshalJSON

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

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" url:"values"`
	// 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" url:"values"`
	// 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" url:"values"`
	// 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

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

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

func (*BulkPublishScheduledShiftsData) GetVersion

func (b *BulkPublishScheduledShiftsData) GetVersion() *int

func (*BulkPublishScheduledShiftsData) String

func (*BulkPublishScheduledShiftsData) UnmarshalJSON

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

type BulkPublishScheduledShiftsRequest

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

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

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

func (*BulkPublishScheduledShiftsResponse) GetExtraProperties

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

func (*BulkPublishScheduledShiftsResponse) GetResponses

func (*BulkPublishScheduledShiftsResponse) String

func (*BulkPublishScheduledShiftsResponse) UnmarshalJSON

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 BulkRetrieveChannelsRequest added in v2.2.0

type BulkRetrieveChannelsRequest struct {
	ChannelIDs []string `json:"channel_ids,omitempty" url:"-"`
}

type BulkRetrieveChannelsRequestConstants added in v2.2.0

type BulkRetrieveChannelsRequestConstants = string

type BulkRetrieveChannelsResponse added in v2.2.0

type BulkRetrieveChannelsResponse struct {
	// Information about errors encountered during the request.
	Errors []*Error `json:"errors,omitempty" url:"errors,omitempty"`
	// A map of channel IDs to channel responses which tell whether
	// retrieval for a specific channel is success or not.
	// Channel response of a success retrieval would contain channel info
	// whereas channel response of a failed retrieval would have error info.
	Responses map[string]*RetrieveChannelResponse `json:"responses,omitempty" url:"responses,omitempty"`
	// contains filtered or unexported fields
}

Defines the fields that are included in the request body for the [BulkRetrieveChannels](api-endpoint:Channels-BulkRetrieveChannels) endpoint.

func (*BulkRetrieveChannelsResponse) GetErrors added in v2.2.0

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

func (*BulkRetrieveChannelsResponse) GetExtraProperties added in v2.2.0

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

func (*BulkRetrieveChannelsResponse) GetResponses added in v2.2.0

func (*BulkRetrieveChannelsResponse) String added in v2.2.0

func (*BulkRetrieveChannelsResponse) UnmarshalJSON added in v2.2.0

func (b *BulkRetrieveChannelsResponse) 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" url:"custom_attribute"`
	// 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" url:"custom_attribute"`
	// 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" url:"custom_attribute"`
	// 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" url:"values"`
	// 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