Class: ApiBrasil::Services::Platform::AccountService
- Inherits:
-
BaseService
- Object
- BaseService
- ApiBrasil::Services::Platform::AccountService
- Defined in:
- lib/api_brasil/services/platform/account_service.rb
Overview
Conta, saldo, faturas, notificacoes e tickets.
Instance Attribute Summary
Attributes inherited from BaseService
Instance Method Summary collapse
-
#add_ticket_message(id, body, options = {}) ⇒ Object
Responde um ticket:
POST /ticket/{id}/messages. -
#api_requests(body = nil, options = {}) ⇒ Object
Historico de requisicoes por API:
POST /api/requests. -
#balance(options = {}) ⇒ Object
Saldo/creditos da conta:
GET /balance. -
#create_ticket(body, options = {}) ⇒ Object
Abre um ticket:
POST /ticket. -
#credentials(options = {}) ⇒ Object
Credenciais do usuario:
GET /credentials. -
#indications(options = {}) ⇒ Object
Indicacoes do usuario:
GET /indications. -
#invoice_notes(options = {}) ⇒ Object
Notas fiscais das faturas:
GET /invoices/notes. -
#invoices(options = {}) ⇒ Object
Faturas:
GET /invoices. -
#jobs(options = {}) ⇒ Object
Jobs em fila do usuario:
GET /jobs. -
#mark_all_notifications_read(options = {}) ⇒ Object
Marca todas as notificacoes como lidas:
POST /notifications/mark-all-read. -
#mark_notification_read(id, options = {}) ⇒ Object
Marca uma notificacao como lida:
PATCH /notifications/{id}/read. -
#notifications(options = {}) ⇒ Object
Notificacoes:
GET /notifications. -
#pay_invoice(body, options = {}) ⇒ Object
Paga uma fatura:
POST /invoices/pay. -
#plan(options = {}) ⇒ Object
Plano atual:
GET /plan. -
#requests(body = nil, options = {}) ⇒ Object
Historico de requisicoes da conta:
POST /requests. -
#ticket_messages(id, options = {}) ⇒ Object
Mensagens de um ticket:
GET /ticket/{id}/messages. -
#tickets(options = {}) ⇒ Object
Tickets de suporte:
GET /tickets. -
#update_ticket(id, body, options = {}) ⇒ Object
Atualiza um ticket:
PUT /ticket/{id}.
Methods inherited from BaseService
#delete, #download, #get, #initialize, #patch, #post, #put
Constructor Details
This class inherits a constructor from ApiBrasil::Services::BaseService
Instance Method Details
#add_ticket_message(id, body, options = {}) ⇒ Object
Responde um ticket: POST /ticket/{id}/messages.
132 133 134 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 132 def (id, body, = {}) post("/ticket/#{id}/messages", body, ) end |
#api_requests(body = nil, options = {}) ⇒ Object
Historico de requisicoes por API: POST /api/requests.
55 56 57 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 55 def api_requests(body = nil, = {}) post("/api/requests", body, ) end |
#balance(options = {}) ⇒ Object
Saldo/creditos da conta: GET /balance.
13 14 15 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 13 def balance( = {}) get("/balance", ) end |
#create_ticket(body, options = {}) ⇒ Object
Abre um ticket: POST /ticket.
111 112 113 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 111 def create_ticket(body, = {}) post("/ticket", body, ) end |
#credentials(options = {}) ⇒ Object
Credenciais do usuario: GET /credentials.
69 70 71 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 69 def credentials( = {}) get("/credentials", ) end |
#indications(options = {}) ⇒ Object
Indicacoes do usuario: GET /indications.
76 77 78 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 76 def indications( = {}) get("/indications", ) end |
#invoice_notes(options = {}) ⇒ Object
Notas fiscais das faturas: GET /invoices/notes.
34 35 36 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 34 def invoice_notes( = {}) get("/invoices/notes", ) end |
#invoices(options = {}) ⇒ Object
Faturas: GET /invoices.
27 28 29 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 27 def invoices( = {}) get("/invoices", ) end |
#jobs(options = {}) ⇒ Object
Jobs em fila do usuario: GET /jobs.
62 63 64 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 62 def jobs( = {}) get("/jobs", ) end |
#mark_all_notifications_read(options = {}) ⇒ Object
Marca todas as notificacoes como lidas: POST /notifications/mark-all-read.
97 98 99 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 97 def mark_all_notifications_read( = {}) post("/notifications/mark-all-read", nil, ) end |
#mark_notification_read(id, options = {}) ⇒ Object
Marca uma notificacao como lida: PATCH /notifications/{id}/read.
90 91 92 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 90 def mark_notification_read(id, = {}) patch("/notifications/#{id}/read", nil, ) end |
#notifications(options = {}) ⇒ Object
Notificacoes: GET /notifications.
83 84 85 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 83 def notifications( = {}) get("/notifications", ) end |
#pay_invoice(body, options = {}) ⇒ Object
Paga uma fatura: POST /invoices/pay.
41 42 43 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 41 def pay_invoice(body, = {}) post("/invoices/pay", body, ) end |
#plan(options = {}) ⇒ Object
Plano atual: GET /plan.
20 21 22 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 20 def plan( = {}) get("/plan", ) end |
#requests(body = nil, options = {}) ⇒ Object
Historico de requisicoes da conta: POST /requests.
48 49 50 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 48 def requests(body = nil, = {}) post("/requests", body, ) end |
#ticket_messages(id, options = {}) ⇒ Object
Mensagens de um ticket: GET /ticket/{id}/messages.
125 126 127 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 125 def (id, = {}) get("/ticket/#{id}/messages", ) end |
#tickets(options = {}) ⇒ Object
Tickets de suporte: GET /tickets.
104 105 106 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 104 def tickets( = {}) get("/tickets", ) end |
#update_ticket(id, body, options = {}) ⇒ Object
Atualiza um ticket: PUT /ticket/{id}.
118 119 120 |
# File 'lib/api_brasil/services/platform/account_service.rb', line 118 def update_ticket(id, body, = {}) put("/ticket/#{id}", body, ) end |