treezor_connect 0.9.0 → 0.11.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63c5794ec9d2eb6adc033b8c7f563e18d1720a1082a8f4cd48fc71b8f3234107
|
4
|
+
data.tar.gz: fabdb2ac3bc884fc68b7d6ca8676edddde2ca1d5079766bada6ecbd65b7bd954
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a37966bf58f58ce4890abba4be4f493d65bababdd6d06aaf478d93e1525a8bc4b1c5a22dfce7db170875bf6d25b34d45a1d93bf67befdf3074fe7f6ef180bb18
|
7
|
+
data.tar.gz: d26117045344203af284241313e53b8fc527bc2bdb4dcae60c0e8d0d4e7e88f09fdfc41d74f3d8cf82993d259a7d2f628771b59e6e4008780b6293ba39b8e73a
|
@@ -41,7 +41,11 @@ module TreezorConnect
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def raise_api_error(http_status:, http_body:)
|
44
|
-
raise ApiError
|
44
|
+
raise ApiError.new(
|
45
|
+
"API request failed: #{http_body.inspect} (HTTP response code was #{http_status})",
|
46
|
+
http_body,
|
47
|
+
http_status
|
48
|
+
)
|
45
49
|
end
|
46
50
|
|
47
51
|
def token_expired?(token)
|
@@ -1,3 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class ApiError < StandardError
|
3
|
+
class ApiError < StandardError
|
4
|
+
attr_reader :errors, :status
|
5
|
+
|
6
|
+
def initialize(message = '', errors = {}, status = 0)
|
7
|
+
@errors = errors
|
8
|
+
@status = status
|
9
|
+
|
10
|
+
super(message)
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TreezorConnect
|
4
|
+
class CardImage < ApiResource
|
5
|
+
extend TreezorConnect::ApiOperations::List
|
6
|
+
|
7
|
+
OBJECT_NAME = 'cardImage'
|
8
|
+
OBJECT_KEY = 'cardimages'
|
9
|
+
OBJECT_PRIMARY_KEY = 'id'
|
10
|
+
|
11
|
+
def self.resource_url
|
12
|
+
'/v1/cardimages'
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'treezor_connect/resources/beneficiary'
|
4
|
+
require 'treezor_connect/resources/card_image'
|
4
5
|
require 'treezor_connect/resources/payin'
|
5
6
|
require 'treezor_connect/resources/oauth/token'
|
6
7
|
require 'treezor_connect/resources/sca/external_operation'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: treezor_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stefakins
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-11-13 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A gem for making HTTP calls to Treezor Connect.
|
15
15
|
email: stefan.atkinson69@gmail.com
|
@@ -29,6 +29,7 @@ files:
|
|
29
29
|
- lib/treezor_connect/errors.rb
|
30
30
|
- lib/treezor_connect/resources.rb
|
31
31
|
- lib/treezor_connect/resources/beneficiary.rb
|
32
|
+
- lib/treezor_connect/resources/card_image.rb
|
32
33
|
- lib/treezor_connect/resources/oauth/token.rb
|
33
34
|
- lib/treezor_connect/resources/payin.rb
|
34
35
|
- lib/treezor_connect/resources/sca/external_operation.rb
|