Class: Desk::Api::Customers

Inherits:
Object
  • Object
show all
Includes:
Creatable, Deletable, 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 Deletable

#delete

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.



23
24
25
26
27
# File 'lib/desk/api/customers.rb', line 23

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

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



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

def connection
  @connection
end

#endpointObject (readonly)

Returns the value of attribute endpoint.



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

def endpoint
  @endpoint
end

#return_classObject (readonly)

Returns the value of attribute return_class.



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

def return_class
  @return_class
end