cryptomus 0.1.1 → 0.2.1

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: e49802cff57624bbb245f1ea8b7cf8bc2d7a1e177683cd9e68cdc3bddd3f8f7a
4
- data.tar.gz: 43a88732580c696d8c7eb5cf15c4dcbddf23a9abf88ea615fad7a8c1c451275b
3
+ metadata.gz: 68eb557e31765c4d1a363dfb697dd1e31f0c6db217c745b8c19ed92fbae5832a
4
+ data.tar.gz: dd97f72723481953ca9650ea8a1c75e8e1a9ba4d9812360fb543e6ce9f08f942
5
5
  SHA512:
6
- metadata.gz: d40cfe81a18225790b22fb0d208a0f34142ab87e807b9dd48b1fe134b14ba49a6af68181cc9d2dcaa09a7b26a3da787e6f2d60236e7b9c3853b3d18d6f937285
7
- data.tar.gz: 63f67b6b483951efb0a87d21640f098ee051a62776a7420c5bd119e0e3bdd3e28d2ed7ef4cd9a03daeb75a6b290ec34807a01335d0b9cd4e36da795511af66cf
6
+ metadata.gz: a2d9cf35d2a5f0de4192e36955a6438b1f6c00b75169a0465145de61b3dd03bd0df29e63a03b58b486ca2c0c3531ca8b06f6e09584d3697b6ac608848ed90c4c
7
+ data.tar.gz: fce87f526d295612055a4d0843139f850757d1fe426fb2f11df2f5bc73993a9bf1dd7db7b20071a6fb8edacbc1759e3eb8d6a5982f1a9cafb108917bc0fed3ca
@@ -42,7 +42,14 @@ module Cryptomus
42
42
  # @raise [Cryptomus::Errors::ApiError]
43
43
  def payment(uuid: nil, order_id: nil)
44
44
  attributes = { uuid:, order_id: }.compact
45
- connection.get('/v1/payment/info', body: attributes)
45
+ connection.post('/v1/payment/info', body: attributes)
46
+ end
47
+
48
+ # https://doc.cryptomus.com/payments/list-of-services
49
+ # @return [Hash]
50
+ # @raise [Cryptomus::Errors::ApiError]
51
+ def list_services
52
+ connection.post('/v1/payment/services', body: {})
46
53
  end
47
54
 
48
55
  # https://doc.cryptomus.com/payments/creating-static
@@ -17,7 +17,8 @@ module Cryptomus
17
17
  @response = response
18
18
  @status = response&.status
19
19
  @response_body = response&.body
20
- msg ||= "Response #{status}, #{response_body}" if response
20
+ body_msg = response_body.is_a?(Hash) ? JSON.generate(response_body) : response_body
21
+ msg ||= "Response #{status}, #{body_msg}" if response
21
22
  super(msg || self.class.name)
22
23
  end
23
24
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptomus
4
- VERSION = '0.1.1'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptomus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Talakevich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-16 00:00:00.000000000 Z
11
+ date: 2023-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday