netvisor 0.9.1 → 0.9.2
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.md
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
## CHANGELOG
|
|
2
2
|
|
|
3
|
+
## Version 0.9.2
|
|
4
|
+
* Changed `ElementBase` from Superclass to Mixin
|
|
5
|
+
|
|
3
6
|
## Version 0.9.1
|
|
4
|
-
* Added dependency for `system_timer` if `RUBY_VERSION < 1.9
|
|
7
|
+
* Added dependency for `system_timer` if `RUBY_VERSION < 1.9`
|
|
5
8
|
|
|
6
9
|
## Version 0.9.0
|
|
7
10
|
* Added parsing and returning of `Netvisor::Response` objects
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
def
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
module ElementBase
|
|
2
|
+
def self.included(base)
|
|
3
|
+
base.class_exec do
|
|
4
|
+
def initialize(args = {})
|
|
5
|
+
args.each_pair do |key, val|
|
|
6
|
+
self.send("#{key}=", val) if ElementBase.method_defined? key
|
|
7
|
+
end
|
|
8
|
+
end
|
|
5
9
|
end
|
|
6
10
|
end
|
|
7
11
|
end
|
|
@@ -10,57 +10,65 @@ module Netvisor
|
|
|
10
10
|
|
|
11
11
|
tag self.name.split('::').last
|
|
12
12
|
|
|
13
|
-
class InvoiceDate
|
|
13
|
+
class InvoiceDate
|
|
14
14
|
include HappyMapper
|
|
15
|
+
include ElementBase
|
|
15
16
|
|
|
16
17
|
attribute :format, String
|
|
17
18
|
content :value, Date
|
|
18
19
|
end
|
|
19
20
|
|
|
20
|
-
class InvoiceAmount
|
|
21
|
+
class InvoiceAmount
|
|
21
22
|
include HappyMapper
|
|
23
|
+
include ElementBase
|
|
22
24
|
|
|
23
25
|
attribute :iso4217currencycode, String
|
|
24
26
|
attribute :currencyrate, Float
|
|
25
27
|
content :amount, Float
|
|
26
28
|
end
|
|
27
29
|
|
|
28
|
-
class SellerId
|
|
30
|
+
class SellerId
|
|
29
31
|
include HappyMapper
|
|
32
|
+
include ElementBase
|
|
30
33
|
|
|
31
34
|
attribute :type, String
|
|
32
35
|
content :id, String
|
|
33
36
|
end
|
|
34
37
|
|
|
35
|
-
class InvoiceStatus
|
|
38
|
+
class InvoiceStatus
|
|
39
|
+
include ElementBase
|
|
36
40
|
include HappyMapper
|
|
37
41
|
|
|
38
42
|
attribute :type, String
|
|
39
43
|
content :status, String
|
|
40
44
|
end
|
|
41
45
|
|
|
42
|
-
class CustomerId
|
|
46
|
+
class CustomerId
|
|
47
|
+
include ElementBase
|
|
43
48
|
include HappyMapper
|
|
44
49
|
|
|
45
50
|
attribute :type, String
|
|
46
51
|
content :id, String
|
|
47
52
|
end
|
|
48
53
|
|
|
49
|
-
class CountryCode
|
|
54
|
+
class CountryCode
|
|
55
|
+
include ElementBase
|
|
50
56
|
include HappyMapper
|
|
51
57
|
|
|
52
58
|
attribute :type, String
|
|
53
59
|
content :country_code, String
|
|
54
60
|
end
|
|
55
61
|
|
|
56
|
-
class CashDiscount
|
|
62
|
+
class CashDiscount
|
|
63
|
+
include ElementBase
|
|
57
64
|
include HappyMapper
|
|
58
65
|
|
|
59
66
|
attribute :type, String
|
|
60
67
|
content :discount, Integer
|
|
61
68
|
end
|
|
62
69
|
|
|
63
|
-
class DirectDebitLink
|
|
70
|
+
class DirectDebitLink
|
|
71
|
+
include ElementBase
|
|
64
72
|
include HappyMapper
|
|
65
73
|
|
|
66
74
|
attribute :mode, String
|
|
@@ -70,12 +78,14 @@ module Netvisor
|
|
|
70
78
|
class InvoiceVoucherLines
|
|
71
79
|
include HappyMapper
|
|
72
80
|
|
|
73
|
-
class VoucherLine
|
|
81
|
+
class VoucherLine
|
|
82
|
+
include ElementBase
|
|
74
83
|
include HappyMapper
|
|
75
84
|
|
|
76
85
|
tag 'VoucherLine'
|
|
77
86
|
|
|
78
|
-
class LineSum
|
|
87
|
+
class LineSum
|
|
88
|
+
include ElementBase
|
|
79
89
|
include HappyMapper
|
|
80
90
|
|
|
81
91
|
attribute :type, String
|
|
@@ -97,7 +107,8 @@ module Netvisor
|
|
|
97
107
|
class SalesInvoiceAttachments
|
|
98
108
|
include HappyMapper
|
|
99
109
|
|
|
100
|
-
class InvoiceAttachment
|
|
110
|
+
class InvoiceAttachment
|
|
111
|
+
include ElementBase
|
|
101
112
|
include HappyMapper
|
|
102
113
|
|
|
103
114
|
tag self.name.split('::').last
|
|
@@ -116,10 +127,12 @@ module Netvisor
|
|
|
116
127
|
include HappyMapper
|
|
117
128
|
|
|
118
129
|
|
|
119
|
-
class CustomTag
|
|
130
|
+
class CustomTag
|
|
131
|
+
include ElementBase
|
|
120
132
|
include HappyMapper
|
|
121
133
|
|
|
122
|
-
class TagValue
|
|
134
|
+
class TagValue
|
|
135
|
+
include ElementBase
|
|
123
136
|
include HappyMapper
|
|
124
137
|
|
|
125
138
|
attribute :datatype, String
|
|
@@ -143,14 +156,16 @@ module Netvisor
|
|
|
143
156
|
|
|
144
157
|
end
|
|
145
158
|
|
|
146
|
-
class ChannelFormat
|
|
159
|
+
class ChannelFormat
|
|
160
|
+
include ElementBase
|
|
147
161
|
include HappyMapper
|
|
148
162
|
|
|
149
163
|
attribute :type, String
|
|
150
164
|
content :format, String
|
|
151
165
|
end
|
|
152
166
|
|
|
153
|
-
class SecondName
|
|
167
|
+
class SecondName
|
|
168
|
+
include ElementBase
|
|
154
169
|
include HappyMapper
|
|
155
170
|
|
|
156
171
|
attribute :type, String
|
|
@@ -160,7 +175,8 @@ module Netvisor
|
|
|
160
175
|
class InvoiceAccrual
|
|
161
176
|
include HappyMapper
|
|
162
177
|
|
|
163
|
-
class AccrualVoucherEntry
|
|
178
|
+
class AccrualVoucherEntry
|
|
179
|
+
include ElementBase
|
|
164
180
|
include HappyMapper
|
|
165
181
|
|
|
166
182
|
element :month, Integer
|
|
@@ -7,13 +7,15 @@ module Netvisor
|
|
|
7
7
|
class SalesInvoiceProductLine
|
|
8
8
|
include HappyMapper
|
|
9
9
|
|
|
10
|
-
class ProductId
|
|
10
|
+
class ProductId
|
|
11
|
+
include ElementBase
|
|
11
12
|
include HappyMapper
|
|
12
13
|
|
|
13
14
|
attribute :type, String
|
|
14
15
|
content :id, String
|
|
15
16
|
end
|
|
16
|
-
class UnitPrice
|
|
17
|
+
class UnitPrice
|
|
18
|
+
include ElementBase
|
|
17
19
|
include HappyMapper
|
|
18
20
|
|
|
19
21
|
attribute :type, String
|
data/lib/netvisor/version.rb
CHANGED
metadata
CHANGED