agris 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f3658a027b00d5a197bde8b526403608e3957b0
|
4
|
+
data.tar.gz: 9d26a844edf3668282a51403248a8f00ac4d179b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f68eb9fe1188ca3bff9e761745d6f2a7280a581da452206f80671d7ce694a1576fbf5f4555ac056ab8fdf278ce77c2a23669223e086413c2a68a7844e9c24019
|
7
|
+
data.tar.gz: 1b1059533e6629cc2ae5da8d6d152f4578909b2427c220b1620a19c4ad3d103c45037bfdf51e1393056142447b16407d9dde782c9219af5da8b10add742b56c8
|
@@ -71,7 +71,8 @@ module Agris
|
|
71
71
|
unique_id
|
72
72
|
).freeze
|
73
73
|
|
74
|
-
attr_reader
|
74
|
+
attr_reader :record_type
|
75
|
+
attr_accessor(*(%w(line_items) + ATTRIBUTE_NAMES))
|
75
76
|
|
76
77
|
def self.from_xml_hash(hash)
|
77
78
|
super.tap do |document|
|
@@ -90,7 +91,39 @@ module Agris
|
|
90
91
|
def initialize(hash = {})
|
91
92
|
super
|
92
93
|
|
94
|
+
@record_type = 'ACRI0'
|
93
95
|
@line_items = []
|
96
|
+
@general_ledger_details = []
|
97
|
+
end
|
98
|
+
|
99
|
+
def add_line_item(line_item)
|
100
|
+
@line_items ||= []
|
101
|
+
@line_items << line_item
|
102
|
+
|
103
|
+
self
|
104
|
+
end
|
105
|
+
|
106
|
+
def records
|
107
|
+
[self] + line_items + general_ledger_details
|
108
|
+
end
|
109
|
+
|
110
|
+
def line_items
|
111
|
+
@line_items || []
|
112
|
+
end
|
113
|
+
|
114
|
+
def general_ledger_details
|
115
|
+
@general_ledger_details || []
|
116
|
+
end
|
117
|
+
|
118
|
+
def xml_ignore_attributes
|
119
|
+
%i(line_items general_ledger_details)
|
120
|
+
end
|
121
|
+
|
122
|
+
def add_general_ledger_detail(general_ledger_detail)
|
123
|
+
@general_ledger_details ||= []
|
124
|
+
@general_ledger_details << general_ledger_detail
|
125
|
+
|
126
|
+
self
|
94
127
|
end
|
95
128
|
|
96
129
|
class LineItem
|
@@ -158,7 +191,24 @@ module Agris
|
|
158
191
|
cost_adjustment_description
|
159
192
|
).freeze
|
160
193
|
|
161
|
-
|
194
|
+
attr_accessor(*ATTRIBUTE_NAMES)
|
195
|
+
end
|
196
|
+
|
197
|
+
class GeneralLedgerDetail
|
198
|
+
include XmlModel
|
199
|
+
|
200
|
+
ATTRIBUTE_NAMES = %w(
|
201
|
+
distribution_amount
|
202
|
+
gl_account_main_code
|
203
|
+
gl_account_detail_code
|
204
|
+
record_type
|
205
|
+
).freeze
|
206
|
+
|
207
|
+
def initialize(hash = {})
|
208
|
+
super(hash)
|
209
|
+
|
210
|
+
@record_type = 'ACRI2'
|
211
|
+
end
|
162
212
|
end
|
163
213
|
end
|
164
214
|
end
|
data/lib/agris/client.rb
CHANGED
data/lib/agris/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: agris
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Gray
|
8
8
|
- Joseph Bridgwater-Rowe
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-06-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: savon
|
@@ -137,7 +137,7 @@ dependencies:
|
|
137
137
|
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '2.3'
|
140
|
-
description:
|
140
|
+
description:
|
141
141
|
email:
|
142
142
|
- wopr42@gmail.com
|
143
143
|
- freakyjoe@gmail.com
|
@@ -228,7 +228,7 @@ homepage: https://github.com/westernmilling/agris.rb
|
|
228
228
|
licenses:
|
229
229
|
- MIT
|
230
230
|
metadata: {}
|
231
|
-
post_install_message:
|
231
|
+
post_install_message:
|
232
232
|
rdoc_options: []
|
233
233
|
require_paths:
|
234
234
|
- lib
|
@@ -243,9 +243,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
243
243
|
- !ruby/object:Gem::Version
|
244
244
|
version: '0'
|
245
245
|
requirements: []
|
246
|
-
rubyforge_project:
|
246
|
+
rubyforge_project:
|
247
247
|
rubygems_version: 2.6.14
|
248
|
-
signing_key:
|
248
|
+
signing_key:
|
249
249
|
specification_version: 4
|
250
250
|
summary: Ruby client library for Agris API
|
251
251
|
test_files: []
|