```ruby
require 'onfido/address_picker'

module Onfido
  class API
    include Requestable
    include AddressPicker

    def url_for(path)
      Onfido.endpoint + path
    end

    def method_missing(method, *args)
      if [:get, :post].include?(method.to_sym)
        make_request(url: args.first.fetch(:url), payload: args.first.fetch(:payload), method: method.to_sym)
      else
        raise NoMethodError.new("undefined method '#{method}' for #{self.class}")
      end
    end

    private

    def headers
      {
        'Authorization' => "Token token=#{Onfido.api_key}",
        'Accept' => "application/json"
      }
    end
  end
end
```

Make an API wrapper around the endpoints for better calling
user
```ruby
module Onfido
  class API
    def method_missing(method, *args)
      klass = method.to_s.capitalize
      Object.const_get("Onfido::#{klass}").new
    rescue
      raise NoMethodError.new("undefined method '#{method}' for #{self.class}")
    end
  end
end
```
assistant