Module: SBA::Client::Licenses

Includes:
Connection
Included in:
SBA::Client
Defined in:
lib/sba/client/licenses.rb

Instance Method Summary collapse

Instance Method Details

#business_type_state(business, state, options = {}) ⇒ Hash

Returns business licenses and permits required for a specific type of business in a specific state.

Examples:

SBA.business_type_state("child care services", "ca")

Parameters:

  • business (String)

    The business parameter includes standard values that allow you to return license and permit information for a specific type of business or for specific employer requirements

  • state (String)

    Input the two letter postal code for the state abbreviation.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Hash)

See Also:



60
61
62
63
# File 'lib/sba/client/licenses.rb', line 60

def business_type_state(business, state, options={})
  response = get("license_permit/state_only/#{business}/#{state}.json", options)
  simplify_response(response)
end

#business_type_state_city(business, state, city, options = {}) ⇒ Hash

Returns business licenses and permits required for a specific type of business in a specific state and city

Examples:

SBA.business_type_state_city("restaurant", "ny", "albany")

Parameters:

  • business (String)

    The business parameter includes standard values that allow you to return license and permit information for a specific type of business or for specific employer requirements

  • state (String)

    Input the two letter postal code for the state abbreviation.

  • city (String)

    Input the name of the City.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Hash)

See Also:



90
91
92
93
# File 'lib/sba/client/licenses.rb', line 90

def business_type_state_city(business, state, city, options={})
  response = get("license_permit/state_and_city/#{business}/#{state}/#{city}.json")
  simplify_response(response)
end

#business_type_state_county(business, state, county, options = {}) ⇒ Hash

Returns business licenses and permits required for a specific type of business in a specific state and county.

Examples:

SBA.business_type_state_county("child care services", "ca", "los angeles county")

Parameters:

  • business (String)

    The business parameter includes standard values that allow you to return license and permit information for a specific type of business or for specific employer requirements

  • state (String)

    Input the two letter postal code for the state abbreviation.

  • county (String)

    Input the name of the county (or its equivalent). County (or equivalent) name should including the word “county” (or “parish” etc.) For example, input Orange County, not Orange.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Hash)

See Also:



75
76
77
78
# File 'lib/sba/client/licenses.rb', line 75

def business_type_state_county(business, state, county, options={})
  response = get("license_permit/state_and_county/#{business}/#{state}/#{county}.json")
  simplify_response(response)
end

#business_type_zip(business, zip, options = {}) ⇒ Hash

Returns business licenses and permits required for a specific type of business in a specific zip code

Examples:

SBA.business_type_zip("restaurant","94105")

Parameters:

  • business (String)

    The business parameter includes standard values that allow you to return license and permit information for a specific type of business or for specific employer requirements

  • zip (String)

    Input a valid five digit zip code.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Hash)

See Also:



104
105
106
107
# File 'lib/sba/client/licenses.rb', line 104

def business_type_zip(business, zip, options={})
  response = get("license_permit/by_zip/#{business}/#{zip}.json")
  simplify_response(response)
end

#by_business_type(business, options = {}) ⇒ Hash

Returns business licenses and permits required for a specific type of business for all 54 states and territories

Examples:

SBA.by_business_type("child care services") 

Parameters:

  • business (String)

    The business parameter includes standard values that allow you to return license and permit information for a specific type of business or for specific employer requirements

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Hash)

See Also:



46
47
48
49
# File 'lib/sba/client/licenses.rb', line 46

def by_business_type(business, options={})
  response = get("license_permit/by_business_type/#{business}.json", options)
  simplify_response(response)
end

#by_category(category, options = {}) ⇒ Hash

Returns results for a matching license or permit category for each 54 states and territories.

Examples:

SBA.by_category("doing business as")

Parameters:

  • category (String)

    One of the following categories: doing business as, entity filing, employer requirements, states licenses, tax registration

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Hash)

See Also:



18
19
20
21
22
# File 'lib/sba/client/licenses.rb', line 18

def by_category(category, options={})
  options.merge!({:format=> "json"})
  response = get("/license_permit/by_category/#{category}.json")
  simplify_response(response)
end

#by_state(state, options = {}) ⇒ Hash

Returns all business licenses for all business types required to operate in an specific state or territory.

Examples:

SBA.by_state("ca")

Parameters:

  • state (String)

    input the two letter postal code for the state abbreviation.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Hash)

See Also:



32
33
34
35
36
# File 'lib/sba/client/licenses.rb', line 32

def by_state(state, options={})
  options.merge!({:format=> "json"})
  response = get("/license_permit/all_by_state/#{state}.json", options)
  simplify_response(response)
end