tinyerp_ruby 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTYyODBjMjJmZWNiYTAxMmQ2MmI4YTllNmUwYzdmZDAxMzFmN2Y2NA==
4
+ NzEzNThkZjExZTFjYzVhZDU2MWY3ZGViMWZlYjVjMmZhNDViNGE1MA==
5
5
  data.tar.gz: !binary |-
6
- OGI2NmViZWE3MTU2ZWRkODk0OWM4YzdjODQ5YTQ0ZDU5NDc5MmE3ZA==
6
+ NGU1MTlkNzQ0OWY0MWI4OGZjMjg4NGIxNGE0N2M1ZWRmMzIxMjllZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzQzYzYxYzA1NzQ0N2Q3NmQ5YTY0Zjg4Y2Y1MmNmYzlkZDAxMzQ4M2ExNjYy
10
- MzAzNzBkOWVjZWM0YTYxZjRjYmY0YmY4OTg2Mzc0Y2E4YmEwYTAxYmI2NWE0
11
- OTQ0OGIzMjc4ZWI1OGVjMWJmNjRjYTE2NTdkYjM0YjFhOGZhZTQ=
9
+ NWZjZTM1MmRmZmJiNTE1Yzg3YjJkN2U2ZTg3NmEwYjVjNjY3ODMxNjc5NjEx
10
+ YTMzZjdhNTRmMjEyNDhmZjMzMmRkYTFjNjU0NjZjZDlmMzEwNTI3OGFkMjQw
11
+ ZDFiZmVjYzIyM2FmMDM5YjlhMGRlZTM2NzQ2MjA1OGJkMDMwNmU=
12
12
  data.tar.gz: !binary |-
13
- NzJkMjk5YTdlZDJiZGRjZjgyNTViM2RiOGJlNGRkNTM4M2M4OGFkZTA2YjRk
14
- NmNiNWU5ZWIzNjc2Nzg4ODY0ZWE2YzRkZGU2NzhlNzMwOGYwMTA4MzkzN2Rj
15
- YjIyMzdmMGRkMTNmNDNkZjMzNzI0MDBiNzZlNDg5YTFhMTljY2M=
13
+ MWEwNmVlYzc0ZTJhZWY3MTQ2MThjMDU3ZWU5MDQ1ZTEzNWFkNjU2MTgwYjk4
14
+ MjkxYjBkZWRhY2FhMWY0MTU5NmVkOGRkNDZkNmY3OGUyMmYxNWU4OTE5ZmI3
15
+ MDk0MWMzYTZkYmExNTZlZjhkMzNjMTVhNWU3MTA0ZjZjMmE3YTk=
data/README.md CHANGED
@@ -7,6 +7,8 @@ by [Locomotiva.pro](http://locomotiva.pro)
7
7
 
8
8
  Gem for integration with [TinyERP](http://www.tiny.com.br) API. At the moment this gem is tested under ruby 1.9.3 and have some problems with ruby 2.0 because an weird behaviour with encoding.
9
9
 
10
+ #### Warning at this moment this gem does not work with ruby 2.0 on OsX.
11
+
10
12
  ## Installation
11
13
 
12
14
  Add this line to your application's Gemfile:
@@ -35,11 +37,11 @@ Then we create a service object.
35
37
 
36
38
  poster = TinyerpRuby::Service.new connection
37
39
 
38
- With service object created we just need to call the api methods and pass a hash according api description.
40
+ With service object created we just need to call the api methods and pass a hash according api description. Keep note that you must pass a hash of size one, where the key is the symbol with the parameter according to Tiny API and the value is another hash formatted according to Tiny API too.
39
41
 
40
42
  params = {....}
41
43
  return_params = poster.pesquisar_vendedores_service(id: params)
42
- return_params = poster.incluir_pedido_service(pedido: params.to_json)
44
+ return_params = poster.incluir_pedido_service(pedido: params)
43
45
 
44
46
  The list with complete api method is found [here.](http://www.tiny.com.br/manuais/api2/)
45
47
 
@@ -14,9 +14,10 @@ module TinyerpRuby
14
14
 
15
15
  private
16
16
  def formatted_params(params)
17
+ params = params.first
17
18
  formatted = { token: @connection.api_key }
18
19
  formatted.delete(:formato)
19
- formatted.merge!(params)
20
+ formatted.merge!({params.first => params.last.to_json})
20
21
  formatted.merge!({formato: 'json'})
21
22
  formatted
22
23
  end
@@ -1,3 +1,3 @@
1
1
  module TinyerpRuby
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tinyerp_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Tierno