Skip to content

Commit

Permalink
add support for legacy_org_id when creating/fetching orgs (#27)
Browse files Browse the repository at this point in the history
* add support for legacy_org_id when creating/fetching orgs

* use star on optional string input

for convention

Co-authored-by: Itai Levi <[email protected]>

---------

Co-authored-by: Itai Levi <[email protected]>
  • Loading branch information
mrmauer and itailevi98 authored Jun 17, 2024
1 parent bf8e635 commit ff63c31
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pkg/models/org.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type OrgMetadata struct {
Metadata map[string]interface{} `json:"metadata"`
IsSamlConfigured bool `json:"is_saml_configured"`
CustomRoleMappingName *string `json:"custom_role_mapping_name"`
LegacyOrgId string `json:"legacy_org_id"`
}

// OrgList is a paged list of organizations. The actual fetched organizations are in the Orgs field, and the
Expand Down Expand Up @@ -78,12 +79,13 @@ type OrgQueryParams struct {

// CreateOrgV2Params is the information needed to create an organization, as well as some optional fields.
type CreateOrgV2Params struct {
Name string `json:"name"`
Domain string `json:"domain,omitempty"`
EnableAutoJoiningByDomain bool `json:"enable_auto_joining_by_domain,omitempty"`
MembersMustHaveMatchingDomain bool `json:"members_must_have_matching_domain,omitempty"`
MaxUsers int `json:"max_users,omitempty"`
CustomRoleMappingName *string `json:"custom_role_mapping_name,omitempty"`
Name string `json:"name"`
Domain string `json:"domain,omitempty"`
EnableAutoJoiningByDomain bool `json:"enable_auto_joining_by_domain,omitempty"`
MembersMustHaveMatchingDomain bool `json:"members_must_have_matching_domain,omitempty"`
MaxUsers int `json:"max_users,omitempty"`
CustomRoleMappingName *string `json:"custom_role_mapping_name,omitempty"`
LegacyOrgId *string `json:"legacy_org_id,omitempty"`
}

// CreateOrgV2Response is the information returned when creating an organization.
Expand Down

0 comments on commit ff63c31

Please sign in to comment.