kashflow_api 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/kashflow_api/api_call.rb +4 -0
- data/lib/kashflow_api/models/line.rb +13 -1
- data/lib/kashflow_api/version.rb +1 -1
- metadata +53 -61
@@ -80,12 +80,16 @@ module KashflowApi
|
|
80
80
|
elsif @object == "receipt"
|
81
81
|
if @field == "Line"
|
82
82
|
out = "<ReceiptID>#{argument.receiptid}</ReceiptID><InvLine>#{argument.to_xml}</InvLine>"
|
83
|
+
elsif @field == "Number"
|
84
|
+
out = "<ReceiptNumber>#{argument.receiptnumber}</ReceiptNumber><InvLine>#{argument.to_xml}</InvLine>"
|
83
85
|
else
|
84
86
|
out = "<Inv>#{argument.to_xml}</Inv>"
|
85
87
|
end
|
86
88
|
elsif @object == "invoice"
|
87
89
|
if @field == "Line"
|
88
90
|
out = "<InvoiceID>#{argument.invoiceid}</InvoiceID><InvLine>#{argument.to_xml}</InvLine>"
|
91
|
+
elsif @field == "Number"
|
92
|
+
out = "<InvoiceNumber>#{argument.invoicenumber}</InvoiceNumber><InvLine>#{argument.to_xml}</InvLine>"
|
89
93
|
else
|
90
94
|
out = "<Inv>#{argument.to_xml}</Inv>"
|
91
95
|
end
|
@@ -5,6 +5,10 @@ module KashflowApi
|
|
5
5
|
insert_receipt_line
|
6
6
|
elsif @hash["InvoiceID"] != ""
|
7
7
|
insert_invoice_line
|
8
|
+
elsif @hash["InvoiceNumber"] != ""
|
9
|
+
insert_invoice_number_line
|
10
|
+
elsif @hash["ReceiptNumber"] != ""
|
11
|
+
insert_receipt_number_line
|
8
12
|
end
|
9
13
|
end
|
10
14
|
|
@@ -24,7 +28,7 @@ module KashflowApi
|
|
24
28
|
private
|
25
29
|
|
26
30
|
def blank_object_hash
|
27
|
-
{"Quantity" => "", "Description" => "", "ChargeType" => "", "VatAmount" => "", "VatRate" => "", "Rate" => "", "ReceiptID" => "", "InvoiceID" => "" }
|
31
|
+
{"Quantity" => "", "Description" => "", "ChargeType" => "", "VatAmount" => "", "VatRate" => "", "Rate" => "", "ReceiptID" => "", "InvoiceID" => "", "InvoiceNumber" => "", "ReceiptNumber" => "" }
|
28
32
|
end
|
29
33
|
|
30
34
|
def insert_receipt_line
|
@@ -34,5 +38,13 @@ module KashflowApi
|
|
34
38
|
def insert_invoice_line
|
35
39
|
KashflowApi.api.insert_invoice_line(self)
|
36
40
|
end
|
41
|
+
|
42
|
+
def insert_invoice_number_line
|
43
|
+
KashflowApi.api.insert_invoice_line_with_invoice_number(self)
|
44
|
+
end
|
45
|
+
|
46
|
+
def insert_receipt_number_line
|
47
|
+
KashflowApi.api.insert_receipt_line_from_number(self)
|
48
|
+
end
|
37
49
|
end
|
38
50
|
end
|
data/lib/kashflow_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,58 +1,55 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: kashflow_api
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
version: 0.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Adam "Arcath" Laycock
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-10-08 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: rspec
|
22
|
-
|
23
|
-
|
24
|
-
requirements:
|
25
|
-
- -
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
- 0
|
29
|
-
version: "0"
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
30
22
|
type: :development
|
31
|
-
version_requirements: *id001
|
32
|
-
- !ruby/object:Gem::Dependency
|
33
|
-
name: savon
|
34
23
|
prerelease: false
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: savon
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - '='
|
36
|
+
- !ruby/object:Gem::Version
|
43
37
|
version: 0.9.2
|
44
38
|
type: :runtime
|
45
|
-
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - '='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.9.2
|
46
46
|
description: Provides an interface for the Kashflow API
|
47
|
-
email:
|
47
|
+
email:
|
48
48
|
- gems@arcath.net
|
49
49
|
executables: []
|
50
|
-
|
51
50
|
extensions: []
|
52
|
-
|
53
51
|
extra_rdoc_files: []
|
54
|
-
|
55
|
-
files:
|
52
|
+
files:
|
56
53
|
- .gitignore
|
57
54
|
- Gemfile
|
58
55
|
- README.markdown
|
@@ -81,37 +78,31 @@ files:
|
|
81
78
|
- spec/kashflow_api_spec.rb
|
82
79
|
- spec/kashflow_api_supplier_spec.rb
|
83
80
|
- spec/spec_helper.rb
|
84
|
-
|
85
|
-
homepage: ""
|
81
|
+
homepage: ''
|
86
82
|
licenses: []
|
87
|
-
|
88
83
|
post_install_message:
|
89
84
|
rdoc_options: []
|
90
|
-
|
91
|
-
require_paths:
|
85
|
+
require_paths:
|
92
86
|
- lib
|
93
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
requirements:
|
102
|
-
- -
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
|
105
|
-
- 0
|
106
|
-
version: "0"
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
none: false
|
89
|
+
requirements:
|
90
|
+
- - ! '>='
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
93
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
107
99
|
requirements: []
|
108
|
-
|
109
100
|
rubyforge_project: kashflow_api
|
110
|
-
rubygems_version: 1.
|
101
|
+
rubygems_version: 1.8.23
|
111
102
|
signing_key:
|
112
103
|
specification_version: 3
|
113
104
|
summary: Provides an interface for the Kashflow API
|
114
|
-
test_files:
|
105
|
+
test_files:
|
115
106
|
- spec/kashflow_api_customer_balance_spec.rb
|
116
107
|
- spec/kashflow_api_customer_spec.rb
|
117
108
|
- spec/kashflow_api_nominal_codes_spec.rb
|
@@ -120,3 +111,4 @@ test_files:
|
|
120
111
|
- spec/kashflow_api_spec.rb
|
121
112
|
- spec/kashflow_api_supplier_spec.rb
|
122
113
|
- spec/spec_helper.rb
|
114
|
+
has_rdoc:
|