Class: Nzbn::Api::CompanyDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/nzbn/api/company_details.rb

Overview

Company Details API

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ CompanyDetails

Returns a new instance of CompanyDetails.



7
8
9
# File 'lib/nzbn/api/company_details.rb', line 7

def initialize(client)
  @client = client
end

Instance Method Details

#get(nzbn:) ⇒ Models::Company

Get company details

Parameters:

  • nzbn (String)

    13-digit NZBN

Returns:



16
17
18
19
# File 'lib/nzbn/api/company_details.rb', line 16

def get(nzbn:)
  response = @client.get("/entities/#{nzbn}/company-details")
  Models::Company.new(response)
end

#get_non_company(nzbn:) ⇒ Models::NonCompany

Get non-company details (limited partnerships, charities, etc.)

Parameters:

  • nzbn (String)

    13-digit NZBN

Returns:



26
27
28
29
# File 'lib/nzbn/api/company_details.rb', line 26

def get_non_company(nzbn:)
  response = @client.get("/entities/#{nzbn}/non-company-details")
  Models::NonCompany.new(response)
end