merchants

package
v1.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BulkDeleteMerchantCustomAttributesRequest

type BulkDeleteMerchantCustomAttributesRequest struct {
	// The data used to update the `CustomAttribute` objects.
	// The keys must be unique and are used to map to the corresponding response.
	Values map[string]*squaregosdk.BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest `json:"values,omitempty" url:"-"`
}

type BulkUpsertMerchantCustomAttributesRequest

type BulkUpsertMerchantCustomAttributesRequest struct {
	// A map containing 1 to 25 individual upsert requests. For each request, provide an
	// arbitrary ID that is unique for this `BulkUpsertMerchantCustomAttributes` request and the
	// information needed to create or update a custom attribute.
	Values map[string]*squaregosdk.BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest `json:"values,omitempty" url:"-"`
}

type CreateMerchantCustomAttributeDefinitionRequest

type CreateMerchantCustomAttributeDefinitionRequest struct {
	// The custom attribute definition to create. Note the following:
	// - With the exception of the `Selection` data type, the `schema` is specified as a simple URL to the JSON schema
	// definition hosted on the Square CDN. For more information, including supported values and constraints, see
	// [Supported data types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types).
	// - `name` is required unless `visibility` is set to `VISIBILITY_HIDDEN`.
	CustomAttributeDefinition *squaregosdk.CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"-"`
	// 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:"-"`
}

type CustomAttributeDefinitionsDeleteRequest

type CustomAttributeDefinitionsDeleteRequest = DeleteCustomAttributeDefinitionsRequest

CustomAttributeDefinitionsDeleteRequest is an alias for DeleteCustomAttributeDefinitionsRequest.

type CustomAttributeDefinitionsGetRequest

type CustomAttributeDefinitionsGetRequest = GetCustomAttributeDefinitionsRequest

CustomAttributeDefinitionsGetRequest is an alias for GetCustomAttributeDefinitionsRequest.

type CustomAttributeDefinitionsListRequest added in v1.1.0

type CustomAttributeDefinitionsListRequest = ListCustomAttributeDefinitionsRequest

CustomAttributeDefinitionsListRequest is an alias for ListCustomAttributeDefinitionsRequest.

type CustomAttributesDeleteRequest

type CustomAttributesDeleteRequest = DeleteCustomAttributesRequest

CustomAttributesDeleteRequest is an alias for DeleteCustomAttributesRequest.

type CustomAttributesGetRequest

type CustomAttributesGetRequest = GetCustomAttributesRequest

CustomAttributesGetRequest is an alias for GetCustomAttributesRequest.

type CustomAttributesListRequest

type CustomAttributesListRequest = ListCustomAttributesRequest

CustomAttributesListRequest is an alias for ListCustomAttributesRequest.

type DeleteCustomAttributeDefinitionsRequest added in v1.2.0

type DeleteCustomAttributeDefinitionsRequest struct {
	// The key of the custom attribute definition to delete.
	Key string `json:"-" url:"-"`
}

type DeleteCustomAttributesRequest added in v1.2.0

type DeleteCustomAttributesRequest struct {
	// The ID of the target [merchant](entity:Merchant).
	MerchantID string `json:"-" url:"-"`
	// 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:"-" url:"-"`
}

type GetCustomAttributeDefinitionsRequest added in v1.2.0

type GetCustomAttributeDefinitionsRequest struct {
	// The key of the custom attribute definition to retrieve. If the requesting application
	// is not the definition owner, you must use the qualified key.
	Key string `json:"-" url:"-"`
	// The current version of the custom attribute definition, which is used for strongly consistent
	// reads to guarantee that you receive the most up-to-date data. When included in the request,
	// Square returns the specified version or a higher version if one exists. If the specified version
	// is higher than the current version, Square returns a `BAD_REQUEST` error.
	Version *int `json:"-" url:"version,omitempty"`
}

type GetCustomAttributesRequest added in v1.2.0

