Add registrant api companies endpoint

This commit is contained in:
Alex Sherman 2020-10-12 16:25:10 +05:00
parent 497ba6514d
commit c79042f789
8 changed files with 105 additions and 5 deletions

View file

@ -0,0 +1,20 @@
module Serializers
module RegistrantApi
class Company
attr_reader :company, :country_code
def initialize(company:, country_code:)
@company = company
@country_code = country_code
end
def to_json(*_args)
{
name: company.company_name,
registry_no: company.registration_number,
country_code: @country_code,
}
end
end
end
end