Class: WixAnswers::REST::Client

Inherits:
Object
  • Object
show all
Includes:
API
Defined in:
lib/wixanswers/rest/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Ticket

#add, #add_as_agent, #add_as_guest, #add_callback_request, #add_on_behalf, #assign, #assign_many, #authenticate, #count, #find_by_number, #mark_not_spam, #mark_not_spam_many, #mark_spam, #mark_spam_many, #my_ticket, #search, #search_mine, #ticket, #transfer, #unassign, #unassign_many, #update_priority, #update_priority_many, #update_status, #update_status_many

Instance Attribute Details

#bearer_tokenObject

Returns the value of attribute bearer_token.



9
10
11
# File 'lib/wixanswers/rest/client.rb', line 9

def bearer_token
  @bearer_token
end

Instance Method Details

#bearer_token?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/wixanswers/rest/client.rb', line 16

def bearer_token?
  !!bearer_token
end

#credentials?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/wixanswers/rest/client.rb', line 21

def credentials?
  super || bearer_token?
end

#perform_request(path, request_method = :get, options = {}) ⇒ Object



11
12
13
# File 'lib/wixanswers/rest/client.rb', line 11

def perform_request(path, request_method=:get, options = {})
  WixAnswers::REST::Request.new(self, path, request_method, options).perform
end