From 7b878f86d561a1257834a5b961cbb639d6776b83 Mon Sep 17 00:00:00 2001 From: Vernon Keenan Date: Wed, 30 Apr 2025 18:42:56 +0000 Subject: [PATCH] feat: Replace AccountID with CompanyID in GetIndustryCompaniesParams and update related Swagger definitions --- .../get_industry_companies_parameters.go | 34 +++++++++---------- .../research_models/industry_company.go | 4 +-- swagger/external/research-vernonkeenan.yaml | 10 ++++-- swagger/research-vernonkeenan.yaml | 10 ++++-- 4 files changed, 35 insertions(+), 23 deletions(-) diff --git a/api/research/research_client/industry_companies/get_industry_companies_parameters.go b/api/research/research_client/industry_companies/get_industry_companies_parameters.go index 1ad800c..71dfd32 100644 --- a/api/research/research_client/industry_companies/get_industry_companies_parameters.go +++ b/api/research/research_client/industry_companies/get_industry_companies_parameters.go @@ -72,11 +72,11 @@ type GetIndustryCompaniesParams struct { */ Active *bool - /* Email. + /* CompanyID. - Email address used for identity lookup + Company record ID */ - Email *string + CompanyID *string /* IndustryCompanyID. @@ -170,15 +170,15 @@ func (o *GetIndustryCompaniesParams) SetActive(active *bool) { o.Active = active } -// WithEmail adds the email to the get industry companies params -func (o *GetIndustryCompaniesParams) WithEmail(email *string) *GetIndustryCompaniesParams { - o.SetEmail(email) +// WithCompanyID adds the companyID to the get industry companies params +func (o *GetIndustryCompaniesParams) WithCompanyID(companyID *string) *GetIndustryCompaniesParams { + o.SetCompanyID(companyID) return o } -// SetEmail adds the email to the get industry companies params -func (o *GetIndustryCompaniesParams) SetEmail(email *string) { - o.Email = email +// SetCompanyID adds the companyId to the get industry companies params +func (o *GetIndustryCompaniesParams) SetCompanyID(companyID *string) { + o.CompanyID = companyID } // WithIndustryCompanyID adds the industryCompanyID to the get industry companies params @@ -250,18 +250,18 @@ func (o *GetIndustryCompaniesParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.Email != nil { + if o.CompanyID != nil { - // query param email - var qrEmail string + // query param companyId + var qrCompanyID string - if o.Email != nil { - qrEmail = *o.Email + if o.CompanyID != nil { + qrCompanyID = *o.CompanyID } - qEmail := qrEmail - if qEmail != "" { + qCompanyID := qrCompanyID + if qCompanyID != "" { - if err := r.SetQueryParam("email", qEmail); err != nil { + if err := r.SetQueryParam("companyId", qCompanyID); err != nil { return err } } diff --git a/api/research/research_models/industry_company.go b/api/research/research_models/industry_company.go index f1046db..22664db 100644 --- a/api/research/research_models/industry_company.go +++ b/api/research/research_models/industry_company.go @@ -21,8 +21,8 @@ import ( // swagger:model IndustryCompany type IndustryCompany struct { - // account ID - AccountID *string `json:"AccountID,omitempty"` + // company ID + CompanyID *string `json:"CompanyID,omitempty"` // Created By User ID CreatedByID *string `json:"CreatedByID,omitempty"` diff --git a/swagger/external/research-vernonkeenan.yaml b/swagger/external/research-vernonkeenan.yaml index 2733689..5425ada 100644 --- a/swagger/external/research-vernonkeenan.yaml +++ b/swagger/external/research-vernonkeenan.yaml @@ -104,6 +104,12 @@ parameters: name: industryCompanyId required: false type: string + companyIdQuery: + description: Company record ID + in: query + name: companyId + required: false + type: string industryCompanyRequest: description: An array of new IndustryCompany records in: body @@ -803,7 +809,7 @@ paths: - $ref: "#/parameters/offsetQuery" - $ref: "#/parameters/activeQuery" - $ref: "#/parameters/industryCompanyIdQuery" - - $ref: "#/parameters/emailQuery" + - $ref: "#/parameters/companyIdQuery" responses: "200": $ref: "#/responses/IndustryCompanyResponse" @@ -1728,7 +1734,7 @@ definitions: IndustryCompany: description: Junction object between Industry and Company properties: - AccountID: + CompanyID: type: string x-nullable: true CreatedByID: diff --git a/swagger/research-vernonkeenan.yaml b/swagger/research-vernonkeenan.yaml index a87bd40..ca1c7c9 100644 --- a/swagger/research-vernonkeenan.yaml +++ b/swagger/research-vernonkeenan.yaml @@ -104,6 +104,12 @@ parameters: name: industryCompanyId required: false type: string + companyIdQuery: + description: Company record ID + in: query + name: companyId + required: false + type: string industryCompanyRequest: description: An array of new IndustryCompany records in: body @@ -803,7 +809,7 @@ paths: - $ref: "#/parameters/offsetQuery" - $ref: "#/parameters/activeQuery" - $ref: "#/parameters/industryCompanyIdQuery" - - $ref: "#/parameters/emailQuery" + - $ref: "#/parameters/companyIdQuery" responses: "200": $ref: "#/responses/IndustryCompanyResponse" @@ -1728,7 +1734,7 @@ definitions: IndustryCompany: description: Junction object between Industry and Company properties: - AccountID: + CompanyID: type: string x-nullable: true CreatedByID: