bunq_rb 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bunq_rb/client.rb +8 -2
- data/lib/bunq_rb/objects/cash_register.rb +1 -1
- data/lib/bunq_rb/objects/device_server.rb +6 -1
- data/lib/bunq_rb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2111635e34659cdd0b1fe0af0dcce466756820bd
|
4
|
+
data.tar.gz: 6082e93e15c0d6a17094cacecc99bc2720802970
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dad7f4549572c10dd560149e9db0ef3d2082db1a9896d8c8cea6ce80e5fb661cf56f112af10e0efd7b9d20d6c688ab3ae5585b33dcf9399b6af8588c845cdd36
|
7
|
+
data.tar.gz: de1bec5c3fe7b45608c158c9e5bb143e53d5289a0a5b3aabf4679244b72bc52f53754660cd38fb661510c581c6f58a7e13498c8a112f39ac23e09b2448c2bde7
|
data/lib/bunq_rb/client.rb
CHANGED
@@ -32,8 +32,13 @@ module BunqRb
|
|
32
32
|
response = Client.send_method(:post, uri, args)
|
33
33
|
new(response[0]["Id"])
|
34
34
|
end
|
35
|
+
when :put
|
36
|
+
define_singleton_method(:update) do |*args|
|
37
|
+
response = Client.send_method(:post, uri, args)
|
38
|
+
new(response[0]["Id"])
|
39
|
+
end
|
35
40
|
else
|
36
|
-
puts "ERROR"
|
41
|
+
puts "ERROR for: #{call}"
|
37
42
|
end
|
38
43
|
end
|
39
44
|
end
|
@@ -61,7 +66,8 @@ require_relative "objects/tab_usage_single"
|
|
61
66
|
module BunqRb
|
62
67
|
# Client
|
63
68
|
class Client
|
64
|
-
BASE_URL = "https://sandbox.public.api.bunq.com".freeze
|
69
|
+
# BASE_URL = "https://sandbox.public.api.bunq.com".freeze
|
70
|
+
BASE_URL = "https://api.bunq.com".freeze
|
65
71
|
|
66
72
|
def self.connection
|
67
73
|
@connection ||= Faraday.new(url: BASE_URL) do |config|
|
@@ -3,7 +3,7 @@ module BunqRb
|
|
3
3
|
class DeviceServer
|
4
4
|
include BunqRb::Shared
|
5
5
|
|
6
|
-
implements :
|
6
|
+
implements :get, :list
|
7
7
|
|
8
8
|
attr_reader :id
|
9
9
|
|
@@ -14,5 +14,10 @@ module BunqRb
|
|
14
14
|
def self.uri
|
15
15
|
"/v1/device-server"
|
16
16
|
end
|
17
|
+
|
18
|
+
def self.create(hash = {})
|
19
|
+
response = Client.send_method(:post, uri, hash)
|
20
|
+
new(response[0]["Id"])
|
21
|
+
end
|
17
22
|
end
|
18
23
|
end
|
data/lib/bunq_rb/version.rb
CHANGED