mp_api 0.3.9 → 0.3.11

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: 48502672bd54cbc042ef54a26dc316c50234c833ab5f31031c1579dcfc6ca653
4
- data.tar.gz: 9560c8e8acfb40c240bcbdc177c3d134bed092b9f4b442a22c29d4ff66856db8
3
+ metadata.gz: e54d28e5a1b179d4711e51aa269bfae4e46c928e059771cd9cc599ad2a4b16df
4
+ data.tar.gz: 0d87f7a4c37a431a39f0c3916256cce2e3cd465f569e325c119708626a1802d1
5
5
  SHA512:
6
- metadata.gz: bae242985b66501ea05511ba97bf6b79f568058c9cf1771582034270f5b0ad6f064dc6be88f681604a19b8b6416152756b1878b736b59263d9f4cc26ead0c928
7
- data.tar.gz: e164962d26a36bbe9be7dba1301e84fcbdbb0637aef1755693d2d66af7ce513d0b9f5a3ddc9a6e940fde823084a797f33047cad973dcf0047af7814c49f7109c
6
+ metadata.gz: 7fbea8df281e4b274785c3e98ee91581ca254cda270dcb6f00a3ff75d8f559c9bf03f849ee4d87354118c14d7e02575b7d0bfdf624ee98edb5fa21bf2f1891d4
7
+ data.tar.gz: 8e6cd4d15c1a1e96d425651811516f6f7f42533caa3c23479212b9f902dbd0b86ac2e263c5b7e3e3cc9f3a558729c2ed01a65b2d7a91131bd38be2cf36e7b4a3
@@ -22,7 +22,7 @@ module MpApi
22
22
  end
23
23
 
24
24
  def failed_payment_error
25
- message_by_error_message(json_response["cause"]&.first["description"])
25
+ message_by_error_message(json_response.dig("cause", 0, "description"))
26
26
  end
27
27
 
28
28
  def message_by_status_detail(status_detail)
@@ -38,7 +38,8 @@ module MpApi
38
38
 
39
39
  def message_by_error_message(error_message)
40
40
  {
41
- "Invalid user identification number" => "CPF inválido."
41
+ "Invalid user identification number" => "CPF inválido.",
42
+ "payer.email must be a valid email" => "E-mail inválido."
42
43
  # "Payer email forbidden" => "E-mail inválido.", Caso do erro no email test_user_2147198029@testuser.com (Nao sei se da pra causar com email valido)
43
44
  }[error_message]
44
45
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MpApi
4
- VERSION = "0.3.9"
4
+ VERSION = "0.3.11"
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.9
4
+ version: 0.3.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - caio