Skip to content
Open
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
14 changes: 8 additions & 6 deletions requestUserMapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package intercom
// A Company the User belongs to
// used to update Companies on a User.
type UserCompany struct {
CompanyID string `json:"company_id,omitempty"`
Name string `json:"name,omitempty"`
Remove *bool `json:"remove,omitempty"`
CompanyID string `json:"company_id,omitempty"`
Name string `json:"name,omitempty"`
Remove *bool `json:"remove,omitempty"`
CustomAttributes map[string]interface{} `json:"custom_attributes,omitempty"`
}

type RequestUserMapper struct{}
Expand Down Expand Up @@ -41,9 +42,10 @@ func (rum RequestUserMapper) MakeUserCompaniesFromCompanies(companies []Company)
userCompanies := make([]UserCompany, len(companies))
for i := 0; i < len(companies); i++ {
userCompanies[i] = UserCompany{
CompanyID: companies[i].CompanyID,
Name: companies[i].Name,
Remove: companies[i].Remove,
CompanyID: companies[i].CompanyID,
Name: companies[i].Name,
Remove: companies[i].Remove,
CustomAttributes: companies[i].CustomAttributes,
}
}
return userCompanies
Expand Down