sagekit 0.1.0
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 +7 -0
- data/.rspec +3 -0
- data/CHANGELOG.md +3 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +10 -0
- data/LICENSE.txt +21 -0
- data/README.org +346 -0
- data/Rakefile +8 -0
- data/bin/console +18 -0
- data/bin/setup +8 -0
- data/docs/index.html +940 -0
- data/docs/style.css +82 -0
- data/lib/sagekit/client.rb +97 -0
- data/lib/sagekit/error.rb +3 -0
- data/lib/sagekit/object.rb +18 -0
- data/lib/sagekit/objects/account_set.rb +4 -0
- data/lib/sagekit/objects/category.rb +4 -0
- data/lib/sagekit/objects/credit_note.rb +4 -0
- data/lib/sagekit/objects/customer.rb +4 -0
- data/lib/sagekit/objects/invoice.rb +4 -0
- data/lib/sagekit/objects/item.rb +4 -0
- data/lib/sagekit/objects/location.rb +4 -0
- data/lib/sagekit/objects/purchase_order.rb +4 -0
- data/lib/sagekit/objects/receipt.rb +4 -0
- data/lib/sagekit/objects/sales_history.rb +4 -0
- data/lib/sagekit/objects/sales_order.rb +4 -0
- data/lib/sagekit/objects/sales_person.rb +4 -0
- data/lib/sagekit/objects/vendor.rb +4 -0
- data/lib/sagekit/objects/vendor_contract_cost.rb +4 -0
- data/lib/sagekit/resource.rb +55 -0
- data/lib/sagekit/resources/account_sets.rb +27 -0
- data/lib/sagekit/resources/categories.rb +26 -0
- data/lib/sagekit/resources/credit_notes.rb +17 -0
- data/lib/sagekit/resources/customer_groups.rb +26 -0
- data/lib/sagekit/resources/customer_terms.rb +26 -0
- data/lib/sagekit/resources/customers.rb +26 -0
- data/lib/sagekit/resources/invoices.rb +12 -0
- data/lib/sagekit/resources/items.rb +27 -0
- data/lib/sagekit/resources/locations.rb +26 -0
- data/lib/sagekit/resources/purchase_orders.rb +16 -0
- data/lib/sagekit/resources/receipts.rb +16 -0
- data/lib/sagekit/resources/sales_history.rb +16 -0
- data/lib/sagekit/resources/sales_orders.rb +40 -0
- data/lib/sagekit/resources/sales_persons.rb +34 -0
- data/lib/sagekit/resources/vendor_contract_costs.rb +27 -0
- data/lib/sagekit/resources/vendor_groups.rb +26 -0
- data/lib/sagekit/resources/vendor_terms.rb +26 -0
- data/lib/sagekit/resources/vendors.rb +30 -0
- data/lib/sagekit/version.rb +5 -0
- data/lib/sagekit.rb +56 -0
- metadata +120 -0
data/docs/index.html
ADDED
@@ -0,0 +1,940 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
5
|
+
<head>
|
6
|
+
<!-- 2021-09-30 Thu 22:59 -->
|
7
|
+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
9
|
+
<title>Sagekit</title>
|
10
|
+
<meta name="author" content="Jose Perez" />
|
11
|
+
<meta name="generator" content="Org Mode" />
|
12
|
+
<style>
|
13
|
+
#content { max-width: 60em; margin: auto; }
|
14
|
+
.title { text-align: center;
|
15
|
+
margin-bottom: .2em; }
|
16
|
+
.subtitle { text-align: center;
|
17
|
+
font-size: medium;
|
18
|
+
font-weight: bold;
|
19
|
+
margin-top:0; }
|
20
|
+
.todo { font-family: monospace; color: red; }
|
21
|
+
.done { font-family: monospace; color: green; }
|
22
|
+
.priority { font-family: monospace; color: orange; }
|
23
|
+
.tag { background-color: #eee; font-family: monospace;
|
24
|
+
padding: 2px; font-size: 80%; font-weight: normal; }
|
25
|
+
.timestamp { color: #bebebe; }
|
26
|
+
.timestamp-kwd { color: #5f9ea0; }
|
27
|
+
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
|
28
|
+
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
|
29
|
+
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
|
30
|
+
.underline { text-decoration: underline; }
|
31
|
+
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
|
32
|
+
p.verse { margin-left: 3%; }
|
33
|
+
pre {
|
34
|
+
border: 1px solid #e6e6e6;
|
35
|
+
border-radius: 3px;
|
36
|
+
background-color: #f2f2f2;
|
37
|
+
padding: 8pt;
|
38
|
+
font-family: monospace;
|
39
|
+
overflow: auto;
|
40
|
+
margin: 1.2em;
|
41
|
+
}
|
42
|
+
pre.src {
|
43
|
+
position: relative;
|
44
|
+
overflow: auto;
|
45
|
+
}
|
46
|
+
pre.src:before {
|
47
|
+
display: none;
|
48
|
+
position: absolute;
|
49
|
+
top: -8px;
|
50
|
+
right: 12px;
|
51
|
+
padding: 3px;
|
52
|
+
color: #555;
|
53
|
+
background-color: #f2f2f299;
|
54
|
+
}
|
55
|
+
pre.src:hover:before { display: inline; margin-top: 14px;}
|
56
|
+
/* Languages per Org manual */
|
57
|
+
pre.src-asymptote:before { content: 'Asymptote'; }
|
58
|
+
pre.src-awk:before { content: 'Awk'; }
|
59
|
+
pre.src-authinfo::before { content: 'Authinfo'; }
|
60
|
+
pre.src-C:before { content: 'C'; }
|
61
|
+
/* pre.src-C++ doesn't work in CSS */
|
62
|
+
pre.src-clojure:before { content: 'Clojure'; }
|
63
|
+
pre.src-css:before { content: 'CSS'; }
|
64
|
+
pre.src-D:before { content: 'D'; }
|
65
|
+
pre.src-ditaa:before { content: 'ditaa'; }
|
66
|
+
pre.src-dot:before { content: 'Graphviz'; }
|
67
|
+
pre.src-calc:before { content: 'Emacs Calc'; }
|
68
|
+
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
|
69
|
+
pre.src-fortran:before { content: 'Fortran'; }
|
70
|
+
pre.src-gnuplot:before { content: 'gnuplot'; }
|
71
|
+
pre.src-haskell:before { content: 'Haskell'; }
|
72
|
+
pre.src-hledger:before { content: 'hledger'; }
|
73
|
+
pre.src-java:before { content: 'Java'; }
|
74
|
+
pre.src-js:before { content: 'Javascript'; }
|
75
|
+
pre.src-latex:before { content: 'LaTeX'; }
|
76
|
+
pre.src-ledger:before { content: 'Ledger'; }
|
77
|
+
pre.src-lisp:before { content: 'Lisp'; }
|
78
|
+
pre.src-lilypond:before { content: 'Lilypond'; }
|
79
|
+
pre.src-lua:before { content: 'Lua'; }
|
80
|
+
pre.src-matlab:before { content: 'MATLAB'; }
|
81
|
+
pre.src-mscgen:before { content: 'Mscgen'; }
|
82
|
+
pre.src-ocaml:before { content: 'Objective Caml'; }
|
83
|
+
pre.src-octave:before { content: 'Octave'; }
|
84
|
+
pre.src-org:before { content: 'Org mode'; }
|
85
|
+
pre.src-oz:before { content: 'OZ'; }
|
86
|
+
pre.src-plantuml:before { content: 'Plantuml'; }
|
87
|
+
pre.src-processing:before { content: 'Processing.js'; }
|
88
|
+
pre.src-python:before { content: 'Python'; }
|
89
|
+
pre.src-R:before { content: 'R'; }
|
90
|
+
pre.src-ruby:before { content: 'Ruby'; }
|
91
|
+
pre.src-sass:before { content: 'Sass'; }
|
92
|
+
pre.src-scheme:before { content: 'Scheme'; }
|
93
|
+
pre.src-screen:before { content: 'Gnu Screen'; }
|
94
|
+
pre.src-sed:before { content: 'Sed'; }
|
95
|
+
pre.src-sh:before { content: 'shell'; }
|
96
|
+
pre.src-sql:before { content: 'SQL'; }
|
97
|
+
pre.src-sqlite:before { content: 'SQLite'; }
|
98
|
+
/* additional languages in org.el's org-babel-load-languages alist */
|
99
|
+
pre.src-forth:before { content: 'Forth'; }
|
100
|
+
pre.src-io:before { content: 'IO'; }
|
101
|
+
pre.src-J:before { content: 'J'; }
|
102
|
+
pre.src-makefile:before { content: 'Makefile'; }
|
103
|
+
pre.src-maxima:before { content: 'Maxima'; }
|
104
|
+
pre.src-perl:before { content: 'Perl'; }
|
105
|
+
pre.src-picolisp:before { content: 'Pico Lisp'; }
|
106
|
+
pre.src-scala:before { content: 'Scala'; }
|
107
|
+
pre.src-shell:before { content: 'Shell Script'; }
|
108
|
+
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
|
109
|
+
/* additional language identifiers per "defun org-babel-execute"
|
110
|
+
in ob-*.el */
|
111
|
+
pre.src-cpp:before { content: 'C++'; }
|
112
|
+
pre.src-abc:before { content: 'ABC'; }
|
113
|
+
pre.src-coq:before { content: 'Coq'; }
|
114
|
+
pre.src-groovy:before { content: 'Groovy'; }
|
115
|
+
/* additional language identifiers from org-babel-shell-names in
|
116
|
+
ob-shell.el: ob-shell is the only babel language using a lambda to put
|
117
|
+
the execution function name together. */
|
118
|
+
pre.src-bash:before { content: 'bash'; }
|
119
|
+
pre.src-csh:before { content: 'csh'; }
|
120
|
+
pre.src-ash:before { content: 'ash'; }
|
121
|
+
pre.src-dash:before { content: 'dash'; }
|
122
|
+
pre.src-ksh:before { content: 'ksh'; }
|
123
|
+
pre.src-mksh:before { content: 'mksh'; }
|
124
|
+
pre.src-posh:before { content: 'posh'; }
|
125
|
+
/* Additional Emacs modes also supported by the LaTeX listings package */
|
126
|
+
pre.src-ada:before { content: 'Ada'; }
|
127
|
+
pre.src-asm:before { content: 'Assembler'; }
|
128
|
+
pre.src-caml:before { content: 'Caml'; }
|
129
|
+
pre.src-delphi:before { content: 'Delphi'; }
|
130
|
+
pre.src-html:before { content: 'HTML'; }
|
131
|
+
pre.src-idl:before { content: 'IDL'; }
|
132
|
+
pre.src-mercury:before { content: 'Mercury'; }
|
133
|
+
pre.src-metapost:before { content: 'MetaPost'; }
|
134
|
+
pre.src-modula-2:before { content: 'Modula-2'; }
|
135
|
+
pre.src-pascal:before { content: 'Pascal'; }
|
136
|
+
pre.src-ps:before { content: 'PostScript'; }
|
137
|
+
pre.src-prolog:before { content: 'Prolog'; }
|
138
|
+
pre.src-simula:before { content: 'Simula'; }
|
139
|
+
pre.src-tcl:before { content: 'tcl'; }
|
140
|
+
pre.src-tex:before { content: 'TeX'; }
|
141
|
+
pre.src-plain-tex:before { content: 'Plain TeX'; }
|
142
|
+
pre.src-verilog:before { content: 'Verilog'; }
|
143
|
+
pre.src-vhdl:before { content: 'VHDL'; }
|
144
|
+
pre.src-xml:before { content: 'XML'; }
|
145
|
+
pre.src-nxml:before { content: 'XML'; }
|
146
|
+
/* add a generic configuration mode; LaTeX export needs an additional
|
147
|
+
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
|
148
|
+
pre.src-conf:before { content: 'Configuration File'; }
|
149
|
+
|
150
|
+
table { border-collapse:collapse; }
|
151
|
+
caption.t-above { caption-side: top; }
|
152
|
+
caption.t-bottom { caption-side: bottom; }
|
153
|
+
td, th { vertical-align:top; }
|
154
|
+
th.org-right { text-align: center; }
|
155
|
+
th.org-left { text-align: center; }
|
156
|
+
th.org-center { text-align: center; }
|
157
|
+
td.org-right { text-align: right; }
|
158
|
+
td.org-left { text-align: left; }
|
159
|
+
td.org-center { text-align: center; }
|
160
|
+
dt { font-weight: bold; }
|
161
|
+
.footpara { display: inline; }
|
162
|
+
.footdef { margin-bottom: 1em; }
|
163
|
+
.figure { padding: 1em; }
|
164
|
+
.figure p { text-align: center; }
|
165
|
+
.equation-container {
|
166
|
+
display: table;
|
167
|
+
text-align: center;
|
168
|
+
width: 100%;
|
169
|
+
}
|
170
|
+
.equation {
|
171
|
+
vertical-align: middle;
|
172
|
+
}
|
173
|
+
.equation-label {
|
174
|
+
display: table-cell;
|
175
|
+
text-align: right;
|
176
|
+
vertical-align: middle;
|
177
|
+
}
|
178
|
+
.inlinetask {
|
179
|
+
padding: 10px;
|
180
|
+
border: 2px solid gray;
|
181
|
+
margin: 10px;
|
182
|
+
background: #ffffcc;
|
183
|
+
}
|
184
|
+
#org-div-home-and-up
|
185
|
+
{ text-align: right; font-size: 70%; white-space: nowrap; }
|
186
|
+
textarea { overflow-x: auto; }
|
187
|
+
.linenr { font-size: smaller }
|
188
|
+
.code-highlighted { background-color: #ffff00; }
|
189
|
+
.org-info-js_info-navigation { border-style: none; }
|
190
|
+
#org-info-js_console-label
|
191
|
+
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
|
192
|
+
.org-info-js_search-highlight
|
193
|
+
{ background-color: #ffff00; color: #000000; font-weight: bold; }
|
194
|
+
.org-svg { width: 90%; }
|
195
|
+
</style>
|
196
|
+
<link rel="stylesheet" type="text/css" href="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/css/htmlize.css"/>
|
197
|
+
<link rel="stylesheet" type="text/css" href="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/css/readtheorg.css"/>
|
198
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
199
|
+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
|
200
|
+
<script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/lib/js/jquery.stickytableheaders.min.js"></script>
|
201
|
+
<script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/js/readtheorg.js"></script>
|
202
|
+
<link rel="stylesheet" type="text/css" href="style.css">
|
203
|
+
</head>
|
204
|
+
<body>
|
205
|
+
<div id="content" class="content">
|
206
|
+
<h1 class="title">Sagekit</h1>
|
207
|
+
<div id="table-of-contents" role="doc-toc">
|
208
|
+
<h2>Table of Contents</h2>
|
209
|
+
<div id="text-table-of-contents" role="doc-toc">
|
210
|
+
<ul>
|
211
|
+
<li><a href="#org4a2b8c2">Installation</a></li>
|
212
|
+
<li><a href="#org2cc0de7">Usage</a></li>
|
213
|
+
<li><a href="#orgb2253b7">Resources</a>
|
214
|
+
<ul>
|
215
|
+
<li><a href="#org872b3df">Query options</a></li>
|
216
|
+
<li><a href="#org5114ec7">Account Receivable (AR)</a>
|
217
|
+
<ul>
|
218
|
+
<li><a href="#org54a46f1">Customers</a></li>
|
219
|
+
<li><a href="#org6e1e6e2">Customer Groups</a></li>
|
220
|
+
<li><a href="#orgd29f461">Customer Terms</a></li>
|
221
|
+
<li><a href="#org1b0b277">Sales Persons</a></li>
|
222
|
+
<li><a href="#org07687a2">Account Sets</a></li>
|
223
|
+
</ul>
|
224
|
+
</li>
|
225
|
+
<li><a href="#org02af97f">Account Payable (AP)</a>
|
226
|
+
<ul>
|
227
|
+
<li><a href="#org8f95439">Vendors</a></li>
|
228
|
+
<li><a href="#org6beefc9">Vendor Groups</a></li>
|
229
|
+
<li><a href="#orgc54b436">Vendor Terms</a></li>
|
230
|
+
</ul>
|
231
|
+
</li>
|
232
|
+
<li><a href="#org75893b5">Invenotry Control (IC)</a>
|
233
|
+
<ul>
|
234
|
+
<li><a href="#orgca80fcf">Items</a></li>
|
235
|
+
<li><a href="#orgeb67a64">Categories</a></li>
|
236
|
+
<li><a href="#org518fec2">Locations</a></li>
|
237
|
+
</ul>
|
238
|
+
</li>
|
239
|
+
<li><a href="#org5df9305">Order Entry (OE)</a>
|
240
|
+
<ul>
|
241
|
+
<li><a href="#orgc9178b1">Sales Orders</a></li>
|
242
|
+
<li><a href="#org14cb642">Invoices</a></li>
|
243
|
+
<li><a href="#orgb846a9a">Sales History</a></li>
|
244
|
+
<li><a href="#orgb1c3102">Credit Notes</a></li>
|
245
|
+
</ul>
|
246
|
+
</li>
|
247
|
+
<li><a href="#org3384f69">Purchase Orders (PO)</a>
|
248
|
+
<ul>
|
249
|
+
<li><a href="#orgbe20424">Purchase Orders</a></li>
|
250
|
+
<li><a href="#org75ed03c">Receipts</a></li>
|
251
|
+
<li><a href="#org5ead6ae">Vendor Contract Costs</a></li>
|
252
|
+
</ul>
|
253
|
+
</li>
|
254
|
+
</ul>
|
255
|
+
</li>
|
256
|
+
<li><a href="#orgd26d23a">Performance tips</a>
|
257
|
+
<ul>
|
258
|
+
<li><a href="#org39a47b2">Increase page size for requets</a></li>
|
259
|
+
<li><a href="#org3235078">Change IIS idle time</a></li>
|
260
|
+
</ul>
|
261
|
+
</li>
|
262
|
+
<li><a href="#orgfeb161c">Contributing</a></li>
|
263
|
+
<li><a href="#orge595e00">License</a></li>
|
264
|
+
</ul>
|
265
|
+
</div>
|
266
|
+
</div>
|
267
|
+
<p>
|
268
|
+
Sagekit is a ruby gem client library to talk with Sage300 API.
|
269
|
+
</p>
|
270
|
+
|
271
|
+
<p>
|
272
|
+
The gem maps as closely as possible to the Sage300 API so you can easily convert API examples to gem code.
|
273
|
+
Responses are created as objects like. They’re built using OpenStruct so you can easily access data in a Ruby-ish way.
|
274
|
+
</p>
|
275
|
+
|
276
|
+
<p>
|
277
|
+
The Sage 300 Web API makes it easier to create services that integrate with Sage 300 data and business logic. The Web API improves on existing tools for third-party integrations without requiring in-depth understanding of the Sage 300 View protocol and components.
|
278
|
+
</p>
|
279
|
+
|
280
|
+
<div id="outline-container-org4a2b8c2" class="outline-2">
|
281
|
+
<h2 id="org4a2b8c2">Installation</h2>
|
282
|
+
<div class="outline-text-2" id="text-org4a2b8c2">
|
283
|
+
<p>
|
284
|
+
Add this line to your application’s Gemfile:
|
285
|
+
</p>
|
286
|
+
|
287
|
+
<div class="org-src-container">
|
288
|
+
<pre class="src src-ruby">gem <span style="color: #f1fa8c;">'sagekit'</span>
|
289
|
+
</pre>
|
290
|
+
</div>
|
291
|
+
|
292
|
+
<p>
|
293
|
+
And then execute:
|
294
|
+
</p>
|
295
|
+
|
296
|
+
<div class="org-src-container">
|
297
|
+
<pre class="src src-bash">$ bundle install
|
298
|
+
</pre>
|
299
|
+
</div>
|
300
|
+
|
301
|
+
<p>
|
302
|
+
Or install it yourself as:
|
303
|
+
</p>
|
304
|
+
|
305
|
+
<div class="org-src-container">
|
306
|
+
<pre class="src src-bash">$ gem install sagekit
|
307
|
+
</pre>
|
308
|
+
</div>
|
309
|
+
</div>
|
310
|
+
</div>
|
311
|
+
|
312
|
+
<div id="outline-container-org2cc0de7" class="outline-2">
|
313
|
+
<h2 id="org2cc0de7">Usage</h2>
|
314
|
+
<div class="outline-text-2" id="text-org2cc0de7">
|
315
|
+
<p>
|
316
|
+
Make sure you have Sage300 web services up and runing. Web service is an easy way to communicate with 3rd party application without hampering the existing system & this is the reason we will always suggest to go for web service integration, whenever any customer requires integration.
|
317
|
+
</p>
|
318
|
+
|
319
|
+
<p>
|
320
|
+
Initialize client to make requets:
|
321
|
+
</p>
|
322
|
+
|
323
|
+
<div class="org-src-container">
|
324
|
+
<pre class="src src-ruby"><span style="color: #ffb86c;">require</span> <span style="color: #f1fa8c;">'sagekit'</span>
|
325
|
+
client = <span style="color: #bd93f9;">Sagekit</span>::<span style="color: #bd93f9;">Client</span>.new(<span style="color: #bd93f9;">URL</span>, <span style="color: #bd93f9;">AUTH</span>)
|
326
|
+
client.sales_orders.list(<span style="color: #bd93f9;">COMPANY</span>, <span style="color: #f1fa8c;">'$top'</span>:<span style="color: #bd93f9; font-weight: bold;">10</span>)
|
327
|
+
</pre>
|
328
|
+
</div>
|
329
|
+
|
330
|
+
<p>
|
331
|
+
Make sure to change:
|
332
|
+
</p>
|
333
|
+
<ul class="org-ul">
|
334
|
+
<li><p>
|
335
|
+
URL with the web serive url
|
336
|
+
Example: <code>http://localhost/Sage300WebApi/v1.0/-/SAMLTD/AR/ARCustomers</code>
|
337
|
+
</p>
|
338
|
+
|
339
|
+
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
340
|
+
|
341
|
+
|
342
|
+
<colgroup>
|
343
|
+
<col class="org-left" />
|
344
|
+
|
345
|
+
<col class="org-left" />
|
346
|
+
|
347
|
+
<col class="org-left" />
|
348
|
+
</colgroup>
|
349
|
+
<thead>
|
350
|
+
<tr>
|
351
|
+
<th scope="col" class="org-left">Component</th>
|
352
|
+
<th scope="col" class="org-left">Description</th>
|
353
|
+
<th scope="col" class="org-left">Example</th>
|
354
|
+
</tr>
|
355
|
+
</thead>
|
356
|
+
<tbody>
|
357
|
+
<tr>
|
358
|
+
<td class="org-left">{protocol}</td>
|
359
|
+
<td class="org-left">The application protocol enabled in IIS setup</td>
|
360
|
+
<td class="org-left">http, https</td>
|
361
|
+
</tr>
|
362
|
+
|
363
|
+
<tr>
|
364
|
+
<td class="org-left">{host}</td>
|
365
|
+
<td class="org-left">The path to the Web API</td>
|
366
|
+
<td class="org-left">localhost/Sage300WebApi</td>
|
367
|
+
</tr>
|
368
|
+
|
369
|
+
<tr>
|
370
|
+
<td class="org-left">{version}</td>
|
371
|
+
<td class="org-left">The API version</td>
|
372
|
+
<td class="org-left">v1.0</td>
|
373
|
+
</tr>
|
374
|
+
|
375
|
+
<tr>
|
376
|
+
<td class="org-left">{company}</td>
|
377
|
+
<td class="org-left">The org ID of the company being requested</td>
|
378
|
+
<td class="org-left">SAMLTD</td>
|
379
|
+
</tr>
|
380
|
+
|
381
|
+
<tr>
|
382
|
+
<td class="org-left">{module}</td>
|
383
|
+
<td class="org-left">SAge300 application module</td>
|
384
|
+
<td class="org-left">AR, AP, GL, IC</td>
|
385
|
+
</tr>
|
386
|
+
|
387
|
+
<tr>
|
388
|
+
<td class="org-left">{resource}</td>
|
389
|
+
<td class="org-left">The resource entity being requested</td>
|
390
|
+
<td class="org-left">APVendors, ARCustomers</td>
|
391
|
+
</tr>
|
392
|
+
</tbody>
|
393
|
+
</table>
|
394
|
+
|
395
|
+
<p>
|
396
|
+
<code>{company}</code> needs to be pass by the request, <code>module</code> and <code>resource</code> the gem will take car of.
|
397
|
+
</p></li>
|
398
|
+
|
399
|
+
<li>AUTH with the Basic authentication key, Example:</li>
|
400
|
+
</ul>
|
401
|
+
<pre class="example">
|
402
|
+
Authorization: Basic QURNSU46QURNSU4=
|
403
|
+
(constructed for user "ADMIN" and password "ADMIN")
|
404
|
+
</pre>
|
405
|
+
|
406
|
+
<ul class="org-ul">
|
407
|
+
<li>COMPANY with teh company id</li>
|
408
|
+
</ul>
|
409
|
+
</div>
|
410
|
+
</div>
|
411
|
+
|
412
|
+
<div id="outline-container-orgb2253b7" class="outline-2">
|
413
|
+
<h2 id="orgb2253b7">Resources</h2>
|
414
|
+
<div class="outline-text-2" id="text-orgb2253b7">
|
415
|
+
<p>
|
416
|
+
The simplest way to retrieve records of a particular resource is to call a GET (list object).
|
417
|
+
</p>
|
418
|
+
|
419
|
+
<div class="org-src-container">
|
420
|
+
<pre class="src src-ruby">client.sales_orders.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
421
|
+
</pre>
|
422
|
+
</div>
|
423
|
+
|
424
|
+
<p>
|
425
|
+
Currently the maximum number of records that can be returned for a single GET request is 100. In order to retrieve records beyond the first 100 or find records based on a given set of criteria, the use of query options is required.
|
426
|
+
</p>
|
427
|
+
|
428
|
+
<p>
|
429
|
+
To reduce the number of requests necessary for transferring large datasets, the maximum page size can be adjusted from the default value of 100 records per request.
|
430
|
+
</p>
|
431
|
+
</div>
|
432
|
+
|
433
|
+
<div id="outline-container-org872b3df" class="outline-3">
|
434
|
+
<h3 id="org872b3df">Query options</h3>
|
435
|
+
<div class="outline-text-3" id="text-org872b3df">
|
436
|
+
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
437
|
+
|
438
|
+
|
439
|
+
<colgroup>
|
440
|
+
<col class="org-left" />
|
441
|
+
|
442
|
+
<col class="org-left" />
|
443
|
+
</colgroup>
|
444
|
+
<thead>
|
445
|
+
<tr>
|
446
|
+
<th scope="col" class="org-left">Component</th>
|
447
|
+
<th scope="col" class="org-left">Example</th>
|
448
|
+
</tr>
|
449
|
+
</thead>
|
450
|
+
<tbody>
|
451
|
+
<tr>
|
452
|
+
<td class="org-left">{query-options}</td>
|
453
|
+
<td class="org-left">$skip:100</td>
|
454
|
+
</tr>
|
455
|
+
|
456
|
+
<tr>
|
457
|
+
<td class="org-left"> </td>
|
458
|
+
<td class="org-left">$filer:“CustomerNumber eq ‘LEPEPE’”</td>
|
459
|
+
</tr>
|
460
|
+
|
461
|
+
<tr>
|
462
|
+
<td class="org-left"> </td>
|
463
|
+
<td class="org-left">$select</td>
|
464
|
+
</tr>
|
465
|
+
|
466
|
+
<tr>
|
467
|
+
<td class="org-left"> </td>
|
468
|
+
<td class="org-left">$top:5</td>
|
469
|
+
</tr>
|
470
|
+
|
471
|
+
<tr>
|
472
|
+
<td class="org-left"> </td>
|
473
|
+
<td class="org-left">$count:true</td>
|
474
|
+
</tr>
|
475
|
+
</tbody>
|
476
|
+
</table>
|
477
|
+
|
478
|
+
<ul class="org-ul">
|
479
|
+
<li><p>
|
480
|
+
<code>$skip</code>
|
481
|
+
</p>
|
482
|
+
|
483
|
+
<p>
|
484
|
+
The <code>$skip</code> query option must be a positive integer N that specifies the records beyond which the response feed should start with, effectively skipping N records. This is typically used to retrieve records beyond the top 100, the default maximum limit of a single response page.
|
485
|
+
</p>
|
486
|
+
|
487
|
+
<div class="org-src-container">
|
488
|
+
<pre class="src src-ruby"> client.sales_orders.list(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'$skip'</span>:<span style="color: #bd93f9; font-weight: bold;">5</span>)
|
489
|
+
</pre>
|
490
|
+
</div></li>
|
491
|
+
|
492
|
+
<li><p>
|
493
|
+
<code>$top</code>
|
494
|
+
</p>
|
495
|
+
|
496
|
+
<p>
|
497
|
+
The <code>$top</code> query option must a positive integer N that specifies the maximum number of records the response feed could contain, effectively selecting the first N records.
|
498
|
+
</p>
|
499
|
+
|
500
|
+
<div class="org-src-container">
|
501
|
+
<pre class="src src-ruby"> client.sales_orders.list(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'$top'</span>:<span style="color: #bd93f9; font-weight: bold;">2</span>)
|
502
|
+
</pre>
|
503
|
+
</div></li>
|
504
|
+
|
505
|
+
<li><p>
|
506
|
+
<code>$count</code>
|
507
|
+
</p>
|
508
|
+
|
509
|
+
<p>
|
510
|
+
The <code>$count</code> query option specifies whether a count of all records will be returned as part of the response feed, regardless of how many records are actually returned in the response.
|
511
|
+
</p></li>
|
512
|
+
|
513
|
+
<li><p>
|
514
|
+
<code>$filter</code>
|
515
|
+
</p>
|
516
|
+
|
517
|
+
<p>
|
518
|
+
The <code>$filter</code> query option specifies a set of criteria that records must satisfy before being returned, effectively allowing the caller to retrieve a subset of the resource collection based on a specified filter.
|
519
|
+
Expressions can reference properties as well as literals. Literal values can be strings enclosed in single quotes, dates, numbers, and boolean values.
|
520
|
+
The following is a list of the operators that are supported in the Sage 300 Web API:
|
521
|
+
</p>
|
522
|
+
|
523
|
+
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
524
|
+
|
525
|
+
|
526
|
+
<colgroup>
|
527
|
+
<col class="org-left" />
|
528
|
+
|
529
|
+
<col class="org-left" />
|
530
|
+
|
531
|
+
<col class="org-left" />
|
532
|
+
</colgroup>
|
533
|
+
<thead>
|
534
|
+
<tr>
|
535
|
+
<th scope="col" class="org-left">Operator</th>
|
536
|
+
<th scope="col" class="org-left">Description</th>
|
537
|
+
<th scope="col" class="org-left">Example</th>
|
538
|
+
</tr>
|
539
|
+
</thead>
|
540
|
+
<tbody>
|
541
|
+
<tr>
|
542
|
+
<td class="org-left">eq</td>
|
543
|
+
<td class="org-left">equal</td>
|
544
|
+
<td class="org-left">’$filter’:“City eq ‘Miami’”</td>
|
545
|
+
</tr>
|
546
|
+
|
547
|
+
<tr>
|
548
|
+
<td class="org-left">ne</td>
|
549
|
+
<td class="org-left">not equal</td>
|
550
|
+
<td class="org-left">’$filter’:“City ne ‘Miami’”</td>
|
551
|
+
</tr>
|
552
|
+
|
553
|
+
<tr>
|
554
|
+
<td class="org-left">gt</td>
|
555
|
+
<td class="org-left">greater than</td>
|
556
|
+
<td class="org-left">’$filter’:“NumberOfDaysToPay” gt 30“</td>
|
557
|
+
</tr>
|
558
|
+
|
559
|
+
<tr>
|
560
|
+
<td class="org-left">lt</td>
|
561
|
+
<td class="org-left">less than</td>
|
562
|
+
<td class="org-left">’$filter’:“AccountPastDue” lt 90“</td>
|
563
|
+
</tr>
|
564
|
+
|
565
|
+
<tr>
|
566
|
+
<td class="org-left">le</td>
|
567
|
+
<td class="org-left">less than or equal to</td>
|
568
|
+
<td class="org-left">’$filter’:“DateLastMaintained le datetime’2015-12-31T12:00’”</td>
|
569
|
+
</tr>
|
570
|
+
|
571
|
+
<tr>
|
572
|
+
<td class="org-left">and</td>
|
573
|
+
<td class="org-left">and</td>
|
574
|
+
<td class="org-left">’$filter’:“GroupCode eq ‘EXPORT’ and OnHold eq ‘No’”</td>
|
575
|
+
</tr>
|
576
|
+
|
577
|
+
<tr>
|
578
|
+
<td class="org-left">or</td>
|
579
|
+
<td class="org-left">or</td>
|
580
|
+
<td class="org-left">’$filter’:“City eq ‘Los Angeles’ or City eq ‘Miami’”</td>
|
581
|
+
</tr>
|
582
|
+
</tbody>
|
583
|
+
</table></li>
|
584
|
+
</ul>
|
585
|
+
|
586
|
+
<p>
|
587
|
+
<b>Combining query options</b>
|
588
|
+
</p>
|
589
|
+
|
590
|
+
<div class="org-src-container">
|
591
|
+
<pre class="src src-ruby">client.customers.list(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'$filter'</span>:<span style="color: #f1fa8c;">"CustomerNumber eq '112321' and OrderType eq 'Active'"</span>, <span style="color: #f1fa8c;">'$skip'</span>:<span style="color: #bd93f9; font-weight: bold;">5</span>, <span style="color: #f1fa8c;">'$top'</span>:<span style="color: #bd93f9; font-weight: bold;">2</span>)
|
592
|
+
</pre>
|
593
|
+
</div>
|
594
|
+
</div>
|
595
|
+
</div>
|
596
|
+
|
597
|
+
<div id="outline-container-org5114ec7" class="outline-3">
|
598
|
+
<h3 id="org5114ec7">Account Receivable (AR)</h3>
|
599
|
+
<div class="outline-text-3" id="text-org5114ec7">
|
600
|
+
</div>
|
601
|
+
<div id="outline-container-org54a46f1" class="outline-4">
|
602
|
+
<h4 id="org54a46f1">Customers</h4>
|
603
|
+
<div class="outline-text-4" id="text-org54a46f1">
|
604
|
+
<div class="org-src-container">
|
605
|
+
<pre class="src src-ruby">client.customers.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
606
|
+
client.customers.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'IDCUST'</span>)
|
607
|
+
client.customers.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
608
|
+
client.customers.update(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
609
|
+
client.customers.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'IDCUST'</span>)
|
610
|
+
</pre>
|
611
|
+
</div>
|
612
|
+
</div>
|
613
|
+
</div>
|
614
|
+
|
615
|
+
<div id="outline-container-org6e1e6e2" class="outline-4">
|
616
|
+
<h4 id="org6e1e6e2">Customer Groups</h4>
|
617
|
+
<div class="outline-text-4" id="text-org6e1e6e2">
|
618
|
+
<div class="org-src-container">
|
619
|
+
<pre class="src src-ruby">client.customer_groups.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
620
|
+
client.customer_groups.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'GROUPCODE'</span>)
|
621
|
+
client.customer_groups.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
622
|
+
client.customer_groups.update(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
623
|
+
client.customer_groups.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'GROUPCODE'</span>)
|
624
|
+
</pre>
|
625
|
+
</div>
|
626
|
+
</div>
|
627
|
+
</div>
|
628
|
+
|
629
|
+
<div id="outline-container-orgd29f461" class="outline-4">
|
630
|
+
<h4 id="orgd29f461">Customer Terms</h4>
|
631
|
+
<div class="outline-text-4" id="text-orgd29f461">
|
632
|
+
<div class="org-src-container">
|
633
|
+
<pre class="src src-ruby">client.customer_terms.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
634
|
+
client.customer_terms.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'TERMSCODE'</span>)
|
635
|
+
client.customer_terms.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
636
|
+
client.customer_terms.update(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
637
|
+
client.customer_terms.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'TERMSCODE'</span>)
|
638
|
+
</pre>
|
639
|
+
</div>
|
640
|
+
</div>
|
641
|
+
</div>
|
642
|
+
|
643
|
+
<div id="outline-container-org1b0b277" class="outline-4">
|
644
|
+
<h4 id="org1b0b277">Sales Persons</h4>
|
645
|
+
<div class="outline-text-4" id="text-org1b0b277">
|
646
|
+
<div class="org-src-container">
|
647
|
+
<pre class="src src-ruby">client.sales_persons.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
648
|
+
client.sales_persons.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'KEY'</span>)
|
649
|
+
client.sales_persons.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
650
|
+
client.sales_persons.update(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
651
|
+
client.sales_persons.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'KEY'</span>)
|
652
|
+
client.sales_persons.statistics(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
653
|
+
client.sales_persons.filter_stats(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'SALESPERSON'</span>, <span style="color: #f1fa8c;">'YEAR'</span>, <span style="color: #f1fa8c;">'PERIDO'</span>)
|
654
|
+
</pre>
|
655
|
+
</div>
|
656
|
+
</div>
|
657
|
+
</div>
|
658
|
+
|
659
|
+
<div id="outline-container-org07687a2" class="outline-4">
|
660
|
+
<h4 id="org07687a2">Account Sets</h4>
|
661
|
+
<div class="outline-text-4" id="text-org07687a2">
|
662
|
+
<div class="org-src-container">
|
663
|
+
<pre class="src src-ruby">client.account_sets.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
664
|
+
client.account_sets.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'KEY'</span>)
|
665
|
+
client.account_sets.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
666
|
+
client.account_sets.update(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
667
|
+
client.account_sets.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'KEY'</span>)
|
668
|
+
</pre>
|
669
|
+
</div>
|
670
|
+
</div>
|
671
|
+
</div>
|
672
|
+
</div>
|
673
|
+
|
674
|
+
<div id="outline-container-org02af97f" class="outline-3">
|
675
|
+
<h3 id="org02af97f">Account Payable (AP)</h3>
|
676
|
+
<div class="outline-text-3" id="text-org02af97f">
|
677
|
+
</div>
|
678
|
+
<div id="outline-container-org8f95439" class="outline-4">
|
679
|
+
<h4 id="org8f95439">Vendors</h4>
|
680
|
+
<div class="outline-text-4" id="text-org8f95439">
|
681
|
+
<div class="org-src-container">
|
682
|
+
<pre class="src src-ruby">client.vendors.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
683
|
+
client.vendors.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'VENDCODE'</span>)
|
684
|
+
client.vendors.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
685
|
+
client.vendors.update(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
686
|
+
client.vendors.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'NUMBER'</span>)
|
687
|
+
client.vendors.statistics(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'VENDCODE'</span>)
|
688
|
+
</pre>
|
689
|
+
</div>
|
690
|
+
</div>
|
691
|
+
</div>
|
692
|
+
|
693
|
+
<div id="outline-container-org6beefc9" class="outline-4">
|
694
|
+
<h4 id="org6beefc9">Vendor Groups</h4>
|
695
|
+
<div class="outline-text-4" id="text-org6beefc9">
|
696
|
+
<div class="org-src-container">
|
697
|
+
<pre class="src src-ruby">client.vendor_groups.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
698
|
+
client.vendor_groups.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'GROUPCODE'</span>)
|
699
|
+
client.vendor_groups.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
700
|
+
client.vendor_groups.update(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
701
|
+
client.vendor_groups.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'GROUPCODE'</span>)
|
702
|
+
</pre>
|
703
|
+
</div>
|
704
|
+
</div>
|
705
|
+
</div>
|
706
|
+
|
707
|
+
<div id="outline-container-orgc54b436" class="outline-4">
|
708
|
+
<h4 id="orgc54b436">Vendor Terms</h4>
|
709
|
+
<div class="outline-text-4" id="text-orgc54b436">
|
710
|
+
<div class="org-src-container">
|
711
|
+
<pre class="src src-ruby">client.vendor_terms.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
712
|
+
client.vendor_terms.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'TERMSCODE'</span>)
|
713
|
+
client.vendor_terms.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
714
|
+
client.vendor_terms.update(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
715
|
+
client.vendor_terms.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'TERMSCODE'</span>)
|
716
|
+
</pre>
|
717
|
+
</div>
|
718
|
+
</div>
|
719
|
+
</div>
|
720
|
+
</div>
|
721
|
+
|
722
|
+
<div id="outline-container-org75893b5" class="outline-3">
|
723
|
+
<h3 id="org75893b5">Invenotry Control (IC)</h3>
|
724
|
+
<div class="outline-text-3" id="text-org75893b5">
|
725
|
+
</div>
|
726
|
+
<div id="outline-container-orgca80fcf" class="outline-4">
|
727
|
+
<h4 id="orgca80fcf">Items</h4>
|
728
|
+
<div class="outline-text-4" id="text-orgca80fcf">
|
729
|
+
<div class="org-src-container">
|
730
|
+
<pre class="src src-ruby">client.items.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
731
|
+
client.items.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'ITEMNO'</span>)
|
732
|
+
client.items.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
733
|
+
client.items.update(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
734
|
+
client.items.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'ITEMNO'</span>)
|
735
|
+
</pre>
|
736
|
+
</div>
|
737
|
+
</div>
|
738
|
+
</div>
|
739
|
+
|
740
|
+
<div id="outline-container-orgeb67a64" class="outline-4">
|
741
|
+
<h4 id="orgeb67a64">Categories</h4>
|
742
|
+
<div class="outline-text-4" id="text-orgeb67a64">
|
743
|
+
<div class="org-src-container">
|
744
|
+
<pre class="src src-ruby">client.categories.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
745
|
+
client.categories.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'CATEGORYCODE'</span>)
|
746
|
+
client.categories.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
747
|
+
client.categories.update(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
748
|
+
client.categories.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'CATEGORYCODE'</span>)
|
749
|
+
</pre>
|
750
|
+
</div>
|
751
|
+
</div>
|
752
|
+
</div>
|
753
|
+
|
754
|
+
<div id="outline-container-org518fec2" class="outline-4">
|
755
|
+
<h4 id="org518fec2">Locations</h4>
|
756
|
+
<div class="outline-text-4" id="text-org518fec2">
|
757
|
+
<div class="org-src-container">
|
758
|
+
<pre class="src src-ruby">client.locations.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
759
|
+
client.locations.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'LOCATION'</span>)
|
760
|
+
client.locations.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
761
|
+
client.locations.update(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
762
|
+
client.locations.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'LOCATION'</span>)
|
763
|
+
</pre>
|
764
|
+
</div>
|
765
|
+
</div>
|
766
|
+
</div>
|
767
|
+
</div>
|
768
|
+
|
769
|
+
<div id="outline-container-org5df9305" class="outline-3">
|
770
|
+
<h3 id="org5df9305">Order Entry (OE)</h3>
|
771
|
+
<div class="outline-text-3" id="text-org5df9305">
|
772
|
+
</div>
|
773
|
+
<div id="outline-container-orgc9178b1" class="outline-4">
|
774
|
+
<h4 id="orgc9178b1">Sales Orders</h4>
|
775
|
+
<div class="outline-text-4" id="text-orgc9178b1">
|
776
|
+
<div class="org-src-container">
|
777
|
+
<pre class="src src-ruby">client.sales_orders.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
778
|
+
client.sales_orders.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'ORDERID'</span>)
|
779
|
+
client.sales_orders.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
780
|
+
</pre>
|
781
|
+
</div>
|
782
|
+
</div>
|
783
|
+
</div>
|
784
|
+
|
785
|
+
<div id="outline-container-org14cb642" class="outline-4">
|
786
|
+
<h4 id="org14cb642">Invoices</h4>
|
787
|
+
<div class="outline-text-4" id="text-org14cb642">
|
788
|
+
<div class="org-src-container">
|
789
|
+
<pre class="src src-ruby">client.invoices.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
790
|
+
client.invoices.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'INVUNIQ'</span>)
|
791
|
+
</pre>
|
792
|
+
</div>
|
793
|
+
</div>
|
794
|
+
</div>
|
795
|
+
|
796
|
+
<div id="outline-container-orgb846a9a" class="outline-4">
|
797
|
+
<h4 id="orgb846a9a">Sales History</h4>
|
798
|
+
<div class="outline-text-4" id="text-orgb846a9a">
|
799
|
+
<div class="org-src-container">
|
800
|
+
<pre class="src src-ruby">client.sales_history.list(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
801
|
+
client.sales_history.details(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
802
|
+
client.sales_history.stats(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
803
|
+
</pre>
|
804
|
+
</div>
|
805
|
+
</div>
|
806
|
+
</div>
|
807
|
+
|
808
|
+
<div id="outline-container-orgb1c3102" class="outline-4">
|
809
|
+
<h4 id="orgb1c3102">Credit Notes</h4>
|
810
|
+
<div class="outline-text-4" id="text-orgb1c3102">
|
811
|
+
<div class="org-src-container">
|
812
|
+
<pre class="src src-ruby">client.credit_notes.list(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
813
|
+
client.credit_notes.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'CNUNIQ'</span>)
|
814
|
+
client.credit_notes.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
815
|
+
</pre>
|
816
|
+
</div>
|
817
|
+
</div>
|
818
|
+
</div>
|
819
|
+
</div>
|
820
|
+
|
821
|
+
<div id="outline-container-org3384f69" class="outline-3">
|
822
|
+
<h3 id="org3384f69">Purchase Orders (PO)</h3>
|
823
|
+
<div class="outline-text-3" id="text-org3384f69">
|
824
|
+
</div>
|
825
|
+
<div id="outline-container-orgbe20424" class="outline-4">
|
826
|
+
<h4 id="orgbe20424">Purchase Orders</h4>
|
827
|
+
<div class="outline-text-4" id="text-orgbe20424">
|
828
|
+
<div class="org-src-container">
|
829
|
+
<pre class="src src-ruby">client.purchase_orders.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
830
|
+
client.purchase_orders.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'SECUENCEID'</span>)
|
831
|
+
client.purchase_orders.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
832
|
+
</pre>
|
833
|
+
</div>
|
834
|
+
</div>
|
835
|
+
</div>
|
836
|
+
|
837
|
+
<div id="outline-container-org75ed03c" class="outline-4">
|
838
|
+
<h4 id="org75ed03c">Receipts</h4>
|
839
|
+
<div class="outline-text-4" id="text-org75ed03c">
|
840
|
+
<div class="org-src-container">
|
841
|
+
<pre class="src src-ruby">client.receipts.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
842
|
+
client.receipts.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'SECUENCEID'</span>)
|
843
|
+
client.receipts.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
844
|
+
</pre>
|
845
|
+
</div>
|
846
|
+
</div>
|
847
|
+
</div>
|
848
|
+
|
849
|
+
<div id="outline-container-org5ead6ae" class="outline-4">
|
850
|
+
<h4 id="org5ead6ae">Vendor Contract Costs</h4>
|
851
|
+
<div class="outline-text-4" id="text-org5ead6ae">
|
852
|
+
<div class="org-src-container">
|
853
|
+
<pre class="src src-ruby">client.vendor_contract_costs.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
|
854
|
+
client.vendor_contract_costs.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'ITEMNO'</span>, <span style="color: #f1fa8c;">'VENDCODE'</span>)
|
855
|
+
client.vendor_contract_costs.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
|
856
|
+
client.vendor_contract_costs.update(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'ITEMNO'</span>, <span style="color: #f1fa8c;">'VENDCODE'</span>, {})
|
857
|
+
client.vendor_contract_costs.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'ITEMNO'</span>, <span style="color: #f1fa8c;">'VENDCODE'</span>)
|
858
|
+
</pre>
|
859
|
+
</div>
|
860
|
+
</div>
|
861
|
+
</div>
|
862
|
+
</div>
|
863
|
+
</div>
|
864
|
+
|
865
|
+
<div id="outline-container-orgd26d23a" class="outline-2">
|
866
|
+
<h2 id="orgd26d23a">Performance tips</h2>
|
867
|
+
<div class="outline-text-2" id="text-orgd26d23a">
|
868
|
+
<p>
|
869
|
+
It is possible to adjust the performance of Sage 300 Web API if improvements are required for integration purposes.
|
870
|
+
</p>
|
871
|
+
</div>
|
872
|
+
|
873
|
+
<div id="outline-container-org39a47b2" class="outline-3">
|
874
|
+
<h3 id="org39a47b2">Increase page size for requets</h3>
|
875
|
+
<div class="outline-text-3" id="text-org39a47b2">
|
876
|
+
<p>
|
877
|
+
When large amounts of records need to be retrieved through Sage 300 Web API, the page size setting can be increased to reduce the number of GET requests and thus reduce the overall time for the entire process.
|
878
|
+
</p>
|
879
|
+
|
880
|
+
<p>
|
881
|
+
In order to increase the page size setting, you can use a text editor to open the <code>Web.config</code> file located in the <code>Online\WebApi</code> folder under your Sage 300 installation folder. Search for the line in this file that contains the following text:
|
882
|
+
</p>
|
883
|
+
|
884
|
+
<div class="org-src-container">
|
885
|
+
<pre class="src src-xml"><<span style="color: #50fa7b;">add</span> <span style="color: #ffc9e8;">key</span>=<span style="color: #f1fa8c;">"PageSize"</span> <span style="color: #ffc9e8;">value</span>=<span style="color: #f1fa8c;">"100"</span> />
|
886
|
+
</pre>
|
887
|
+
</div>
|
888
|
+
|
889
|
+
<p>
|
890
|
+
Increase the value to the required page size. The recommended setting for large numbers of records is 1000.
|
891
|
+
</p>
|
892
|
+
</div>
|
893
|
+
</div>
|
894
|
+
|
895
|
+
<div id="outline-container-org3235078" class="outline-3">
|
896
|
+
<h3 id="org3235078">Change IIS idle time</h3>
|
897
|
+
<div class="outline-text-3" id="text-org3235078">
|
898
|
+
<p>
|
899
|
+
By default, IIS terminates a web application after 20 minutes of inactivity. This means that if Sage 300 Web API requests are not made within 20 minutes of one another, a request will take longer than usual to process. To curb this behavior, the IIS application pool Idle Time-out setting can be adjusted.
|
900
|
+
</p>
|
901
|
+
|
902
|
+
<p>
|
903
|
+
To increase the Time-out time and Time-out Action:
|
904
|
+
</p>
|
905
|
+
<ol class="org-ol">
|
906
|
+
<li>Open IIS Manager</li>
|
907
|
+
<li>In Application Pools, select Sage300 Pool.</li>
|
908
|
+
<li>In the Actions pane, click Advanced Settings.</li>
|
909
|
+
<li>In the Process Model section, change the Idle Time-out Action from Terminate to Suspend.</li>
|
910
|
+
<li>The Idle Time-out time should be increased to a more reasonable amount. 1447 minutes is the recommended value, as it is greater than a single day.</li>
|
911
|
+
</ol>
|
912
|
+
</div>
|
913
|
+
</div>
|
914
|
+
</div>
|
915
|
+
|
916
|
+
<div id="outline-container-orgfeb161c" class="outline-2">
|
917
|
+
<h2 id="orgfeb161c">Contributing</h2>
|
918
|
+
<div class="outline-text-2" id="text-orgfeb161c">
|
919
|
+
<p>
|
920
|
+
Everyone is encouraged to help improve this project. Bug reports and pull requests are welcome at <a href="https://github.com/lepepe/sagekit/pulls">https://github.com/lepepe/sagekit/pulls</a>.
|
921
|
+
Feel free to open an <a href="https://github.com/lepepe/sagekit/issues">issue</a> to get feedback on your idea before spending too much time on it.
|
922
|
+
</p>
|
923
|
+
</div>
|
924
|
+
</div>
|
925
|
+
|
926
|
+
<div id="outline-container-orge595e00" class="outline-2">
|
927
|
+
<h2 id="orge595e00">License</h2>
|
928
|
+
<div class="outline-text-2" id="text-orge595e00">
|
929
|
+
<p>
|
930
|
+
The gem is available as open source under the terms of the <a href="https://opensource.org/licenses/MIT">MIT License</a>.
|
931
|
+
</p>
|
932
|
+
</div>
|
933
|
+
</div>
|
934
|
+
</div>
|
935
|
+
<div id="postamble" class="status">
|
936
|
+
<p class="author">Author: Jose Perez</p>
|
937
|
+
<p class="date">Created: 2021-09-30 Thu 22:59</p>
|
938
|
+
</div>
|
939
|
+
</body>
|
940
|
+
</html>
|