Skip to content

Commit

Permalink
Release v0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Oct 30, 2023
1 parent 8bc8adc commit 6f9a234
Show file tree
Hide file tree
Showing 16 changed files with 2,522 additions and 5 deletions.
177 changes: 177 additions & 0 deletions access_codes.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
package api

import (
json "encoding/json"
fmt "fmt"
core "github.com/seamapi/go/core"
)

type AccessCodesCreateRequest struct {
Expand Down Expand Up @@ -77,32 +79,182 @@ func (a AccessCodesCreateMultipleRequestBehaviorWhenCodeCannotBeShared) Ptr() *A
type AccessCodesCreateMultipleResponse struct {
AccessCodes []*AccessCode `json:"access_codes,omitempty"`
Ok bool `json:"ok"`

_rawJSON json.RawMessage
}

func (a *AccessCodesCreateMultipleResponse) UnmarshalJSON(data []byte) error {
type unmarshaler AccessCodesCreateMultipleResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = AccessCodesCreateMultipleResponse(value)
a._rawJSON = json.RawMessage(data)
return nil
}

func (a *AccessCodesCreateMultipleResponse) String() string {
if len(a._rawJSON) > 0 {
if value, err := core.StringifyJSON(a._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(a); err == nil {
return value
}
return fmt.Sprintf("%#v", a)
}

type AccessCodesCreateResponse struct {
ActionAttempt *ActionAttempt `json:"action_attempt,omitempty"`
AccessCode *AccessCode `json:"access_code,omitempty"`
Ok bool `json:"ok"`

_rawJSON json.RawMessage
}

func (a *AccessCodesCreateResponse) UnmarshalJSON(data []byte) error {
type unmarshaler AccessCodesCreateResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = AccessCodesCreateResponse(value)
a._rawJSON = json.RawMessage(data)
return nil
}

func (a *AccessCodesCreateResponse) String() string {
if len(a._rawJSON) > 0 {
if value, err := core.StringifyJSON(a._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(a); err == nil {
return value
}
return fmt.Sprintf("%#v", a)
}

type AccessCodesDeleteResponse struct {
ActionAttempt *ActionAttempt `json:"action_attempt,omitempty"`
Ok bool `json:"ok"`

_rawJSON json.RawMessage
}

func (a *AccessCodesDeleteResponse) UnmarshalJSON(data []byte) error {
type unmarshaler AccessCodesDeleteResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = AccessCodesDeleteResponse(value)
a._rawJSON = json.RawMessage(data)
return nil
}

func (a *AccessCodesDeleteResponse) String() string {
if len(a._rawJSON) > 0 {
if value, err := core.StringifyJSON(a._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(a); err == nil {
return value
}
return fmt.Sprintf("%#v", a)
}

type AccessCodesGetResponse struct {
AccessCode *AccessCode `json:"access_code,omitempty"`
Ok bool `json:"ok"`

_rawJSON json.RawMessage
}

func (a *AccessCodesGetResponse) UnmarshalJSON(data []byte) error {
type unmarshaler AccessCodesGetResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = AccessCodesGetResponse(value)
a._rawJSON = json.RawMessage(data)
return nil
}

func (a *AccessCodesGetResponse) String() string {
if len(a._rawJSON) > 0 {
if value, err := core.StringifyJSON(a._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(a); err == nil {
return value
}
return fmt.Sprintf("%#v", a)
}

type AccessCodesListResponse struct {
AccessCodes []*AccessCode `json:"access_codes,omitempty"`
Ok bool `json:"ok"`

_rawJSON json.RawMessage
}

func (a *AccessCodesListResponse) UnmarshalJSON(data []byte) error {
type unmarshaler AccessCodesListResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = AccessCodesListResponse(value)
a._rawJSON = json.RawMessage(data)
return nil
}

func (a *AccessCodesListResponse) String() string {
if len(a._rawJSON) > 0 {
if value, err := core.StringifyJSON(a._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(a); err == nil {
return value
}
return fmt.Sprintf("%#v", a)
}

type AccessCodesPullBackupAccessCodeResponse struct {
BackupAccessCode *AccessCode `json:"backup_access_code,omitempty"`
Ok bool `json:"ok"`

_rawJSON json.RawMessage
}

func (a *AccessCodesPullBackupAccessCodeResponse) UnmarshalJSON(data []byte) error {
type unmarshaler AccessCodesPullBackupAccessCodeResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = AccessCodesPullBackupAccessCodeResponse(value)
a._rawJSON = json.RawMessage(data)
return nil
}

func (a *AccessCodesPullBackupAccessCodeResponse) String() string {
if len(a._rawJSON) > 0 {
if value, err := core.StringifyJSON(a._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(a); err == nil {
return value
}
return fmt.Sprintf("%#v", a)
}

type AccessCodesUpdateRequestType string
Expand Down Expand Up @@ -130,6 +282,31 @@ func (a AccessCodesUpdateRequestType) Ptr() *AccessCodesUpdateRequestType {
type AccessCodesUpdateResponse struct {
ActionAttempt *ActionAttempt `json:"action_attempt,omitempty"`
Ok bool `json:"ok"`

_rawJSON json.RawMessage
}

func (a *AccessCodesUpdateResponse) UnmarshalJSON(data []byte) error {
type unmarshaler AccessCodesUpdateResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = AccessCodesUpdateResponse(value)
a._rawJSON = json.RawMessage(data)
return nil
}

func (a *AccessCodesUpdateResponse) String() string {
if len(a._rawJSON) > 0 {
if value, err := core.StringifyJSON(a._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(a); err == nil {
return value
}
return fmt.Sprintf("%#v", a)
}

type AccessCodesUpdateRequest struct {
Expand Down
56 changes: 56 additions & 0 deletions action_attempts.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

package api

import (
json "encoding/json"
fmt "fmt"
core "github.com/seamapi/go/core"
)

type ActionAttemptsGetRequest struct {
ActionAttemptId string `json:"action_attempt_id"`
}
Expand All @@ -13,9 +19,59 @@ type ActionAttemptsListRequest struct {
type ActionAttemptsGetResponse struct {
ActionAttempt *ActionAttempt `json:"action_attempt,omitempty"`
Ok bool `json:"ok"`

_rawJSON json.RawMessage
}

func (a *ActionAttemptsGetResponse) UnmarshalJSON(data []byte) error {
type unmarshaler ActionAttemptsGetResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = ActionAttemptsGetResponse(value)
a._rawJSON = json.RawMessage(data)
return nil
}

func (a *ActionAttemptsGetResponse) String() string {
if len(a._rawJSON) > 0 {
if value, err := core.StringifyJSON(a._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(a); err == nil {
return value
}
return fmt.Sprintf("%#v", a)
}

type ActionAttemptsListResponse struct {
ActionAttempts []*ActionAttempt `json:"action_attempts,omitempty"`
Ok bool `json:"ok"`

_rawJSON json.RawMessage
}

func (a *ActionAttemptsListResponse) UnmarshalJSON(data []byte) error {
type unmarshaler ActionAttemptsListResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = ActionAttemptsListResponse(value)
a._rawJSON = json.RawMessage(data)
return nil
}

func (a *ActionAttemptsListResponse) String() string {
if len(a._rawJSON) > 0 {
if value, err := core.StringifyJSON(a._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(a); err == nil {
return value
}
return fmt.Sprintf("%#v", a)
}
4 changes: 2 additions & 2 deletions client/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ func WithHTTPHeader(httpHeader http.Header) core.ClientOption {
}
}

// WithAuthApiKey sets the 'Authorization: Bearer <apiKey>' header on every request.
func WithAuthApiKey(apiKey string) core.ClientOption {
// WithApiKey sets the 'Authorization: Bearer <apiKey>' header on every request.
func WithApiKey(apiKey string) core.ClientOption {
return func(opts *core.ClientOptions) {
opts.ApiKey = apiKey
}
Expand Down
Loading

0 comments on commit 6f9a234

Please sign in to comment.