Class: Desk::Api::Customers

Inherits:
Object
  • Object
show all
Includes:
Creatable, Listable, Searchable
Defined in:
lib/desk/api/customers.rb

Constant Summary collapse

VALID_SEARCH_PARAMS =
[:first_name, :last_name, :full_name, :email, :since_created_at,
:max_created_at, :external_id, :since_updated_at, :max_updated_at,
:since_id, :max_id, :twitter, :phone, :custom_N]

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Searchable

#search

Methods included from Creatable

#create, #update

Methods included from Listable

#all, #show

Constructor Details

#initialize(connection) ⇒ Customers

Returns a new instance of Customers.



20
21
22
23
24
# File 'lib/desk/api/customers.rb', line 20

def initialize(connection)
  @connection = connection
  @endpoint = "customers"
  @return_class = Desk::Customer
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



18
19
20
# File 'lib/desk/api/customers.rb', line 18

def connection
  @connection
end

#endpointObject (readonly)

Returns the value of attribute endpoint.



18
19
20
# File 'lib/desk/api/customers.rb', line 18

def endpoint
  @endpoint
end

#return_classObject (readonly)

Returns the value of attribute return_class.



18
19
20
# File 'lib/desk/api/customers.rb', line 18

def return_class
  @return_class
end