internetee-registry/lib/serializers/registrant_api/company.rb
2020-10-12 16:32:37 +05:00

20 lines
427 B
Ruby

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