Class: BriteAPI::AddressAPIClient

Inherits:
APIClient
  • Object
show all
Defined in:
lib/brite-api/clients/address_api_client.rb

Constant Summary collapse

API_HATH =
'/addresses.json'

Constants inherited from APIClient

BriteAPI::APIClient::API_HOST

Instance Method Summary collapse

Methods inherited from APIClient

#get, #initialize

Constructor Details

This class inherits a constructor from BriteAPI::APIClient

Instance Method Details

#verify(value) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/brite-api/clients/address_api_client.rb', line 6

def verify(value)
  raise "Address should be a Hash" unless value.respond_to? :each
  params = {}
  value.each do |k, v|
    params["address[#{k}]"] = v
  end

  get API_HOST + API_HATH, params
end