vpsa 0.0.6 → 0.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6b4d8b0fed4ff40e9261960c1f8f0878a572479
4
- data.tar.gz: ff9f391fa16f63ed859cb56b73a3b2a5cdbdf1eb
3
+ metadata.gz: 7b4ad9ceb624244e09b367ecf51d5ea9781297f3
4
+ data.tar.gz: eaadaa028010f6c8504ccfa73c8d4117198c5f73
5
5
  SHA512:
6
- metadata.gz: 5adab1ea1aa5b44c6c3fd0f88e256612c4359e9c200eafdb3ced889e2baed84d208ce66ffe6f3701796b0c38e8c1feb9fcc63789f658efd6007303c42df038ff
7
- data.tar.gz: 85a8a4b51fabec034bd3cf8abb5e4423939b72d74c4205ceed8dce48007b91b7309313f651c12346887e830cfc11348a2813e85203edb62ab30d8005cc189a70
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
@@ -1,3 +1,3 @@
1
1
  module Vpsa
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -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.6
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-20 00:00:00.000000000 Z
11
+ date: 2015-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty