vpsa 0.0.1 → 0.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
  SHA1:
3
- metadata.gz: 2581e6b2cdc9efced4649c51b61371830699181b
4
- data.tar.gz: 7981e944fedbcec6c9ff819892fccd91afc8e5bb
3
+ metadata.gz: a3b2f1b422fdf83a67ae33e4adb5500bf89cdab5
4
+ data.tar.gz: e4acffe7bc8a452f75b642682cc8b97bb19a9f0f
5
5
  SHA512:
6
- metadata.gz: e1773d21003f1db07315779909f370dc6384df13bad48d53e4ec4e46138948c127e6b11cca93ab10910a12d247556fd778ba4bb9638b2a7bb42081f197208658
7
- data.tar.gz: 687cdff259911bf1512a10c1849e8cde3e08c89997572a935eb4c6caa05e67c96c21216828f5308e4d9b5b1cbafba304fffce0fd20cb818a80398761e8158dc8
6
+ metadata.gz: 8a58c951576baafa2b2d8823b955550c7a91da08743d9deda461d35d4b7490abb1a40bc9214a09fc6956eb91576727b1cd27b4c546380f9475ecb518f49db8b1
7
+ data.tar.gz: 7346a6a8a84d9cba5a216e520aee99da0c3b35a50f7e4ddd4c980302574792c63ec0b5fb342cb16c790cf9e9feb3060effe7742caab6ece786fa4b5e9428c4df
data/README.md CHANGED
@@ -33,6 +33,7 @@ With the client instance, you can access the following resources:
33
33
  * Terceiros (client.third_parties) **Listing and finding**
34
34
  * Entidades (client.entities) **Listing and finding**
35
35
  * Lançamentos Padrões (client.default_entries) **Listing and finding**
36
+ * Provisões (client.provisions) **Only Creation**
36
37
 
37
38
  ## Using the resources
38
39
  ### Listing
@@ -55,6 +56,15 @@ It finds the resource with the passed ID.
55
56
  Vpsa.new(YOUR_ACCESS_TOKEN).third_parties.find(4)
56
57
  ```
57
58
 
59
+ ### Creation
60
+ Some resources implement a **create** method.
61
+
62
+ It creates a new resource base on the information passed via Hash.
63
+
64
+ ```ruby
65
+ Vpsa.new(YOUR_ACCESS_TOKEN).provisions.create({:"idLancamentoPadrao" => 3, :"idEntidade" => 1, :"idTerceiro" => 15, :"data" => "21-10-2012", :"valor" =>123.40, :"historico" => "histórico da provisão"})
66
+ ```
67
+
58
68
  ### Reading the response
59
69
  All methods return an Vpsa::Client::Response object. This objects contains the following attributes:
60
70
 
@@ -1,7 +1,7 @@
1
1
  module Vpsa
2
2
  module Api
3
3
  class Provisions < Client
4
- base_uri "https://www.vpsa.com.br/apps/api/provisoes"
4
+ base_uri "https://www.vpsa.com.br/apps/api/provisoes-contas"
5
5
 
6
6
  def create(data)
7
7
  return parse_response(self.class.post("/", :body => build_body(data), :headers => header))
data/lib/vpsa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Vpsa
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -5,7 +5,7 @@ RSpec.describe Vpsa::Api::Provisions do
5
5
 
6
6
  describe "listing" do
7
7
  before(:each) do
8
- stub_request(:post, "https://www.vpsa.com.br/apps/api/provisoes/").to_return(:status => 201)
8
+ stub_request(:post, "https://www.vpsa.com.br/apps/api/provisoes-contas/").to_return(:status => 201)
9
9
  end
10
10
 
11
11
  let(:provision_param) {{:"idLancamentoPadrao" => 3, :"idEntidade" => 1, :"idTerceiro" => 2, :data => "25-02-2019", :valor => "123.50", :historico => "histórico"}}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vpsa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gustavo Berdugo