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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 72b04e1496a080336859483c426214a19c5744d1
4
- data.tar.gz: 80bbc1382e16645a932f947e355160d6563cee65
3
+ metadata.gz: 2111635e34659cdd0b1fe0af0dcce466756820bd
4
+ data.tar.gz: 6082e93e15c0d6a17094cacecc99bc2720802970
5
5
  SHA512:
6
- metadata.gz: 82f61f067739ffd939cfa1d5cdcaf1b4bcd0ff342432adb5a186207669d1169cfc2d328628e01fc179c2476ec3d6b7f94ddc91c9d912ef99071d19c786db1da2
7
- data.tar.gz: 217344c642a888358c7fd61c132149ab00a71bf634754b737d8d0d8cbe2f29e2558db8b904ce18eb2f43effa33f24e20d16d2755e918a9d2d830f754768e2d40
6
+ metadata.gz: dad7f4549572c10dd560149e9db0ef3d2082db1a9896d8c8cea6ce80e5fb661cf56f112af10e0efd7b9d20d6c688ab3ae5585b33dcf9399b6af8588c845cdd36
7
+ data.tar.gz: de1bec5c3fe7b45608c158c9e5bb143e53d5289a0a5b3aabf4679244b72bc52f53754660cd38fb661510c581c6f58a7e13498c8a112f39ac23e09b2448c2bde7
@@ -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 CashRegister
4
4
  include BunqRb::Shared
5
5
 
6
- implements :post, :puts, :get, :list
6
+ implements :post, :put, :get, :list
7
7
 
8
8
  attr_reader :id, :name, :status
9
9
 
@@ -3,7 +3,7 @@ module BunqRb
3
3
  class DeviceServer
4
4
  include BunqRb::Shared
5
5
 
6
- implements :post, :get, :list
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
@@ -1,3 +1,3 @@
1
1
  module BunqRb
2
- VERSION = "0.0.13".freeze
2
+ VERSION = "0.0.14".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bunq_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dunya Kirkali