payjp_mock 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/payjp_mock/request.rb +3 -0
- data/lib/payjp_mock/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: c7f977063630656f5c88303550868aa9236b9e4a
|
4
|
+
data.tar.gz: a2e2189498c05968358a6fb49a27b56402905cee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ea678234fd4172642bf3b2d339723b5a2fc87e589d123193d59bbd2667c7a936a9e42c7885bc05d20dd083382716b5ab25012035b8f0145da32a43b5f9db272
|
7
|
+
data.tar.gz: 80607c4f44c6c192814301d70b5231d9f303dc6049fd5a87e6a4ff9ce87360dd2d96065a980f3288c095238e9f91361f9b6a05fc1e9416a3cf57eb9032d166ee
|
data/lib/payjp_mock/request.rb
CHANGED
@@ -3,6 +3,7 @@ require 'webmock'
|
|
3
3
|
|
4
4
|
class PayjpMock::Request
|
5
5
|
include WebMock::API
|
6
|
+
using PayjpMock::Ext::Hash
|
6
7
|
|
7
8
|
API_HOST = 'api.pay.jp'.freeze
|
8
9
|
API_VERSION = 'v1'.freeze
|
@@ -17,5 +18,7 @@ class PayjpMock::Request
|
|
17
18
|
def stub
|
18
19
|
stub_request(@method, @url)
|
19
20
|
.to_return(body: @response.body, status: @response.status, exception: @response.exception)
|
21
|
+
|
22
|
+
JSON.parse(@response.body || '{}').symbolize_keys
|
20
23
|
end
|
21
24
|
end
|
data/lib/payjp_mock/version.rb
CHANGED