vpsa 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/vpsa/api/third_parties.rb +2 -2
- data/lib/vpsa/version.rb +1 -1
- data/spec/vpsa/api/third_parties_spec.rb +4 -2
- 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: b6eb04dae2d75343bbc1a8e358bfddb6e8e23b6c
|
4
|
+
data.tar.gz: 87e5385337d27af96f20df30ab22c34721ad9d0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2669691e066a6d5b09807634ce11d00e9c34d584a284550e6edd7c63bdcc64599354c507a0f399ccfa4add0564d1ddf6cd16d352787a9c96986da5d9565f7801
|
7
|
+
data.tar.gz: b14635a7c8b38c4463a6821ae4eb49cf8418f994f1be8081ff77bc7ab0a39f14ff206052cda7f3139d42d19d12e877ecc4181a229dcd35d23ffc4bffaefc2c5d
|
@@ -43,8 +43,8 @@ module Vpsa
|
|
43
43
|
return parse_response(self.class.put("/#{id}/limites_credito/desbloquear", :body => build_body({"justificativa" => justification}), :headers => header))
|
44
44
|
end
|
45
45
|
|
46
|
-
def credit_limit_history(id)
|
47
|
-
return parse_response(self.class.get("/#{id}/limites_credito/historico", :body => build_body, :headers => header))
|
46
|
+
def credit_limit_history(id, start_date, end_date)
|
47
|
+
return parse_response(self.class.get("/#{id}/limites_credito/historico", :body => build_body({"desde" => start_date, "ate" => end_date}), :headers => header))
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
data/lib/vpsa/version.rb
CHANGED
@@ -158,14 +158,16 @@ RSpec.describe Vpsa::Api::ThirdParties do
|
|
158
158
|
end
|
159
159
|
|
160
160
|
context "history" do
|
161
|
+
let(:history_params) {{"desde" => Date.parse("01/01/2015"), "ate" => Date.parse("11/01/2015"), :token => "abc"}}
|
162
|
+
|
161
163
|
before(:each) do
|
162
164
|
stub_request(:get, "https://www.vpsa.com.br/apps/api/terceiros/5/limites_credito/historico").to_return(:status => 200)
|
163
165
|
end
|
164
166
|
|
165
167
|
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 =>
|
168
|
+
expect(Vpsa::Api::ThirdParties).to receive(:get).with("/5/limites_credito/historico", :body => history_params.to_json, :headers => header).and_call_original
|
167
169
|
|
168
|
-
Vpsa.new("abc").third_parties.credit_limit_history(5)
|
170
|
+
Vpsa.new("abc").third_parties.credit_limit_history(5, Date.parse("01/01/2015"), Date.parse("11/01/2015"))
|
169
171
|
end
|
170
172
|
end
|
171
173
|
end
|