Class: Aircall::Contacts
Instance Attribute Summary
Attributes included from Connection
#aircall
Instance Method Summary
collapse
-
#get_all(page: 1, per_page: 5, order: "asc", order_by: "created_at", from: nil, to: nil) ⇒ Object
-
#get_by_email(email, page: 1, per_page: 5, order: "asc", order_by: "created_at", from: nil, to: nil) ⇒ Object
-
#get_by_id(contact_id) ⇒ Object
-
#get_by_phone_number(phone_number, page: 1, per_page: 5, order: "asc", order_by: "created_at", from: nil, to: nil) ⇒ Object
Methods included from Connection
#get_method_arguments, #initialize, #require_settings
Instance Method Details
#get_all(page: 1, per_page: 5, order: "asc", order_by: "created_at", from: nil, to: nil) ⇒ Object
5
6
7
|
# File 'lib/aircall/contacts.rb', line 5
def get_all(page: 1, per_page: 5, order: "asc", order_by: "created_at", from: nil, to: nil)
get(construct_request_with_arguments("/contacts", binding))
end
|
#get_by_email(email, page: 1, per_page: 5, order: "asc", order_by: "created_at", from: nil, to: nil) ⇒ Object
13
14
15
|
# File 'lib/aircall/contacts.rb', line 13
def get_by_email(email, page: 1, per_page: 5, order: "asc", order_by: "created_at", from: nil, to: nil)
get(construct_request_with_arguments("/contacts/search", binding))
end
|
#get_by_id(contact_id) ⇒ Object
9
10
11
|
# File 'lib/aircall/contacts.rb', line 9
def get_by_id(contact_id)
get("/contacts/#{contact_id}")
end
|
#get_by_phone_number(phone_number, page: 1, per_page: 5, order: "asc", order_by: "created_at", from: nil, to: nil) ⇒ Object
17
18
19
|
# File 'lib/aircall/contacts.rb', line 17
def get_by_phone_number(phone_number, page: 1, per_page: 5, order: "asc", order_by: "created_at", from: nil, to: nil)
get(construct_request_with_arguments("/contacts/search", binding))
end
|