sagekit 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf9a2ad3103e00fb5a7c70db398b14b693da3458a3dd826f01ca453d37753cc2
4
- data.tar.gz: 8bc67fc26a566568542d8675741a4593942014f3e2872e4f34f79cf2bb3bce7d
3
+ metadata.gz: e41f4e099bde651245639540edf15eb2258d9c08bb64cd8750bf0c9b5f34d735
4
+ data.tar.gz: ec4fc63aeafbc85d3757ab4ce39c816f716988b327b466d2e54caa67efb1c5ae
5
5
  SHA512:
6
- metadata.gz: adf9a8f1aed9563904da68f88238e9349ffe712b60d767661701e10206795037db32060d8c0e3784816c1bf6326549a9c871a53f3dab8babf4e75fa4e72dbf3a
7
- data.tar.gz: 9fb19570edd2aacbd78189a4f62589c357bd0afa70ed7ef955eb6dcf2955752d4c57cb23813dd5d48c7ea2adb1c64846779e6b1534be014029c7da27ebdfb879
6
+ metadata.gz: f996b5ba6c86e129cdee8b1ab2376b0757c8f367b1c45a71dde94b24693eb4b2c8a6e120350f243c24297a309d7d96ddb4ac5b82385a45fe24a8651f23a4334f
7
+ data.tar.gz: 4ae79babfb127596bb82d399dc47d2023342d97996faefa8a59440902e871dc464b34f64bc6d6a502850161b27023877802a50b8f14470c2dc64eba049aee99e
data/README.org CHANGED
@@ -8,6 +8,8 @@
8
8
 
9
9
  Sagekit is a ruby gem client library to talk with Sage300 API.
10
10
 
11
+ [[https://badge.fury.io/rb/sagekit.svg]]
12
+
11
13
  The gem maps as closely as possible to the Sage300 API so you can easily convert API examples to gem code.
12
14
  Responses are created as objects like. They're built using OpenStruct so you can easily access data in a Ruby-ish way.
13
15
 
@@ -261,6 +263,11 @@ client.sales_orders.retreive('COMPANY', 'ORDERID')
261
263
  client.sales_orders.create('COMPANY', {})
262
264
  #+end_src
263
265
 
266
+ Create sales order passing json payload instead of ruby atributes.
267
+ #+begin_src ruby
268
+ client.sales_orders.create_json('COMPANY', {})
269
+ #+end_src
270
+
264
271
  **** Invoices
265
272
 
266
273
  #+begin_src ruby
@@ -344,3 +351,10 @@ Feel free to open an [[https://github.com/lepepe/sagekit/issues][issue]] to get
344
351
  ** License
345
352
 
346
353
  The gem is available as open source under the terms of the [[https://opensource.org/licenses/MIT][MIT License]].
354
+
355
+ ** TODO Sagekit todo list.
356
+ + [ ] Testing API requests
357
+ + [ ] Add endpoints for:
358
+ + [ ] Common Services
359
+ + [ ] General Ledger
360
+ + [ ] Complete other module's endpoints
data/docs/index.html CHANGED
@@ -3,7 +3,7 @@
3
3
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
4
  <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5
5
  <head>
6
- <!-- 2021-09-30 Thu 22:59 -->
6
+ <!-- 2021-10-08 Fri 09:23 -->
7
7
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1" />
9
9
  <title>Sagekit</title>
@@ -208,59 +208,60 @@
208
208
  <h2>Table of Contents</h2>
209
209
  <div id="text-table-of-contents" role="doc-toc">
210
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>
211
+ <li><a href="#org440bdcf">Installation</a></li>
212
+ <li><a href="#org7d1db6d">Usage</a></li>
213
+ <li><a href="#orgb24a4f7">Resources</a>
214
214
  <ul>
215
- <li><a href="#org872b3df">Query options</a></li>
216
- <li><a href="#org5114ec7">Account Receivable (AR)</a>
215
+ <li><a href="#org2664de8">Query options</a></li>
216
+ <li><a href="#orgf3c2edb">Account Receivable (AR)</a>
217
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>
218
+ <li><a href="#orgc7937bc">Customers</a></li>
219
+ <li><a href="#org107fce5">Customer Groups</a></li>
220
+ <li><a href="#org60d2c45">Customer Terms</a></li>
221
+ <li><a href="#org8054856">Sales Persons</a></li>
222
+ <li><a href="#org3516ea0">Account Sets</a></li>
223
223
  </ul>
224
224
  </li>
225
- <li><a href="#org02af97f">Account Payable (AP)</a>
225
+ <li><a href="#orga609a19">Account Payable (AP)</a>
226
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>
227
+ <li><a href="#org7ba1865">Vendors</a></li>
228
+ <li><a href="#orge2f01ca">Vendor Groups</a></li>
229
+ <li><a href="#orgb2251dc">Vendor Terms</a></li>
230
230
  </ul>
231
231
  </li>
232
- <li><a href="#org75893b5">Invenotry Control (IC)</a>
232
+ <li><a href="#orgcce1fbb">Invenotry Control (IC)</a>
233
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>
234
+ <li><a href="#org7c68eea">Items</a></li>
235
+ <li><a href="#orgea7f575">Categories</a></li>
236
+ <li><a href="#org440c768">Locations</a></li>
237
237
  </ul>
238
238
  </li>
239
- <li><a href="#org5df9305">Order Entry (OE)</a>
239
+ <li><a href="#orgd76b214">Order Entry (OE)</a>
240
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>
241
+ <li><a href="#org62bd88f">Sales Orders</a></li>
242
+ <li><a href="#org9382b9a">Invoices</a></li>
243
+ <li><a href="#orga0f291b">Sales History</a></li>
244
+ <li><a href="#org71b8e95">Credit Notes</a></li>
245
245
  </ul>
246
246
  </li>
247
- <li><a href="#org3384f69">Purchase Orders (PO)</a>
247
+ <li><a href="#orge6526fa">Purchase Orders (PO)</a>
248
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>
249
+ <li><a href="#org973ebd4">Purchase Orders</a></li>
250
+ <li><a href="#orgb86f2aa">Receipts</a></li>
251
+ <li><a href="#orgc4ccb79">Vendor Contract Costs</a></li>
252
252
  </ul>
253
253
  </li>
254
254
  </ul>
255
255
  </li>
256
- <li><a href="#orgd26d23a">Performance tips</a>
256
+ <li><a href="#orgd9473be">Performance tips</a>
257
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>
258
+ <li><a href="#orgf8a818f">Increase page size for requets</a></li>
259
+ <li><a href="#orgbbf1ff3">Change IIS idle time</a></li>
260
260
  </ul>
261
261
  </li>
262
- <li><a href="#orgfeb161c">Contributing</a></li>
263
- <li><a href="#orge595e00">License</a></li>
262
+ <li><a href="#orge95b8c1">Contributing</a></li>
263
+ <li><a href="#org9fc6187">License</a></li>
264
+ <li><a href="#org41d5974"><span class="todo TODO">TODO</span> Sagekit todo list.</a></li>
264
265
  </ul>
265
266
  </div>
266
267
  </div>
@@ -268,6 +269,12 @@
268
269
  Sagekit is a ruby gem client library to talk with Sage300 API.
269
270
  </p>
270
271
 
272
+
273
+ <div id="orgd43e6b6" class="figure">
274
+ <p><img src="https://badge.fury.io/rb/sagekit.svg" alt="sagekit.svg" />
275
+ </p>
276
+ </div>
277
+
271
278
  <p>
272
279
  The gem maps as closely as possible to the Sage300 API so you can easily convert API examples to gem code.
273
280
  Responses are created as objects like. They&rsquo;re built using OpenStruct so you can easily access data in a Ruby-ish way.
@@ -277,9 +284,9 @@ Responses are created as objects like. They&rsquo;re built using OpenStruct so y
277
284
  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
285
  </p>
279
286
 
280
- <div id="outline-container-org4a2b8c2" class="outline-2">
281
- <h2 id="org4a2b8c2">Installation</h2>
282
- <div class="outline-text-2" id="text-org4a2b8c2">
287
+ <div id="outline-container-org440bdcf" class="outline-2">
288
+ <h2 id="org440bdcf">Installation</h2>
289
+ <div class="outline-text-2" id="text-org440bdcf">
283
290
  <p>
284
291
  Add this line to your application&rsquo;s Gemfile:
285
292
  </p>
@@ -309,9 +316,9 @@ Or install it yourself as:
309
316
  </div>
310
317
  </div>
311
318
 
312
- <div id="outline-container-org2cc0de7" class="outline-2">
313
- <h2 id="org2cc0de7">Usage</h2>
314
- <div class="outline-text-2" id="text-org2cc0de7">
319
+ <div id="outline-container-org7d1db6d" class="outline-2">
320
+ <h2 id="org7d1db6d">Usage</h2>
321
+ <div class="outline-text-2" id="text-org7d1db6d">
315
322
  <p>
316
323
  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 &amp; this is the reason we will always suggest to go for web service integration, whenever any customer requires integration.
317
324
  </p>
@@ -409,9 +416,9 @@ Authorization: Basic QURNSU46QURNSU4=
409
416
  </div>
410
417
  </div>
411
418
 
412
- <div id="outline-container-orgb2253b7" class="outline-2">
413
- <h2 id="orgb2253b7">Resources</h2>
414
- <div class="outline-text-2" id="text-orgb2253b7">
419
+ <div id="outline-container-orgb24a4f7" class="outline-2">
420
+ <h2 id="orgb24a4f7">Resources</h2>
421
+ <div class="outline-text-2" id="text-orgb24a4f7">
415
422
  <p>
416
423
  The simplest way to retrieve records of a particular resource is to call a GET (list object).
417
424
  </p>
@@ -430,9 +437,9 @@ To reduce the number of requests necessary for transferring large datasets, the
430
437
  </p>
431
438
  </div>
432
439
 
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">
440
+ <div id="outline-container-org2664de8" class="outline-3">
441
+ <h3 id="org2664de8">Query options</h3>
442
+ <div class="outline-text-3" id="text-org2664de8">
436
443
  <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
437
444
 
438
445
 
@@ -594,13 +601,13 @@ The following is a list of the operators that are supported in the Sage 300 Web
594
601
  </div>
595
602
  </div>
596
603
 
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">
604
+ <div id="outline-container-orgf3c2edb" class="outline-3">
605
+ <h3 id="orgf3c2edb">Account Receivable (AR)</h3>
606
+ <div class="outline-text-3" id="text-orgf3c2edb">
600
607
  </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">
608
+ <div id="outline-container-orgc7937bc" class="outline-4">
609
+ <h4 id="orgc7937bc">Customers</h4>
610
+ <div class="outline-text-4" id="text-orgc7937bc">
604
611
  <div class="org-src-container">
605
612
  <pre class="src src-ruby">client.customers.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
606
613
  client.customers.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'IDCUST'</span>)
@@ -612,9 +619,9 @@ client.customers.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span st
612
619
  </div>
613
620
  </div>
614
621
 
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">
622
+ <div id="outline-container-org107fce5" class="outline-4">
623
+ <h4 id="org107fce5">Customer Groups</h4>
624
+ <div class="outline-text-4" id="text-org107fce5">
618
625
  <div class="org-src-container">
619
626
  <pre class="src src-ruby">client.customer_groups.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
620
627
  client.customer_groups.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'GROUPCODE'</span>)
@@ -626,9 +633,9 @@ client.customer_groups.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <s
626
633
  </div>
627
634
  </div>
628
635
 
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">
636
+ <div id="outline-container-org60d2c45" class="outline-4">
637
+ <h4 id="org60d2c45">Customer Terms</h4>
638
+ <div class="outline-text-4" id="text-org60d2c45">
632
639
  <div class="org-src-container">
633
640
  <pre class="src src-ruby">client.customer_terms.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
634
641
  client.customer_terms.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'TERMSCODE'</span>)
@@ -640,9 +647,9 @@ client.customer_terms.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <sp
640
647
  </div>
641
648
  </div>
642
649
 
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">
650
+ <div id="outline-container-org8054856" class="outline-4">
651
+ <h4 id="org8054856">Sales Persons</h4>
652
+ <div class="outline-text-4" id="text-org8054856">
646
653
  <div class="org-src-container">
647
654
  <pre class="src src-ruby">client.sales_persons.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
648
655
  client.sales_persons.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'KEY'</span>)
@@ -656,9 +663,9 @@ client.sales_persons.filter_stats(<span style="color: #f1fa8c;">'COMPANY'</span>
656
663
  </div>
657
664
  </div>
658
665
 
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">
666
+ <div id="outline-container-org3516ea0" class="outline-4">
667
+ <h4 id="org3516ea0">Account Sets</h4>
668
+ <div class="outline-text-4" id="text-org3516ea0">
662
669
  <div class="org-src-container">
663
670
  <pre class="src src-ruby">client.account_sets.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
664
671
  client.account_sets.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'KEY'</span>)
@@ -671,13 +678,13 @@ client.account_sets.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span
671
678
  </div>
672
679
  </div>
673
680
 
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">
681
+ <div id="outline-container-orga609a19" class="outline-3">
682
+ <h3 id="orga609a19">Account Payable (AP)</h3>
683
+ <div class="outline-text-3" id="text-orga609a19">
677
684
  </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">
685
+ <div id="outline-container-org7ba1865" class="outline-4">
686
+ <h4 id="org7ba1865">Vendors</h4>
687
+ <div class="outline-text-4" id="text-org7ba1865">
681
688
  <div class="org-src-container">
682
689
  <pre class="src src-ruby">client.vendors.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
683
690
  client.vendors.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'VENDCODE'</span>)
@@ -690,9 +697,9 @@ client.vendors.statistics(<span style="color: #f1fa8c;">'COMPANY'</span>, <span
690
697
  </div>
691
698
  </div>
692
699
 
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">
700
+ <div id="outline-container-orge2f01ca" class="outline-4">
701
+ <h4 id="orge2f01ca">Vendor Groups</h4>
702
+ <div class="outline-text-4" id="text-orge2f01ca">
696
703
  <div class="org-src-container">
697
704
  <pre class="src src-ruby">client.vendor_groups.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
698
705
  client.vendor_groups.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'GROUPCODE'</span>)
@@ -704,9 +711,9 @@ client.vendor_groups.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <spa
704
711
  </div>
705
712
  </div>
706
713
 
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">
714
+ <div id="outline-container-orgb2251dc" class="outline-4">
715
+ <h4 id="orgb2251dc">Vendor Terms</h4>
716
+ <div class="outline-text-4" id="text-orgb2251dc">
710
717
  <div class="org-src-container">
711
718
  <pre class="src src-ruby">client.vendor_terms.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
712
719
  client.vendor_terms.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'TERMSCODE'</span>)
@@ -719,13 +726,13 @@ client.vendor_terms.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span
719
726
  </div>
720
727
  </div>
721
728
 
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">
729
+ <div id="outline-container-orgcce1fbb" class="outline-3">
730
+ <h3 id="orgcce1fbb">Invenotry Control (IC)</h3>
731
+ <div class="outline-text-3" id="text-orgcce1fbb">
725
732
  </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">
733
+ <div id="outline-container-org7c68eea" class="outline-4">
734
+ <h4 id="org7c68eea">Items</h4>
735
+ <div class="outline-text-4" id="text-org7c68eea">
729
736
  <div class="org-src-container">
730
737
  <pre class="src src-ruby">client.items.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
731
738
  client.items.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'ITEMNO'</span>)
@@ -737,9 +744,9 @@ client.items.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style=
737
744
  </div>
738
745
  </div>
739
746
 
740
- <div id="outline-container-orgeb67a64" class="outline-4">
741
- <h4 id="orgeb67a64">Categories</h4>
742
- <div class="outline-text-4" id="text-orgeb67a64">
747
+ <div id="outline-container-orgea7f575" class="outline-4">
748
+ <h4 id="orgea7f575">Categories</h4>
749
+ <div class="outline-text-4" id="text-orgea7f575">
743
750
  <div class="org-src-container">
744
751
  <pre class="src src-ruby">client.categories.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
745
752
  client.categories.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'CATEGORYCODE'</span>)
@@ -751,9 +758,9 @@ client.categories.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span s
751
758
  </div>
752
759
  </div>
753
760
 
754
- <div id="outline-container-org518fec2" class="outline-4">
755
- <h4 id="org518fec2">Locations</h4>
756
- <div class="outline-text-4" id="text-org518fec2">
761
+ <div id="outline-container-org440c768" class="outline-4">
762
+ <h4 id="org440c768">Locations</h4>
763
+ <div class="outline-text-4" id="text-org440c768">
757
764
  <div class="org-src-container">
758
765
  <pre class="src src-ruby">client.locations.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
759
766
  client.locations.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'LOCATION'</span>)
@@ -766,25 +773,33 @@ client.locations.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span st
766
773
  </div>
767
774
  </div>
768
775
 
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">
776
+ <div id="outline-container-orgd76b214" class="outline-3">
777
+ <h3 id="orgd76b214">Order Entry (OE)</h3>
778
+ <div class="outline-text-3" id="text-orgd76b214">
772
779
  </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">
780
+ <div id="outline-container-org62bd88f" class="outline-4">
781
+ <h4 id="org62bd88f">Sales Orders</h4>
782
+ <div class="outline-text-4" id="text-org62bd88f">
776
783
  <div class="org-src-container">
