ruconomic 0.9.0
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 +7 -0
- data/.gitignore +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +100 -0
- data/Rakefile +2 -0
- data/lib/ruconomic/api/account.rb +520 -0
- data/lib/ruconomic/api/accounting_period.rb +113 -0
- data/lib/ruconomic/api/accounting_year.rb +161 -0
- data/lib/ruconomic/api/activity.rb +90 -0
- data/lib/ruconomic/api/bank_payment_type.rb +103 -0
- data/lib/ruconomic/api/budget_figure.rb +343 -0
- data/lib/ruconomic/api/cash_book.rb +232 -0
- data/lib/ruconomic/api/cash_book_entry.rb +716 -0
- data/lib/ruconomic/api/company.rb +294 -0
- data/lib/ruconomic/api/cost_type.rb +138 -0
- data/lib/ruconomic/api/cost_type_group.rb +115 -0
- data/lib/ruconomic/api/creditor.rb +688 -0
- data/lib/ruconomic/api/creditor_contact.rb +269 -0
- data/lib/ruconomic/api/creditor_entry.rb +235 -0
- data/lib/ruconomic/api/creditor_group.rb +208 -0
- data/lib/ruconomic/api/currency.rb +67 -0
- data/lib/ruconomic/api/current_invoice.rb +1110 -0
- data/lib/ruconomic/api/current_invoice_line.rb +440 -0
- data/lib/ruconomic/api/current_supplier_invoice.rb +115 -0
- data/lib/ruconomic/api/current_supplier_invoice_line.rb +92 -0
- data/lib/ruconomic/api/debtor.rb +978 -0
- data/lib/ruconomic/api/debtor_contact.rb +328 -0
- data/lib/ruconomic/api/debtor_entry.rb +223 -0
- data/lib/ruconomic/api/debtor_group.rb +232 -0
- data/lib/ruconomic/api/delivery_location.rb +341 -0
- data/lib/ruconomic/api/department.rb +197 -0
- data/lib/ruconomic/api/distribution_key.rb +187 -0
- data/lib/ruconomic/api/document_archive_category.rb +163 -0
- data/lib/ruconomic/api/employee.rb +421 -0
- data/lib/ruconomic/api/employee_group.rb +199 -0
- data/lib/ruconomic/api/entry.rb +318 -0
- data/lib/ruconomic/api/extended_vat_zone.rb +79 -0
- data/lib/ruconomic/api/inventory_location.rb +91 -0
- data/lib/ruconomic/api/invoice.rb +655 -0
- data/lib/ruconomic/api/invoice_line.rb +248 -0
- data/lib/ruconomic/api/key_figure_code.rb +103 -0
- data/lib/ruconomic/api/mileage_entry.rb +319 -0
- data/lib/ruconomic/api/order.rb +1169 -0
- data/lib/ruconomic/api/order_line.rb +451 -0
- data/lib/ruconomic/api/price_group.rb +200 -0
- data/lib/ruconomic/api/product.rb +533 -0
- data/lib/ruconomic/api/product_group.rb +271 -0
- data/lib/ruconomic/api/product_price.rb +164 -0
- data/lib/ruconomic/api/project.rb +449 -0
- data/lib/ruconomic/api/project_group.rb +113 -0
- data/lib/ruconomic/api/quotation.rb +1145 -0
- data/lib/ruconomic/api/quotation_line.rb +451 -0
- data/lib/ruconomic/api/report_code.rb +78 -0
- data/lib/ruconomic/api/report_code_set.rb +89 -0
- data/lib/ruconomic/api/scanned_document.rb +175 -0
- data/lib/ruconomic/api/subscriber.rb +475 -0
- data/lib/ruconomic/api/subscription.rb +375 -0
- data/lib/ruconomic/api/subscription_line.rb +307 -0
- data/lib/ruconomic/api/sum_interval.rb +164 -0
- data/lib/ruconomic/api/template_collection.rb +78 -0
- data/lib/ruconomic/api/term_of_payment.rb +307 -0
- data/lib/ruconomic/api/time_entry.rb +258 -0
- data/lib/ruconomic/api/unit.rb +187 -0
- data/lib/ruconomic/api/vat_account.rb +151 -0
- data/lib/ruconomic/api.rb +79 -0
- data/lib/ruconomic/fault.rb +17 -0
- data/lib/ruconomic/soap/document.rb +79 -0
- data/lib/ruconomic/soap/node.rb +24 -0
- data/lib/ruconomic/soap.rb +7 -0
- data/lib/ruconomic/version.rb +3 -0
- data/lib/ruconomic/web_service.rb +50 -0
- data/lib/ruconomic.rb +42 -0
- data/ruconomic.gemspec +27 -0
- metadata +202 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0aa0d263eec7209d585309d5506456caac5a7e29
|
4
|
+
data.tar.gz: 300cf03c979e5f18bb960ca924fbab764430c8b6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 684e0023aa2197aa9375b31dc55218f2a195dbf03ae4122e5f4d9d746b41c8ad2ed2e819a67f60101c12493a83dc07276a0e5a7a104511d328ee7c92355bea87
|
7
|
+
data.tar.gz: fba583cc4eff3e0f555a9a131abfab60ad7ee4fbb8c04c3699066e44fc6b1fdab3d9c82bd8a71681fdb64f9c627893612b1feb79569b09ce456655d9a1db8ab1
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Tonni Tølbøll Lund Aagesen
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
# ruconomic
|
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).
|
4
|
+
|
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/ta/ruconomic/tree/master/lib/ruconomic/api).
|
6
|
+
|
7
|
+
So, the idea is that we [add functionality](https://github.com/ta/ruconomic#contributing) as needed.
|
8
|
+
|
9
|
+
## Dependencies
|
10
|
+
|
11
|
+
The ruconomic gem uses [libxml-ruby](https://github.com/xml4r/libxml-ruby) and [curb](https://github.com/taf2/curb) for that speedy experience.
|
12
|
+
|
13
|
+
To build those gems, you will maybe need to install some extra libraries. On a recent Ubuntu system:
|
14
|
+
|
15
|
+
```
|
16
|
+
$ sudo apt-get install libcurl4-openssl-dev libxml2-dev
|
17
|
+
```
|
18
|
+
|
19
|
+
## Installation
|
20
|
+
|
21
|
+
Add this line to your application's Gemfile:
|
22
|
+
|
23
|
+
gem 'ruconomic'
|
24
|
+
|
25
|
+
And then execute:
|
26
|
+
|
27
|
+
$ bundle
|
28
|
+
|
29
|
+
Or install it yourself as:
|
30
|
+
|
31
|
+
$ gem install ruconomic
|
32
|
+
|
33
|
+
## Usage
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
require "ruconomic"
|
37
|
+
|
38
|
+
Ruconomic.configure do |config|
|
39
|
+
config.agreement = "agreement"
|
40
|
+
config.username = "username"
|
41
|
+
config.password = "password"
|
42
|
+
end
|
43
|
+
|
44
|
+
Ruconomic.session do |api|
|
45
|
+
puts "API version: #{api.get_api_information}"
|
46
|
+
api::Debtor.create("101", "1", "My Company Ltd.", "HomeCountry")
|
47
|
+
api::Debtor.get_all.each do |handle|
|
48
|
+
debtor = api::Debtor.get_data(handle)
|
49
|
+
puts "Debtor #{debtor[:name]} (#{debtor[:handle][:number]}) has balance: #{debtor[:balance]}"
|
50
|
+
end
|
51
|
+
api::Debtor.delete("101")
|
52
|
+
end
|
53
|
+
|
54
|
+
# Catch SOAP errors
|
55
|
+
begin
|
56
|
+
...
|
57
|
+
rescue Ruconomic::Fault => e
|
58
|
+
puts e
|
59
|
+
end
|
60
|
+
|
61
|
+
# => Ruconomic::Fault { :code => 'soap:Client', :reason => 'Economic.Api.Exceptions.IntegrityException(E06000): The debtor does not exist. (id=<id>)', :details => '' }
|
62
|
+
```
|
63
|
+
|
64
|
+
## Contributing
|
65
|
+
|
66
|
+
1. Fork it ( https://github.com/ta/ruconomic/fork )
|
67
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
68
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
69
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
70
|
+
5. Create a new Pull Request
|
71
|
+
6. Enjoy your rightful place in the hall of fame below
|
72
|
+
|
73
|
+
## Contributors
|
74
|
+
|
75
|
+
Open for vacancy
|
76
|
+
|
77
|
+
## License
|
78
|
+
|
79
|
+
Copyright (c) 2014 Tonni Tølbøll Lund Aagesen
|
80
|
+
|
81
|
+
MIT License
|
82
|
+
|
83
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
84
|
+
a copy of this software and associated documentation files (the
|
85
|
+
"Software"), to deal in the Software without restriction, including
|
86
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
87
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
88
|
+
permit persons to whom the Software is furnished to do so, subject to
|
89
|
+
the following conditions:
|
90
|
+
|
91
|
+
The above copyright notice and this permission notice shall be
|
92
|
+
included in all copies or substantial portions of the Software.
|
93
|
+
|
94
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
95
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
96
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
97
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
98
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
99
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
100
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED