ruconomic 0.9.2 → 0.9.3

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: 5f7eb2273f3f96a5cbc4301358312ff4a57e744c
4
- data.tar.gz: 97b3532dc67dc54646c706233367807873747062
3
+ metadata.gz: d8d6af3d92915cceb4b2a1c0250115aa04975d66
4
+ data.tar.gz: 04e85726d81de9bd598658b62ad44ec9cba87318
5
5
  SHA512:
6
- metadata.gz: c399900a8fcc87d93ffc09344987526477aee0e0e5ff7cce33c8241c02afe781b66c4124e97aff50eb8e9feadf5c375da744e2e547ebcd65a3c5c3fef244ac7a
7
- data.tar.gz: b85671084d3efe6b659c354cd30d5cf644f7332cb0fda556f2e0a7b786a5acdb6556e1438700779d974fd9b0aae4778246098c0af7038a36b2538ab74c790ee6
6
+ metadata.gz: 598073b1bb643cc69b49d0a2bb8dc16c3fa06579229014528b3cabda2152944ccf3d697e2e13b42d94e845ee69ab7a5c626b289b0eb8396fd9d3cee382b1352b
7
+ data.tar.gz: dfa3ea917ab897dd598647cabda4380f94401d25675270d054bca615fd62fec7669b80d962281c53e1d14803ce5ce85dd7f5eb75b85fff27514436a5e956fb2c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.3
4
+
5
+ - Added support for X-EconomicAppIdentifier header (dinesh)
6
+
7
+ ## 0.9.2
8
+
9
+ - Added fetching invoice by number (twarberg)
10
+
3
11
  ## 0.9.1
4
12
 
5
13
  - Added a changelog
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ruconomic
2
2
 
3
- The ruconomic gem provides a lightweight, speedy and easy-to-use ruby wrapper for the [e-conomic](http://www.e-conomic.com) SOAP web service - it will build, parse and transport some XML and little else. For a more full SOAPedelic experience, have a look at [rconomic](https://github.com/lokalebasen/rconomic).
3
+ The ruconomic gem provides a lightweight, speedy and easy-to-use ruby wrapper for the [e-conomic](http://www.e-conomic.com) SOAP web service - it will build, parse and transport some XML and little else. For a more full SOAPedelic experience, have a look at [rconomic](https://github.com/lokalebasen/rconomic).
4
4
 
5
5
  This gem is intended to be a crowd source project. The [e-conomic webservice](https://api.e-conomic.com/secure/api1/EconomicWebService.asmx) implements ~1500 operations(!), and all those operations are mapped to ruby classes and methods under ```lib/ruconomic/api``` - but not fully implemented. As always, the best way to understand is to [browse the source](https://github.com/coherify/ruconomic/tree/master/lib/ruconomic/api).
6
6
 
@@ -39,6 +39,8 @@ Ruconomic.configure do |config|
39
39
  config.agreement = "agreement"
40
40
  config.username = "username"
41
41
  config.password = "password"
42
+ # change for your integration but try to keep the format same
43
+ config.app_identifier = "MyCoolIntegration/1.1 (http://example.com/MyCoolIntegration/; MyCoolIntegration@example.com) Ruconomic/#{Ruconomic::VERSION}"
42
44
  end
43
45
 
44
46
  Ruconomic.session do |api|
@@ -63,7 +65,7 @@ end
63
65
 
64
66
  ## Documentation
65
67
 
66
- You can find the latest API documentation at [http://rdoc.info/github/ta/ruconomic/index](http://rdoc.info/github/ta/ruconomic/index) or generate your own copy with ```bundle install && bundle exec yardoc``` after cloning the repository.
68
+ You can find the latest API documentation at [http://rdoc.info/github/coherify/ruconomic/index](http://rdoc.info/github/coherify/ruconomic/index) or generate your own copy with ```bundle install && bundle exec yardoc``` after cloning the repository.
67
69
 
68
70
  ## Contributing
69
71
 
@@ -1,3 +1,3 @@
1
1
  module Ruconomic
2
- VERSION = "0.9.2"
2
+ VERSION = "0.9.3"
3
3
  end
@@ -16,10 +16,15 @@ module Ruconomic
16
16
 
17
17
  call(document.to_s(:indent => false), action)
18
18
  end
19
-
19
+
20
20
  def call(document, action)
21
21
  @@curl ||= Curl::Easy.new(Ruconomic.url) do |c|
22
22
  c.headers["Content-Type"] = "text/xml; charset=UTF-8"
23
+
24
+ if Ruconomic.app_identifier
25
+ c.headers['X-EconomicAppIdentifier'] = Ruconomic.app_identifier
26
+ end
27
+
23
28
  c.timeout = Ruconomic.timeout
24
29
  c.enable_cookies = true
25
30
  if Ruconomic.follow_redirects
data/lib/ruconomic.rb CHANGED
@@ -8,7 +8,7 @@ module Ruconomic
8
8
  URL = "https://www.e-conomic.com/secure/api1/EconomicWebService.asmx"
9
9
 
10
10
  class << self
11
- attr_accessor :agreement, :username, :password, :timeout, :follow_redirects, :max_redirects, :url
11
+ attr_accessor :agreement, :username, :password, :timeout, :follow_redirects, :max_redirects, :url, :app_identifier
12
12
 
13
13
  def configure &block
14
14
  yield self if block_given?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruconomic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tonni Tølbøll Lund Aagesen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-27 00:00:00.000000000 Z
11
+ date: 2015-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curb