sagekit 0.1.2 → 0.1.2.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.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/README.org +8 -0
  3. data/docs/index.html +149 -135
  4. data/lib/sagekit/client.rb +40 -31
  5. data/lib/sagekit/objects/invoice_batch.rb +4 -0
  6. data/lib/sagekit/resources/AP/invoice_batches.rb +22 -0
  7. data/lib/sagekit/resources/{vendor_contract_costs.rb → AP/vendor_contract_costs.rb} +2 -2
  8. data/lib/sagekit/resources/{vendor_groups.rb → AP/vendor_groups.rb} +1 -1
  9. data/lib/sagekit/resources/{vendor_terms.rb → AP/vendor_terms.rb} +1 -1
  10. data/lib/sagekit/resources/{vendors.rb → AP/vendors.rb} +1 -1
  11. data/lib/sagekit/resources/{account_sets.rb → AR/account_sets.rb} +1 -1
  12. data/lib/sagekit/resources/{customer_groups.rb → AR/customer_groups.rb} +1 -1
  13. data/lib/sagekit/resources/{customer_terms.rb → AR/customer_terms.rb} +2 -2
  14. data/lib/sagekit/resources/{customers.rb → AR/customers.rb} +1 -1
  15. data/lib/sagekit/resources/{sales_persons.rb → AR/sales_persons.rb} +1 -1
  16. data/lib/sagekit/resources/{categories.rb → IC/categories.rb} +1 -1
  17. data/lib/sagekit/resources/{items.rb → IC/items.rb} +1 -1
  18. data/lib/sagekit/resources/{locations.rb → IC/locations.rb} +1 -1
  19. data/lib/sagekit/resources/{credit_notes.rb → OE/credit_notes.rb} +1 -1
  20. data/lib/sagekit/resources/{invoices.rb → OE/invoices.rb} +1 -1
  21. data/lib/sagekit/resources/{sales_history.rb → OE/sales_history.rb} +1 -1
  22. data/lib/sagekit/resources/{sales_orders.rb → OE/sales_orders.rb} +1 -1
  23. data/lib/sagekit/resources/{purchase_orders.rb → PO/purchase_orders.rb} +2 -2
  24. data/lib/sagekit/resources/{receipts.rb → PO/receipts.rb} +1 -1
  25. data/lib/sagekit/resources/PO/vendor_contract_costs.rb +27 -0
  26. data/lib/sagekit/version.rb +1 -1
  27. data/lib/sagekit.rb +34 -18
  28. metadata +29 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17a9eb26d57913a0f890d45326f755cb6ae6fff5c9093999b92972fa2260c7eb
4
- data.tar.gz: 76bfa5f78323048e16cc6870763824b77594baa6c9e80db9fd5db0a031630023
3
+ metadata.gz: 82d9521ce3abf96ca5d7436725107043af11e34ebd444920a57ab845537dba54
4
+ data.tar.gz: 10c7b2923056f67b61a29335f637916c2947ca7496861c3641abd264e45663f5
5
5
  SHA512:
6
- metadata.gz: c8ff6152d7fdd6228295aab8777e393496d81c335cc4e5f8bea9469213408fbe35b88d2327556c3d65629a4aeded8efc06f08c3ee183f13befbca26dd5c80fc3
7
- data.tar.gz: c52a86f3e7afe726c8359637cba3d29c0c105a2ad96571ea308369cfb45bb640ca943ddb06c93c3af4a1de9dd54351ab9230ce714f4d7c674e9ad6b72dfd2bdc
6
+ metadata.gz: facdf1f29ab98ce6335d36adef0fa530cc73132094c1c0256eaa6d39cb3952b084d2d04caaace7b40da217103c8370141a36e9832666e681bf7297053787ef4a
7
+ data.tar.gz: 7bf160aab3ead4b62aa5a58e2f8bd80d4d629c557716f25f6ff8f2f49046f24a8540bdc82f94ae2f1b11b94919c70040356aac7f67e40cc5ef757725f373bbc5
data/README.org CHANGED
@@ -198,6 +198,14 @@ client.account_sets.delete('COMPANY', 'KEY')
198
198
 
199
199
  *** Account Payable (AP)
200
200
 
201
+ **** Invoices Batches
202
+ #+begin_src ruby
203
+ client.invoice_batches.list('COMPANY')
204
+ client.invoice_batches.retreive('COMPANY', 'NUMBER')
205
+ client.invoice_batches.create('COMPANY', {})
206
+ client.invoice_batches.update('COMPANY', 'NUMBER', {})
207
+ #+end_src
208
+
201
209
  **** Vendors
202
210
 
203
211
  #+begin_src ruby
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-10-14 Thu 11:37 -->
6
+ <!-- 2021-12-22 Wed 22:39 -->
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,60 +208,61 @@
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="#org0d66645">Installation</a></li>
212
- <li><a href="#org42c4f7d">Usage</a></li>
213
- <li><a href="#orgcf4a116">Resources</a>
211
+ <li><a href="#org0e0a6d4">Installation</a></li>
212
+ <li><a href="#org8e7faa7">Usage</a></li>
213
+ <li><a href="#org25104bb">Resources</a>
214
214
  <ul>
215
- <li><a href="#orgd4085cd">Query options</a></li>
216
- <li><a href="#orgffb38b9">Account Receivable (AR)</a>
215
+ <li><a href="#org907368f">Query options</a></li>
216
+ <li><a href="#org2130e9a">Account Receivable (AR)</a>
217
217
  <ul>
218
- <li><a href="#orgdfb1deb">Customers</a></li>
219
- <li><a href="#org6b641f6">Customer Groups</a></li>
220
- <li><a href="#org43e2b09">Customer Terms</a></li>
221
- <li><a href="#org166be64">Sales Persons</a></li>
222
- <li><a href="#orgb429d5a">Account Sets</a></li>
218
+ <li><a href="#orgd443b87">Customers</a></li>
219
+ <li><a href="#org22323d4">Customer Groups</a></li>
220
+ <li><a href="#orgebae13b">Customer Terms</a></li>
221
+ <li><a href="#orgd9a7a75">Sales Persons</a></li>
222
+ <li><a href="#orgd649d1f">Account Sets</a></li>
223
223
  </ul>
224
224
  </li>
225
- <li><a href="#orgc5c3b9c">Account Payable (AP)</a>
225
+ <li><a href="#orgd252f07">Account Payable (AP)</a>
226
226
  <ul>
227
- <li><a href="#org90f80ac">Vendors</a></li>
228
- <li><a href="#org3eca8ff">Vendor Groups</a></li>
229
- <li><a href="#org5231aaa">Vendor Terms</a></li>
227
+ <li><a href="#orgab9e1c2">Invoices Batches</a></li>
228
+ <li><a href="#org42b17bb">Vendors</a></li>
229
+ <li><a href="#org669bb84">Vendor Groups</a></li>
230
+ <li><a href="#org2fa6143">Vendor Terms</a></li>
230
231
  </ul>
231
232
  </li>
232
- <li><a href="#orgbe44e1e">Invenotry Control (IC)</a>
233
+ <li><a href="#orgc8c0c1c">Invenotry Control (IC)</a>
233
234
  <ul>
234
- <li><a href="#orga6d68d9">Items</a></li>
235
- <li><a href="#orgc83934e">Categories</a></li>
236
- <li><a href="#org466cade">Locations</a></li>
235
+ <li><a href="#orgf2239f0">Items</a></li>
236
+ <li><a href="#org80481d5">Categories</a></li>
237
+ <li><a href="#org685463c">Locations</a></li>
237
238
  </ul>
238
239
  </li>
239
- <li><a href="#orgb1ade6b">Order Entry (OE)</a>
240
+ <li><a href="#org0e61ae4">Order Entry (OE)</a>
240
241
  <ul>
241
- <li><a href="#orgfb7e454">Sales Orders</a></li>
242
- <li><a href="#orgd46f9c1">Invoices</a></li>
243
- <li><a href="#orgfce5f99">Sales History</a></li>
244
- <li><a href="#orga1d9486">Credit Notes</a></li>
242
+ <li><a href="#org414d9a9">Sales Orders</a></li>
243
+ <li><a href="#orgc572bae">Invoices</a></li>
244
+ <li><a href="#org484f806">Sales History</a></li>
245
+ <li><a href="#orgc00025a">Credit Notes</a></li>
245
246
  </ul>
246
247
  </li>
247
- <li><a href="#org697354c">Purchase Orders (PO)</a>
248
+ <li><a href="#orgb613df5">Purchase Orders (PO)</a>
248
249
  <ul>
249
- <li><a href="#org3dca9f4">Purchase Orders</a></li>
250
- <li><a href="#org3e9f005">Receipts</a></li>
251
- <li><a href="#org139f4eb">Vendor Contract Costs</a></li>
250
+ <li><a href="#org29c8b31">Purchase Orders</a></li>
251
+ <li><a href="#orgb5659ab">Receipts</a></li>
252
+ <li><a href="#orge7c641e">Vendor Contract Costs</a></li>
252
253
  </ul>
253
254
  </li>
254
255
  </ul>
255
256
  </li>
256
- <li><a href="#org18b47f0">Performance tips</a>
257
+ <li><a href="#orga0c5995">Performance tips</a>
257
258
  <ul>
258
- <li><a href="#org9c391a3">Increase page size for requets</a></li>
259
- <li><a href="#orgd5c088a">Change IIS idle time</a></li>
259
+ <li><a href="#org9b650c2">Increase page size for requets</a></li>
260
+ <li><a href="#org1f874e3">Change IIS idle time</a></li>
260
261
  </ul>
261
262
  </li>
262
- <li><a href="#orge1c47bd">Contributing</a></li>
263
- <li><a href="#org5d9e313">License</a></li>
264
- <li><a href="#org035e16b"><span class="todo TODO">TODO</span> Sagekit todo list.</a></li>
263
+ <li><a href="#org0a77b2e">Contributing</a></li>
264
+ <li><a href="#orgf15b5c0">License</a></li>
265
+ <li><a href="#org513d092"><span class="todo TODO">TODO</span> Sagekit todo list.</a></li>
265
266
  </ul>
266
267
  </div>
267
268
  </div>
@@ -270,7 +271,7 @@ Sagekit is a ruby gem client library to talk with Sage300 API.
270
271
  </p>
271
272
 
272
273
 
273
- <div id="org2597773" class="figure">
274
+ <div id="org885f079" class="figure">
274
275
  <p><img src="https://badge.fury.io/rb/sagekit.svg" alt="sagekit.svg" />
275
276
  </p>
276
277
  </div>
@@ -284,9 +285,9 @@ Responses are created as objects like. They&rsquo;re built using OpenStruct so y
284
285
  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.
285
286
  </p>
286
287
 
287
- <div id="outline-container-org0d66645" class="outline-2">
288
- <h2 id="org0d66645">Installation</h2>
289
- <div class="outline-text-2" id="text-org0d66645">
288
+ <div id="outline-container-org0e0a6d4" class="outline-2">
289
+ <h2 id="org0e0a6d4">Installation</h2>
290
+ <div class="outline-text-2" id="text-org0e0a6d4">
290
291
  <p>
291
292
  Add this line to your application&rsquo;s Gemfile:
292
293
  </p>
@@ -316,9 +317,9 @@ Or install it yourself as:
316
317
  </div>
317
318
  </div>
318
319
 
319
- <div id="outline-container-org42c4f7d" class="outline-2">
320
- <h2 id="org42c4f7d">Usage</h2>
321
- <div class="outline-text-2" id="text-org42c4f7d">
320
+ <div id="outline-container-org8e7faa7" class="outline-2">
321
+ <h2 id="org8e7faa7">Usage</h2>
322
+ <div class="outline-text-2" id="text-org8e7faa7">
322
323
  <p>
323
324
  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.
324
325
  </p>
@@ -416,9 +417,9 @@ Authorization: Basic QURNSU46QURNSU4=
416
417
  </div>
417
418
  </div>
418
419
 
419
- <div id="outline-container-orgcf4a116" class="outline-2">
420
- <h2 id="orgcf4a116">Resources</h2>
421
- <div class="outline-text-2" id="text-orgcf4a116">
420
+ <div id="outline-container-org25104bb" class="outline-2">
421
+ <h2 id="org25104bb">Resources</h2>
422
+ <div class="outline-text-2" id="text-org25104bb">
422
423
  <p>
423
424
  The simplest way to retrieve records of a particular resource is to call a GET (list object).
424
425
  </p>
@@ -437,9 +438,9 @@ To reduce the number of requests necessary for transferring large datasets, the
437
438
  </p>
438
439
  </div>
439
440
 
440
- <div id="outline-container-orgd4085cd" class="outline-3">
441
- <h3 id="orgd4085cd">Query options</h3>
442
- <div class="outline-text-3" id="text-orgd4085cd">
441
+ <div id="outline-container-org907368f" class="outline-3">
442
+ <h3 id="org907368f">Query options</h3>
443
+ <div class="outline-text-3" id="text-org907368f">
443
444
  <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
444
445
 
445
446
 
@@ -614,13 +615,13 @@ The following is a list of the operators that are supported in the Sage 300 Web
614
615
  </div>
615
616
  </div>
616
617
 
617
- <div id="outline-container-orgffb38b9" class="outline-3">
618
- <h3 id="orgffb38b9">Account Receivable (AR)</h3>
619
- <div class="outline-text-3" id="text-orgffb38b9">
618
+ <div id="outline-container-org2130e9a" class="outline-3">
619
+ <h3 id="org2130e9a">Account Receivable (AR)</h3>
620
+ <div class="outline-text-3" id="text-org2130e9a">
620
621
  </div>
621
- <div id="outline-container-orgdfb1deb" class="outline-4">
622
- <h4 id="orgdfb1deb">Customers</h4>
623
- <div class="outline-text-4" id="text-orgdfb1deb">
622
+ <div id="outline-container-orgd443b87" class="outline-4">
623
+ <h4 id="orgd443b87">Customers</h4>
624
+ <div class="outline-text-4" id="text-orgd443b87">
624
625
  <div class="org-src-container">
625
626
  <pre class="src src-ruby">client.customers.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
626
627
  client.customers.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'IDCUST'</span>)
@@ -632,9 +633,9 @@ client.customers.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span st
632
633
  </div>
633
634
  </div>
634
635
 
635
- <div id="outline-container-org6b641f6" class="outline-4">
636
- <h4 id="org6b641f6">Customer Groups</h4>
637
- <div class="outline-text-4" id="text-org6b641f6">
636
+ <div id="outline-container-org22323d4" class="outline-4">
637
+ <h4 id="org22323d4">Customer Groups</h4>
638
+ <div class="outline-text-4" id="text-org22323d4">
638
639
  <div class="org-src-container">
639
640
  <pre class="src src-ruby">client.customer_groups.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
640
641
  client.customer_groups.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'GROUPCODE'</span>)
@@ -646,9 +647,9 @@ client.customer_groups.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <s
646
647
  </div>
647
648
  </div>
648
649
 
649
- <div id="outline-container-org43e2b09" class="outline-4">
650
- <h4 id="org43e2b09">Customer Terms</h4>
651
- <div class="outline-text-4" id="text-org43e2b09">
650
+ <div id="outline-container-orgebae13b" class="outline-4">
651
+ <h4 id="orgebae13b">Customer Terms</h4>
652
+ <div class="outline-text-4" id="text-orgebae13b">
652
653
  <div class="org-src-container">
653
654
  <pre class="src src-ruby">client.customer_terms.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
654
655
  client.customer_terms.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'TERMSCODE'</span>)
@@ -660,9 +661,9 @@ client.customer_terms.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <sp
660
661
  </div>
661
662
  </div>
662
663
 
663
- <div id="outline-container-org166be64" class="outline-4">
664
- <h4 id="org166be64">Sales Persons</h4>
665
- <div class="outline-text-4" id="text-org166be64">
664
+ <div id="outline-container-orgd9a7a75" class="outline-4">
665
+ <h4 id="orgd9a7a75">Sales Persons</h4>
666
+ <div class="outline-text-4" id="text-orgd9a7a75">
666
667
  <div class="org-src-container">
667
668
  <pre class="src src-ruby">client.sales_persons.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
668
669
  client.sales_persons.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'KEY'</span>)
@@ -676,9 +677,9 @@ client.sales_persons.filter_stats(<span style="color: #f1fa8c;">'COMPANY'</span>
676
677
  </div>
677
678
  </div>
678
679
 
679
- <div id="outline-container-orgb429d5a" class="outline-4">
680
- <h4 id="orgb429d5a">Account Sets</h4>
681
- <div class="outline-text-4" id="text-orgb429d5a">
680
+ <div id="outline-container-orgd649d1f" class="outline-4">
681
+ <h4 id="orgd649d1f">Account Sets</h4>
682
+ <div class="outline-text-4" id="text-orgd649d1f">
682
683
  <div class="org-src-container">
683
684
  <pre class="src src-ruby">client.account_sets.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
684
685
  client.account_sets.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'KEY'</span>)
@@ -691,13 +692,26 @@ client.account_sets.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span
691
692
  </div>
692
693
  </div>
693
694
 
694
- <div id="outline-container-orgc5c3b9c" class="outline-3">
695
- <h3 id="orgc5c3b9c">Account Payable (AP)</h3>
696
- <div class="outline-text-3" id="text-orgc5c3b9c">
695
+ <div id="outline-container-orgd252f07" class="outline-3">
696
+ <h3 id="orgd252f07">Account Payable (AP)</h3>
697
+ <div class="outline-text-3" id="text-orgd252f07">
697
698
  </div>
698
- <div id="outline-container-org90f80ac" class="outline-4">
699
- <h4 id="org90f80ac">Vendors</h4>
700
- <div class="outline-text-4" id="text-org90f80ac">
699
+ <div id="outline-container-orgab9e1c2" class="outline-4">
700
+ <h4 id="orgab9e1c2">Invoices Batches</h4>
701
+ <div class="outline-text-4" id="text-orgab9e1c2">
702
+ <div class="org-src-container">
703
+ <pre class="src src-ruby">client.invoice_batches.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
704
+ client.invoice_batches.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'NUMBER'</span>)
705
+ client.invoice_batches.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
706
+ client.invoice_batches.update(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'NUMBER'</span>, {})
707
+ </pre>
708
+ </div>
709
+ </div>
710
+ </div>
711
+
712
+ <div id="outline-container-org42b17bb" class="outline-4">
713
+ <h4 id="org42b17bb">Vendors</h4>
714
+ <div class="outline-text-4" id="text-org42b17bb">
701
715
  <div class="org-src-container">
702
716
  <pre class="src src-ruby">client.vendors.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
703
717
  client.vendors.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'VENDCODE'</span>)
@@ -710,9 +724,9 @@ client.vendors.statistics(<span style="color: #f1fa8c;">'COMPANY'</span>, <span
710
724
  </div>
711
725
  </div>
712
726
 
713
- <div id="outline-container-org3eca8ff" class="outline-4">
714
- <h4 id="org3eca8ff">Vendor Groups</h4>
715
- <div class="outline-text-4" id="text-org3eca8ff">
727
+ <div id="outline-container-org669bb84" class="outline-4">
728
+ <h4 id="org669bb84">Vendor Groups</h4>
729
+ <div class="outline-text-4" id="text-org669bb84">
716
730
  <div class="org-src-container">
717
731
  <pre class="src src-ruby">client.vendor_groups.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
718
732
  client.vendor_groups.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'GROUPCODE'</span>)
@@ -724,9 +738,9 @@ client.vendor_groups.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <spa
724
738
  </div>
725
739
  </div>
726
740
 
727
- <div id="outline-container-org5231aaa" class="outline-4">
728
- <h4 id="org5231aaa">Vendor Terms</h4>
729
- <div class="outline-text-4" id="text-org5231aaa">
741
+ <div id="outline-container-org2fa6143" class="outline-4">
742
+ <h4 id="org2fa6143">Vendor Terms</h4>
743
+ <div class="outline-text-4" id="text-org2fa6143">
730
744
  <div class="org-src-container">
731
745
  <pre class="src src-ruby">client.vendor_terms.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
732
746
  client.vendor_terms.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'TERMSCODE'</span>)
@@ -739,13 +753,13 @@ client.vendor_terms.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span
739
753
  </div>
740
754
  </div>
741
755
 
742
- <div id="outline-container-orgbe44e1e" class="outline-3">
743
- <h3 id="orgbe44e1e">Invenotry Control (IC)</h3>
744
- <div class="outline-text-3" id="text-orgbe44e1e">
756
+ <div id="outline-container-orgc8c0c1c" class="outline-3">
757
+ <h3 id="orgc8c0c1c">Invenotry Control (IC)</h3>
758
+ <div class="outline-text-3" id="text-orgc8c0c1c">
745
759
  </div>
746
- <div id="outline-container-orga6d68d9" class="outline-4">
747
- <h4 id="orga6d68d9">Items</h4>
748
- <div class="outline-text-4" id="text-orga6d68d9">
760
+ <div id="outline-container-orgf2239f0" class="outline-4">
761
+ <h4 id="orgf2239f0">Items</h4>
762
+ <div class="outline-text-4" id="text-orgf2239f0">
749
763
  <div class="org-src-container">
750
764
  <pre class="src src-ruby">client.items.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
751
765
  client.items.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'ITEMNO'</span>)
@@ -757,9 +771,9 @@ client.items.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style=
757
771
  </div>
758
772
  </div>
759
773
 
760
- <div id="outline-container-orgc83934e" class="outline-4">
761
- <h4 id="orgc83934e">Categories</h4>
762
- <div class="outline-text-4" id="text-orgc83934e">
774
+ <div id="outline-container-org80481d5" class="outline-4">
775
+ <h4 id="org80481d5">Categories</h4>
776
+ <div class="outline-text-4" id="text-org80481d5">
763
777
  <div class="org-src-container">
764
778
  <pre class="src src-ruby">client.categories.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
765
779
  client.categories.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'CATEGORY'</span>)
@@ -771,9 +785,9 @@ client.categories.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span s
771
785
  </div>
772
786
  </div>
773
787
 
774
- <div id="outline-container-org466cade" class="outline-4">
775
- <h4 id="org466cade">Locations</h4>
776
- <div class="outline-text-4" id="text-org466cade">
788
+ <div id="outline-container-org685463c" class="outline-4">
789
+ <h4 id="org685463c">Locations</h4>
790
+ <div class="outline-text-4" id="text-org685463c">
777
791
  <div class="org-src-container">
778
792
  <pre class="src src-ruby">client.locations.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
779
793
  client.locations.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'LOCATION'</span>)
@@ -786,13 +800,13 @@ client.locations.delete(<span style="color: #f1fa8c;">'COMPANY'</span>, <span st
786
800
  </div>
787
801
  </div>
788
802
 
789
- <div id="outline-container-orgb1ade6b" class="outline-3">
790
- <h3 id="orgb1ade6b">Order Entry (OE)</h3>
791
- <div class="outline-text-3" id="text-orgb1ade6b">
803
+ <div id="outline-container-org0e61ae4" class="outline-3">
804
+ <h3 id="org0e61ae4">Order Entry (OE)</h3>
805
+ <div class="outline-text-3" id="text-org0e61ae4">
792
806
  </div>
793
- <div id="outline-container-orgfb7e454" class="outline-4">
794
- <h4 id="orgfb7e454">Sales Orders</h4>
795
- <div class="outline-text-4" id="text-orgfb7e454">
807
+ <div id="outline-container-org414d9a9" class="outline-4">
808
+ <h4 id="org414d9a9">Sales Orders</h4>
809
+ <div class="outline-text-4" id="text-org414d9a9">
796
810
  <div class="org-src-container">
797
811
  <pre class="src src-ruby">client.sales_orders.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
798
812
  client.sales_orders.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'ORDERID'</span>)
@@ -810,9 +824,9 @@ Create sales order passing json payload instead of ruby atributes.
810
824
  </div>
811
825
  </div>
812
826
 
813
- <div id="outline-container-orgd46f9c1" class="outline-4">
814
- <h4 id="orgd46f9c1">Invoices</h4>
815
- <div class="outline-text-4" id="text-orgd46f9c1">
827
+ <div id="outline-container-orgc572bae" class="outline-4">
828
+ <h4 id="orgc572bae">Invoices</h4>
829
+ <div class="outline-text-4" id="text-orgc572bae">
816
830
  <div class="org-src-container">
817
831
  <pre class="src src-ruby">client.invoices.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
818
832
  client.invoices.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'INVUNIQ'</span>)
@@ -821,9 +835,9 @@ client.invoices.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span s
821
835
  </div>
822
836
  </div>
823
837
 
824
- <div id="outline-container-orgfce5f99" class="outline-4">
825
- <h4 id="orgfce5f99">Sales History</h4>
826
- <div class="outline-text-4" id="text-orgfce5f99">
838
+ <div id="outline-container-org484f806" class="outline-4">
839
+ <h4 id="org484f806">Sales History</h4>
840
+ <div class="outline-text-4" id="text-org484f806">
827
841
  <div class="org-src-container">
828
842
  <pre class="src src-ruby">client.sales_history.list(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
829
843
  client.sales_history.details(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
@@ -833,9 +847,9 @@ client.sales_history.stats(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
833
847
  </div>
834
848
  </div>
835
849
 
836
- <div id="outline-container-orga1d9486" class="outline-4">
837
- <h4 id="orga1d9486">Credit Notes</h4>
838
- <div class="outline-text-4" id="text-orga1d9486">
850
+ <div id="outline-container-orgc00025a" class="outline-4">
851
+ <h4 id="orgc00025a">Credit Notes</h4>
852
+ <div class="outline-text-4" id="text-orgc00025a">
839
853
  <div class="org-src-container">
840
854
  <pre class="src src-ruby">client.credit_notes.list(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
841
855
  client.credit_notes.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'CNUNIQ'</span>)
@@ -846,13 +860,13 @@ client.credit_notes.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
846
860
  </div>
847
861
  </div>
848
862
 
849
- <div id="outline-container-org697354c" class="outline-3">
850
- <h3 id="org697354c">Purchase Orders (PO)</h3>
851
- <div class="outline-text-3" id="text-org697354c">
863
+ <div id="outline-container-orgb613df5" class="outline-3">
864
+ <h3 id="orgb613df5">Purchase Orders (PO)</h3>
865
+ <div class="outline-text-3" id="text-orgb613df5">
852
866
  </div>
853
- <div id="outline-container-org3dca9f4" class="outline-4">
854
- <h4 id="org3dca9f4">Purchase Orders</h4>
855
- <div class="outline-text-4" id="text-org3dca9f4">
867
+ <div id="outline-container-org29c8b31" class="outline-4">
868
+ <h4 id="org29c8b31">Purchase Orders</h4>
869
+ <div class="outline-text-4" id="text-org29c8b31">
856
870
  <div class="org-src-container">
857
871
  <pre class="src src-ruby">client.purchase_orders.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
858
872
  client.purchase_orders.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'SECUENCEID'</span>)
@@ -862,9 +876,9 @@ client.purchase_orders.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {}
862
876
  </div>
863
877
  </div>
864
878
 
865
- <div id="outline-container-org3e9f005" class="outline-4">
866
- <h4 id="org3e9f005">Receipts</h4>
867
- <div class="outline-text-4" id="text-org3e9f005">
879
+ <div id="outline-container-orgb5659ab" class="outline-4">
880
+ <h4 id="orgb5659ab">Receipts</h4>
881
+ <div class="outline-text-4" id="text-orgb5659ab">
868
882
  <div class="org-src-container">
869
883
  <pre class="src src-ruby">client.receipts.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
870
884
  client.receipts.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'SECUENCEID'</span>)
@@ -874,9 +888,9 @@ client.receipts.create(<span style="color: #f1fa8c;">'COMPANY'</span>, {})
874
888
  </div>
875
889
  </div>
876
890
 
877
- <div id="outline-container-org139f4eb" class="outline-4">
878
- <h4 id="org139f4eb">Vendor Contract Costs</h4>
879
- <div class="outline-text-4" id="text-org139f4eb">
891
+ <div id="outline-container-orge7c641e" class="outline-4">
892
+ <h4 id="orge7c641e">Vendor Contract Costs</h4>
893
+ <div class="outline-text-4" id="text-orge7c641e">
880
894
  <div class="org-src-container">
881
895
  <pre class="src src-ruby">client.vendor_contract_costs.list(<span style="color: #f1fa8c;">'COMPANY'</span>)
882
896
  client.vendor_contract_costs.retreive(<span style="color: #f1fa8c;">'COMPANY'</span>, <span style="color: #f1fa8c;">'ITEMNO'</span>, <span style="color: #f1fa8c;">'VENDCODE'</span>)
@@ -890,17 +904,17 @@ client.vendor_contract_costs.delete(<span style="color: #f1fa8c;">'COMPANY'</spa
890
904
  </div>
891
905
  </div>
892
906
 
893
- <div id="outline-container-org18b47f0" class="outline-2">
894
- <h2 id="org18b47f0">Performance tips</h2>
895
- <div class="outline-text-2" id="text-org18b47f0">
907
+ <div id="outline-container-orga0c5995" class="outline-2">
908
+ <h2 id="orga0c5995">Performance tips</h2>
909
+ <div class="outline-text-2" id="text-orga0c5995">
896
910
  <p>
897
911
  It is possible to adjust the performance of Sage 300 Web API if improvements are required for integration purposes.
898
912
  </p>
899
913
  </div>
900
914
 
901
- <div id="outline-container-org9c391a3" class="outline-3">
902
- <h3 id="org9c391a3">Increase page size for requets</h3>
903
- <div class="outline-text-3" id="text-org9c391a3">
915
+ <div id="outline-container-org9b650c2" class="outline-3">
916
+ <h3 id="org9b650c2">Increase page size for requets</h3>
917
+ <div class="outline-text-3" id="text-org9b650c2">
904
918
  <p>
905
919
  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.
906
920
  </p>
@@ -920,9 +934,9 @@ Increase the value to the required page size. The recommended setting for large
920
934
  </div>
921
935
  </div>
922
936
 
923
- <div id="outline-container-orgd5c088a" class="outline-3">
924
- <h3 id="orgd5c088a">Change IIS idle time</h3>
925
- <div class="outline-text-3" id="text-orgd5c088a">
937
+ <div id="outline-container-org1f874e3" class="outline-3">
938
+ <h3 id="org1f874e3">Change IIS idle time</h3>
939
+ <div class="outline-text-3" id="text-org1f874e3">
926
940
  <p>
927
941
  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.
928
942
  </p>
@@ -941,9 +955,9 @@ To increase the Time-out time and Time-out Action:
941
955
  </div>
942
956
  </div>
943
957
 
944
- <div id="outline-container-orge1c47bd" class="outline-2">
945
- <h2 id="orge1c47bd">Contributing</h2>
946
- <div class="outline-text-2" id="text-orge1c47bd">
958
+ <div id="outline-container-org0a77b2e" class="outline-2">
959
+ <h2 id="org0a77b2e">Contributing</h2>
960
+ <div class="outline-text-2" id="text-org0a77b2e">
947
961
  <p>
948
962
  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>.
949
963
  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.
@@ -951,18 +965,18 @@ Feel free to open an <a href="https://github.com/lepepe/sagekit/issues">issue</a
951
965
  </div>
952
966
  </div>
953
967
 
954
- <div id="outline-container-org5d9e313" class="outline-2">
955
- <h2 id="org5d9e313">License</h2>
956
- <div class="outline-text-2" id="text-org5d9e313">
968
+ <div id="outline-container-orgf15b5c0" class="outline-2">
969
+ <h2 id="orgf15b5c0">License</h2>
970
+ <div class="outline-text-2" id="text-orgf15b5c0">
957
971
  <p>
958
972
  The gem is available as open source under the terms of the <a href="https://opensource.org/licenses/MIT">MIT License</a>.
959
973
  </p>
960
974
  </div>
961
975
  </div>
962
976
 
963
- <div id="outline-container-org035e16b" class="outline-2">
964
- <h2 id="org035e16b"><span class="todo TODO">TODO</span> Sagekit todo list.</h2>
965
- <div class="outline-text-2" id="text-org035e16b">
977
+ <div id="outline-container-org513d092" class="outline-2">
978
+ <h2 id="org513d092"><span class="todo TODO">TODO</span> Sagekit todo list.</h2>
979
+ <div class="outline-text-2" id="text-org513d092">
966
980
  <ul class="org-ul">
967
981
  <li class="off"><code>[&#xa0;]</code> Testing API requests</li>
968
982
  <li class="off"><code>[&#xa0;]</code> Add endpoints for:
@@ -977,7 +991,7 @@ The gem is available as open source under the terms of the <a href="https://open
977
991
  </div>
978
992
  <div id="postamble" class="status">
979
993
  <p class="author">Author: Jose Perez</p>
980
- <p class="date">Created: 2021-10-14 Thu 11:37</p>
994
+ <p class="date">Created: 2021-12-22 Wed 22:39</p>
981
995
  </div>
982
996
  </body>
983
997
  </html>
@@ -13,76 +13,85 @@ module Sagekit
13
13
  @adapter = adapter
14
14
  end
15
15
 
16
- def sales_orders
17
- SalesOrdersResource.new(self)
18
- end
19
-
20
- def invoices
21
- InvoicesResource.new(self)
16
+ # AP Accounts Payable
17
+ def invoice_batches
18
+ AP::InvoiceBatchesResource.new(self)
22
19
  end
23
20
 
24
- def sales_history
25
- SalesHistoryResource.new(self)
26
- end
27
-
28
- def purchase_orders
29
- PurchaseOrdersResource.new(self)
21
+ def vendors
22
+ AP::VendorsResource.new(self)
30
23
  end
31
24
 
32
- def receipts
33
- ReceiptsResource.new(self)
25
+ def vendor_groups
26
+ AP::VendorGroupsResource.new(self)
34
27
  end
35
28
 
36
- def vendor_contract_cost
37
- VendorContractCostsResource.new(self)
29
+ def vendor_terms
30
+ AP::VendorTermsResource.new(self)
38
31
  end
39
32
 
33
+ # AR Accounts Receivable
40
34
  def customers
41
- CustomersResource.new(self)
35
+ AR::CustomersResource.new(self)
42
36
  end
43
37
 
44
38
  def customer_groups
45
- CustomerGroupsResource.new(self)
39
+ AR::CustomerGroupsResource.new(self)
46
40
  end
47
41
 
48
42
  def customer_terms
49
- CustomerTermsResource.new(self)
43
+ AR::CustomerTermsResource.new(self)
50
44
  end
51
45
 
52
46
  def account_sets
53
- AccountSetsResource.new(self)
47
+ AR::AccountSetsResource.new(self)
48
+ end
49
+
50
+ def sales_persons
51
+ AR::SalesPersonsResource.new(self)
54
52
  end
55
53
 
54
+ # OE Order Entry
56
55
  def credit_notes
57
56
  CreditNotesResource.new(self)
58
57
  end
59
58
 
60
- def sales_persons
61
- SalesPersonsResource.new(self)
59
+ def sales_orders
60
+ OE::SalesOrdersResource.new(self)
62
61
  end
63
62
 
64
- def vendors
65
- VendorsResource.new(self)
63
+ def invoices
64
+ OE::InvoicesResource.new(self)
66
65
  end
67
66
 
68
- def vendor_groups
69
- VendorGroupsResource.new(self)
67
+ def sales_history
68
+ OE::SalesHistoryResource.new(self)
70
69
  end
71
70
 
72
- def vendor_terms
73
- VendorTermsResource.new(self)
71
+ # PO Purchase Orders
72
+ def purchase_orders
73
+ PO::PurchaseOrdersResource.new(self)
74
+ end
75
+
76
+ def receipts
77
+ PO::ReceiptsResource.new(self)
78
+ end
79
+
80
+ def vendor_contract_cost
81
+ PO::VendorContractCostsResource.new(self)
74
82
  end
75
83
 
84
+ # IC Inventory Control
76
85
  def items
77
- ItemsResource.new(self)
86
+ IC::ItemsResource.new(self)
78
87
  end
79
88
 
80
89
  def categories
81
- CategoriesResource.new(self)
90
+ IC::CategoriesResource.new(self)
82
91
  end
83
92
 
84
93
  def locations
85
- LocationsResource.new(self)
94
+ IC::LocationsResource.new(self)
86
95
  end
87
96
 
88
97
  def connection
@@ -0,0 +1,4 @@
1
+ module Sagekit
2
+ class InvoiceBatch < Object
3
+ end
4
+ end
@@ -0,0 +1,22 @@
1
+ module Sagekit
2
+ class AP::InvoiceBatchesResource < Resource
3
+
4
+ def list(company, **params)
5
+ Collection.from_response get_request("#{company}/AP/APInvoiceBatches", params: params), type: InvoiceBatch
6
+ end
7
+
8
+ def retreive(company, batch_number, **params)
9
+ InvoiceBatch.new get_request("#{company}/AP/APInvoiceBatches('#{batch_number}')", params: params).body
10
+ end
11
+
12
+ def create(company, **attributes)
13
+ InvoiceBatch.new post_request("#{company}/AP/APInvoiceBatches", body: attributes).body
14
+ end
15
+
16
+ def update(company, batch_number, **attributes)
17
+ patch_request("#{company}/AR/ARTerms('#{batch_number}')", body: attributes)
18
+ true
19
+ end
20
+
21
+ end
22
+ end
@@ -1,5 +1,5 @@
1
1
  module Sagekit
2
- class VendorContractCostsResource < Resource
2
+ class AP::VendorContractCostsResource < Resource
3
3
 
4
4
  def list(company, **params)
5
5
  Collection.from_response get_request("#{company}/PO/POVendorContractCosts?$count=true", params: params), type: VendorContractCost
@@ -10,7 +10,7 @@ module Sagekit
10
10
  end
11
11
 
12
12
  def create(company, **attributes)
13
- VeVendorContractCost.new post_request("#{company}/PO/POVendorContractCosts", body: attributes).body
13
+ VendorContractCost.new post_request("#{company}/PO/POVendorContractCosts", body: attributes).body
14
14
  end
15
15
 
16
16
  def update(company, item, vendor, **attributes)
@@ -1,5 +1,5 @@
1
1
  module Sagekit
2
- class VendorGroupsResource < Resource
2
+ class AP::VendorGroupsResource < Resource
3
3
 
4
4
  def list(company, **params)
5
5
  Collection.from_response get_request("#{company}/AP/APVendorGroups?$count=true", params: params), type: Vendor
@@ -1,5 +1,5 @@
1
1
  module Sagekit
2
- class VendorTermsResource < Resource
2
+ class AP::VendorTermsResource < Resource
3
3
 
4
4
  def list(company, **params)
5
5
  Collection.from_response get_request("#{company}/AP/APTerms?$count=true", params: params), type: Vendor
@@ -1,5 +1,5 @@
1
1
  module Sagekit
2
- class VendorsResource < Resource
2
+ class AP::VendorsResource < Resource
3
3
 
4
4
  def list(company, **params)
5
5
  Collection.from_response get_request("#{company}/AP/APVendors?$count=true", params: params), type: Vendor
@@ -1,5 +1,5 @@
1
1
  module Sagekit
2
- class AccountSetsResource < Resource
2
+ class AR::AccountSetsResource < Resource
3
3
 
4
4
  def list(company, **params)
5
5
  Collection.from_response get_request("#{company}/AR/ARAccountSets?$count=true", params: params), type: AccountSet
@@ -1,5 +1,5 @@
1
1
  module Sagekit
2
- class CustomerGroupsResource < Resource
2
+ class AR::CustomerGroupsResource < Resource
3
3
 
4
4
  def list(company, **params)
5
5
  Collection.from_response get_request("#{company}/AR/ARCustomerGroups?$count=true", params: params), type: Customer
@@ -1,8 +1,8 @@
1
1
  module Sagekit
2
- class CustomerTermsResource < Resource
2
+ class AR::CustomerTermsResource < Resource
3
3
 
4
4
  def list(company, **params)
5
- Customer.new get_request("#{company}/AR/ARTerms", params: params).body
5
+ Collection.from_response get_request("#{company}/AR/ARTerms", params: params), type: Customer
6
6
  end
7
7
 
8
8
  def retreive(company, terms_code, **params)
@@ -1,5 +1,5 @@
1
1
  module Sagekit
2
- class CustomersResource < Resource
2
+ class AR::CustomersResource < Resource
3
3
 
4
4
  def list(company, **params)
5
5
  Collection.from_response get_request("#{company}/AR/ARCustomers?$count=true", params: params), type: Customer
@@ -1,5 +1,5 @@
1
1
  module Sagekit
2
- class SalesPersonsResource < Resource
2
+ class AR::SalesPersonsResource < Resource
3
3
 
4
4
  def list(company, **params)
5
5
  Collection.from_response get_request("#{company}/AR/ARSalespersons?$count=true", params: params), type: SalesPerson
@@ -1,5 +1,5 @@
1
1
  module Sagekit
2
- class CategoriesResource < Resource
2
+ class IC::CategoriesResource < Resource
3
3
 
4
4
  def list(company, **params)
5
5
  Collection.from_response get_request("#{company}/IC/ICCategories?$count=true", params: params), type: Category
@@ -1,5 +1,5 @@
1
1
  module Sagekit
2
- class ItemsResource < Resource
2
+ class IC::ItemsResource < Resource
3
3
 
4
4
  def list(company, **params)
5
5
  Collection.from_response get_request("#{company}/IC/ICItems?$count=true", params: params), type: Item
@@ -1,5 +1,5 @@
1
1
  module Sagekit
2
- class LocationsResource < Resource
2
+ class IC::LocationsResource < Resource
3
3
 
4
4
  def list(company, **params)
5
5
  Collection.from_response get_request("#{company}/IC/ICLocations?$count=true", params: params), type: Item
@@ -1,5 +1,5 @@
1
1
  module Sagekit
2
- class CreditNotesResource < Resource
2
+ class OE::CreditNotesResource < Resource
3
3
 
4
4
  def list(company, **params)
5
5
  Collection.from_response get_request("#{company}/OE/OECreditDebitNotes?$count=true", params: params), type: CreditNote
@@ -1,5 +1,5 @@
1
1
  module Sagekit
2
- class InvoicesResource < Resource
2
+ class OE::InvoicesResource < Resource
3
3
 
4
4
  def list(company, **params)
5
5
  Collection.from_response get_request("#{company}/OE/OEInvoices?$count=true", params: params), type: Invoice
@@ -1,5 +1,5 @@
1
1
  module Sagekit
2
- class SalesHistoryResource < Resource
2
+ class OE::SalesHistoryResource < Resource
3
3
 
4
4
  def list(company, **params)
5
5
  Collection.from_response get_request("#{company}/OE/OESalesHistory?$count=true", params: params), type: SalesHistory
@@ -1,5 +1,5 @@
1
1
  module Sagekit
2
- class SalesOrdersResource < Resource
2
+ class OE::SalesOrdersResource < Resource
3
3
 
4
4
  def list(company, **params)
5
5
  Collection.from_response get_request("#{company}/OE/OEOrders?$count=true", params: params), type: Invoice
@@ -1,8 +1,8 @@
1
1
  module Sagekit
2
- class PurchaseOrdersResource < Resource
2
+ class PO::PurchaseOrdersResource < Resource
3
3
 
4
4
  def list(company, **params)
5
- Collection.from_response get_request("#{company}/PO/POPurchaseOrders?$count=true", params: params), type: Item
5
+ Collection.from_response get_request("#{company}/PO/POPurchaseOrders?$count=true", params: params), type: PurchaseOrder
6
6
  end
7
7
 
8
8
  def retreive(company, order_id, **params)
@@ -1,5 +1,5 @@
1
1
  module Sagekit
2
- class ReceiptsResource < Resource
2
+ class PO::ReceiptsResource < Resource
3
3
 
4
4
  def list(company, **params)
5
5
  Collection.from_response get_request("#{company}/PO/POReceipts?$count=true", params: params), type: Receipt
@@ -0,0 +1,27 @@
1
+ module Sagekit
2
+ class PO::VendorContractCostsResource < Resource
3
+
4
+ def list(company, **params)
5
+ Collection.from_response get_request("#{company}/PO/POVendorContractCosts?$count=true", params: params), type: VendorContractCost
6
+ end
7
+
8
+ def retreive(company, item, vendor, **params)
9
+ VendorContractCost.new get_request("#{company}/PO/POVendorContractCosts(ItemNumer='#{item}',VendorNumber='#{vendor}')", params: params).body
10
+ end
11
+
12
+ def create(company, **attributes)
13
+ VendorContractCost.new post_request("#{company}/PO/POVendorContractCosts", body: attributes).body
14
+ end
15
+
16
+ def update(company, item, vendor, **attributes)
17
+ patch_request("#{company}/PO/POVendorContractCosts(ItemNumer='#{item}',VendorNumber='#{vendor}')", body: attributes)
18
+ true
19
+ end
20
+
21
+ def delete(company, item, vendor)
22
+ delete_request("#{company}/PO/POVendorContractCosts(ItemNumer='#{item}',VendorNumber='#{vendor}')")
23
+ true
24
+ end
25
+
26
+ end
27
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sagekit
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.2.1"
5
5
  end
data/lib/sagekit.rb CHANGED
@@ -11,28 +11,43 @@ module Sagekit
11
11
 
12
12
  # Resources | Categories of Sage300 API calls
13
13
  # OE Module
14
- autoload :SalesOrdersResource, "sagekit/resources/sales_orders"
15
- autoload :InvoicesResource, "sagekit/resources/invoices"
16
- autoload :SalesHistoryResource, "sagekit/resources/sales_history"
17
- autoload :CreditNotesResource, "sagekit/resources/credit_notes"
14
+ module OE
15
+ autoload :SalesOrdersResource, "sagekit/resources/OE/sales_orders"
16
+ autoload :InvoicesResource, "sagekit/resources/OR/OEnvoices"
17
+ autoload :SalesHistoryResource, "sagekit/resources/OE/sales_history"
18
+ autoload :CreditNotesResource, "sagekit/resources/OE/credit_notes"
19
+ end
20
+
18
21
  # PO Module
19
- autoload :PurchaseOrdersResource, "sagekit/resources/purchase_orders"
20
- autoload :ReceiptsResource, "sagekit/resources/receipts"
21
- autoload :VendorContractCostsResource, "sagekit/resources/vendor_contract_costs"
22
+ module PO
23
+ autoload :PurchaseOrdersResource, "sagekit/resources/PO/purchase_orders"
24
+ autoload :ReceiptsResource, "sagekit/resources/PO/receipts"
25
+ autoload :VendorContractCostsResource, "sagekit/resources/PO/vendor_contract_costs"
26
+ end
27
+
22
28
  # AR Module
23
- autoload :CustomersResource, "sagekit/resources/customers"
24
- autoload :CustomerGroupsResource, "sagekit/resources/customer_groups"
25
- autoload :CustomerTermsResource, "sagekit/resources/customer_terms"
26
- autoload :SalesPersonsResource, "sagekit/resources/sales_persons"
27
- autoload :AccountSetsResource, "sagekit/resources/account_sets"
29
+ module AR
30
+ autoload :CustomersResource, "sagekit/resources/AR/customers"
31
+ autoload :CustomerGroupsResource, "sagekit/resources/AR/customer_groups"
32
+ autoload :CustomerTermsResource, "sagekit/resources/AR/customer_terms"
33
+ autoload :SalesPersonsResource, "sagekit/resources/AR/sales_persons"
34
+ autoload :AccountSetsResource, "sagekit/resources/AR/account_sets"
35
+ end
36
+
28
37
  # AP Module
29
- autoload :VendorsResource, "sagekit/resources/vendors"
30
- autoload :VendorGroupsResource, "sagekit/resources/vendor_groups"
31
- autoload :VendorTermsResource, "sagekit/resources/vendor_terms"
38
+ module AP
39
+ autoload :InvoiceBatchesResource, "sagekit/resources/AP/invoice_batches"
40
+ autoload :VendorsResource, "sagekit/resources/AP/vendors"
41
+ autoload :VendorGroupsResource, "sagekit/resources/AP/vendor_groups"
42
+ autoload :VendorTermsResource, "sagekit/resources/AP/vendor_terms"
43
+ end
44
+
32
45
  # IC Module
33
- autoload :ItemsResource, "sagekit/resources/items"
34
- autoload :CategoriesResource, "sagekit/resources/categories"
35
- autoload :LocationsResource, "sagekit/resources/locations"
46
+ module IC
47
+ autoload :ItemsResource, "sagekit/resources/IC/items"
48
+ autoload :CategoriesResource, "sagekit/resources/IC/categories"
49
+ autoload :LocationsResource, "sagekit/resources/IC/locations"
50
+ end
36
51
 
37
52
  # Objects
38
53
  # OE Module
@@ -50,6 +65,7 @@ module Sagekit
50
65
  autoload :AccountSet, "sagekit/objects/account_set.rb"
51
66
  # AP Module
52
67
  autoload :Vendor, "sagekit/objects/vendor.rb"
68
+ autoload :InvoiceBatch, "sagekit/objects/invoice_batch.rb"
53
69
  # IC Module
54
70
  autoload :Item, "sagekit/objects/item.rb"
55
71
  autoload :Category, "sagekit/objects/category.rb"
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.2
4
+ version: 0.1.2.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-14 00:00:00.000000000 Z
11
+ date: 2021-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.14.0
41
- description: Client library fro Sage300 API.
41
+ description: Client library for Sage300 API.
42
42
  email:
43
43
  - jose.perez@vertilux.com
44
44
  executables: []
@@ -66,6 +66,7 @@ files:
66
66
  - lib/sagekit/objects/credit_note.rb
67
67
  - lib/sagekit/objects/customer.rb
68
68
  - lib/sagekit/objects/invoice.rb
69
+ - lib/sagekit/objects/invoice_batch.rb
69
70
  - lib/sagekit/objects/item.rb
70
71
  - lib/sagekit/objects/location.rb
71
72
  - lib/sagekit/objects/purchase_order.rb
@@ -76,29 +77,34 @@ files:
76
77
  - lib/sagekit/objects/vendor.rb
77
78
  - lib/sagekit/objects/vendor_contract_cost.rb
78
79
  - lib/sagekit/resource.rb
79
- - lib/sagekit/resources/account_sets.rb
80
- - lib/sagekit/resources/categories.rb
81
- - lib/sagekit/resources/credit_notes.rb
82
- - lib/sagekit/resources/customer_groups.rb
83
- - lib/sagekit/resources/customer_terms.rb
84
- - lib/sagekit/resources/customers.rb
85
- - lib/sagekit/resources/invoices.rb
86
- - lib/sagekit/resources/items.rb
87
- - lib/sagekit/resources/locations.rb
88
- - lib/sagekit/resources/purchase_orders.rb
89
- - lib/sagekit/resources/receipts.rb
90
- - lib/sagekit/resources/sales_history.rb
91
- - lib/sagekit/resources/sales_orders.rb
92
- - lib/sagekit/resources/sales_persons.rb
93
- - lib/sagekit/resources/vendor_contract_costs.rb
94
- - lib/sagekit/resources/vendor_groups.rb
95
- - lib/sagekit/resources/vendor_terms.rb
96
- - lib/sagekit/resources/vendors.rb
80
+ - lib/sagekit/resources/AP/invoice_batches.rb
81
+ - lib/sagekit/resources/AP/vendor_contract_costs.rb
82
+ - lib/sagekit/resources/AP/vendor_groups.rb
83
+ - lib/sagekit/resources/AP/vendor_terms.rb
84
+ - lib/sagekit/resources/AP/vendors.rb
85
+ - lib/sagekit/resources/AR/account_sets.rb
86
+ - lib/sagekit/resources/AR/customer_groups.rb
87
+ - lib/sagekit/resources/AR/customer_terms.rb
88
+ - lib/sagekit/resources/AR/customers.rb
89
+ - lib/sagekit/resources/AR/sales_persons.rb
90
+ - lib/sagekit/resources/IC/categories.rb
91
+ - lib/sagekit/resources/IC/items.rb
92
+ - lib/sagekit/resources/IC/locations.rb
93
+ - lib/sagekit/resources/OE/credit_notes.rb
94
+ - lib/sagekit/resources/OE/invoices.rb
95
+ - lib/sagekit/resources/OE/sales_history.rb
96
+ - lib/sagekit/resources/OE/sales_orders.rb
97
+ - lib/sagekit/resources/PO/purchase_orders.rb
98
+ - lib/sagekit/resources/PO/receipts.rb
99
+ - lib/sagekit/resources/PO/vendor_contract_costs.rb
97
100
  - lib/sagekit/version.rb
98
101
  homepage: https://lepepe.github.io/sagekit/
99
102
  licenses:
100
103
  - MIT
101
- metadata: {}
104
+ metadata:
105
+ homepage_uri: https://lepepe.github.io/sagekit/
106
+ source_code_uri: https://github.com/lepepe/sagekit
107
+ changelog_uri: https://github.com/lepepe/sagekit/blob/main/CHANGELOG.md
102
108
  post_install_message:
103
109
  rdoc_options: []
104
110
  require_paths:
@@ -114,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
120
  - !ruby/object:Gem::Version
115
121
  version: '0'
116
122
  requirements: []
117
- rubygems_version: 3.2.21
123
+ rubygems_version: 3.2.29
118
124
  signing_key:
119
125
  specification_version: 4
120
126
  summary: Client library for Sage300 API.