Skip to content

Commit

Permalink
feat: update via SDK Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Feb 27, 2024
1 parent a973d63 commit 9e6b580
Show file tree
Hide file tree
Showing 297 changed files with 39,576 additions and 37,899 deletions.
2 changes: 2 additions & 0 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
// service directly, and instead use the [NewAccountService] method instead.
type AccountService struct {
Options []option.RequestOption
Members *AccountMemberService
}

// NewAccountService generates a new service that applies the given options to each
Expand All @@ -32,6 +33,7 @@ type AccountService struct {
func NewAccountService(opts ...option.RequestOption) (r *AccountService) {
r = &AccountService{}
r.Options = opts
r.Members = NewAccountMemberService(opts...)
return
}

Expand Down
10 changes: 5 additions & 5 deletions accountmember_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestAccountMemberNewWithOptionalParams(t *testing.T) {
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
option.WithUserServiceKey("v1.0-144c9defac04969c7bfad8ef-631a41d003a32d25fe878081ef365c49503f7fada600da935e2851a1c7326084b85cbf6429c4b859de8475731dc92a9c329631e6d59e6c73da7b198497172b4cefe071d90d0f5d2719"),
)
_, err := client.AccountMembers.New(context.TODO(), cloudflare.AccountMemberNewParams{
_, err := client.Accounts.Members.New(context.TODO(), cloudflare.AccountMemberNewParams{
AccountID: cloudflare.F[any](map[string]interface{}{}),
Email: cloudflare.F("user@example.com"),
Roles: cloudflare.F([]string{"3536bcfad5faccb999b47003c79917fb", "3536bcfad5faccb999b47003c79917fb", "3536bcfad5faccb999b47003c79917fb"}),
Expand Down Expand Up @@ -60,7 +60,7 @@ func TestAccountMemberUpdate(t *testing.T) {
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
option.WithUserServiceKey("v1.0-144c9defac04969c7bfad8ef-631a41d003a32d25fe878081ef365c49503f7fada600da935e2851a1c7326084b85cbf6429c4b859de8475731dc92a9c329631e6d59e6c73da7b198497172b4cefe071d90d0f5d2719"),
)
_, err := client.AccountMembers.Update(
_, err := client.Accounts.Members.Update(
context.TODO(),
"4536bcfad5faccb111b47003c79917fa",
cloudflare.AccountMemberUpdateParams{
Expand Down Expand Up @@ -99,7 +99,7 @@ func TestAccountMemberListWithOptionalParams(t *testing.T) {
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
option.WithUserServiceKey("v1.0-144c9defac04969c7bfad8ef-631a41d003a32d25fe878081ef365c49503f7fada600da935e2851a1c7326084b85cbf6429c4b859de8475731dc92a9c329631e6d59e6c73da7b198497172b4cefe071d90d0f5d2719"),
)
_, err := client.AccountMembers.List(context.TODO(), cloudflare.AccountMemberListParams{
_, err := client.Accounts.Members.List(context.TODO(), cloudflare.AccountMemberListParams{
AccountID: cloudflare.F[any](map[string]interface{}{}),
Direction: cloudflare.F(cloudflare.AccountMemberListParamsDirectionDesc),
Order: cloudflare.F(cloudflare.AccountMemberListParamsOrderStatus),
Expand Down Expand Up @@ -132,7 +132,7 @@ func TestAccountMemberDelete(t *testing.T) {
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
option.WithUserServiceKey("v1.0-144c9defac04969c7bfad8ef-631a41d003a32d25fe878081ef365c49503f7fada600da935e2851a1c7326084b85cbf6429c4b859de8475731dc92a9c329631e6d59e6c73da7b198497172b4cefe071d90d0f5d2719"),
)
_, err := client.AccountMembers.Delete(
_, err := client.Accounts.Members.Delete(
context.TODO(),
"4536bcfad5faccb111b47003c79917fa",
cloudflare.AccountMemberDeleteParams{
Expand Down Expand Up @@ -164,7 +164,7 @@ func TestAccountMemberGet(t *testing.T) {
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
option.WithUserServiceKey("v1.0-144c9defac04969c7bfad8ef-631a41d003a32d25fe878081ef365c49503f7fada600da935e2851a1c7326084b85cbf6429c4b859de8475731dc92a9c329631e6d59e6c73da7b198497172b4cefe071d90d0f5d2719"),
)
_, err := client.AccountMembers.Get(
_, err := client.Accounts.Members.Get(
context.TODO(),
"4536bcfad5faccb111b47003c79917fa",
cloudflare.AccountMemberGetParams{
Expand Down
138 changes: 0 additions & 138 deletions activationcheck.go

This file was deleted.

2 changes: 2 additions & 0 deletions address.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
// service directly, and instead use the [NewAddressService] method instead.
type AddressService struct {
Options []option.RequestOption
Services *AddressServiceService
AddressMaps *AddressAddressMapService
LOADocuments *AddressLOADocumentService
Prefixes *AddressPrefixService
Expand All @@ -23,6 +24,7 @@ type AddressService struct {
func NewAddressService(opts ...option.RequestOption) (r *AddressService) {
r = &AddressService{}
r.Options = opts
r.Services = NewAddressServiceService(opts...)
r.AddressMaps = NewAddressAddressMapService(opts...)
r.LOADocuments = NewAddressLOADocumentService(opts...)
r.Prefixes = NewAddressPrefixService(opts...)
Expand Down
28 changes: 0 additions & 28 deletions addressing.go

This file was deleted.

29 changes: 0 additions & 29 deletions addressingprefix.go

This file was deleted.

Loading

0 comments on commit 9e6b580

Please sign in to comment.