type GetCustomAttributesRequest struct {
	// The ID of the target [merchant](entity:Merchant).
	MerchantID string `json:"-" url:"-"`
	// The key of the custom attribute to retrieve. 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:"-" url:"-"`
	// Indicates whether to return the [custom attribute definition](entity:CustomAttributeDefinition) in the `definition` field of
	// the custom attribute. Set this parameter to `true` to get the name and description of the custom
	// attribute, information about the data type, or other definition details. The default value is `false`.
	WithDefinition *bool `json:"-" url:"with_definition,omitempty"`
	// The current version of the custom attribute, which is used for strongly consistent reads to
	// guarantee that you receive the most up-to-date data. When included in the request, Square
	// returns the specified version or a higher version if one exists. If the specified version is
	// higher than the current version, Square returns a `BAD_REQUEST` error.
	Version *int `json:"-" url:"version,omitempty"`
}

type ListCustomAttributeDefinitionsRequest added in v1.2.0

type ListCustomAttributeDefinitionsRequest struct {
	// Filters the `CustomAttributeDefinition` results by their `visibility` values.
	VisibilityFilter *squaregosdk.VisibilityFilter `json:"-" url:"visibility_filter,omitempty"`
	// The maximum number of results to return in a single paged response. This limit is advisory.
	// The response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.
	// The default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Limit *int `json:"-" url:"limit,omitempty"`
	// The cursor returned in the paged response from the previous call to this endpoint.
	// Provide this cursor to retrieve the next page of results for your original request.
	// For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"-" url:"cursor,omitempty"`
}

type ListCustomAttributesRequest added in v1.2.0

type ListCustomAttributesRequest struct {
	// The ID of the target [merchant](entity:Merchant).
	MerchantID string `json:"-" url:"-"`
	// Filters the `CustomAttributeDefinition` results by their `visibility` values.
	VisibilityFilter *squaregosdk.VisibilityFilter `json:"-" url:"visibility_filter,omitempty"`
	// The maximum number of results to return in a single paged response. This limit is advisory.
	// The response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.
	// The default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Limit *int `json:"-" url:"limit,omitempty"`
	// The cursor returned in the paged response from the previous call to this endpoint.
	// Provide this cursor to retrieve the next page of results for your original request. For more
	// information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
	Cursor *string `json:"-" url:"cursor,omitempty"`
	// Indicates whether to return the [custom attribute definition](entity:CustomAttributeDefinition) in the `definition` field of each
	// custom attribute. Set this parameter to `true` to get the name and description of each custom
	// attribute, information about the data type, or other definition details. The default value is `false`.
	WithDefinitions *bool `json:"-" url:"with_definitions,omitempty"`
}

type UpdateMerchantCustomAttributeDefinitionRequest

type UpdateMerchantCustomAttributeDefinitionRequest struct {
	// The key of the custom attribute definition to update.
	Key string `json:"-" url:"-"`
	// The custom attribute definition that contains the fields to update. This endpoint
	// supports sparse updates, so only new or changed fields need to be included in the request.
	// Only the following fields can be updated:
	// - `name`
	// - `description`
	// - `visibility`
	// - `schema` for a `Selection` data type. Only changes to the named options or the maximum number of allowed
	// selections are supported.
	// For more information, see
	// [Update a merchant custom attribute definition](https://developer.squareup.com/docs/merchant-custom-attributes-api/custom-attribute-definitions#update-custom-attribute-definition).
	// 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.
	CustomAttributeDefinition *squaregosdk.CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"-"`
	// 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:"-"`
}

type UpsertMerchantCustomAttributeRequest

type UpsertMerchantCustomAttributeRequest struct {
	// The ID of the target [merchant](entity:Merchant).
	MerchantID string `json:"-" url:"-"`
	// The key of the custom attribute to create or update. 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:"-" url:"-"`
	// 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 [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 *squaregosdk.CustomAttribute `json:"custom_attribute,omitempty" url:"-"`
	// 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:"-"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL