butterware-kashflow 0.0.9 → 0.1.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.
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +3 -1
- data/README.mkd +1 -1
- data/VERSION +1 -1
- data/butterware-kashflow.gemspec +5 -3
- data/lib/kashflow/client.rb +3 -4
- metadata +6 -4
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
kashflow
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-1.9.3-p392
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
GEM
|
2
|
-
remote:
|
2
|
+
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
4
|
activesupport (3.2.8)
|
5
5
|
i18n (~> 0.6)
|
@@ -22,6 +22,7 @@ GEM
|
|
22
22
|
json (1.7.5)
|
23
23
|
multi_json (1.3.6)
|
24
24
|
nokogiri (1.5.5)
|
25
|
+
nokogiri (1.5.5-x86-mingw32)
|
25
26
|
nori (1.1.3)
|
26
27
|
rack (1.4.1)
|
27
28
|
rake (0.9.2.2)
|
@@ -47,6 +48,7 @@ GEM
|
|
47
48
|
|
48
49
|
PLATFORMS
|
49
50
|
ruby
|
51
|
+
x86-mingw32
|
50
52
|
|
51
53
|
DEPENDENCIES
|
52
54
|
activesupport
|
data/README.mkd
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0
|
1
|
+
0.1.0
|
data/butterware-kashflow.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "butterware-kashflow"
|
8
|
-
s.version = "0.0
|
8
|
+
s.version = "0.1.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Pogodan", "David Bourguignon"]
|
12
|
-
s.date = "
|
12
|
+
s.date = "2013-05-24"
|
13
13
|
s.description = "A Ruby wrapper for the Kashflow Accouting SOAP API"
|
14
14
|
s.email = "david@butterware.co.uk"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -18,6 +18,8 @@ Gem::Specification.new do |s|
|
|
18
18
|
]
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
|
+
".ruby-gemset",
|
22
|
+
".ruby-version",
|
21
23
|
"Gemfile",
|
22
24
|
"Gemfile.lock",
|
23
25
|
"LICENSE.txt",
|
@@ -38,7 +40,7 @@ Gem::Specification.new do |s|
|
|
38
40
|
s.homepage = "https://github.com/butterware/kashflow"
|
39
41
|
s.licenses = ["MIT"]
|
40
42
|
s.require_paths = ["lib"]
|
41
|
-
s.rubygems_version = "1.8.
|
43
|
+
s.rubygems_version = "1.8.25"
|
42
44
|
s.summary = "A Ruby wrapper for the Kashflow SOAP API"
|
43
45
|
|
44
46
|
if s.respond_to? :specification_version then
|
data/lib/kashflow/client.rb
CHANGED
@@ -72,14 +72,13 @@ module Kashflow
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def object_wrapper(name, params_xml)
|
75
|
-
object_alias = {:customer => "custr", :quote => "quote", :invoice => "Inv", :supplier => "supl", :receipt => "Inv", :line => "InvLine"}
|
75
|
+
object_alias = {:customer => "custr", :quote => "quote", :invoice => "Inv", :supplier => "supl", :receipt => "Inv", :line => "InvLine", :payment => "InvoicePayment"}
|
76
76
|
needs_object = [ "insert", "update" ]
|
77
77
|
operation, object, line = name.to_s.split("_")
|
78
78
|
if needs_object.include? operation
|
79
|
-
text = object_alias[object.to_sym]
|
79
|
+
text = line ? object_alias[line.to_sym] : object_alias[object.to_sym]
|
80
80
|
text = "sup" if operation == "update" and object == "supplier"
|
81
|
-
if line
|
82
|
-
text = object_alias[:line]
|
81
|
+
if line == "line" # prevent add_invoice_payment trying to do below actions
|
83
82
|
case name.to_s
|
84
83
|
when "insert_invoice_line_with_invoice_number"
|
85
84
|
line_id = "<InvoiceNumber>#{params_xml.match(/<InvoiceNumber>(.*?)<\/InvoiceNumber>/)[1]}</InvoiceNumber>\n\t\t"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: butterware-kashflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2013-05-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: savon
|
@@ -133,6 +133,8 @@ extra_rdoc_files:
|
|
133
133
|
- README.mkd
|
134
134
|
files:
|
135
135
|
- .document
|
136
|
+
- .ruby-gemset
|
137
|
+
- .ruby-version
|
136
138
|
- Gemfile
|
137
139
|
- Gemfile.lock
|
138
140
|
- LICENSE.txt
|
@@ -164,7 +166,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
164
166
|
version: '0'
|
165
167
|
segments:
|
166
168
|
- 0
|
167
|
-
hash: -
|
169
|
+
hash: -4240421946762615456
|
168
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
171
|
none: false
|
170
172
|
requirements:
|
@@ -173,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
175
|
version: '0'
|
174
176
|
requirements: []
|
175
177
|
rubyforge_project:
|
176
|
-
rubygems_version: 1.8.
|
178
|
+
rubygems_version: 1.8.25
|
177
179
|
signing_key:
|
178
180
|
specification_version: 3
|
179
181
|
summary: A Ruby wrapper for the Kashflow SOAP API
|