16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/cb/clients/company.rb', line 16
def self.find_by_did(did)
json_hash = cb_client.cb_get(Cb.configuration.uri_company_find,
query: { CompanyDID: did, hostsite: Cb.configuration.host_site })
if json_hash.key?('Results')
if json_hash['Results'].key?('CompanyProfileDetail')
company = Models::Company.new(json_hash['Results']['CompanyProfileDetail'])
end
cb_client.append_api_responses(company, json_hash['Results'])
end
cb_client.append_api_responses(company, json_hash)
end
|