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

chore: Rename UpdateInsOrgRoleParams to UpdateInstanceOrganizationRoleParams #179

Merged
merged 1 commit into from
Nov 13, 2023
Merged
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
4 changes: 2 additions & 2 deletions clerk/instance_organization_roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ func (s *InstanceService) ReadOrganizationRole(orgRoleID string) (*Role, error)
return &orgRole, nil
}

type UpdateInsOrgRoleParams struct {
type UpdateInstanceOrganizationRoleParams struct {
Name *string `json:"name,omitempty"`
Key *string `json:"key,omitempty"`
Description *string `json:"description,omitempty"`
Permissions *[]string `json:"permissions,omitempty"`
}

func (s *InstanceService) UpdateOrganizationRole(orgRoleID string, params UpdateInsOrgRoleParams) (*Role, error) {
func (s *InstanceService) UpdateOrganizationRole(orgRoleID string, params UpdateInstanceOrganizationRoleParams) (*Role, error) {
req, _ := s.client.NewRequest(http.MethodPatch, fmt.Sprintf("%s/%s", OrganizationRolesUrl, orgRoleID), &params)

var orgRole Role
Expand Down
4 changes: 2 additions & 2 deletions clerk/instance_organization_roles_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestOrganizationRolesService_Read(t *testing.T) {
func TestOrganizationRolesService_Update(t *testing.T) {
client, mux, _, teardown := setup("token")
defer teardown()
var payload UpdateInsOrgRoleParams
var payload UpdateInstanceOrganizationRoleParams
_ = json.Unmarshal([]byte(dummyUpdateOrgRoleJson), &payload)

expectedResponse := dummyOrgRoleJson
Expand Down Expand Up @@ -103,7 +103,7 @@ func TestOrganizationRolesService_Update(t *testing.T) {

func TestOrganizationRolesService_Update_invalidServer(t *testing.T) {
client, _ := NewClient("token")
var payload UpdateInsOrgRoleParams
var payload UpdateInstanceOrganizationRoleParams
_ = json.Unmarshal([]byte(dummyUpdateOrgRoleJson), &payload)

_, err := client.Instances().UpdateOrganizationRole("someOrgRoleId", payload)
Expand Down
Loading