ledger_sync-netsuite 0.1.1 → 0.3.3
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/.github/workflows/gem-workflow.yml +7 -3
- data/Gemfile.lock +59 -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/journal_entry_line_item.rb +4 -0
- data/lib/ledger_sync/netsuite/token.rb +5 -7
- data/lib/ledger_sync/netsuite/version.rb +7 -7
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca12859d1008ded5f0d5a6222252544ae52a0b26bfcbcc99d508cdfa472e2be0
|
4
|
+
data.tar.gz: a512ba4cf254998f6df0b2e4253e30b68f10ec25833cc0bfd6a6f5d7653ea652
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77978d9fc3fdfff147fa5a2034856e268663c16e6d14909e7c0b0be2ed54258f40913273ec552fb24b99ca2d0caa3d3a925678e378776b3ade02939859a5f1ce
|
7
|
+
data.tar.gz: 81a21b2010ab5dbf24c2d39a715850af0a6b2f64d8c61ffc33bab86c7d130bc8dd6f770584a13d4cd5da6370e47d91dd3593dd4204f8b5b9a9f669ad4f5f8185
|
@@ -1,5 +1,9 @@
|
|
1
1
|
name: Test and Deploy
|
2
|
-
on:
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
pull_request:
|
5
|
+
release:
|
6
|
+
types: [created]
|
3
7
|
jobs:
|
4
8
|
rubocop:
|
5
9
|
strategy:
|
@@ -39,7 +43,7 @@ jobs:
|
|
39
43
|
publish:
|
40
44
|
runs-on: ubuntu-latest
|
41
45
|
needs: ['rubocop', 'rspec']
|
42
|
-
if:
|
46
|
+
if: github.event_name == 'release' && github.event.action == 'created'
|
43
47
|
steps:
|
44
48
|
- name: Checkout
|
45
49
|
uses: actions/checkout@v2
|
@@ -49,7 +53,7 @@ jobs:
|
|
49
53
|
- name: Ruby Setup and Bundle
|
50
54
|
uses: ruby/setup-ruby@v1
|
51
55
|
with:
|
52
|
-
ruby-version: 2.
|
56
|
+
ruby-version: 2.7.1
|
53
57
|
bundler-cache: true
|
54
58
|
- name: Publish to RubyGems
|
55
59
|
run: |
|
data/Gemfile.lock
CHANGED
@@ -1,41 +1,42 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ledger_sync-netsuite (0.
|
4
|
+
ledger_sync-netsuite (0.3.3)
|
5
5
|
dotenv
|
6
|
-
ledger_sync (
|
6
|
+
ledger_sync (>= 2.0.0)
|
7
7
|
nokogiri
|
8
8
|
oauth2
|
9
9
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activemodel (6.
|
14
|
-
activesupport (= 6.
|
15
|
-
activesupport (6.
|
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
|
-
i18n (>=
|
18
|
-
minitest (
|
19
|
-
tzinfo (~>
|
20
|
-
zeitwerk (~> 2.
|
17
|
+
i18n (>= 1.6, < 2)
|
18
|
+
minitest (>= 5.1)
|
19
|
+
tzinfo (~> 2.0)
|
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
|
-
concurrent-ruby (1.1.
|
29
|
+
concurrent-ruby (1.1.8)
|
30
30
|
coveralls (0.8.23)
|
31
31
|
json (>= 1.8, < 3)
|
32
32
|
simplecov (~> 0.16.1)
|
33
33
|
term-ansicolor (~> 1.3)
|
34
34
|
thor (>= 0.19.4, < 2.0)
|
35
35
|
tins (~> 1.6)
|
36
|
-
crack (0.4.
|
36
|
+
crack (0.4.5)
|
37
|
+
rexml
|
37
38
|
diff-lcs (1.4.4)
|
38
|
-
docile (1.
|
39
|
+
docile (1.4.0)
|
39
40
|
dotenv (2.7.6)
|
40
41
|
dry-configurable (0.12.1)
|
41
42
|
concurrent-ruby (~> 1.0)
|
@@ -43,12 +44,12 @@ GEM
|
|
43
44
|
dry-container (0.7.2)
|
44
45
|
concurrent-ruby (~> 1.0)
|
45
46
|
dry-configurable (~> 0.1, >= 0.1.3)
|
46
|
-
dry-core (0.
|
47
|
+
dry-core (0.6.0)
|
47
48
|
concurrent-ruby (~> 1.0)
|
48
49
|
dry-equalizer (0.3.0)
|
49
50
|
dry-inflector (0.2.0)
|
50
51
|
dry-initializer (3.0.4)
|
51
|
-
dry-logic (1.
|
52
|
+
dry-logic (1.2.0)
|
52
53
|
concurrent-ruby (~> 1.0)
|
53
54
|
dry-core (~> 0.5, >= 0.5)
|
54
55
|
dry-schema (1.5.6)
|
@@ -74,23 +75,31 @@ GEM
|
|
74
75
|
dry-schema (~> 1.5, >= 1.5.2)
|
75
76
|
factory_bot (6.1.0)
|
76
77
|
activesupport (>= 5.0.0)
|
77
|
-
faraday (1.
|
78
|
+
faraday (1.4.2)
|
79
|
+
faraday-em_http (~> 1.0)
|
80
|
+
faraday-em_synchrony (~> 1.0)
|
81
|
+
faraday-excon (~> 1.1)
|
78
82
|
faraday-net_http (~> 1.0)
|
83
|
+
faraday-net_http_persistent (~> 1.1)
|
79
84
|
multipart-post (>= 1.2, < 3)
|
80
|
-
ruby2_keywords
|
85
|
+
ruby2_keywords (>= 0.0.4)
|
81
86
|
faraday-detailed_logger (2.3.0)
|
82
87
|
faraday (>= 0.8, < 2)
|
88
|
+
faraday-em_http (1.0.0)
|
89
|
+
faraday-em_synchrony (1.0.0)
|
90
|
+
faraday-excon (1.1.0)
|
83
91
|
faraday-net_http (1.0.1)
|
92
|
+
faraday-net_http_persistent (1.1.0)
|
84
93
|
faraday_middleware (1.0.0)
|
85
94
|
faraday (~> 1.0)
|
86
95
|
fingerprintable (1.2.1)
|
87
96
|
colorize
|
88
97
|
hashdiff (1.0.1)
|
89
|
-
i18n (1.8.
|
98
|
+
i18n (1.8.10)
|
90
99
|
concurrent-ruby (~> 1.0)
|
91
|
-
json (2.
|
92
|
-
jwt (2.2.
|
93
|
-
ledger_sync (
|
100
|
+
json (2.5.1)
|
101
|
+
jwt (2.2.3)
|
102
|
+
ledger_sync (2.0.0)
|
94
103
|
activemodel
|
95
104
|
colorize
|
96
105
|
dry-schema (~> 1.5.4)
|
@@ -105,12 +114,12 @@ GEM
|
|
105
114
|
rack (~> 2.2.3)
|
106
115
|
resonad
|
107
116
|
simply_serializable (>= 1.5.1)
|
108
|
-
mini_portile2 (2.5.
|
109
|
-
minitest (5.14.
|
117
|
+
mini_portile2 (2.5.3)
|
118
|
+
minitest (5.14.4)
|
110
119
|
multi_json (1.15.0)
|
111
120
|
multi_xml (0.6.0)
|
112
121
|
multipart-post (2.1.1)
|
113
|
-
nokogiri (1.11.
|
122
|
+
nokogiri (1.11.7)
|
114
123
|
mini_portile2 (~> 2.5.0)
|
115
124
|
racc (~> 1.4)
|
116
125
|
oauth2 (1.4.7)
|
@@ -120,8 +129,8 @@ GEM
|
|
120
129
|
multi_xml (~> 0.5)
|
121
130
|
rack (>= 1.2, < 3)
|
122
131
|
openssl (2.2.0)
|
123
|
-
parallel (1.
|
124
|
-
parser (
|
132
|
+
parallel (1.20.1)
|
133
|
+
parser (3.0.1.1)
|
125
134
|
ast (~> 2.4.1)
|
126
135
|
pd_ruby (0.2.3)
|
127
136
|
colorize
|
@@ -129,35 +138,35 @@ GEM
|
|
129
138
|
racc (1.5.2)
|
130
139
|
rack (2.2.3)
|
131
140
|
rainbow (3.0.0)
|
132
|
-
rake (13.0.
|
133
|
-
regexp_parser (1.
|
141
|
+
rake (13.0.3)
|
142
|
+
regexp_parser (2.1.1)
|
134
143
|
resonad (1.4.0)
|
135
|
-
rexml (3.2.
|
144
|
+
rexml (3.2.5)
|
136
145
|
rspec (3.10.0)
|
137
146
|
rspec-core (~> 3.10.0)
|
138
147
|
rspec-expectations (~> 3.10.0)
|
139
148
|
rspec-mocks (~> 3.10.0)
|
140
|
-
rspec-core (3.10.
|
149
|
+
rspec-core (3.10.1)
|
141
150
|
rspec-support (~> 3.10.0)
|
142
|
-
rspec-expectations (3.10.
|
151
|
+
rspec-expectations (3.10.1)
|
143
152
|
diff-lcs (>= 1.2.0, < 2.0)
|
144
153
|
rspec-support (~> 3.10.0)
|
145
|
-
rspec-mocks (3.10.
|
154
|
+
rspec-mocks (3.10.2)
|
146
155
|
diff-lcs (>= 1.2.0, < 2.0)
|
147
156
|
rspec-support (~> 3.10.0)
|
148
|
-
rspec-support (3.10.
|
149
|
-
rubocop (1.
|
157
|
+
rspec-support (3.10.2)
|
158
|
+
rubocop (1.15.0)
|
150
159
|
parallel (~> 1.10)
|
151
|
-
parser (>=
|
160
|
+
parser (>= 3.0.0.0)
|
152
161
|
rainbow (>= 2.2.2, < 4.0)
|
153
|
-
regexp_parser (>= 1.8)
|
162
|
+
regexp_parser (>= 1.8, < 3.0)
|
154
163
|
rexml
|
155
|
-
rubocop-ast (>= 1.0.
|
164
|
+
rubocop-ast (>= 1.5.0, < 2.0)
|
156
165
|
ruby-progressbar (~> 1.7)
|
157
|
-
unicode-display_width (>= 1.4.0, <
|
158
|
-
rubocop-ast (1.
|
159
|
-
parser (>=
|
160
|
-
ruby-progressbar (1.
|
166
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
167
|
+
rubocop-ast (1.6.0)
|
168
|
+
parser (>= 3.0.1.1)
|
169
|
+
ruby-progressbar (1.11.0)
|
161
170
|
ruby2_keywords (0.0.4)
|
162
171
|
simplecov (0.16.1)
|
163
172
|
docile (~> 1.1)
|
@@ -169,18 +178,17 @@ GEM
|
|
169
178
|
sync (0.5.0)
|
170
179
|
term-ansicolor (1.7.1)
|
171
180
|
tins (~> 1.0)
|
172
|
-
thor (1.0
|
173
|
-
|
174
|
-
tins (1.26.0)
|
181
|
+
thor (1.1.0)
|
182
|
+
tins (1.29.1)
|
175
183
|
sync
|
176
|
-
tzinfo (
|
177
|
-
|
178
|
-
unicode-display_width (
|
179
|
-
webmock (3.
|
184
|
+
tzinfo (2.0.4)
|
185
|
+
concurrent-ruby (~> 1.0)
|
186
|
+
unicode-display_width (2.0.0)
|
187
|
+
webmock (3.13.0)
|
180
188
|
addressable (>= 2.3.6)
|
181
189
|
crack (>= 0.3.2)
|
182
190
|
hashdiff (>= 0.4.0, < 2.0.0)
|
183
|
-
zeitwerk (2.4.
|
191
|
+
zeitwerk (2.4.2)
|
184
192
|
|
185
193
|
PLATFORMS
|
186
194
|
ruby
|
@@ -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', '
|
41
|
+
spec.add_runtime_dependency('ledger_sync', '>= 2.0.0')
|
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
|
@@ -3,14 +3,14 @@
|
|
3
3
|
# :nocov:
|
4
4
|
module LedgerSync
|
5
5
|
module NetSuite
|
6
|
-
VERSION = '0.
|
6
|
+
VERSION = '0.3.3'
|
7
7
|
|
8
|
-
def self.version
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
def self.version
|
9
|
+
if ENV['PRE_RELEASE']
|
10
|
+
"#{VERSION}.pre.#{ENV['GITHUB_RUN_NUMBER']}"
|
11
|
+
else
|
12
|
+
VERSION
|
13
|
+
end
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Modern Treasury
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04
|
11
|
+
date: 2021-06-04 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:
|
187
|
+
version: 2.0.0
|
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:
|
194
|
+
version: 2.0.0
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: nokogiri
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|