mp_api 0.3.7 → 0.3.8

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: c600eab092606f704327cff5ebe60fa86932272b751a4dd1103d6ebb4538c235
4
- data.tar.gz: 07b7972375ab32e0511db182e32b7a249f185af9c60844abc305c5cb4588717d
3
+ metadata.gz: 70b974d39a2f32b20eaf5ab1d1e71a808aee9727de3b440cbcaca6155b70b8be
4
+ data.tar.gz: 652c07eda8d6f6a2d246b86a0a95ccf5b564d28c7f4a02f253d849690f9cbaf3
5
5
  SHA512:
6
- metadata.gz: 05c48e6250018130c06654b768a809f88bf2a980b422566bc77edfec5da30668ba3708bd70213b259da6f40a2a4c5aa1ec9d51990df8289f3a4205a2ddefaff2
7
- data.tar.gz: 8e9e04813caa77e89d6cb26dd2d2ae1950b5e03d2a6e889c5be1fff5ea7cd659af0078ae2497f509d6e0f9c4de55d6c4861668a42cd48d75a67249b4abb85d69
6
+ metadata.gz: 21a90e4578f235b1c22fe19a83b2058b54c8d5d08376be73f67cb82ae7817a7c3fcb8b70cf61135eb8a440932ddc2aea916acb5802fe8d72ec21a10d9120813c
7
+ data.tar.gz: 2711a21679e9a2f34c25b88acf1dbf3e446267906ba9bf079d408e8d039c8a0d977674e1f8f4fe39c971cc1770883749c80492aea58feaee9f483204bf4ce5af
@@ -10,7 +10,8 @@ module MpApi
10
10
  end
11
11
 
12
12
  def internal_error
13
- json_response["cause"].first["description"]
13
+ return nil unless json_response["error"]
14
+ json_response["cause"]&.first["description"]
14
15
  end
15
16
 
16
17
  private
@@ -22,8 +23,7 @@ module MpApi
22
23
 
23
24
  def failed_payment_error
24
25
  return nil unless json_response["error"]
25
- json_response["cause"].first["description"]
26
- message_by_error_message(json_response["cause"].first["description"])
26
+ message_by_error_message(json_response["cause"]&.first["description"])
27
27
  end
28
28
 
29
29
  def message_by_status_detail(status_detail)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MpApi
4
- VERSION = "0.3.7"
4
+ VERSION = "0.3.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mp_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - caio