vpsa 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vpsa/api/third_parties.rb +4 -0
- data/lib/vpsa/version.rb +1 -1
- data/spec/vpsa/api/third_parties_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b4ad9ceb624244e09b367ecf51d5ea9781297f3
|
4
|
+
data.tar.gz: eaadaa028010f6c8504ccfa73c8d4117198c5f73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c9899a7bed43740f77f3257315527961deb4334d51a943f729c402b762354ecadf397ad3624f26038c805e6ce0d164cf5333ac7a0f437c93118fc411353e121
|
7
|
+
data.tar.gz: deeb1fd792502ce1a08ebd2d9a3cccd83aa9fc2a7239d75beeae71b745c44779ed8be3b8f339ccaa4da0f76a9b89d2f986fd579fdae9fd517fce5d4a9fd6cce2
|
@@ -42,6 +42,10 @@ module Vpsa
|
|
42
42
|
def unlock_credit_limit(id, justification)
|
43
43
|
return parse_response(self.class.put("/#{id}/limites_credito/desbloquear", :body => build_body({"justificativa" => justification}), :headers => header))
|
44
44
|
end
|
45
|
+
|
46
|
+
def credit_limit_history(id)
|
47
|
+
return parse_response(self.class.get("/#{id}/limites_credito/historico", :body => build_body, :headers => header))
|
48
|
+
end
|
45
49
|
end
|
46
50
|
end
|
47
51
|
end
|
data/lib/vpsa/version.rb
CHANGED
@@ -156,5 +156,17 @@ RSpec.describe Vpsa::Api::ThirdParties do
|
|
156
156
|
Vpsa.new("abc").third_parties.unlock_credit_limit(5, "Cliente pagou")
|
157
157
|
end
|
158
158
|
end
|
159
|
+
|
160
|
+
context "history" do
|
161
|
+
before(:each) do
|
162
|
+
stub_request(:get, "https://www.vpsa.com.br/apps/api/terceiros/5/limites_credito/historico").to_return(:status => 200)
|
163
|
+
end
|
164
|
+
|
165
|
+
it "should issue a get to the third party credit history url" do
|
166
|
+
expect(Vpsa::Api::ThirdParties).to receive(:get).with("/5/limites_credito/historico", :body => {:token => "abc"}.to_json, :headers => header).and_call_original
|
167
|
+
|
168
|
+
Vpsa.new("abc").third_parties.credit_limit_history(5)
|
169
|
+
end
|
170
|
+
end
|
159
171
|
end
|
160
172
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vpsa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gustavo Berdugo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|