Method: Invoicexpress::Client::Clients#client_by_name

Defined in:
lib/invoicexpress/client/clients.rb

#client_by_name(client_name, options = {}) ⇒ Invoicexpress::Models::Client

Use this method to obtain a client by name. Partial searches are not supported

Parameters:

  • client_name (String)

    The client’s name

Returns:

Raises:

  • Invoicexpress::Unauthorized When the client is unauthorized

  • Invoicexpress::NotFound When there are no clients with that name



101
102
103
104
105
106
107
108
# File 'lib/invoicexpress/client/clients.rb', line 101

def client_by_name(client_name, options={})
  params = {
    :klass       => Invoicexpress::Models::Client,
    :client_name => client_name
  }

  get("clients/find-by-name.xml", params.merge(options))
end