Skip to content

Commit

Permalink
Release v0.0.130
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Nov 6, 2024
1 parent 64b5cfd commit 4ad5429
Show file tree
Hide file tree
Showing 110 changed files with 41,140 additions and 24,357 deletions.
7 changes: 3 additions & 4 deletions applepay/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ package applepay

import (
context "context"
squaregosdk "github.com/square/square-go-sdk"
core "github.com/square/square-go-sdk/core"
option "github.com/square/square-go-sdk/option"
http "net/http"
os "os"

squaregosdk "github.com/fern-demo/square-go-sdk"
core "github.com/fern-demo/square-go-sdk/core"
option "github.com/fern-demo/square-go-sdk/option"
)

type Client struct {
Expand Down
13 changes: 6 additions & 7 deletions bankaccounts/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ package bankaccounts
import (
context "context"
fmt "fmt"
squaregosdk "github.com/square/square-go-sdk"
core "github.com/square/square-go-sdk/core"
option "github.com/square/square-go-sdk/option"
http "net/http"
os "os"

squaregosdk "github.com/fern-demo/square-go-sdk"
core "github.com/fern-demo/square-go-sdk/core"
option "github.com/fern-demo/square-go-sdk/option"
)

type Client struct {
Expand Down Expand Up @@ -39,7 +38,7 @@ func NewClient(opts ...option.RequestOption) *Client {
}
}

// Returns a list of [BankAccount]($m/BankAccount) objects linked to a Square account.
// Returns a list of [BankAccount](entity:BankAccount) objects linked to a Square account.
func (c *Client) List(
ctx context.Context,
request *squaregosdk.BankAccountsListRequest,
Expand Down Expand Up @@ -98,7 +97,7 @@ func (c *Client) List(
return pager.GetPage(ctx, request.Cursor)
}

// Returns details of a [BankAccount]($m/BankAccount) identified by V1 bank account ID.
// Returns details of a [BankAccount](entity:BankAccount) identified by V1 bank account ID.
func (c *Client) GetByV1ID(
ctx context.Context,
// Connect V1 ID of the desired `BankAccount`. For more information, see
Expand Down Expand Up @@ -138,7 +137,7 @@ func (c *Client) GetByV1ID(
return response, nil
}

// Returns details of a [BankAccount]($m/BankAccount)
// Returns details of a [BankAccount](entity:BankAccount)
// linked to a Square account.
func (c *Client) Get(
ctx context.Context,
Expand Down
7 changes: 3 additions & 4 deletions bookingcustomattributes/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ package bookingcustomattributes

import (
context "context"
squaregosdk "github.com/square/square-go-sdk"
core "github.com/square/square-go-sdk/core"
option "github.com/square/square-go-sdk/option"
http "net/http"
os "os"

squaregosdk "github.com/fern-demo/square-go-sdk"
core "github.com/fern-demo/square-go-sdk/core"
option "github.com/fern-demo/square-go-sdk/option"
)

type Client struct {
Expand Down
9 changes: 4 additions & 5 deletions bookings/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ package client
import (
context "context"
fmt "fmt"
squaregosdk "github.com/square/square-go-sdk"
teammemberprofiles "github.com/square/square-go-sdk/bookings/teammemberprofiles"
core "github.com/square/square-go-sdk/core"
option "github.com/square/square-go-sdk/option"
http "net/http"
os "os"

squaregosdk "github.com/fern-demo/square-go-sdk"
teammemberprofiles "github.com/fern-demo/square-go-sdk/bookings/teammemberprofiles"
core "github.com/fern-demo/square-go-sdk/core"
option "github.com/fern-demo/square-go-sdk/option"
)

type Client struct {
Expand Down
9 changes: 4 additions & 5 deletions bookings/teammemberprofiles/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ package teammemberprofiles
import (
context "context"
fmt "fmt"
squaregosdk "github.com/square/square-go-sdk"
bookings "github.com/square/square-go-sdk/bookings"
core "github.com/square/square-go-sdk/core"
option "github.com/square/square-go-sdk/option"
http "net/http"
os "os"

squaregosdk "github.com/fern-demo/square-go-sdk"
bookings "github.com/fern-demo/square-go-sdk/bookings"
core "github.com/fern-demo/square-go-sdk/core"
option "github.com/fern-demo/square-go-sdk/option"
)

type Client struct {
Expand Down
3 changes: 3 additions & 0 deletions cards.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ type CreateCardRequest struct {
Card *Card `json:"card,omitempty" url:"-"`
}

type DisableCardRequest struct {
}

type CardsListRequest struct {
// A pagination cursor returned by a previous call to this endpoint.
// Provide this to retrieve the next set of results for your original query.
Expand Down
9 changes: 5 additions & 4 deletions cards/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ package cards
import (
context "context"
fmt "fmt"
squaregosdk "github.com/square/square-go-sdk"
core "github.com/square/square-go-sdk/core"
option "github.com/square/square-go-sdk/option"
http "net/http"
os "os"

squaregosdk "github.com/fern-demo/square-go-sdk"
core "github.com/fern-demo/square-go-sdk/core"
option "github.com/fern-demo/square-go-sdk/option"
)

type Client struct {
Expand Down Expand Up @@ -183,6 +182,7 @@ func (c *Client) Disable(
ctx context.Context,
// Unique ID for the desired Card.
cardID string,
request *squaregosdk.DisableCardRequest,
opts ...option.RequestOption,
) (*squaregosdk.DisableCardResponse, error) {
options := core.NewRequestOptions(opts...)
Expand All @@ -209,6 +209,7 @@ func (c *Client) Disable(
BodyProperties: options.BodyProperties,
QueryParameters: options.QueryParameters,
Client: options.HTTPClient,
Request: request,
Response: &response,
},
); err != nil {
Expand Down
7 changes: 3 additions & 4 deletions cashdrawers/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
package client

import (
shifts "github.com/square/square-go-sdk/cashdrawers/shifts"
core "github.com/square/square-go-sdk/core"
option "github.com/square/square-go-sdk/option"
http "net/http"
os "os"

shifts "github.com/fern-demo/square-go-sdk/cashdrawers/shifts"
core "github.com/fern-demo/square-go-sdk/core"
option "github.com/fern-demo/square-go-sdk/option"
)

type Client struct {
Expand Down
2 changes: 1 addition & 1 deletion cashdrawers/shifts.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package cashdrawers

import (
squaregosdk "github.com/fern-demo/square-go-sdk"
squaregosdk "github.com/square/square-go-sdk"
)

type ShiftsGetRequest struct {
Expand Down
15 changes: 7 additions & 8 deletions cashdrawers/shifts/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ package shifts
import (
context "context"
fmt "fmt"
squaregosdk "github.com/square/square-go-sdk"
cashdrawers "github.com/square/square-go-sdk/cashdrawers"
core "github.com/square/square-go-sdk/core"
option "github.com/square/square-go-sdk/option"
http "net/http"
os "os"

squaregosdk "github.com/fern-demo/square-go-sdk"
cashdrawers "github.com/fern-demo/square-go-sdk/cashdrawers"
core "github.com/fern-demo/square-go-sdk/core"
option "github.com/fern-demo/square-go-sdk/option"
)

type Client struct {
Expand Down Expand Up @@ -86,7 +85,7 @@ func (c *Client) List(
}
readPageResponse := func(response *squaregosdk.ListCashDrawerShiftsResponse) *core.PageResponse[*string, *squaregosdk.CashDrawerShiftSummary] {
next := response.Cursor
results := response.CashDrawerShifts
results := response.Items
return &core.PageResponse[*string, *squaregosdk.CashDrawerShiftSummary]{
Next: next,
Results: results,
Expand All @@ -101,7 +100,7 @@ func (c *Client) List(
}

// Provides the summary details for a single cash drawer shift. See
// [ListCashDrawerShiftEvents]($e/CashDrawers/ListCashDrawerShiftEvents) for a list of cash drawer shift events.
// [ListCashDrawerShiftEvents](api-endpoint:CashDrawers-ListCashDrawerShiftEvents) for a list of cash drawer shift events.
func (c *Client) Get(
ctx context.Context,
// The shift ID.
Expand Down Expand Up @@ -196,7 +195,7 @@ func (c *Client) ListEvents(
}
readPageResponse := func(response *squaregosdk.ListCashDrawerShiftEventsResponse) *core.PageResponse[*string, *squaregosdk.CashDrawerShiftEvent] {
next := response.Cursor
results := response.CashDrawerShiftEvents
results := response.Events
return &core.PageResponse[*string, *squaregosdk.CashDrawerShiftEvent]{
Next: next,
Results: results,
Expand Down
4 changes: 2 additions & 2 deletions catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ type BatchGetCatalogObjectsRequest struct {
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]($m/CatalogObject)s' `version` attribute. If not included, results will
// 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`.
Expand Down Expand Up @@ -150,7 +150,7 @@ type CatalogListRequest struct {
Types *string `json:"-" url:"types,omitempty"`
// The specific version of the catalog objects to be included in the response.
// This allows you to retrieve historical versions of objects. The specified version value is matched against
// the [CatalogObject]($m/CatalogObject)s' `version` attribute. If not included, results will be from the
// the [CatalogObject](entity:CatalogObject)s' `version` attribute. If not included, results will be from the
// current version of the catalog.
CatalogVersion *int64 `json:"-" url:"catalog_version,omitempty"`
}
Expand Down
43 changes: 21 additions & 22 deletions catalog/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ package client
import (
context "context"
fmt "fmt"
squaregosdk "github.com/square/square-go-sdk"
images "github.com/square/square-go-sdk/catalog/images"
object "github.com/square/square-go-sdk/catalog/object"
core "github.com/square/square-go-sdk/core"
option "github.com/square/square-go-sdk/option"
http "net/http"
os "os"

squaregosdk "github.com/fern-demo/square-go-sdk"
images "github.com/fern-demo/square-go-sdk/catalog/images"
object "github.com/fern-demo/square-go-sdk/catalog/object"
core "github.com/fern-demo/square-go-sdk/core"
option "github.com/fern-demo/square-go-sdk/option"
)

type Client struct {
Expand Down Expand Up @@ -46,11 +45,11 @@ func NewClient(opts ...option.RequestOption) *Client {
}
}

// Deletes a set of [CatalogItem]($m/CatalogItem)s based on the
// Deletes a set of [CatalogItem](entity:CatalogItem)s based on the
// provided list of target IDs and returns a set of successfully deleted IDs in
// the response. Deletion is a cascading event such that all children of the
// targeted object are also deleted. For example, deleting a CatalogItem will
// also delete all of its [CatalogItemVariation]($m/CatalogItemVariation)
// also delete all of its [CatalogItemVariation](entity:CatalogItemVariation)
// children.
//
// `BatchDeleteCatalogObjects` succeeds even if only a portion of the targeted
Expand Down Expand Up @@ -99,11 +98,11 @@ func (c *Client) BatchDelete(
}

// Returns a set of objects based on the provided ID.
// Each [CatalogItem]($m/CatalogItem) returned in the set includes all of its
// Each [CatalogItem](entity:CatalogItem) returned in the set includes all of its
// child information including: all of its
// [CatalogItemVariation]($m/CatalogItemVariation) objects, references to
// its [CatalogModifierList]($m/CatalogModifierList) objects, and the ids of
// any [CatalogTax]($m/CatalogTax) objects that apply to it.
// [CatalogItemVariation](entity:CatalogItemVariation) objects, references to
// its [CatalogModifierList](entity:CatalogModifierList) objects, and the ids of
// any [CatalogTax](entity:CatalogTax) objects that apply to it.
func (c *Client) BatchGet(
ctx context.Context,
request *squaregosdk.BatchGetCatalogObjectsRequest,
Expand Down Expand Up @@ -231,13 +230,13 @@ func (c *Client) Info(
return response, nil
}

// Returns a list of all [CatalogObject]($m/CatalogObject)s of the specified types in the catalog.
// Returns a list of all [CatalogObject](entity:CatalogObject)s of the specified types in the catalog.
//
// The `types` parameter is specified as a comma-separated list of the [CatalogObjectType]($m/CatalogObjectType) values,
// The `types` parameter is specified as a comma-separated list of the [CatalogObjectType](entity:CatalogObjectType) values,
// for example, "`ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`, `IMAGE`".
//
// **Important:** ListCatalog does not return deleted catalog items. To retrieve
// deleted catalog items, use [SearchCatalogObjects]($e/Catalog/SearchCatalogObjects)
// deleted catalog items, use [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects)
// and set the `include_deleted_objects` attribute value to `true`.
func (c *Client) List(
ctx context.Context,
Expand Down Expand Up @@ -297,10 +296,10 @@ func (c *Client) List(
return pager.GetPage(ctx, request.Cursor)
}

// Searches for [CatalogObject]($m/CatalogObject) of any type by matching supported search attribute values,
// Searches for [CatalogObject](entity:CatalogObject) of any type by matching supported search attribute values,
// excluding custom attribute values on items or item variations, against one or more of the specified query filters.
//
// This (`SearchCatalogObjects`) endpoint differs from the [SearchCatalogItems]($e/Catalog/SearchCatalogItems)
// This (`SearchCatalogObjects`) endpoint differs from the [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems)
// endpoint in the following aspects:
//
// - `SearchCatalogItems` can only search for items or item variations, whereas `SearchCatalogObjects` can search for any type of catalog objects.
Expand Down Expand Up @@ -348,7 +347,7 @@ func (c *Client) Search(
// Searches for catalog items or item variations by matching supported search attribute values, including
// custom attribute values, against one or more of the specified query filters.
//
// This (`SearchCatalogItems`) endpoint differs from the [SearchCatalogObjects]($e/Catalog/SearchCatalogObjects)
// This (`SearchCatalogItems`) endpoint differs from the [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects)
// endpoint in the following aspects:
//
// - `SearchCatalogItems` can only search for items or item variations, whereas `SearchCatalogObjects` can search for any type of catalog objects.
Expand Down Expand Up @@ -393,8 +392,8 @@ func (c *Client) SearchItems(
return response, nil
}

// Updates the [CatalogModifierList]($m/CatalogModifierList) objects
// that apply to the targeted [CatalogItem]($m/CatalogItem) without having
// Updates the [CatalogModifierList](entity:CatalogModifierList) objects
// that apply to the targeted [CatalogItem](entity:CatalogItem) without having
// to perform an upsert on the entire item.
func (c *Client) UpdateItemModifierLists(
ctx context.Context,
Expand Down Expand Up @@ -434,8 +433,8 @@ func (c *Client) UpdateItemModifierLists(
return response, nil
}

// Updates the [CatalogTax]($m/CatalogTax) objects that apply to the
// targeted [CatalogItem]($m/CatalogItem) without having to perform an
// Updates the [CatalogTax](entity:CatalogTax) objects that apply to the
// targeted [CatalogItem](entity:CatalogItem) without having to perform an
// upsert on the entire item.
func (c *Client) UpdateItemTaxes(
ctx context.Context,
Expand Down
2 changes: 1 addition & 1 deletion catalog/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package catalog

import (
squaregosdk "github.com/fern-demo/square-go-sdk"
squaregosdk "github.com/square/square-go-sdk"
)

type ImagesCreateRequest struct {
Expand Down
Loading

0 comments on commit 4ad5429

Please sign in to comment.