ledger_sync-netsuite 0.2.0 → 0.3.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +48 -51
- data/ledger_sync-netsuite.gemspec +1 -1
- data/lib/ledger_sync/netsuite/journal_entry/deserializer.rb +1 -0
- data/lib/ledger_sync/netsuite/journal_entry/serializer.rb +1 -0
- data/lib/ledger_sync/netsuite/journal_entry_line_item/deserializer.rb +5 -0
- data/lib/ledger_sync/netsuite/journal_entry_line_item/serializer.rb +5 -0
- data/lib/ledger_sync/netsuite/record/metadata.rb +6 -8
- data/lib/ledger_sync/netsuite/resources/customer_deposit.rb +3 -0
- data/lib/ledger_sync/netsuite/resources/journal_entry_line_item.rb +4 -0
- data/lib/ledger_sync/netsuite/token.rb +5 -7
- data/lib/ledger_sync/netsuite/version.rb +1 -1
- metadata +10 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 354b3d978f68bd1224d6ecc5c19937d5c691c424b326a68f15db65ab5855979e
|
4
|
+
data.tar.gz: 93df221431f15c1ae7cd96ae26fec50536a8b757e67c15306d74d34c739da45e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0442ce64685beb1dc273aa9dcd007db7a02b0a0c77c96824a4be77cd3dd59764f809f0d8d9120de7dfba61dcdd3a1ccad9a218c79354a5e95b2dd7c896b8daf4
|
7
|
+
data.tar.gz: 6cc7c093dfdab8ce04e03058b821b08387c537183c21b91f0383318e25598bb9e86ebcfbc91cf4a58fc32b90dda73dc725ea3f9752f1f3bb1b0bde51f1b31760
|
data/Gemfile.lock
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ledger_sync-netsuite (0.
|
4
|
+
ledger_sync-netsuite (0.3.4)
|
5
5
|
dotenv
|
6
|
-
ledger_sync (
|
6
|
+
ledger_sync (>= 2.0.2)
|
7
7
|
nokogiri
|
8
8
|
oauth2
|
9
9
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activemodel (6.1.3.
|
14
|
-
activesupport (= 6.1.3.
|
15
|
-
activesupport (6.1.3.
|
13
|
+
activemodel (6.1.3.2)
|
14
|
+
activesupport (= 6.1.3.2)
|
15
|
+
activesupport (6.1.3.2)
|
16
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
17
|
i18n (>= 1.6, < 2)
|
18
18
|
minitest (>= 5.1)
|
@@ -20,36 +20,36 @@ GEM
|
|
20
20
|
zeitwerk (~> 2.3)
|
21
21
|
addressable (2.7.0)
|
22
22
|
public_suffix (>= 2.0.2, < 5.0)
|
23
|
-
ast (2.4.
|
24
|
-
awesome_print (1.
|
23
|
+
ast (2.4.2)
|
24
|
+
awesome_print (1.9.2)
|
25
25
|
bump (0.9.0)
|
26
26
|
byebug (11.1.3)
|
27
|
-
climate_control (0.
|
27
|
+
climate_control (1.0.1)
|
28
28
|
colorize (0.8.1)
|
29
29
|
concurrent-ruby (1.1.8)
|
30
|
-
connection_pool (2.2.5)
|
31
30
|
coveralls (0.8.23)
|
32
31
|
json (>= 1.8, < 3)
|
33
32
|
simplecov (~> 0.16.1)
|
34
33
|
term-ansicolor (~> 1.3)
|
35
34
|
thor (>= 0.19.4, < 2.0)
|
36
35
|
tins (~> 1.6)
|
37
|
-
crack (0.4.
|
36
|
+
crack (0.4.5)
|
37
|
+
rexml
|
38
38
|
diff-lcs (1.4.4)
|
39
|
-
docile (1.
|
39
|
+
docile (1.4.0)
|
40
40
|
dotenv (2.7.6)
|
41
41
|
dry-configurable (0.12.1)
|
42
42
|
concurrent-ruby (~> 1.0)
|
43
43
|
dry-core (~> 0.5, >= 0.5.0)
|
44
|
-
dry-container (0.
|
44
|
+
dry-container (0.8.0)
|
45
45
|
concurrent-ruby (~> 1.0)
|
46
46
|
dry-configurable (~> 0.1, >= 0.1.3)
|
47
|
-
dry-core (0.
|
47
|
+
dry-core (0.6.0)
|
48
48
|
concurrent-ruby (~> 1.0)
|
49
49
|
dry-equalizer (0.3.0)
|
50
50
|
dry-inflector (0.2.0)
|
51
51
|
dry-initializer (3.0.4)
|
52
|
-
dry-logic (1.
|
52
|
+
dry-logic (1.2.0)
|
53
53
|
concurrent-ruby (~> 1.0)
|
54
54
|
dry-core (~> 0.5, >= 0.5)
|
55
55
|
dry-schema (1.5.6)
|
@@ -73,22 +73,23 @@ GEM
|
|
73
73
|
dry-equalizer (~> 0.2)
|
74
74
|
dry-initializer (~> 3.0)
|
75
75
|
dry-schema (~> 1.5, >= 1.5.2)
|
76
|
-
excon (0.80.1)
|
77
76
|
factory_bot (6.1.0)
|
78
77
|
activesupport (>= 5.0.0)
|
79
|
-
faraday (1.4.
|
80
|
-
faraday-
|
78
|
+
faraday (1.4.2)
|
79
|
+
faraday-em_http (~> 1.0)
|
80
|
+
faraday-em_synchrony (~> 1.0)
|
81
|
+
faraday-excon (~> 1.1)
|
81
82
|
faraday-net_http (~> 1.0)
|
82
|
-
faraday-net_http_persistent (~> 1.
|
83
|
+
faraday-net_http_persistent (~> 1.1)
|
83
84
|
multipart-post (>= 1.2, < 3)
|
84
85
|
ruby2_keywords (>= 0.0.4)
|
85
86
|
faraday-detailed_logger (2.3.0)
|
86
87
|
faraday (>= 0.8, < 2)
|
87
|
-
faraday-
|
88
|
-
|
88
|
+
faraday-em_http (1.0.0)
|
89
|
+
faraday-em_synchrony (1.0.0)
|
90
|
+
faraday-excon (1.1.0)
|
89
91
|
faraday-net_http (1.0.1)
|
90
|
-
faraday-net_http_persistent (1.0
|
91
|
-
net-http-persistent (>= 3.1)
|
92
|
+
faraday-net_http_persistent (1.1.0)
|
92
93
|
faraday_middleware (1.0.0)
|
93
94
|
faraday (~> 1.0)
|
94
95
|
fingerprintable (1.2.1)
|
@@ -96,9 +97,9 @@ GEM
|
|
96
97
|
hashdiff (1.0.1)
|
97
98
|
i18n (1.8.10)
|
98
99
|
concurrent-ruby (~> 1.0)
|
99
|
-
json (2.
|
100
|
-
jwt (2.2.
|
101
|
-
ledger_sync (2.0.
|
100
|
+
json (2.5.1)
|
101
|
+
jwt (2.2.3)
|
102
|
+
ledger_sync (2.0.2)
|
102
103
|
activemodel
|
103
104
|
colorize
|
104
105
|
dry-schema (~> 1.5.4)
|
@@ -113,15 +114,11 @@ GEM
|
|
113
114
|
rack (~> 2.2.3)
|
114
115
|
resonad
|
115
116
|
simply_serializable (>= 1.5.1)
|
116
|
-
mini_portile2 (2.5.0)
|
117
117
|
minitest (5.14.4)
|
118
118
|
multi_json (1.15.0)
|
119
119
|
multi_xml (0.6.0)
|
120
120
|
multipart-post (2.1.1)
|
121
|
-
|
122
|
-
connection_pool (~> 2.2)
|
123
|
-
nokogiri (1.11.3)
|
124
|
-
mini_portile2 (~> 2.5.0)
|
121
|
+
nokogiri (1.11.7-x86_64-darwin)
|
125
122
|
racc (~> 1.4)
|
126
123
|
oauth2 (1.4.7)
|
127
124
|
faraday (>= 0.8, < 2.0)
|
@@ -130,8 +127,8 @@ GEM
|
|
130
127
|
multi_xml (~> 0.5)
|
131
128
|
rack (>= 1.2, < 3)
|
132
129
|
openssl (2.2.0)
|
133
|
-
parallel (1.
|
134
|
-
parser (
|
130
|
+
parallel (1.20.1)
|
131
|
+
parser (3.0.1.1)
|
135
132
|
ast (~> 2.4.1)
|
136
133
|
pd_ruby (0.2.3)
|
137
134
|
colorize
|
@@ -139,35 +136,35 @@ GEM
|
|
139
136
|
racc (1.5.2)
|
140
137
|
rack (2.2.3)
|
141
138
|
rainbow (3.0.0)
|
142
|
-
rake (13.0.
|
143
|
-
regexp_parser (1.
|
139
|
+
rake (13.0.3)
|
140
|
+
regexp_parser (2.1.1)
|
144
141
|
resonad (1.4.0)
|
145
|
-
rexml (3.2.
|
142
|
+
rexml (3.2.5)
|
146
143
|
rspec (3.10.0)
|
147
144
|
rspec-core (~> 3.10.0)
|
148
145
|
rspec-expectations (~> 3.10.0)
|
149
146
|
rspec-mocks (~> 3.10.0)
|
150
|
-
rspec-core (3.10.
|
147
|
+
rspec-core (3.10.1)
|
151
148
|
rspec-support (~> 3.10.0)
|
152
|
-
rspec-expectations (3.10.
|
149
|
+
rspec-expectations (3.10.1)
|
153
150
|
diff-lcs (>= 1.2.0, < 2.0)
|
154
151
|
rspec-support (~> 3.10.0)
|
155
|
-
rspec-mocks (3.10.
|
152
|
+
rspec-mocks (3.10.2)
|
156
153
|
diff-lcs (>= 1.2.0, < 2.0)
|
157
154
|
rspec-support (~> 3.10.0)
|
158
|
-
rspec-support (3.10.
|
159
|
-
rubocop (1.
|
155
|
+
rspec-support (3.10.2)
|
156
|
+
rubocop (1.15.0)
|
160
157
|
parallel (~> 1.10)
|
161
|
-
parser (>=
|
158
|
+
parser (>= 3.0.0.0)
|
162
159
|
rainbow (>= 2.2.2, < 4.0)
|
163
|
-
regexp_parser (>= 1.8)
|
160
|
+
regexp_parser (>= 1.8, < 3.0)
|
164
161
|
rexml
|
165
|
-
rubocop-ast (>= 1.0.
|
162
|
+
rubocop-ast (>= 1.5.0, < 2.0)
|
166
163
|
ruby-progressbar (~> 1.7)
|
167
|
-
unicode-display_width (>= 1.4.0, <
|
168
|
-
rubocop-ast (1.
|
169
|
-
parser (>=
|
170
|
-
ruby-progressbar (1.
|
164
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
165
|
+
rubocop-ast (1.6.0)
|
166
|
+
parser (>= 3.0.1.1)
|
167
|
+
ruby-progressbar (1.11.0)
|
171
168
|
ruby2_keywords (0.0.4)
|
172
169
|
simplecov (0.16.1)
|
173
170
|
docile (~> 1.1)
|
@@ -179,13 +176,13 @@ GEM
|
|
179
176
|
sync (0.5.0)
|
180
177
|
term-ansicolor (1.7.1)
|
181
178
|
tins (~> 1.0)
|
182
|
-
thor (1.0
|
183
|
-
tins (1.
|
179
|
+
thor (1.1.0)
|
180
|
+
tins (1.29.1)
|
184
181
|
sync
|
185
182
|
tzinfo (2.0.4)
|
186
183
|
concurrent-ruby (~> 1.0)
|
187
|
-
unicode-display_width (
|
188
|
-
webmock (3.
|
184
|
+
unicode-display_width (2.0.0)
|
185
|
+
webmock (3.13.0)
|
189
186
|
addressable (>= 2.3.6)
|
190
187
|
crack (>= 0.3.2)
|
191
188
|
hashdiff (>= 0.4.0, < 2.0.0)
|
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
spec.add_development_dependency('rubocop', '>= 0')
|
39
39
|
spec.add_development_dependency('webmock', '>= 0')
|
40
40
|
spec.add_runtime_dependency('dotenv')
|
41
|
-
spec.add_runtime_dependency('ledger_sync', '2.0.
|
41
|
+
spec.add_runtime_dependency('ledger_sync', '>= 2.0.2')
|
42
42
|
spec.add_runtime_dependency('nokogiri', '>= 0')
|
43
43
|
spec.add_runtime_dependency('oauth2', '>= 0')
|
44
44
|
end
|
@@ -11,6 +11,11 @@ module LedgerSync
|
|
11
11
|
attribute :credit
|
12
12
|
attribute :debit
|
13
13
|
attribute :memo
|
14
|
+
attribute :entity,
|
15
|
+
type: Type::DeserializerEntityType.new
|
16
|
+
references_one :ledger_class,
|
17
|
+
hash_attribute: :class,
|
18
|
+
deserializer: LedgerClass::Deserializer
|
14
19
|
references_one :account
|
15
20
|
end
|
16
21
|
end
|
@@ -10,6 +10,11 @@ module LedgerSync
|
|
10
10
|
attribute :credit
|
11
11
|
attribute :debit
|
12
12
|
attribute :memo
|
13
|
+
references_one :entity,
|
14
|
+
serializer: Reference::Serializer
|
15
|
+
references_one :class,
|
16
|
+
resource_attribute: :ledger_class,
|
17
|
+
serializer: Reference::Serializer
|
13
18
|
references_one :account,
|
14
19
|
serializer: Reference::Serializer
|
15
20
|
end
|
@@ -55,14 +55,12 @@ module LedgerSync
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def metadata_response
|
58
|
-
@metadata_response =
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
)
|
65
|
-
end
|
58
|
+
@metadata_response = client.get(
|
59
|
+
headers: {
|
60
|
+
'Accept' => 'application/swagger+json'
|
61
|
+
},
|
62
|
+
path: "#{BASE_PATH}?select=#{record}"
|
63
|
+
)
|
66
64
|
end
|
67
65
|
|
68
66
|
def properties
|
@@ -1,13 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative 'account'
|
4
|
+
require_relative 'customer'
|
4
5
|
require_relative 'department'
|
5
6
|
require_relative 'ledger_class'
|
7
|
+
require_relative 'vendor'
|
6
8
|
|
7
9
|
module LedgerSync
|
8
10
|
module NetSuite
|
9
11
|
class JournalEntryLineItem < NetSuite::Resource
|
10
12
|
references_one :account, to: Account
|
13
|
+
references_one :entity, to: [Customer, Vendor]
|
14
|
+
references_one :ledger_class, to: LedgerClass
|
11
15
|
attribute :line, type: Type::Integer
|
12
16
|
attribute :credit, type: Type::Float
|
13
17
|
attribute :debit, type: Type::Float
|
@@ -65,13 +65,11 @@ module LedgerSync
|
|
65
65
|
|
66
66
|
# Ref: https://tools.ietf.org/html/rfc5849#section-3.4.1.3.2
|
67
67
|
def signature_data_string
|
68
|
-
@signature_data_string ||=
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
].join('&')
|
74
|
-
end
|
68
|
+
@signature_data_string ||= [
|
69
|
+
method,
|
70
|
+
escape(url_without_params),
|
71
|
+
escape(parameters_string)
|
72
|
+
].join('&')
|
75
73
|
end
|
76
74
|
|
77
75
|
def signature_key
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ledger_sync-netsuite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Modern Treasury
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|
@@ -182,16 +182,16 @@ dependencies:
|
|
182
182
|
name: ledger_sync
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- -
|
185
|
+
- - ">="
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 2.0.
|
187
|
+
version: 2.0.2
|
188
188
|
type: :runtime
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- -
|
192
|
+
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 2.0.
|
194
|
+
version: 2.0.2
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: nokogiri
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -369,7 +369,7 @@ files:
|
|
369
369
|
homepage: https://www.ledgersync.dev
|
370
370
|
licenses: []
|
371
371
|
metadata: {}
|
372
|
-
post_install_message:
|
372
|
+
post_install_message:
|
373
373
|
rdoc_options: []
|
374
374
|
require_paths:
|
375
375
|
- lib
|
@@ -384,9 +384,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
384
384
|
- !ruby/object:Gem::Version
|
385
385
|
version: '0'
|
386
386
|
requirements: []
|
387
|
-
|
388
|
-
|
389
|
-
signing_key:
|
387
|
+
rubygems_version: 3.1.6
|
388
|
+
signing_key:
|
390
389
|
specification_version: 4
|
391
390
|
summary: Sync common objects to accounting software.
|
392
391
|
test_files: []
|