mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Add registrant api companies endpoint
This commit is contained in:
parent
497ba6514d
commit
c79042f789
8 changed files with 105 additions and 5 deletions
20
lib/serializers/registrant_api/company.rb
Normal file
20
lib/serializers/registrant_api/company.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue