ledger_sync 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +71 -17
  3. data/docs/.gitignore +4 -0
  4. data/documentation/build.sh +3 -1
  5. data/documentation/site/_includes/ledgers/{Stripe_summary.md → stripe_summary.md} +0 -0
  6. data/ledger_sync.gemspec +4 -0
  7. data/lib/ledger_sync/serialization/type/deserializer_references_one_type.rb +1 -1
  8. data/lib/ledger_sync/version.rb +1 -1
  9. metadata +59 -136
  10. data/docs/CNAME +0 -1
  11. data/docs/assets/css/brands.min.css +0 -5
  12. data/docs/assets/css/fontawesome.min.css +0 -5
  13. data/docs/assets/css/main.css +0 -1924
  14. data/docs/assets/css/monokai.css +0 -441
  15. data/docs/assets/js/main.js +0 -214
  16. data/docs/assets/js/plugins.js +0 -22
  17. data/docs/assets/js/prism.js +0 -9
  18. data/docs/assets/webfonts/fa-brands-400.eot +0 -0
  19. data/docs/assets/webfonts/fa-brands-400.svg +0 -3452
  20. data/docs/assets/webfonts/fa-brands-400.ttf +0 -0
  21. data/docs/assets/webfonts/fa-brands-400.woff +0 -0
  22. data/docs/assets/webfonts/fa-brands-400.woff2 +0 -0
  23. data/docs/blog/index.html +0 -282
  24. data/docs/guides/architecture/clients/index.html +0 -458
  25. data/docs/guides/architecture/index.html +0 -435
  26. data/docs/guides/architecture/operations/index.html +0 -465
  27. data/docs/guides/architecture/resources/index.html +0 -461
  28. data/docs/guides/architecture/results/index.html +0 -426
  29. data/docs/guides/architecture/searchers/index.html +0 -446
  30. data/docs/guides/architecture/serialization/index.html +0 -476
  31. data/docs/guides/community/index.html +0 -412
  32. data/docs/guides/contribute/console/index.html +0 -424
  33. data/docs/guides/contribute/deployment/index.html +0 -434
  34. data/docs/guides/contribute/documentation/index.html +0 -450
  35. data/docs/guides/contribute/index.html +0 -434
  36. data/docs/guides/contribute/qa/index.html +0 -436
  37. data/docs/guides/contribute/testing/index.html +0 -424
  38. data/docs/guides/customization/custom_resources/index.html +0 -461
  39. data/docs/guides/customization/custom_serializers/index.html +0 -460
  40. data/docs/guides/customization/index.html +0 -431
  41. data/docs/guides/customization/resource_converters/index.html +0 -491
  42. data/docs/guides/getting-started/get-help/index.html +0 -427
  43. data/docs/guides/getting-started/index.html +0 -421
  44. data/docs/guides/getting-started/installation/index.html +0 -433
  45. data/docs/guides/getting-started/quick-start/index.html +0 -531
  46. data/docs/guides/index.html +0 -428
  47. data/docs/guides/ledgers/index.html +0 -429
  48. data/docs/guides/ledgers/netsuite/index.html +0 -424
  49. data/docs/guides/ledgers/netsuite_soap/index.html +0 -424
  50. data/docs/guides/ledgers/quickbooks_online/index.html +0 -424
  51. data/docs/guides/ledgers/stripe/index.html +0 -424
  52. data/docs/guides/modern-treasury/index.html +0 -411
  53. data/docs/guides/tips_and_more/index.html +0 -471
  54. data/docs/images/1.jpg +0 -0
  55. data/docs/images/10.jpg +0 -0
  56. data/docs/images/2.jpg +0 -0
  57. data/docs/images/3.jpg +0 -0
  58. data/docs/images/4.jpg +0 -0
  59. data/docs/images/5.jpg +0 -0
  60. data/docs/images/6.jpg +0 -0
  61. data/docs/images/7.jpg +0 -0
  62. data/docs/images/8.jpg +0 -0
  63. data/docs/images/9.jpg +0 -0
  64. data/docs/images/logo.svg +0 -8
  65. data/docs/index.html +0 -379
  66. data/docs/overview/index.html +0 -409
  67. data/docs/posts/introducing-docs/index.html +0 -270
  68. data/docs/posts/netsuite-authentication/index.html +0 -624
  69. data/docs/reference/architecture/clients/index.html +0 -332
  70. data/docs/reference/architecture/index.html +0 -311
  71. data/docs/reference/architecture/operations/index.html +0 -302
  72. data/docs/reference/architecture/resources/index.html +0 -335
  73. data/docs/reference/architecture/results/index.html +0 -302
  74. data/docs/reference/architecture/searchers/index.html +0 -302
  75. data/docs/reference/architecture/serialization/index.html +0 -302
  76. data/docs/reference/index.html +0 -281
  77. data/docs/reference/netsuite/authentication/index.html +0 -392
  78. data/docs/reference/netsuite/authentication/token_based_authentication/index.html +0 -486
  79. data/docs/reference/netsuite/index.html +0 -388
  80. data/docs/reference/netsuite/resources/account/index.html +0 -484
  81. data/docs/reference/netsuite/resources/check/index.html +0 -492
  82. data/docs/reference/netsuite/resources/check_line_item/index.html +0 -460
  83. data/docs/reference/netsuite/resources/currency/index.html +0 -476
  84. data/docs/reference/netsuite/resources/customer/index.html +0 -488
  85. data/docs/reference/netsuite/resources/customer_deposit/index.html +0 -480
  86. data/docs/reference/netsuite/resources/department/index.html +0 -484
  87. data/docs/reference/netsuite/resources/deposit/index.html +0 -468
  88. data/docs/reference/netsuite/resources/deposit_line_item/index.html +0 -460
  89. data/docs/reference/netsuite/resources/index.html +0 -436
  90. data/docs/reference/netsuite/resources/invoice/index.html +0 -468
  91. data/docs/reference/netsuite/resources/invoice_line_item/index.html +0 -456
  92. data/docs/reference/netsuite/resources/item/index.html +0 -444
  93. data/docs/reference/netsuite/resources/journal_entry/index.html +0 -488
  94. data/docs/reference/netsuite/resources/journal_entry_line_item/index.html +0 -464
  95. data/docs/reference/netsuite/resources/ledger_class/index.html +0 -484
  96. data/docs/reference/netsuite/resources/location/index.html +0 -468
  97. data/docs/reference/netsuite/resources/resource/index.html +0 -440
  98. data/docs/reference/netsuite/resources/subsidiary/index.html +0 -448
  99. data/docs/reference/netsuite/resources/vendor/index.html +0 -492
  100. data/docs/reference/netsuite_soap/index.html +0 -303
  101. data/docs/reference/netsuite_soap/resources/customer/index.html +0 -364
  102. data/docs/reference/netsuite_soap/resources/index.html +0 -316
  103. data/docs/reference/netsuite_soap/resources/resource/index.html +0 -336
  104. data/docs/reference/netsuite_soap/resources/subsidiary/index.html +0 -356
  105. data/docs/reference/quickbooks_online/authentication/index.html +0 -442
  106. data/docs/reference/quickbooks_online/errors/index.html +0 -395
  107. data/docs/reference/quickbooks_online/index.html +0 -393
  108. data/docs/reference/quickbooks_online/resources/account/index.html +0 -530
  109. data/docs/reference/quickbooks_online/resources/bill/index.html +0 -534
  110. data/docs/reference/quickbooks_online/resources/bill_line_item/index.html +0 -496
  111. data/docs/reference/quickbooks_online/resources/bill_payment/index.html +0 -550
  112. data/docs/reference/quickbooks_online/resources/bill_payment_line_item/index.html +0 -488
  113. data/docs/reference/quickbooks_online/resources/currency/index.html +0 -492
  114. data/docs/reference/quickbooks_online/resources/customer/index.html +0 -514
  115. data/docs/reference/quickbooks_online/resources/department/index.html +0 -518
  116. data/docs/reference/quickbooks_online/resources/deposit/index.html +0 -526
  117. data/docs/reference/quickbooks_online/resources/deposit_line_item/index.html +0 -500
  118. data/docs/reference/quickbooks_online/resources/expense/index.html +0 -538
  119. data/docs/reference/quickbooks_online/resources/expense_line_item/index.html +0 -496
  120. data/docs/reference/quickbooks_online/resources/index.html +0 -484
  121. data/docs/reference/quickbooks_online/resources/invoice/index.html +0 -526
  122. data/docs/reference/quickbooks_online/resources/invoice_sales_line_item/index.html +0 -496
  123. data/docs/reference/quickbooks_online/resources/item/index.html +0 -484
  124. data/docs/reference/quickbooks_online/resources/journal_entry/index.html +0 -518
  125. data/docs/reference/quickbooks_online/resources/journal_entry_line_item/index.html +0 -504
  126. data/docs/reference/quickbooks_online/resources/ledger_class/index.html +0 -518
  127. data/docs/reference/quickbooks_online/resources/payment/index.html +0 -538
  128. data/docs/reference/quickbooks_online/resources/payment_line_item/index.html +0 -488
  129. data/docs/reference/quickbooks_online/resources/preferences/index.html +0 -526
  130. data/docs/reference/quickbooks_online/resources/primary_email_addr/index.html +0 -484
  131. data/docs/reference/quickbooks_online/resources/primary_phone/index.html +0 -484
  132. data/docs/reference/quickbooks_online/resources/resource/index.html +0 -480
  133. data/docs/reference/quickbooks_online/resources/subsidiary/index.html +0 -488
  134. data/docs/reference/quickbooks_online/resources/transfer/index.html +0 -522
  135. data/docs/reference/quickbooks_online/resources/vendor/index.html +0 -526
  136. data/docs/reference/quickbooks_online/webhooks/index.html +0 -427
  137. data/docs/reference/stripe/index.html +0 -293
  138. data/docs/reference/stripe/resources/customer/index.html +0 -366
  139. data/docs/reference/stripe/resources/index.html +0 -309
  140. data/docs/reference/stripe/resources/resource/index.html +0 -330
  141. data/docs/style-guide/index.html +0 -375
  142. data/documentation/site/Gemfile +0 -11
  143. data/documentation/site/Gemfile.lock +0 -69
@@ -1,431 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
-
4
- <head>
5
-
6
- <title>LedgerSync - Customization - LedgerSync</title>
7
- <meta charset="utf-8">
8
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
- <meta name="description" content="An open-source library for easily syncing with accounting software, general ledgers, ERPs, and other ledgers." />
10
- <link href="https://fonts.googleapis.com/css?family=Lato:400,400i,700,700i%26display=swap" rel="stylesheet">
11
- <link rel="stylesheet" href="/assets/css/main.css">
12
-
13
- <!-- Global site tag (gtag.js) - Google Analytics -->
14
- <script async src="https://www.googletagmanager.com/gtag/js?id=UA-152343827-1"></script>
15
- <script>
16
- window.dataLayer = window.dataLayer || [];
17
- function gtag(){dataLayer.push(arguments);}
18
- gtag('js', new Date());
19
-
20
- gtag('config', 'UA-152343827-1');
21
- </script>
22
-
23
- </head>
24
-
25
- <body>
26
-
27
- <div id="page" class="site">
28
- <header id="masthead" class="site-header outer">
29
- <div class="inner">
30
- <div class="site-header-inside">
31
- <div class="site-branding">
32
-
33
-
34
- <p class="site-logo"><a href="/"><img src="/images/logo.svg" alt="LedgerSync" /></a></p>
35
-
36
- </div><!-- .site-branding -->
37
-
38
-
39
- <nav id="main-navigation" class="site-navigation" aria-label="Main Navigation">
40
- <div class="site-nav-inside">
41
- <button id="menu-close" class="menu-toggle"><span class="screen-reader-text">Open Menu</span><span class="icon-close" aria-hidden="true"></span></button>
42
- <ul class="menu">
43
-
44
- <li class="menu-item">
45
-
46
-
47
- <a class="" href="/" >
48
-
49
- Home
50
-
51
- </a>
52
-
53
- </li>
54
-
55
- <li class="menu-item">
56
-
57
-
58
- <a class="" href="/guides/" >
59
-
60
- Guides
61
-
62
- </a>
63
-
64
- </li>
65
-
66
- <li class="menu-item has-children">
67
-
68
-
69
- <a class="" href="/reference" >
70
-
71
- Reference
72
-
73
- </a>
74
-
75
-
76
- <ul class="submenu">
77
-
78
- <li class="menu-item">
79
-
80
-
81
- <a class="" href="/reference/netsuite" >
82
-
83
- NetSuite REST
84
-
85
- </a>
86
- </li>
87
-
88
- <li class="menu-item">
89
-
90
-
91
- <a class="" href="/reference/netsuite_soap" >
92
-
93
- NetSuite SOAP
94
-
95
- </a>
96
- </li>
97
-
98
- <li class="menu-item">
99
-
100
-
101
- <a class="" href="/reference/quickbooks_online" >
102
-
103
- QuickBooks Online
104
-
105
- </a>
106
- </li>
107
-
108
- <li class="menu-item">
109
-
110
-
111
- <a class="" href="/reference/stripe" >
112
-
113
- Stripe
114
-
115
- </a>
116
- </li>
117
-
118
- </ul>
119
-
120
-
121
- </li>
122
-
123
- <li class="menu-item">
124
-
125
-
126
- <a class="" href="/blog" >
127
-
128
- Blog
129
-
130
- </a>
131
-
132
- </li>
133
-
134
- <li class="menu-item">
135
-
136
-
137
- <a class="" href="/guides/contribute" >
138
-
139
- Contribute
140
-
141
- </a>
142
-
143
- </li>
144
-
145
- <li class="menu-item menu-button">
146
-
147
-
148
- <a class="button" href="https://github.com/LedgerSync/ledger_sync" >
149
-
150
- GitHub
151
-
152
- </a>
153
-
154
- </li>
155
-
156
- </ul>
157
- </div><!-- .site-nav-inside -->
158
- </nav><!-- .site-navigation -->
159
- <button id="menu-open" class="menu-toggle"><span class="screen-reader-text">Close Menu</span><span class="icon-menu" aria-hidden="true"></span></button>
160
-
161
- </div><!-- .site-header-inside -->
162
- </div><!-- .inner -->
163
- </header><!-- .site-header -->
164
-
165
- <main id="content" class="site-content">
166
- <div class="inner outer">
167
- <div class="guides-content">
168
-
169
- <nav id="guides-nav" class="guides-nav">
170
- <div id="guides-nav-inside" class="guides-nav-inside sticky">
171
- <button id="guides-nav-toggle" class="guides-nav-toggle">Navigate<span class="icon-angle-right" aria-hidden="true"></span></button>
172
- <div class="guides-toc-wrap">
173
- <ul id="guides-toc" class="guides-toc">
174
-
175
- <li class="toc-item">
176
- <a href="/guides/">Welcome to LedgerSync</a>
177
- </li>
178
-
179
-
180
- <li class="toc-item has-children">
181
- <a href="/guides/getting-started/">Getting Started</a>
182
- <button class="submenu-toggle"><span class="screen-reader-text">Submenu</span><span class="icon-angle-right" aria-hidden="true"></span></button> <ul class="toc-submenu">
183
-
184
- <li class="toc-item">
185
- <a href="/guides/getting-started/installation/">Installation</a>
186
- </li>
187
-
188
- <li class="toc-item">
189
- <a href="/guides/getting-started/quick-start/">Quick Start</a>
190
- </li>
191
-
192
- <li class="toc-item">
193
- <a href="/guides/getting-started/get-help/">Get Help</a>
194
- </li>
195
-
196
- </ul>
197
-
198
- </li>
199
-
200
- <li class="toc-item has-children">
201
- <a href="/guides/architecture/">Architecture</a>
202
- <button class="submenu-toggle"><span class="screen-reader-text">Submenu</span><span class="icon-angle-right" aria-hidden="true"></span></button> <ul class="toc-submenu">
203
-
204
- <li class="toc-item">
205
- <a href="/guides/architecture/clients/">Clients</a>
206
- </li>
207
-
208
- <li class="toc-item">
209
- <a href="/guides/architecture/resources/">Resources</a>
210
- </li>
211
-
212
- <li class="toc-item">
213
- <a href="/guides/architecture/serialization/">Serialization</a>
214
- </li>
215
-
216
- <li class="toc-item">
217
- <a href="/guides/architecture/operations/">Operations</a>
218
- </li>
219
-
220
- <li class="toc-item">
221
- <a href="/guides/architecture/searchers/">Operations</a>
222
- </li>
223
-
224
- <li class="toc-item">
225
- <a href="/guides/architecture/results/">Results</a>
226
- </li>
227
-
228
- </ul>
229
-
230
- </li>
231
-
232
- <li class="toc-item has-children">
233
- <a href="/guides/ledgers/">Ledgers</a>
234
- <button class="submenu-toggle"><span class="screen-reader-text">Submenu</span><span class="icon-angle-right" aria-hidden="true"></span></button> <ul class="toc-submenu">
235
-
236
- <li class="toc-item">
237
- <a href="/guides/ledgers/netsuite/">NetSuite REST</a>
238
- </li>
239
-
240
- <li class="toc-item">
241
- <a href="/guides/ledgers/netsuite_soap/">NetSuite SOAP</a>
242
- </li>
243
-
244
- <li class="toc-item">
245
- <a href="/guides/ledgers/quickbooks_online/">QuickBooks Online</a>
246
- </li>
247
-
248
- <li class="toc-item">
249
- <a href="/guides/ledgers/stripe/">Stripe</a>
250
- </li>
251
-
252
- </ul>
253
-
254
- </li>
255
-
256
- <li class="toc-item has-children current active">
257
- <a href="/guides/customization/">Customization</a>
258
- <button class="submenu-toggle"><span class="screen-reader-text">Submenu</span><span class="icon-angle-right" aria-hidden="true"></span></button> <ul class="toc-submenu">
259
-
260
- <li class="toc-item">
261
- <a href="/guides/customization/resource_converters/">Resource Converters</a>
262
- </li>
263
-
264
- <li class="toc-item">
265
- <a href="/guides/customization/custom_resources/">Custom Resources</a>
266
- </li>
267
-
268
- <li class="toc-item">
269
- <a href="/guides/customization/custom_serializers/">Custom Serializers</a>
270
- </li>
271
-
272
- </ul>
273
-
274
- </li>
275
-
276
- <li class="toc-item">
277
- <a href="/guides/tips_and_more/">Tips and More</a>
278
- </li>
279
-
280
- <li class="toc-item has-children">
281
- <a href="/guides/contribute/">Contribute</a>
282
- <button class="submenu-toggle"><span class="screen-reader-text">Submenu</span><span class="icon-angle-right" aria-hidden="true"></span></button> <ul class="toc-submenu">
283
-
284
- <li class="toc-item">
285
- <a href="/guides/contribute/console/">Console</a>
286
- </li>
287
-
288
- <li class="toc-item">
289
- <a href="/guides/contribute/deployment/">Deployment</a>
290
- </li>
291
-
292
- <li class="toc-item">
293
- <a href="/guides/contribute/documentation/">Documentation</a>
294
- </li>
295
-
296
- <li class="toc-item">
297
- <a href="/guides/contribute/qa/">QA</a>
298
- </li>
299
-
300
- <li class="toc-item">
301
- <a href="/guides/contribute/testing/">Testing</a>
302
- </li>
303
-
304
- </ul>
305
-
306
- </li>
307
-
308
- <li class="toc-item">
309
- <a href="/guides/community/">Where To Get Support</a>
310
- </li>
311
-
312
- <li class="toc-item">
313
- <a href="/guides/modern-treasury/">Modern Treasury</a>
314
- </li>
315
-
316
-
317
- </ul>
318
- <!-- .guides-toc -->
319
- </div>
320
- <!-- .guides-toc-wrap -->
321
- </div>
322
- <!-- .guides-nav-inside -->
323
- </nav>
324
- <!-- .guides-nav -->
325
- <article class="post type-guides">
326
- <div class="post-inside">
327
- <header class="post-header">
328
- <h1 class="post-title line-left">Customization</h1>
329
- </header>
330
- <!-- .post-header -->
331
- <div class="post-content">
332
- <p>One of the goals of LedgerSync is to make it easy to customize for your needs. For example, you may need:</p>
333
-
334
- <ul>
335
- <li>Resource converters</li>
336
- <li>Custom resources</li>
337
- <li>Custom attributes</li>
338
- <li>Custom operations</li>
339
- <li>Custom ledgers</li>
340
- <li>etc.</li>
341
- </ul>
342
-
343
- <p>We provide some guides for achieving this functionality.</p>
344
-
345
- <hr />
346
-
347
- <div>Related articles:</div><br />
348
-
349
- <ul class="guides-section-items">
350
-
351
- <li class="guides-section-item"><a href="/guides/customization/resource_converters/" class="guides-item-link">Resource Converters<span class="icon-angle-right" aria-hidden="true"></span></a></li>
352
-
353
- <li class="guides-section-item"><a href="/guides/customization/custom_resources/" class="guides-item-link">Custom Resources<span class="icon-angle-right" aria-hidden="true"></span></a></li>
354
-
355
- <li class="guides-section-item"><a href="/guides/customization/custom_serializers/" class="guides-item-link">Custom Serializers<span class="icon-angle-right" aria-hidden="true"></span></a></li>
356
-
357
- </ul>
358
- <!-- .guides-section-pages -->
359
-
360
- </div>
361
- <!-- .post-content -->
362
- </div>
363
- <!-- .post-inside -->
364
- </article>
365
- <!-- .post -->
366
- <nav id="page-nav" class="page-nav">
367
- <div id="page-nav-inside" class="page-nav-inside sticky">
368
- <h2 class="page-nav-title">Jump to Section</h2>
369
- </div>
370
- <!-- .page-nav-inside -->
371
- </nav>
372
- <!-- .page-nav -->
373
- </div>
374
- <!-- .guides-content -->
375
- </div>
376
- <!-- .inner-->
377
- </main><!-- .site-content -->
378
- <footer id="colophon" class="site-footer outer">
379
- <div class="inner">
380
- <div class="site-footer-inside">
381
- <p class="site-info">
382
-
383
- <span class="copyright">&copy; Modern Treasury Inc. All rights reserved.</span>
384
- <a class="" href="https://www.moderntreasury.com" target="_blank" rel="noopener" >
385
-
386
- Maintained with ❤️ in San Francisco, CA by Modern Treasury
387
-
388
- </a>
389
- </p>
390
- <!-- .site-info -->
391
-
392
- <div class="social-links">
393
-
394
- <a class="" href="https://www.netlify.com" target="_blank" rel="noopener" >
395
-
396
- <img src="https://www.netlify.com/img/global/badges/netlify-dark.svg" alt="Deploys by Netlify" />
397
-
398
- </a>
399
- <a class="button button-icon" href="https://twitter.com/ModernTreasury" target="_blank" rel="noopener" >
400
-
401
- <span class="icon fab fa-twitter" aria-hidden="true"></span><span class="screen-reader-text">Twitter</span>
402
-
403
- </a>
404
- <a class="button button-icon" href="https://www.linkedin.com/company/modern-treasury" target="_blank" rel="noopener" >
405
-
406
- <span class="icon fab fa-linkedin" aria-hidden="true"></span><span class="screen-reader-text">LinkedIn</span>
407
-
408
- </a>
409
- <a class="button button-icon" href="https://github.com/LedgerSync/ledger_sync" target="_blank" rel="noopener" >
410
-
411
- <span class="icon fab fa-github" aria-hidden="true"></span><span class="screen-reader-text">GitHub</span>
412
-
413
- </a>
414
- </div>
415
- <!-- .social-links -->
416
-
417
- </div>
418
- <!-- .site-footer-inside -->
419
- </div>
420
- <!-- .inner -->
421
- </footer>
422
- <!-- .site-footer -->
423
- </div><!-- .site -->
424
-
425
- <!-- Scripts -->
426
- <script src="/assets/js/plugins.js"></script>
427
- <script src="/assets/js/prism.js" data-manual></script>
428
- <script src="/assets/js/main.js"></script>
429
- </body>
430
-
431
- </html>
@@ -1,491 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
-
4
- <head>
5
-
6
- <title>LedgerSync - Resource Converters - LedgerSync</title>
7
- <meta charset="utf-8">
8
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
- <meta name="description" content="An open-source library for easily syncing with accounting software, general ledgers, ERPs, and other ledgers." />
10
- <link href="https://fonts.googleapis.com/css?family=Lato:400,400i,700,700i%26display=swap" rel="stylesheet">
11
- <link rel="stylesheet" href="/assets/css/main.css">
12
-
13
- <!-- Global site tag (gtag.js) - Google Analytics -->
14
- <script async src="https://www.googletagmanager.com/gtag/js?id=UA-152343827-1"></script>
15
- <script>
16
- window.dataLayer = window.dataLayer || [];
17
- function gtag(){dataLayer.push(arguments);}
18
- gtag('js', new Date());
19
-
20
- gtag('config', 'UA-152343827-1');
21
- </script>
22
-
23
- </head>
24
-
25
- <body>
26
-
27
- <div id="page" class="site">
28
- <header id="masthead" class="site-header outer">
29
- <div class="inner">
30
- <div class="site-header-inside">
31
- <div class="site-branding">
32
-
33
-
34
- <p class="site-logo"><a href="/"><img src="/images/logo.svg" alt="LedgerSync" /></a></p>
35
-
36
- </div><!-- .site-branding -->
37
-
38
-
39
- <nav id="main-navigation" class="site-navigation" aria-label="Main Navigation">
40
- <div class="site-nav-inside">
41
- <button id="menu-close" class="menu-toggle"><span class="screen-reader-text">Open Menu</span><span class="icon-close" aria-hidden="true"></span></button>
42
- <ul class="menu">
43
-
44
- <li class="menu-item">
45
-
46
-
47
- <a class="" href="/" >
48
-
49
- Home
50
-
51
- </a>
52
-
53
- </li>
54
-
55
- <li class="menu-item">
56
-
57
-
58
- <a class="" href="/guides/" >
59
-
60
- Guides
61
-
62
- </a>
63
-
64
- </li>
65
-
66
- <li class="menu-item has-children">
67
-
68
-
69
- <a class="" href="/reference" >
70
-
71
- Reference
72
-
73
- </a>
74
-
75
-
76
- <ul class="submenu">
77
-
78
- <li class="menu-item">
79
-
80
-
81
- <a class="" href="/reference/netsuite" >
82
-
83
- NetSuite REST
84
-
85
- </a>
86
- </li>
87
-
88
- <li class="menu-item">
89
-
90
-
91
- <a class="" href="/reference/netsuite_soap" >
92
-
93
- NetSuite SOAP
94
-
95
- </a>
96
- </li>
97
-
98
- <li class="menu-item">
99
-
100
-
101
- <a class="" href="/reference/quickbooks_online" >
102
-
103
- QuickBooks Online
104
-
105
- </a>
106
- </li>
107
-
108
- <li class="menu-item">
109
-
110
-
111
- <a class="" href="/reference/stripe" >
112
-
113
- Stripe
114
-
115
- </a>
116
- </li>
117
-
118
- </ul>
119
-
120
-
121
- </li>
122
-
123
- <li class="menu-item">
124
-
125
-
126
- <a class="" href="/blog" >
127
-
128
- Blog
129
-
130
- </a>
131
-
132
- </li>
133
-
134
- <li class="menu-item">
135
-
136
-
137
- <a class="" href="/guides/contribute" >
138
-
139
- Contribute
140
-
141
- </a>
142
-
143
- </li>
144
-
145
- <li class="menu-item menu-button">
146
-
147
-
148
- <a class="button" href="https://github.com/LedgerSync/ledger_sync" >
149
-
150
- GitHub
151
-
152
- </a>
153
-
154
- </li>
155
-
156
- </ul>
157
- </div><!-- .site-nav-inside -->
158
- </nav><!-- .site-navigation -->
159
- <button id="menu-open" class="menu-toggle"><span class="screen-reader-text">Close Menu</span><span class="icon-menu" aria-hidden="true"></span></button>
160
-
161
- </div><!-- .site-header-inside -->
162
- </div><!-- .inner -->
163
- </header><!-- .site-header -->
164
-
165
- <main id="content" class="site-content">
166
- <div class="inner outer">
167
- <div class="guides-content">
168
-
169
- <nav id="guides-nav" class="guides-nav">
170
- <div id="guides-nav-inside" class="guides-nav-inside sticky">
171
- <button id="guides-nav-toggle" class="guides-nav-toggle">Navigate<span class="icon-angle-right" aria-hidden="true"></span></button>
172
- <div class="guides-toc-wrap">
173
- <ul id="guides-toc" class="guides-toc">
174
-
175
- <li class="toc-item">
176
- <a href="/guides/">Welcome to LedgerSync</a>
177
- </li>
178
-
179
-
180
- <li class="toc-item has-children">
181
- <a href="/guides/getting-started/">Getting Started</a>
182
- <button class="submenu-toggle"><span class="screen-reader-text">Submenu</span><span class="icon-angle-right" aria-hidden="true"></span></button> <ul class="toc-submenu">
183
-
184
- <li class="toc-item">
185
- <a href="/guides/getting-started/installation/">Installation</a>
186
- </li>
187
-
188
- <li class="toc-item">
189
- <a href="/guides/getting-started/quick-start/">Quick Start</a>
190
- </li>
191
-
192
- <li class="toc-item">
193
- <a href="/guides/getting-started/get-help/">Get Help</a>
194
- </li>
195
-
196
- </ul>
197
-
198
- </li>
199
-
200
- <li class="toc-item has-children">
201
- <a href="/guides/architecture/">Architecture</a>
202
- <button class="submenu-toggle"><span class="screen-reader-text">Submenu</span><span class="icon-angle-right" aria-hidden="true"></span></button> <ul class="toc-submenu">
203
-
204
- <li class="toc-item">
205
- <a href="/guides/architecture/clients/">Clients</a>
206
- </li>
207
-
208
- <li class="toc-item">
209
- <a href="/guides/architecture/resources/">Resources</a>
210
- </li>
211
-
212
- <li class="toc-item">
213
- <a href="/guides/architecture/serialization/">Serialization</a>
214
- </li>
215
-
216
- <li class="toc-item">
217
- <a href="/guides/architecture/operations/">Operations</a>
218
- </li>
219
-
220
- <li class="toc-item">
221
- <a href="/guides/architecture/searchers/">Operations</a>
222
- </li>
223
-
224
- <li class="toc-item">
225
- <a href="/guides/architecture/results/">Results</a>
226
- </li>
227
-
228
- </ul>
229
-
230
- </li>
231
-
232
- <li class="toc-item has-children">
233
- <a href="/guides/ledgers/">Ledgers</a>
234
- <button class="submenu-toggle"><span class="screen-reader-text">Submenu</span><span class="icon-angle-right" aria-hidden="true"></span></button> <ul class="toc-submenu">
235
-
236
- <li class="toc-item">
237
- <a href="/guides/ledgers/netsuite/">NetSuite REST</a>
238
- </li>
239
-
240
- <li class="toc-item">
241
- <a href="/guides/ledgers/netsuite_soap/">NetSuite SOAP</a>
242
- </li>
243
-
244
- <li class="toc-item">
245
- <a href="/guides/ledgers/quickbooks_online/">QuickBooks Online</a>
246
- </li>
247
-
248
- <li class="toc-item">
249
- <a href="/guides/ledgers/stripe/">Stripe</a>
250
- </li>
251
-
252
- </ul>
253
-
254
- </li>
255
-
256
- <li class="toc-item has-children active">
257
- <a href="/guides/customization/">Customization</a>
258
- <button class="submenu-toggle"><span class="screen-reader-text">Submenu</span><span class="icon-angle-right" aria-hidden="true"></span></button> <ul class="toc-submenu">
259
-
260
- <li class="toc-item current">
261
- <a href="/guides/customization/resource_converters/">Resource Converters</a>
262
- </li>
263
-
264
- <li class="toc-item">
265
- <a href="/guides/customization/custom_resources/">Custom Resources</a>
266
- </li>
267
-
268
- <li class="toc-item">
269
- <a href="/guides/customization/custom_serializers/">Custom Serializers</a>
270
- </li>
271
-
272
- </ul>
273
-
274
- </li>
275
-
276
- <li class="toc-item">
277
- <a href="/guides/tips_and_more/">Tips and More</a>
278
- </li>
279
-
280
- <li class="toc-item has-children">
281
- <a href="/guides/contribute/">Contribute</a>
282
- <button class="submenu-toggle"><span class="screen-reader-text">Submenu</span><span class="icon-angle-right" aria-hidden="true"></span></button> <ul class="toc-submenu">
283
-
284
- <li class="toc-item">
285
- <a href="/guides/contribute/console/">Console</a>
286
- </li>
287
-
288
- <li class="toc-item">
289
- <a href="/guides/contribute/deployment/">Deployment</a>
290
- </li>
291
-
292
- <li class="toc-item">
293
- <a href="/guides/contribute/documentation/">Documentation</a>
294
- </li>
295
-
296
- <li class="toc-item">
297
- <a href="/guides/contribute/qa/">QA</a>
298
- </li>
299
-
300
- <li class="toc-item">
301
- <a href="/guides/contribute/testing/">Testing</a>
302
- </li>
303
-
304
- </ul>
305
-
306
- </li>
307
-
308
- <li class="toc-item">
309
- <a href="/guides/community/">Where To Get Support</a>
310
- </li>
311
-
312
- <li class="toc-item">
313
- <a href="/guides/modern-treasury/">Modern Treasury</a>
314
- </li>
315
-
316
-
317
- </ul>
318
- <!-- .guides-toc -->
319
- </div>
320
- <!-- .guides-toc-wrap -->
321
- </div>
322
- <!-- .guides-nav-inside -->
323
- </nav>
324
- <!-- .guides-nav -->
325
- <article class="post type-guides">
326
- <div class="post-inside">
327
- <header class="post-header">
328
- <h1 class="post-title line-left">Resource Converters</h1>
329
- </header>
330
- <!-- .post-header -->
331
- <div class="post-content">
332
- <h2 id="overview">Overview</h2>
333
-
334
- <p>LedgerSync provides ledger-specific resources and operations for you to easily interface with a ledger. Complexity arises for a few reasons, such as the following:</p>
335
-
336
- <ul>
337
- <li>Ledgers have different resources. Some ledgers may not even implement the same resources as another ledger.</li>
338
- <li>Resources for a given ledger have different attributes from their counterparts in other ledgers.</li>
339
- <li>Operations may not be supported in all ledgers (e.g. deletion is not available for some resources in QuickBooks Online)</li>
340
- <li>etc.</li>
341
- </ul>
342
-
343
- <p>Because of this complexity, LedgerSync tries to remain “unopinionated” about ledgers. The goal is to have resources, attributes, and operations that match as closely to the API as possible. The issue here is that it requires a developer to have ledger-specific knowledge for every interaction with LedgerSync or to define new resource, operation, and validation layers entirely.</p>
344
-
345
- <p>To solve this problem, some engineers at <a href="site.modern_treasury_url">Modern Treasury</a> have created what we call a <code class="highlighter-rouge">ResourceConverter</code>. This object takes in a <code class="highlighter-rouge">source</code> and <code class="highlighter-rouge">destination</code>. It also defines the mapping from source to destination. This makes it easy to take any object and map it to a ledger-specific resource. Having a converter per resource per ledger enables you to create an interface with LedgerSync. After this layer is created, future developers are not required to have ledger-specific knowledge to make updates.</p>
346
-
347
- <p>Let’s see how this works.</p>
348
-
349
- <h2 id="scenario">Scenario</h2>
350
-
351
- <p>Let’s assume that we have a <code class="highlighter-rouge">Customer</code> model object that we use internally that looks like the following:</p>
352
-
353
- <div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Customer</span>
354
- <span class="nb">attr_accessor</span> <span class="ss">:name</span>
355
- <span class="nb">attr_accessor</span> <span class="ss">:email</span>
356
- <span class="nb">attr_accessor</span> <span class="ss">:id</span>
357
- <span class="k">end</span>
358
- </code></pre></div></div>
359
-
360
- <p>We want to sync the data on this object (specifically <code class="highlighter-rouge">name</code>, <code class="highlighter-rouge">email</code>, and <code class="highlighter-rouge">id</code>) to QuickBooks Online and NetSuite. We will also assume that we have already handled authentication and have a valid client for each(<code class="highlighter-rouge">quickbooks_online_client</code> and <code class="highlighter-rouge">netsuite_client</code>, respectively). Both ledgers implement their own <code class="highlighter-rouge">Customer</code> object, but the attributes for these objects vary. For example, here are the relevant snippets of these resources:</p>
361
-
362
- <div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">module</span> <span class="nn">LedgerSync</span>
363
- <span class="k">module</span> <span class="nn">Ledgers</span>
364
- <span class="k">module</span> <span class="nn">QuickBooksOnline</span>
365
- <span class="k">class</span> <span class="nc">Customer</span> <span class="o">&lt;</span> <span class="no">QuickBooksOnline</span><span class="o">::</span><span class="no">Resource</span>
366
- <span class="n">attribute</span> <span class="ss">:DisplayName</span><span class="p">,</span> <span class="ss">type: </span><span class="no">LedgerSync</span><span class="o">::</span><span class="no">Type</span><span class="o">::</span><span class="no">String</span>
367
-
368
- <span class="n">references_one</span> <span class="ss">:PrimaryEmailAddr</span><span class="p">,</span> <span class="ss">to: </span><span class="no">PrimaryEmailAddr</span>
369
- <span class="k">end</span>
370
- <span class="k">end</span>
371
- <span class="k">end</span>
372
- <span class="k">end</span>
373
-
374
- <span class="k">module</span> <span class="nn">LedgerSync</span>
375
- <span class="k">module</span> <span class="nn">Ledgers</span>
376
- <span class="k">module</span> <span class="nn">QuickBooksOnline</span>
377
- <span class="k">class</span> <span class="nc">PrimaryEmailAddr</span> <span class="o">&lt;</span> <span class="no">QuickBooksOnline</span><span class="o">::</span><span class="no">Resource</span>
378
- <span class="n">attribute</span> <span class="ss">:Address</span><span class="p">,</span> <span class="ss">type: </span><span class="no">LedgerSync</span><span class="o">::</span><span class="no">Type</span><span class="o">::</span><span class="no">String</span>
379
- <span class="k">end</span>
380
- <span class="k">end</span>
381
- <span class="k">end</span>
382
- <span class="k">end</span>
383
- </code></pre></div></div>
384
-
385
- <div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">module</span> <span class="nn">LedgerSync</span>
386
- <span class="k">module</span> <span class="nn">Ledgers</span>
387
- <span class="k">module</span> <span class="nn">NetSuite</span>
388
- <span class="k">class</span> <span class="nc">Customer</span> <span class="o">&lt;</span> <span class="no">NetSuite</span><span class="o">::</span><span class="no">Resource</span>
389
- <span class="n">attribute</span> <span class="ss">:email</span><span class="p">,</span> <span class="ss">type: </span><span class="no">LedgerSync</span><span class="o">::</span><span class="no">Type</span><span class="o">::</span><span class="no">String</span>
390
- <span class="n">attribute</span> <span class="ss">:companyName</span><span class="p">,</span> <span class="ss">type: </span><span class="no">LedgerSync</span><span class="o">::</span><span class="no">Type</span><span class="o">::</span><span class="no">String</span>
391
- <span class="n">attribute</span> <span class="ss">:firstName</span><span class="p">,</span> <span class="ss">type: </span><span class="no">LedgerSync</span><span class="o">::</span><span class="no">Type</span><span class="o">::</span><span class="no">String</span>
392
- <span class="n">attribute</span> <span class="ss">:lastName</span><span class="p">,</span> <span class="ss">type: </span><span class="no">LedgerSync</span><span class="o">::</span><span class="no">Type</span><span class="o">::</span><span class="no">String</span>
393
- <span class="k">end</span>
394
- <span class="k">end</span>
395
- <span class="k">end</span>
396
- <span class="k">end</span>
397
- </code></pre></div></div>
398
-
399
- <div class="note"><strong>Note:</strong>
400
- <p>
401
- We will ignore for the purposes of this guide that NetSuite requires a `subsidiary` for their `Customer` resource.
402
- </p>
403
- </div>
404
-
405
- <hr />
406
-
407
- <div>Related articles:</div><br />
408
-
409
- <ul class="guides-section-items">
410
-
411
- <li class="guides-section-item"><a href="/guides/customization/resource_converters/" class="guides-item-link">Resource Converters<span class="icon-angle-right" aria-hidden="true"></span></a></li>
412
-
413
- <li class="guides-section-item"><a href="/guides/customization/custom_resources/" class="guides-item-link">Custom Resources<span class="icon-angle-right" aria-hidden="true"></span></a></li>
414
-
415
- <li class="guides-section-item"><a href="/guides/customization/custom_serializers/" class="guides-item-link">Custom Serializers<span class="icon-angle-right" aria-hidden="true"></span></a></li>
416
-
417
- </ul>
418
- <!-- .guides-section-pages -->
419
-
420
- </div>
421
- <!-- .post-content -->
422
- </div>
423
- <!-- .post-inside -->
424
- </article>
425
- <!-- .post -->
426
- <nav id="page-nav" class="page-nav">
427
- <div id="page-nav-inside" class="page-nav-inside sticky">
428
- <h2 class="page-nav-title">Jump to Section</h2>
429
- </div>
430
- <!-- .page-nav-inside -->
431
- </nav>
432
- <!-- .page-nav -->
433
- </div>
434
- <!-- .guides-content -->
435
- </div>
436
- <!-- .inner-->
437
- </main><!-- .site-content -->
438
- <footer id="colophon" class="site-footer outer">
439
- <div class="inner">
440
- <div class="site-footer-inside">
441
- <p class="site-info">
442
-
443
- <span class="copyright">&copy; Modern Treasury Inc. All rights reserved.</span>
444
- <a class="" href="https://www.moderntreasury.com" target="_blank" rel="noopener" >
445
-
446
- Maintained with ❤️ in San Francisco, CA by Modern Treasury
447
-
448
- </a>
449
- </p>
450
- <!-- .site-info -->
451
-
452
- <div class="social-links">
453
-
454
- <a class="" href="https://www.netlify.com" target="_blank" rel="noopener" >
455
-
456
- <img src="https://www.netlify.com/img/global/badges/netlify-dark.svg" alt="Deploys by Netlify" />
457
-
458
- </a>
459
- <a class="button button-icon" href="https://twitter.com/ModernTreasury" target="_blank" rel="noopener" >
460
-
461
- <span class="icon fab fa-twitter" aria-hidden="true"></span><span class="screen-reader-text">Twitter</span>
462
-
463
- </a>
464
- <a class="button button-icon" href="https://www.linkedin.com/company/modern-treasury" target="_blank" rel="noopener" >
465
-
466
- <span class="icon fab fa-linkedin" aria-hidden="true"></span><span class="screen-reader-text">LinkedIn</span>
467
-
468
- </a>
469
- <a class="button button-icon" href="https://github.com/LedgerSync/ledger_sync" target="_blank" rel="noopener" >
470
-
471
- <span class="icon fab fa-github" aria-hidden="true"></span><span class="screen-reader-text">GitHub</span>
472
-
473
- </a>
474
- </div>
475
- <!-- .social-links -->
476
-
477
- </div>
478
- <!-- .site-footer-inside -->
479
- </div>
480
- <!-- .inner -->
481
- </footer>
482
- <!-- .site-footer -->
483
- </div><!-- .site -->
484
-
485
- <!-- Scripts -->
486
- <script src="/assets/js/plugins.js"></script>
487
- <script src="/assets/js/prism.js" data-manual></script>
488
- <script src="/assets/js/main.js"></script>
489
- </body>
490
-
491
- </html>