Method: Invoicexpress::Client::Clients#client_by_code

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

#client_by_code(client_code, options = {}) ⇒ Invoicexpress::Models::Client

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

Parameters:

  • client_code (String)

    The client’s code (your code)

Returns:

Raises:

  • Invoicexpress::Unauthorized When the client is unauthorized

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



116
117
118
119
120
121
122
123
# File 'lib/invoicexpress/client/clients.rb', line 116

def client_by_code(client_code, options={})
  params = {
    :klass       => Invoicexpress::Models::Client,
    :client_code => client_code
  }

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