Documentation
¶
Index ¶
- type Client
- func (c *Client) Delete(ctx context.Context, request *squaregosdk.DeleteSnippetsRequest, ...) (*squaregosdk.DeleteSnippetResponse, error)
- func (c *Client) Get(ctx context.Context, request *squaregosdk.GetSnippetsRequest, ...) (*squaregosdk.GetSnippetResponse, error)
- func (c *Client) Upsert(ctx context.Context, request *squaregosdk.UpsertSnippetRequest, ...) (*squaregosdk.UpsertSnippetResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(opts ...option.RequestOption) *Client
func (*Client) Delete ¶
func (c *Client) Delete( ctx context.Context, request *squaregosdk.DeleteSnippetsRequest, opts ...option.RequestOption, ) (*squaregosdk.DeleteSnippetResponse, error)
Removes your snippet from a Square Online site.
You can call [ListSites](api-endpoint:Sites-ListSites) to get the IDs of the sites that belong to a seller.
__Note:__ Square Online APIs are publicly available as part of an early access program. For more information, see [Early access program for Square Online APIs](https://developer.squareup.com/docs/online-api#early-access-program-for-square-online-apis).
func (*Client) Get ¶
func (c *Client) Get( ctx context.Context, request *squaregosdk.GetSnippetsRequest, opts ...option.RequestOption, ) (*squaregosdk.GetSnippetResponse, error)
Retrieves your snippet from a Square Online site. A site can contain snippets from multiple snippet applications, but you can retrieve only the snippet that was added by your application.
You can call [ListSites](api-endpoint:Sites-ListSites) to get the IDs of the sites that belong to a seller.
__Note:__ Square Online APIs are publicly available as part of an early access program. For more information, see [Early access program for Square Online APIs](https://developer.squareup.com/docs/online-api#early-access-program-for-square-online-apis).
func (*Client) Upsert ¶
func (c *Client) Upsert( ctx context.Context, request *squaregosdk.UpsertSnippetRequest, opts ...option.RequestOption, ) (*squaregosdk.UpsertSnippetResponse, error)
Adds a snippet to a Square Online site or updates the existing snippet on the site. The snippet code is appended to the end of the `head` element on every page of the site, except checkout pages. A snippet application can add one snippet to a given site.
You can call [ListSites](api-endpoint:Sites-ListSites) to get the IDs of the sites that belong to a seller.
__Note:__ Square Online APIs are publicly available as part of an early access program. For more information, see [Early access program for Square Online APIs](https://developer.squareup.com/docs/online-api#early-access-program-for-square-online-apis).