777
784
  <pre class="src src-ruby">client.sales_orders.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
778
785
  client.sales_orders.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'ORDERID'</span>)
779
786
  client.sales_orders.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
780
787
  </pre>
781
788
  </div>
789
+
790
+ <p>
791
+ Create sales order passing json payload instead of ruby atributes.
792
+ </p>
793
+ <div class="org-src-container">
794
+ <pre class="src src-ruby">client.sales_orders.create_json(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
795
+ </pre>
796
+ </div>
782
797
  </div>
783
798
  </div>
784
799
 
785
- <div id="outline-container-org14cb642" class="outline-4">
786
- <h4 id="org14cb642">Invoices</h4>
787
- <div class="outline-text-4" id="text-org14cb642">
800
+ <div id="outline-container-org9382b9a" class="outline-4">
801
+ <h4 id="org9382b9a">Invoices</h4>
802
+ <div class="outline-text-4" id="text-org9382b9a">
788
803
  <div class="org-src-container">
789
804
  <pre class="src src-ruby">client.invoices.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
790
805
  client.invoices.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'INVUNIQ'</span>)
@@ -793,9 +808,9 @@ client.invoices.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span s
793
808
  </div>
794
809
  </div>
795
810
 
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">
811
+ <div id="outline-container-orga0f291b" class="outline-4">
812
+ <h4 id="orga0f291b">Sales History</h4>
813
+ <div class="outline-text-4" id="text-orga0f291b">
799
814
  <div class="org-src-container">
800
815
  <pre class="src src-ruby">client.sales_history.list(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
801
816
  client.sales_history.details(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
@@ -805,9 +820,9 @@ client.sales_history.stats(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
805
820
  </div>
806
821
  </div>
807
822
 
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">
823
+ <div id="outline-container-org71b8e95" class="outline-4">
824
+ <h4 id="org71b8e95">Credit Notes</h4>
825
+ <div class="outline-text-4" id="text-org71b8e95">
811
826
  <div class="org-src-container">
812
827
  <pre class="src src-ruby">client.credit_notes.list(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
813
828
  client.credit_notes.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'CNUNIQ'</span>)
@@ -818,13 +833,13 @@ client.credit_notes.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
818
833
  </div>
819
834
  </div>
820
835
 
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">
836
+ <div id="outline-container-orge6526fa" class="outline-3">
837
+ <h3 id="orge6526fa">Purchase Orders (PO)</h3>
838
+ <div class="outline-text-3" id="text-orge6526fa">
824
839
  </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">
840
+ <div id="outline-container-org973ebd4" class="outline-4">
841
+ <h4 id="org973ebd4">Purchase Orders</h4>
842
+ <div class="outline-text-4" id="text-org973ebd4">
828
843
  <div class="org-src-container">
829
844
  <pre class="src src-ruby">client.purchase_orders.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
830
845
  client.purchase_orders.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'SECUENCEID'</span>)
@@ -834,9 +849,9 @@ client.purchase_orders.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {}
834
849
  </div>
835
850
  </div>
836
851
 
837
- <div id="outline-container-org75ed03c" class="outline-4">
838
- <h4 id="org75ed03c">Receipts</h4>
839
- <div class="outline-text-4" id="text-org75ed03c">
852
+ <div id="outline-container-orgb86f2aa" class="outline-4">
853
+ <h4 id="orgb86f2aa">Receipts</h4>
854
+ <div class="outline-text-4" id="text-orgb86f2aa">
840
855
  <div class="org-src-container">
841
856
  <pre class="src src-ruby">client.receipts.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
842
857
  client.receipts.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'SECUENCEID'</span>)
@@ -846,9 +861,9 @@ client.receipts.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
846
861
  </div>
847
862
  </div>
848
863
 
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">
864
+ <div id="outline-container-orgc4ccb79" class="outline-4">
865
+ <h4 id="orgc4ccb79">Vendor Contract Costs</h4>
866
+ <div class="outline-text-4" id="text-orgc4ccb79">
852
867
  <div class="org-src-container">
853
868
  <pre class="src src-ruby">client.vendor_contract_costs.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
854
869
  client.vendor_contract_costs.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'ITEMNO'</span>, <span style="color: #f1fa8c;">'VENDCODE'</span>)
