rvista 0.6.0 → 0.6.1
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/CHANGELOG +3 -0
- data/Rakefile +1 -1
- data/lib/rvista/poa_line_item.rb +33 -14
- metadata +7 -11
data/CHANGELOG
CHANGED
data/Rakefile
CHANGED
data/lib/rvista/poa_line_item.rb
CHANGED
@@ -14,19 +14,6 @@ module RVista
|
|
14
14
|
attr_accessor :status_code, :demand_qty, :rrp, :discount_percent
|
15
15
|
attr_accessor :availability_date, :text
|
16
16
|
|
17
|
-
STATUS = {
|
18
|
-
1 => "Shipped as ordered",
|
19
|
-
2 => "Title substituted",
|
20
|
-
6 => "Out of stock - reprinting",
|
21
|
-
7 => "Back ordered",
|
22
|
-
9 => "Part supply",
|
23
|
-
10 => "Part back ordered",
|
24
|
-
15 => "Market restricted",
|
25
|
-
27 => "ISBN not recognised",
|
26
|
-
28 => "Out of print",
|
27
|
-
29 => "Customer backordered"
|
28
|
-
}
|
29
|
-
|
30
17
|
# returns a new RVista::POALineItem object using the data passed in as an
|
31
18
|
# array. The array should have exactly 14 items in it. Refer to the Vista
|
32
19
|
# standard to see what those 14 items should be.
|
@@ -54,7 +41,39 @@ module RVista
|
|
54
41
|
end
|
55
42
|
|
56
43
|
def status_text
|
57
|
-
|
44
|
+
case self.status_code.to_i
|
45
|
+
when 1 then "Accepted: Title Shipped As Ordered"
|
46
|
+
when 2 then "Accepted: Substitute Title Shipped As Ordered"
|
47
|
+
when 3 then "Cancelled: Future Publication"
|
48
|
+
when 4 then "Cancelled: Future Publication" # date available
|
49
|
+
when 5 then "Backordered: Future Publication"
|
50
|
+
when 6 then "Cancelled: Out of Stock"
|
51
|
+
when 7 then "Backordered: Out of Stock"
|
52
|
+
when 8 then "Cancelled: Out of Print"
|
53
|
+
when 9 then "Partial Ship: Cancel Rest"
|
54
|
+
when 10 then "Partial Ship: Backorder Rest"
|
55
|
+
when 11 then "Cancelled: HB Out of Print, PB Available"
|
56
|
+
when 12 then "Cancelled: PB Out of Print, HB Available"
|
57
|
+
when 13 then "Cancelled: Out of Print, Alt. Edition Available"
|
58
|
+
when 14 then "Backordered: Subtitute Title on BO."
|
59
|
+
when 15 then "Cancelled: No Rights"
|
60
|
+
when 16 then "Cancelled: Not our Publication"
|
61
|
+
when 17 then "Accepted: Free Book"
|
62
|
+
when 18 then "Cancelled: BO Expired"
|
63
|
+
when 19 then "Cancelled: Subscription Only"
|
64
|
+
when 20 then "Cancelled: Not Carried"
|
65
|
+
when 21 then "Cancelled: Not Carried"
|
66
|
+
when 22 then "Cancelled: Import Title"
|
67
|
+
when 23 then "Cancelled: Not Available for Wholesale"
|
68
|
+
when 24 then "Cancelled: Kits Not Available"
|
69
|
+
when 25 then "Cancelled: Not Available"
|
70
|
+
when 26 then "Cancelled: New Price From Publisher"
|
71
|
+
when 27 then "Cancelled: ISBN Not Recognised"
|
72
|
+
when 28 then "Cancelled: Out of Print"
|
73
|
+
when 29 then "Backordered: At Customers Request"
|
74
|
+
else
|
75
|
+
"UNKNOWN"
|
76
|
+
end
|
58
77
|
end
|
59
78
|
|
60
79
|
# output a string that represents this line item that meets the vista spec
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rvista
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Healy
|
@@ -9,11 +9,11 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-06-17 00:00:00 +10:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
16
|
-
description: rvista is a small library for reading Vista HDS order files
|
16
|
+
description: " rvista is a small library for reading Vista HDS order files.\n"
|
17
17
|
email: jimmy@deefa.com
|
18
18
|
executables: []
|
19
19
|
|
@@ -26,7 +26,6 @@ extra_rdoc_files:
|
|
26
26
|
- CHANGELOG
|
27
27
|
files:
|
28
28
|
- lib/rvista.rb
|
29
|
-
- lib/rvista
|
30
29
|
- lib/rvista/errors.rb
|
31
30
|
- lib/rvista/invoice.rb
|
32
31
|
- lib/rvista/invoice_line_item.rb
|
@@ -34,25 +33,20 @@ files:
|
|
34
33
|
- lib/rvista/po_line_item.rb
|
35
34
|
- lib/rvista/poa.rb
|
36
35
|
- lib/rvista/poa_line_item.rb
|
37
|
-
- test/data
|
38
|
-
- test/data/invoice
|
39
36
|
- test/data/invoice/invalid_line.txt
|
40
37
|
- test/data/invoice/invalid_missing_footer.txt
|
41
38
|
- test/data/invoice/invalid_missing_header.txt
|
42
39
|
- test/data/invoice/valid.txt
|
43
|
-
- test/data/po
|
44
40
|
- test/data/po/invalid_line.txt
|
45
41
|
- test/data/po/invalid_missing_footer.txt
|
46
42
|
- test/data/po/invalid_missing_header.txt
|
47
43
|
- test/data/po/no_delivery_location.txt
|
48
44
|
- test/data/po/seperate_delivery_location.txt
|
49
45
|
- test/data/po/valid.txt
|
50
|
-
- test/data/poa
|
51
46
|
- test/data/poa/invalid_line.txt
|
52
47
|
- test/data/poa/invalid_missing_footer.txt
|
53
48
|
- test/data/poa/invalid_missing_header.txt
|
54
49
|
- test/data/poa/valid.txt
|
55
|
-
- test/unit
|
56
50
|
- test/unit/invoice_line_item_test.rb
|
57
51
|
- test/unit/invoice_test.rb
|
58
52
|
- test/unit/line_item_test.rb
|
@@ -66,6 +60,8 @@ files:
|
|
66
60
|
- CHANGELOG
|
67
61
|
has_rdoc: true
|
68
62
|
homepage:
|
63
|
+
licenses: []
|
64
|
+
|
69
65
|
post_install_message:
|
70
66
|
rdoc_options:
|
71
67
|
- --title
|
@@ -90,9 +86,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
86
|
requirements: []
|
91
87
|
|
92
88
|
rubyforge_project:
|
93
|
-
rubygems_version: 1.3.
|
89
|
+
rubygems_version: 1.3.4
|
94
90
|
signing_key:
|
95
|
-
specification_version:
|
91
|
+
specification_version: 3
|
96
92
|
summary: A small library for reading Vista HDS ecommerce files
|
97
93
|
test_files: []
|
98
94
|
|