inter_api 1.0.1 → 1.0.2

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: '00359604a49c1e13d27dc95669f21d4de43530b5d1101d0945cb5c33d90517f0'
4
- data.tar.gz: 6c7565195e26b407c1a0bb08a0a2188da5fe1f04b20c85319b4a9aca5ef16cd6
3
+ metadata.gz: 36661dd5aa68653e29608d07616fd26e0726640409f2188efaf99b8e3a44dcf4
4
+ data.tar.gz: 94eb00f18a9a1191014047249ca1050ce720dde93f0836965ab078abb6800ad5
5
5
  SHA512:
6
- metadata.gz: 0b91d9df2cd30a8c8109f02fe4676618c817df5599cefceb25178656565dc8da277766f9196ba633760c4f918c6ef350c2cba7e6906857b8dc34f515a4184af1
7
- data.tar.gz: c5f479d4773e988e80a5de2eaa8565c45142b8a062e44c073f09a43b0622ae02590964af25857c929f49dc33a78a236a99f26906cf3b6c199c2298b1e2ec2a0c
6
+ metadata.gz: 6a46510c801ffcba0d75ef5ca8bbea8d9b7d492b76957516a528dd8032b93d6440ebb8a6ee59ad629654991d7c14c0a0aecfb109148b6dbe76d67bbeedc10fd8
7
+ data.tar.gz: c2edb6b9c990e8161d0d4e52137da8585cd615ed1e69ba92d89e25a66f9c7ee1aea94a9cea0c1cbaea0366533bd45c7bb2b972e65003f70e8638bfb2f075ec0e
@@ -84,12 +84,12 @@ module InterApi
84
84
  end
85
85
 
86
86
  def update_payment(payment_id, body)
87
- response = update_payment_request(payment_id, body).run
87
+ response = patch("/pix/v2/cob/#{payment_id}", headers: build_headers, sslcert: @crt, sslkey: @key, body: JSON.dump(body)) { |response| validate_response(response, "txid") }
88
88
  InterApi::Payment.new(response.json, self)
89
89
  end
90
90
 
91
91
  def get_refund(end_to_end_id, id)
92
- response = get("/pix/v2/pix/#{end_to_end_id}/devolucao/#{id}", headers: build_headers, sslcert: @crt, sslkey: @key)
92
+ response = get("/pix/v2/pix/#{end_to_end_id}/devolucao/#{id}", headers: build_headers, sslcert: @crt, sslkey: @key) { |response| validate_response(response, "id") }
93
93
  response.json
94
94
  end
95
95
 
@@ -100,7 +100,7 @@ module InterApi
100
100
  natureza: refund_nature,
101
101
  descricao: description
102
102
  }
103
- response = put("/pix/v2/pix/#{end_to_end_id}/devolucao/#{id}", headers: build_headers, sslcert: @crt, sslkey: @key, body: JSON.dump(body))
103
+ response = put("/pix/v2/pix/#{end_to_end_id}/devolucao/#{id}", headers: build_headers, sslcert: @crt, sslkey: @key, body: JSON.dump(body)) { |response| validate_response(response, "id") }
104
104
  response.json
105
105
  end
106
106
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InterApi
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inter_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ulysses