fastbill 0.0.3 → 0.0.4
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/lib/fastbill/invoice.rb +2 -1
- data/lib/fastbill/version.rb +1 -1
- metadata +11 -11
data/lib/fastbill/invoice.rb
CHANGED
@@ -38,6 +38,7 @@ class Invoice
|
|
38
38
|
|
39
39
|
end
|
40
40
|
def hydrate(body)
|
41
|
+
#"INVOICE_ID"=>"72783", "INVOICE_TYPE"=>"outgoing", "CUSTOMER_ID"=>"62288", "CUSTOMER_COSTCENTER_ID"=>"0", "CURRENCY_CODE"=>"EUR", "TEMPLATE_ID"=>"3493", "INVOICE_NUMBER"=>"145", "INTROTEXT"=>"Guten Tag Herr Schlenker,\n\nanbei meine Rechnung über den Umbau der Young Gans Community auf das aktuelle Layout.\n\nGruß, Kai Wernicke", "PAYED_DATE"=>"0000-00-00 00:00:00", "IS_CANCELED"=>"0", "INVOICE_DATE"=>"2011-10-10", "DUE_DATE"=>"2011-10-24 09:54:09", "DELIVERY_DATE"=>nil, "SUB_TOTAL"=>"100", "VAT_TOTAL"=>"19", "VAT_ITEMS"=>{"VAT_ITEM"=>{"VAT_PERCENT"=>"19.00", "VAT_VALUE"=>"19"}}, "ITEMS"=>{"ITEM"=>{"INVOICE_ITEM_ID"=>"148279", "ARTICLE_NUMBER"=>nil, "DESCRIPTION"=>"Stunden / Programmierung", "QUANTITY"=>"5.00", "UNIT_PRICE"=>"20.0000", "VAT_PERCENT"=>"19.00", "VAT_VALUE"=>"19", "COMPLETE_NET"=>"100", "COMPLETE_GROSS"=>"119", "SORT_ORDER"=>"1"}}, "TOTAL"=>"119"
|
41
42
|
@is_new = false
|
42
43
|
@id = body["INVOICE_ID"]
|
43
44
|
@invoice_type = body["INVOICE_TYPE"]
|
@@ -55,6 +56,7 @@ class Invoice
|
|
55
56
|
@sub_total = body["SUB_TOTAL"]
|
56
57
|
@vat_total = body["VAT_TOTAL"]
|
57
58
|
@vat_items = []
|
59
|
+
@total = body["TOTAL"]
|
58
60
|
for vat_item in body["VAT_ITEMS"].each
|
59
61
|
@vat_items.push InvoiceVatItem.new vat_item.last
|
60
62
|
end
|
@@ -64,7 +66,6 @@ class Invoice
|
|
64
66
|
i.hydrate(item.last)
|
65
67
|
@items.push i
|
66
68
|
end
|
67
|
-
@total = body["TOTAl"]
|
68
69
|
end
|
69
70
|
def parse_date(date)
|
70
71
|
if date != nil && date != "0000-00-00 00:00:00"
|
data/lib/fastbill/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastbill
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-10-11 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70194008312180 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70194008312180
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: httparty
|
27
|
-
requirement: &
|
27
|
+
requirement: &70194008376400 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70194008376400
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: crack
|
38
|
-
requirement: &
|
38
|
+
requirement: &70194008435360 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70194008435360
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: httparty
|
49
|
-
requirement: &
|
49
|
+
requirement: &70194008808560 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70194008808560
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: crack
|
60
|
-
requirement: &
|
60
|
+
requirement: &70194009008500 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70194009008500
|
69
69
|
description: a basic ruby wrapper for the methods provided by the fastbill API
|
70
70
|
email:
|
71
71
|
- kai@4ware.net
|