totalvoice-ruby 1.5.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/lib/api/conta.rb +32 -0
- data/lib/totalvoice/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fd153b5d90c0c587c42d2e4da23c939083828886d74c658ac377a658fc676624
|
4
|
+
data.tar.gz: d5aa962d9fbfa74c97aed2f68e35eb223fe23196f7d551b1592188bd6b76d438
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c553626c281e9a78edbafebcf3ef7a1ef7b5945e4aec2cbba5b577f87a74d65c8684d453928ef8d206c571981e227877afd345959132151e71e42eb305d43131
|
7
|
+
data.tar.gz: 950b21e20b4aa92f3be3b04054312e1f2fe3c2be045d92771df418102b253a29cdf96f76cfd0f3388b0c7e76eb2d13d68b2d7b9995fcd4cee60886405371d3cc
|
data/.gitignore
CHANGED
data/lib/api/conta.rb
CHANGED
@@ -6,6 +6,7 @@ module TotalVoice
|
|
6
6
|
class Conta
|
7
7
|
attr_reader :client
|
8
8
|
ROTA_CONTA = "/conta"
|
9
|
+
ROTA_WEBHOOK_DEFAULT = "/webhook-default"
|
9
10
|
|
10
11
|
def initialize(client)
|
11
12
|
@client = client
|
@@ -82,6 +83,37 @@ module TotalVoice
|
|
82
83
|
#
|
83
84
|
def recarga_bonus(id, nome, valor)
|
84
85
|
@client.post(Route.new([ROTA_CONTA, id.to_s, 'bonus']), { nome: nome, valor:valor })
|
86
|
+
end
|
87
|
+
|
88
|
+
##
|
89
|
+
# Retorna a lista de webhooks default configurados para esta conta
|
90
|
+
# @return [json]
|
91
|
+
#
|
92
|
+
def webhooks_default()
|
93
|
+
@client.get(Route.new([ROTA_CONTA, ROTA_WEBHOOK_DEFAULT]))
|
94
|
+
end
|
95
|
+
|
96
|
+
##
|
97
|
+
# Apaga um webhook default
|
98
|
+
#
|
99
|
+
# @param [String] nome
|
100
|
+
# @return [json]
|
101
|
+
#
|
102
|
+
def excluir_webhook_default(nome)
|
103
|
+
@client.delete(Route.new([ROTA_CONTA, ROTA_WEBHOOK_DEFAULT, nome]))
|
104
|
+
end
|
105
|
+
|
106
|
+
##
|
107
|
+
# Cadastra ou atualiza um webhook default
|
108
|
+
#
|
109
|
+
# @param [String] nome
|
110
|
+
# @param [String] url
|
111
|
+
# @return [json]
|
112
|
+
#
|
113
|
+
def salvar_webhook_default(nome, url)
|
114
|
+
@client.put(Route.new([ROTA_CONTA, ROTA_WEBHOOK_DEFAULT, nome]), {
|
115
|
+
url: url
|
116
|
+
})
|
85
117
|
end
|
86
118
|
end
|
87
119
|
end
|
data/lib/totalvoice/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: totalvoice-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DiloWagner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
85
|
rubyforge_project:
|
86
|
-
rubygems_version: 2.6
|
86
|
+
rubygems_version: 2.7.6
|
87
87
|
signing_key:
|
88
88
|
specification_version: 4
|
89
89
|
summary: Official TotalVoice Gem
|