@@ -862,17 +877,17 @@ client.vendor_contract_costs.delete(<span style="color: #f1fa8c;">'COMPANY'</spa
862
877
  </div>
863
878
  </div>
864
879
 
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">
880
+ <div id="outline-container-orgd9473be" class="outline-2">
881
+ <h2 id="orgd9473be">Performance tips</h2>
882
+ <div class="outline-text-2" id="text-orgd9473be">
868
883
  <p>
869
884
  It is possible to adjust the performance of Sage 300 Web API if improvements are required for integration purposes.
870
885
  </p>
871
886
  </div>
872
887
 
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">
888
+ <div id="outline-container-orgf8a818f" class="outline-3">
889
+ <h3 id="orgf8a818f">Increase page size for requets</h3>
890
+ <div class="outline-text-3" id="text-orgf8a818f">
876
891
  <p>
877
892
  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
893
  </p>
@@ -892,9 +907,9 @@ Increase the value to the required page size. The recommended setting for large
892
907
  </div>
893
908
  </div>
894
909
 
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">
910
+ <div id="outline-container-orgbbf1ff3" class="outline-3">
911
+ <h3 id="orgbbf1ff3">Change IIS idle time</h3>
912
+ <div class="outline-text-3" id="text-orgbbf1ff3">
898
913
  <p>
899
914
  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
915
  </p>
@@ -913,9 +928,9 @@ To increase the Time-out time and Time-out Action:
913
928
  </div>
914
929
  </div>
915
930
 
916
- <div id="outline-container-orgfeb161c" class="outline-2">
917
- <h2 id="orgfeb161c">Contributing</h2>
918
- <div class="outline-text-2" id="text-orgfeb161c">
931
+ <div id="outline-container-orge95b8c1" class="outline-2">
932
+ <h2 id="orge95b8c1">Contributing</h2>
933
+ <div class="outline-text-2" id="text-orge95b8c1">
919
934
  <p>
920
935
  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
936
  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.
@@ -923,18 +938,33 @@ Feel free to open an <a href="https://github.com/lepepe/sagekit/issues">issue</a
923
938
  </div>
924
939
  </div>
925
940
 
926
- <div id="outline-container-orge595e00" class="outline-2">
927
- <h2 id="orge595e00">License</h2>
928
- <div class="outline-text-2" id="text-orge595e00">
941
+ <div id="outline-container-org9fc6187" class="outline-2">
942
+ <h2 id="org9fc6187">License</h2>
943
+ <div class="outline-text-2" id="text-org9fc6187">
929
944
  <p>
930
945
  The gem is available as open source under the terms of the <a href="https://opensource.org/licenses/MIT">MIT License</a>.
931
946
  </p>
932
947
  </div>
933
948
  </div>
949
+
950
+ <div id="outline-container-org41d5974" class="outline-2">
951
+ <h2 id="org41d5974"><span class="todo TODO">TODO</span> Sagekit todo list.</h2>
952
+ <div class="outline-text-2" id="text-org41d5974">
953
+ <ul class="org-ul">
954
+ <li class="off"><code>[&#xa0;]</code> Testing API requests</li>
955
+ <li class="off"><code>[&#xa0;]</code> Add endpoints for:
956
+ <ul class="org-ul">
957
+ <li class="off"><code>[&#xa0;]</code> Common Services</li>
958
+ <li class="off"><code>[&#xa0;]</code> General Ledger</li>
959
+ <li class="off"><code>[&#xa0;]</code> Complete other module&rsquo;s endpoints</li>
960
+ </ul></li>
961
+ </ul>
962
+ </div>
963
+ </div>
934
964
  </div>
935
965
  <div id="postamble" class="status">
936
966
  <p class="author">Author: Jose Perez</p>
937
- <p class="date">Created: 2021-09-30 Thu 22:59</p>
967
+ <p class="date">Created: 2021-10-08 Fri 09:23</p>
938
968
  </div>
939
969
  </body>
940
970
  </html>
data/docs/style.css CHANGED
@@ -80,3 +80,12 @@ a:visited{
80
80
  margin-bottom: 0px;
81
81
  color: #00f769;
82
82
  }
83
+
84
+ .figure {
85
+ padding: 0;
86
+ }
87
+
88
+ .figure p {
89
+ text-align: left;
90
+ padding: 0;
91
+ }
@@ -9,32 +9,12 @@ module Sagekit
9
9
  SalesOrder.new get_request("#{company}/OE/OEOrders(#{order_id})", params: params).body
10
10
  end
11
11
 
12
- # Create new record:
13
- # body: json
14
- # client.sales_orders.create(
15
- # "ACCLTD",
16
- # {
17
- # "CustomerNumber":"33016L",
18
- # "OrderReference":"26",
19
- # "OrderDescription":"Ship via: Delivery",
20
- # "OrderComment":"Ordered form ERP: 26. Testing UOM!",
21
- # "OrderDetails":
22
- # [
23
- # {
24
- # "Item":"0-005-39-00100",
25
- # "StockItem":true,
26
- # "QuantityOrdered":55.12
27
- # },
28
- # {
29
- # "Item":"0-005-19-00200",
30
- # "StockItem":true,
31
- # "QuantityOrdered":101.05
32
- # }
33
- # ]
34
- # }
35
- #)
36
12
  def create(company, **attributes)
37
13
  SalesOrder.new post_request("#{company}/OE/OEOrders", body: attributes).body
38
14
  end
15
+
16
+ def create_json(company, options={})
17
+ SalesOrder.new post_request("#{company}/OE/OEOrders", body: options).body
18
+ end
39
19
  end
40
20
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sagekit
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sagekit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jose Perez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-01 00:00:00.000000000 Z
11
+ date: 2021-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday