From 4745a13dd32d9c6004e58a3e0ca8087b5d6d0c46 Mon Sep 17 00:00:00 2001 From: Andrea Angiolillo Date: Mon, 3 Jul 2023 14:38:16 +0200 Subject: [PATCH] INTMDB-838: Add FederationSettingsId to org (#503) --- mongodbatlas/organizations.go | 14 ++++++++------ mongodbatlas/organizations_test.go | 7 +++++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/mongodbatlas/organizations.go b/mongodbatlas/organizations.go index 5cee3135..f415f370 100644 --- a/mongodbatlas/organizations.go +++ b/mongodbatlas/organizations.go @@ -76,16 +76,18 @@ type Organizations struct { // CreateOrganizationRequest struct for CreateOrganizationRequest. type CreateOrganizationRequest struct { - APIKey *APIKeyInput `json:"apiKey,omitempty"` - Name string `json:"name"` - OrgOwnerID *string `json:"orgOwnerId,omitempty"` + APIKey *APIKeyInput `json:"apiKey,omitempty"` + FederationSettingsID *string `json:"federationSettingsId,omitempty"` + Name string `json:"name"` + OrgOwnerID *string `json:"orgOwnerId,omitempty"` } // CreateOrganizationResponse struct for CreateOrganizationResponse. type CreateOrganizationResponse struct { - APIKey *APIKey `json:"apiKey,omitempty"` - OrgOwnerID *string `json:"orgOwnerId,omitempty"` - Organization *Organization `json:"organization,omitempty"` + APIKey *APIKey `json:"apiKey,omitempty"` + FederationSettingsID *string `json:"federationSettingsId,omitempty"` + OrgOwnerID *string `json:"orgOwnerId,omitempty"` + Organization *Organization `json:"organization,omitempty"` } // List gets all organizations. diff --git a/mongodbatlas/organizations_test.go b/mongodbatlas/organizations_test.go index e7db2719..1e17a67a 100644 --- a/mongodbatlas/organizations_test.go +++ b/mongodbatlas/organizations_test.go @@ -465,7 +465,8 @@ func TestOrganizationsServiceOp_Create(t *testing.T) { "roleName": "ORG_OWNER" } ] - }, + }, + "federationSettingsId": "1", "organization": { "id": "32b6e34b3d91647abb20e7b8", "name": "test" @@ -478,7 +479,8 @@ func TestOrganizationsServiceOp_Create(t *testing.T) { Desc: "string", Roles: []string{"ORG_OWNER"}, }, - Name: "test", + Name: "test", + FederationSettingsID: pointer("1"), } response, _, err := client.Organizations.Create(ctx, body) @@ -500,6 +502,7 @@ func TestOrganizationsServiceOp_Create(t *testing.T) { ID: "32b6e34b3d91647abb20e7b8", Name: "test", }, + FederationSettingsID: pointer("1"), } if diff := deep.Equal(response, expected); diff != nil {