Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌿 Fern Regeneration -- December 6, 2024 #9

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions apple_pay.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type RegisterDomainRequest struct {
}

// Defines the fields that are included in the response body of
// a request to the [RegisterDomain](api-endpoint:ApplePay-RegisterDomain) endpoint.
// a request to the [RegisterDomain]($e/ApplePay/RegisterDomain) endpoint.
//
// Either `errors` or `status` are present in a given response (never both).
type RegisterDomainResponse struct {
Expand Down Expand Up @@ -82,7 +82,6 @@ type RegisterDomainResponseStatus string
const (
RegisterDomainResponseStatusPending RegisterDomainResponseStatus = "PENDING"
RegisterDomainResponseStatusVerified RegisterDomainResponseStatus = "VERIFIED"
RegisterDomainResponseStatusDoNotUse RegisterDomainResponseStatus = "DO_NOT_USE"
)

func NewRegisterDomainResponseStatusFromString(s string) (RegisterDomainResponseStatus, error) {
Expand All @@ -91,8 +90,6 @@ func NewRegisterDomainResponseStatusFromString(s string) (RegisterDomainResponse
return RegisterDomainResponseStatusPending, nil
case "VERIFIED":
return RegisterDomainResponseStatusVerified, nil
case "DO_NOT_USE":
return RegisterDomainResponseStatusDoNotUse, nil
}
var t RegisterDomainResponseStatus
return "", fmt.Errorf("%s is not a valid %T", s, t)
Expand Down
3 changes: 0 additions & 3 deletions bank_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ func (b BankAccountStatus) Ptr() *BankAccountStatus {
type BankAccountType string

const (
BankAccountTypeUnknown BankAccountType = "UNKNOWN"
BankAccountTypeChecking BankAccountType = "CHECKING"
BankAccountTypeSavings BankAccountType = "SAVINGS"
BankAccountTypeInvestment BankAccountType = "INVESTMENT"
Expand All @@ -284,8 +283,6 @@ const (

func NewBankAccountTypeFromString(s string) (BankAccountType, error) {
switch s {
case "UNKNOWN":
return BankAccountTypeUnknown, nil
case "CHECKING":
return BankAccountTypeChecking, nil
case "SAVINGS":
Expand Down
6 changes: 3 additions & 3 deletions bankaccounts/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func NewClient(opts ...option.RequestOption) *Client {
}
}

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

// Returns details of a [BankAccount](entity:BankAccount) identified by V1 bank account ID.
// Returns details of a [BankAccount]($m/BankAccount) identified by V1 bank account ID.
func (c *Client) GetByV1ID(
ctx context.Context,
request *squaregosdk.BankAccountsGetByV1IDRequest,
Expand Down Expand Up @@ -136,7 +136,7 @@ func (c *Client) GetByV1ID(
return response, nil
}

// Returns details of a [BankAccount](entity:BankAccount)
// Returns details of a [BankAccount]($m/BankAccount)
// linked to a Square account.
func (c *Client) Get(
ctx context.Context,
Expand Down
26 changes: 13 additions & 13 deletions booking_custom_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ type UpsertBookingCustomAttributeRequest struct {
IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"`
}

// Represents an individual delete request in a [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes)
// Represents an individual delete request in a [BulkDeleteBookingCustomAttributes]($e/BookingCustomAttributes/BulkDeleteBookingCustomAttributes)
// request. An individual request contains a booking ID, the custom attribute to delete, and an optional idempotency key.
type BookingCustomAttributeDeleteRequest struct {
// The ID of the target [booking](entity:Booking).
Expand Down Expand Up @@ -189,7 +189,7 @@ func (b *BookingCustomAttributeDeleteRequest) String() string {
return fmt.Sprintf("%#v", b)
}

// Represents a response for an individual upsert request in a [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes) operation.
// Represents a response for an individual upsert request in a [BulkDeleteBookingCustomAttributes]($e/BookingCustomAttributes/BulkDeleteBookingCustomAttributes) operation.
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"`
Expand Down Expand Up @@ -246,7 +246,7 @@ func (b *BookingCustomAttributeDeleteResponse) String() string {
return fmt.Sprintf("%#v", b)
}

// Represents an individual upsert request in a [BulkUpsertBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkUpsertBookingCustomAttributes)
// Represents an individual upsert request in a [BulkUpsertBookingCustomAttributes]($e/BookingCustomAttributes/BulkUpsertBookingCustomAttributes)
// request. An individual request contains a booking ID, the custom attribute to create or update,
// and an optional idempotency key.
type BookingCustomAttributeUpsertRequest struct {
Expand Down Expand Up @@ -325,7 +325,7 @@ func (b *BookingCustomAttributeUpsertRequest) String() string {
return fmt.Sprintf("%#v", b)
}

// Represents a response for an individual upsert request in a [BulkUpsertBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkUpsertBookingCustomAttributes) operation.
// Represents a response for an individual upsert request in a [BulkUpsertBookingCustomAttributes]($e/BookingCustomAttributes/BulkUpsertBookingCustomAttributes) operation.
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"`
Expand Down Expand Up @@ -391,7 +391,7 @@ func (b *BookingCustomAttributeUpsertResponse) String() string {
return fmt.Sprintf("%#v", b)
}

// Represents a [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes) response,
// Represents a [BulkDeleteBookingCustomAttributes]($e/BookingCustomAttributes/BulkDeleteBookingCustomAttributes) response,
// which contains a map of responses that each corresponds to an individual delete request.
type BulkDeleteBookingCustomAttributesResponse struct {
// A map of responses that correspond to individual delete requests. Each response has the
Expand Down Expand Up @@ -450,7 +450,7 @@ func (b *BulkDeleteBookingCustomAttributesResponse) String() string {
return fmt.Sprintf("%#v", b)
}

// Represents a [BulkUpsertBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkUpsertBookingCustomAttributes) response,
// Represents a [BulkUpsertBookingCustomAttributes]($e/BookingCustomAttributes/BulkUpsertBookingCustomAttributes) response,
// which contains a map of responses that each corresponds to an individual upsert request.
type BulkUpsertBookingCustomAttributesResponse struct {
// A map of responses that correspond to individual upsert requests. Each response has the
Expand Down Expand Up @@ -509,7 +509,7 @@ func (b *BulkUpsertBookingCustomAttributesResponse) String() string {
return fmt.Sprintf("%#v", b)
}

// Represents a [CreateBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-CreateBookingCustomAttributeDefinition) response.
// Represents a [CreateBookingCustomAttributeDefinition]($e/BookingCustomAttributes/CreateBookingCustomAttributeDefinition) response.
// Either `custom_attribute_definition` or `errors` is present in the response.
type CreateBookingCustomAttributeDefinitionResponse struct {
// The newly created custom attribute definition.
Expand Down Expand Up @@ -567,7 +567,7 @@ func (c *CreateBookingCustomAttributeDefinitionResponse) String() string {
return fmt.Sprintf("%#v", c)
}

// Represents a [DeleteBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttributeDefinition) response
// Represents a [DeleteBookingCustomAttributeDefinition]($e/BookingCustomAttributes/DeleteBookingCustomAttributeDefinition) response
// containing error messages when errors occurred during the request. The successful response does not contain any payload.
type DeleteBookingCustomAttributeDefinitionResponse struct {
// Any errors that occurred during the request.
Expand Down Expand Up @@ -616,7 +616,7 @@ func (d *DeleteBookingCustomAttributeDefinitionResponse) String() string {
return fmt.Sprintf("%#v", d)
}

// Represents a [DeleteBookingCustomAttribute](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttribute) response.
// Represents a [DeleteBookingCustomAttribute]($e/BookingCustomAttributes/DeleteBookingCustomAttribute) response.
// Either an empty object `{}` (for a successful deletion) or `errors` is present in the response.
type DeleteBookingCustomAttributeResponse struct {
// Any errors that occurred during the request.
Expand Down Expand Up @@ -665,7 +665,7 @@ func (d *DeleteBookingCustomAttributeResponse) String() string {
return fmt.Sprintf("%#v", d)
}

// Represents a [RetrieveBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttributeDefinition) response.
// Represents a [RetrieveBookingCustomAttributeDefinition]($e/BookingCustomAttributes/RetrieveBookingCustomAttributeDefinition) response.
// Either `custom_attribute_definition` or `errors` is present in the response.
type RetrieveBookingCustomAttributeDefinitionResponse struct {
// The retrieved custom attribute definition.
Expand Down Expand Up @@ -723,7 +723,7 @@ func (r *RetrieveBookingCustomAttributeDefinitionResponse) String() string {
return fmt.Sprintf("%#v", r)
}

// Represents a [RetrieveBookingCustomAttribute](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttribute) response.
// Represents a [RetrieveBookingCustomAttribute]($e/BookingCustomAttributes/RetrieveBookingCustomAttribute) response.
// Either `custom_attribute_definition` or `errors` is present in the response.
type RetrieveBookingCustomAttributeResponse struct {
// The retrieved custom attribute. If `with_definition` was set to `true` in the request,
Expand Down Expand Up @@ -782,7 +782,7 @@ func (r *RetrieveBookingCustomAttributeResponse) String() string {
return fmt.Sprintf("%#v", r)
}

// Represents an [UpdateBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-UpdateBookingCustomAttributeDefinition) response.
// Represents an [UpdateBookingCustomAttributeDefinition]($e/BookingCustomAttributes/UpdateBookingCustomAttributeDefinition) response.
// Either `custom_attribute_definition` or `errors` is present in the response.
type UpdateBookingCustomAttributeDefinitionResponse struct {
// The updated custom attribute definition.
Expand Down Expand Up @@ -840,7 +840,7 @@ func (u *UpdateBookingCustomAttributeDefinitionResponse) String() string {
return fmt.Sprintf("%#v", u)
}

// Represents an [UpsertBookingCustomAttribute](api-endpoint:BookingCustomAttributes-UpsertBookingCustomAttribute) response.
// Represents an [UpsertBookingCustomAttribute]($e/BookingCustomAttributes/UpsertBookingCustomAttribute) response.
// Either `custom_attribute_definition` or `errors` is present in the response.
type UpsertBookingCustomAttributeResponse struct {
// The new or updated custom attribute.
Expand Down
4 changes: 2 additions & 2 deletions bookings.go
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ func (b *BulkRetrieveBookingsResponse) String() string {
return fmt.Sprintf("%#v", b)
}

// Response payload for the [BulkRetrieveTeamMemberBookingProfiles](api-endpoint:Bookings-BulkRetrieveTeamMemberBookingProfiles) endpoint.
// Response payload for the [BulkRetrieveTeamMemberBookingProfiles]($e/Bookings/BulkRetrieveTeamMemberBookingProfiles) endpoint.
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"`
Expand Down Expand Up @@ -1362,7 +1362,7 @@ func (g *GetBusinessBookingProfileResponse) String() string {
return fmt.Sprintf("%#v", g)
}

// Represents a [ListBookingCustomAttributeDefinitions](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributeDefinitions) response.
// Represents a [ListBookingCustomAttributeDefinitions]($e/BookingCustomAttributes/ListBookingCustomAttributeDefinitions) response.
// Either `custom_attribute_definitions`, an empty object, or `errors` is present in the response.
// If additional results are available, the `cursor` field is also present along with `custom_attribute_definitions`.
type ListBookingCustomAttributeDefinitionsResponse struct {
Expand Down
10 changes: 5 additions & 5 deletions cards.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type CreateCardRequest struct {
Card *Card `json:"card,omitempty" url:"-"`
}

type DisableCardRequest struct {
type CardsDisableRequest struct {
// Unique ID for the desired Card.
CardID string `json:"-" url:"-"`
}
Expand Down Expand Up @@ -58,7 +58,7 @@ type CardsListRequest struct {
}

// Defines the fields that are included in the response body of
// a request to the [CreateCard](api-endpoint:Cards-CreateCard) endpoint.
// a request to the [CreateCard]($e/Cards/CreateCard) endpoint.
//
// Note: if there are errors processing the request, the card field will not be
// present.
Expand Down Expand Up @@ -119,7 +119,7 @@ func (c *CreateCardResponse) String() string {
}

// Defines the fields that are included in the response body of
// a request to the [DisableCard](api-endpoint:Cards-DisableCard) endpoint.
// a request to the [DisableCard]($e/Cards/DisableCard) endpoint.
//
// Note: if there are errors processing the request, the card field will not be
// present.
Expand Down Expand Up @@ -180,7 +180,7 @@ func (d *DisableCardResponse) String() string {
}

// Defines the fields that are included in the response body of
// a request to the [RetrieveCard](api-endpoint:Cards-RetrieveCard) endpoint.
// a request to the [RetrieveCard]($e/Cards/RetrieveCard) endpoint.
//
// Note: if there are errors processing the request, the card field will not be
// present.
Expand Down Expand Up @@ -241,7 +241,7 @@ func (g *GetCardResponse) String() string {
}

// Defines the fields that are included in the response body of
// a request to the [ListCards](api-endpoint:Cards-ListCards) endpoint.
// a request to the [ListCards]($e/Cards/ListCards) endpoint.
//
// Note: if there are errors processing the request, the card field will not be
// present.
Expand Down
4 changes: 1 addition & 3 deletions cards/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (c *Client) Get(
// Disabling an already disabled card is allowed but has no effect.
func (c *Client) Disable(
ctx context.Context,
request *squaregosdk.DisableCardRequest,
request *squaregosdk.CardsDisableRequest,
opts ...option.RequestOption,
) (*squaregosdk.DisableCardResponse, error) {
options := core.NewRequestOptions(opts...)
Expand All @@ -197,7 +197,6 @@ func (c *Client) Disable(
c.header.Clone(),
options.ToHeader(),
)
headers.Set("Content-Type", "application/json")

var response *squaregosdk.DisableCardResponse
if err := c.caller.Call(
Expand All @@ -210,7 +209,6 @@ func (c *Client) Disable(
BodyProperties: options.BodyProperties,
QueryParameters: options.QueryParameters,
Client: options.HTTPClient,
Request: request,
Response: &response,
},
); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions cashdrawers/shifts/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (c *Client) List(
}

// Provides the summary details for a single cash drawer shift. See
// [ListCashDrawerShiftEvents](api-endpoint:CashDrawers-ListCashDrawerShiftEvents) for a list of cash drawer shift events.
// [ListCashDrawerShiftEvents]($e/CashDrawers/ListCashDrawerShiftEvents) for a list of cash drawer shift events.
func (c *Client) Get(
ctx context.Context,
request *cashdrawers.ShiftsGetRequest,
Expand Down Expand Up @@ -192,7 +192,7 @@ func (c *Client) ListEvents(
}
readPageResponse := func(response *squaregosdk.ListCashDrawerShiftEventsResponse) *internal.PageResponse[*string, *squaregosdk.CashDrawerShiftEvent] {
next := response.Cursor
results := response.Events
results := response.CashDrawerShiftEvents
return &internal.PageResponse[*string, *squaregosdk.CashDrawerShiftEvent]{
Next: next,
Results: results,
Expand Down
Loading
Loading