ledger_sync 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +71 -17
- data/docs/.gitignore +4 -0
- data/documentation/build.sh +3 -1
- data/documentation/site/_includes/ledgers/{Stripe_summary.md → stripe_summary.md} +0 -0
- data/ledger_sync.gemspec +4 -0
- data/lib/ledger_sync/serialization/type/deserializer_references_one_type.rb +1 -1
- data/lib/ledger_sync/version.rb +1 -1
- metadata +59 -136
- data/docs/CNAME +0 -1
- data/docs/assets/css/brands.min.css +0 -5
- data/docs/assets/css/fontawesome.min.css +0 -5
- data/docs/assets/css/main.css +0 -1924
- data/docs/assets/css/monokai.css +0 -441
- data/docs/assets/js/main.js +0 -214
- data/docs/assets/js/plugins.js +0 -22
- data/docs/assets/js/prism.js +0 -9
- data/docs/assets/webfonts/fa-brands-400.eot +0 -0
- data/docs/assets/webfonts/fa-brands-400.svg +0 -3452
- data/docs/assets/webfonts/fa-brands-400.ttf +0 -0
- data/docs/assets/webfonts/fa-brands-400.woff +0 -0
- data/docs/assets/webfonts/fa-brands-400.woff2 +0 -0
- data/docs/blog/index.html +0 -282
- data/docs/guides/architecture/clients/index.html +0 -458
- data/docs/guides/architecture/index.html +0 -435
- data/docs/guides/architecture/operations/index.html +0 -465
- data/docs/guides/architecture/resources/index.html +0 -461
- data/docs/guides/architecture/results/index.html +0 -426
- data/docs/guides/architecture/searchers/index.html +0 -446
- data/docs/guides/architecture/serialization/index.html +0 -476
- data/docs/guides/community/index.html +0 -412
- data/docs/guides/contribute/console/index.html +0 -424
- data/docs/guides/contribute/deployment/index.html +0 -434
- data/docs/guides/contribute/documentation/index.html +0 -450
- data/docs/guides/contribute/index.html +0 -434
- data/docs/guides/contribute/qa/index.html +0 -436
- data/docs/guides/contribute/testing/index.html +0 -424
- data/docs/guides/customization/custom_resources/index.html +0 -461
- data/docs/guides/customization/custom_serializers/index.html +0 -460
- data/docs/guides/customization/index.html +0 -431
- data/docs/guides/customization/resource_converters/index.html +0 -491
- data/docs/guides/getting-started/get-help/index.html +0 -427
- data/docs/guides/getting-started/index.html +0 -421
- data/docs/guides/getting-started/installation/index.html +0 -433
- data/docs/guides/getting-started/quick-start/index.html +0 -531
- data/docs/guides/index.html +0 -428
- data/docs/guides/ledgers/index.html +0 -429
- data/docs/guides/ledgers/netsuite/index.html +0 -424
- data/docs/guides/ledgers/netsuite_soap/index.html +0 -424
- data/docs/guides/ledgers/quickbooks_online/index.html +0 -424
- data/docs/guides/ledgers/stripe/index.html +0 -424
- data/docs/guides/modern-treasury/index.html +0 -411
- data/docs/guides/tips_and_more/index.html +0 -471
- data/docs/images/1.jpg +0 -0
- data/docs/images/10.jpg +0 -0
- data/docs/images/2.jpg +0 -0
- data/docs/images/3.jpg +0 -0
- data/docs/images/4.jpg +0 -0
- data/docs/images/5.jpg +0 -0
- data/docs/images/6.jpg +0 -0
- data/docs/images/7.jpg +0 -0
- data/docs/images/8.jpg +0 -0
- data/docs/images/9.jpg +0 -0
- data/docs/images/logo.svg +0 -8
- data/docs/index.html +0 -379
- data/docs/overview/index.html +0 -409
- data/docs/posts/introducing-docs/index.html +0 -270
- data/docs/posts/netsuite-authentication/index.html +0 -624
- data/docs/reference/architecture/clients/index.html +0 -332
- data/docs/reference/architecture/index.html +0 -311
- data/docs/reference/architecture/operations/index.html +0 -302
- data/docs/reference/architecture/resources/index.html +0 -335
- data/docs/reference/architecture/results/index.html +0 -302
- data/docs/reference/architecture/searchers/index.html +0 -302
- data/docs/reference/architecture/serialization/index.html +0 -302
- data/docs/reference/index.html +0 -281
- data/docs/reference/netsuite/authentication/index.html +0 -392
- data/docs/reference/netsuite/authentication/token_based_authentication/index.html +0 -486
- data/docs/reference/netsuite/index.html +0 -388
- data/docs/reference/netsuite/resources/account/index.html +0 -484
- data/docs/reference/netsuite/resources/check/index.html +0 -492
- data/docs/reference/netsuite/resources/check_line_item/index.html +0 -460
- data/docs/reference/netsuite/resources/currency/index.html +0 -476
- data/docs/reference/netsuite/resources/customer/index.html +0 -488
- data/docs/reference/netsuite/resources/customer_deposit/index.html +0 -480
- data/docs/reference/netsuite/resources/department/index.html +0 -484
- data/docs/reference/netsuite/resources/deposit/index.html +0 -468
- data/docs/reference/netsuite/resources/deposit_line_item/index.html +0 -460
- data/docs/reference/netsuite/resources/index.html +0 -436
- data/docs/reference/netsuite/resources/invoice/index.html +0 -468
- data/docs/reference/netsuite/resources/invoice_line_item/index.html +0 -456
- data/docs/reference/netsuite/resources/item/index.html +0 -444
- data/docs/reference/netsuite/resources/journal_entry/index.html +0 -488
- data/docs/reference/netsuite/resources/journal_entry_line_item/index.html +0 -464
- data/docs/reference/netsuite/resources/ledger_class/index.html +0 -484
- data/docs/reference/netsuite/resources/location/index.html +0 -468
- data/docs/reference/netsuite/resources/resource/index.html +0 -440
- data/docs/reference/netsuite/resources/subsidiary/index.html +0 -448
- data/docs/reference/netsuite/resources/vendor/index.html +0 -492
- data/docs/reference/netsuite_soap/index.html +0 -303
- data/docs/reference/netsuite_soap/resources/customer/index.html +0 -364
- data/docs/reference/netsuite_soap/resources/index.html +0 -316
- data/docs/reference/netsuite_soap/resources/resource/index.html +0 -336
- data/docs/reference/netsuite_soap/resources/subsidiary/index.html +0 -356
- data/docs/reference/quickbooks_online/authentication/index.html +0 -442
- data/docs/reference/quickbooks_online/errors/index.html +0 -395
- data/docs/reference/quickbooks_online/index.html +0 -393
- data/docs/reference/quickbooks_online/resources/account/index.html +0 -530
- data/docs/reference/quickbooks_online/resources/bill/index.html +0 -534
- data/docs/reference/quickbooks_online/resources/bill_line_item/index.html +0 -496
- data/docs/reference/quickbooks_online/resources/bill_payment/index.html +0 -550
- data/docs/reference/quickbooks_online/resources/bill_payment_line_item/index.html +0 -488
- data/docs/reference/quickbooks_online/resources/currency/index.html +0 -492
- data/docs/reference/quickbooks_online/resources/customer/index.html +0 -514
- data/docs/reference/quickbooks_online/resources/department/index.html +0 -518
- data/docs/reference/quickbooks_online/resources/deposit/index.html +0 -526
- data/docs/reference/quickbooks_online/resources/deposit_line_item/index.html +0 -500
- data/docs/reference/quickbooks_online/resources/expense/index.html +0 -538
- data/docs/reference/quickbooks_online/resources/expense_line_item/index.html +0 -496
- data/docs/reference/quickbooks_online/resources/index.html +0 -484
- data/docs/reference/quickbooks_online/resources/invoice/index.html +0 -526
- data/docs/reference/quickbooks_online/resources/invoice_sales_line_item/index.html +0 -496
- data/docs/reference/quickbooks_online/resources/item/index.html +0 -484
- data/docs/reference/quickbooks_online/resources/journal_entry/index.html +0 -518
- data/docs/reference/quickbooks_online/resources/journal_entry_line_item/index.html +0 -504
- data/docs/reference/quickbooks_online/resources/ledger_class/index.html +0 -518
- data/docs/reference/quickbooks_online/resources/payment/index.html +0 -538
- data/docs/reference/quickbooks_online/resources/payment_line_item/index.html +0 -488
- data/docs/reference/quickbooks_online/resources/preferences/index.html +0 -526
- data/docs/reference/quickbooks_online/resources/primary_email_addr/index.html +0 -484
- data/docs/reference/quickbooks_online/resources/primary_phone/index.html +0 -484
- data/docs/reference/quickbooks_online/resources/resource/index.html +0 -480
- data/docs/reference/quickbooks_online/resources/subsidiary/index.html +0 -488
- data/docs/reference/quickbooks_online/resources/transfer/index.html +0 -522
- data/docs/reference/quickbooks_online/resources/vendor/index.html +0 -526
- data/docs/reference/quickbooks_online/webhooks/index.html +0 -427
- data/docs/reference/stripe/index.html +0 -293
- data/docs/reference/stripe/resources/customer/index.html +0 -366
- data/docs/reference/stripe/resources/index.html +0 -309
- data/docs/reference/stripe/resources/resource/index.html +0 -330
- data/docs/style-guide/index.html +0 -375
- data/documentation/site/Gemfile +0 -11
- data/documentation/site/Gemfile.lock +0 -69
@@ -1,433 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html lang="en">
|
3
|
-
|
4
|
-
<head>
|
5
|
-
|
6
|
-
<title>LedgerSync - Installation - 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 active">
|
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 current">
|
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">
|
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">Installation</h1>
|
329
|
-
</header>
|
330
|
-
<!-- .post-header -->
|
331
|
-
<div class="post-content">
|
332
|
-
<p>Add this line to your application’s Gemfile:</p>
|
333
|
-
|
334
|
-
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">gem</span> <span class="s1">'ledger_sync'</span>
|
335
|
-
</code></pre></div></div>
|
336
|
-
|
337
|
-
<p>And then execute:</p>
|
338
|
-
|
339
|
-
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bundle
|
340
|
-
</code></pre></div></div>
|
341
|
-
|
342
|
-
<p>Or install it yourself as:</p>
|
343
|
-
|
344
|
-
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>gem <span class="nb">install </span>ledger_sync
|
345
|
-
</code></pre></div></div>
|
346
|
-
|
347
|
-
<hr />
|
348
|
-
|
349
|
-
<div>Related articles:</div><br />
|
350
|
-
|
351
|
-
<ul class="guides-section-items">
|
352
|
-
|
353
|
-
<li class="guides-section-item"><a href="/guides/getting-started/installation/" class="guides-item-link">Installation<span class="icon-angle-right" aria-hidden="true"></span></a></li>
|
354
|
-
|
355
|
-
<li class="guides-section-item"><a href="/guides/getting-started/quick-start/" class="guides-item-link">Quick Start<span class="icon-angle-right" aria-hidden="true"></span></a></li>
|
356
|
-
|
357
|
-
<li class="guides-section-item"><a href="/guides/getting-started/get-help/" class="guides-item-link">Get Help<span class="icon-angle-right" aria-hidden="true"></span></a></li>
|
358
|
-
|
359
|
-
</ul>
|
360
|
-
<!-- .guides-section-pages -->
|
361
|
-
|
362
|
-
</div>
|
363
|
-
<!-- .post-content -->
|
364
|
-
</div>
|
365
|
-
<!-- .post-inside -->
|
366
|
-
</article>
|
367
|
-
<!-- .post -->
|
368
|
-
<nav id="page-nav" class="page-nav">
|
369
|
-
<div id="page-nav-inside" class="page-nav-inside sticky">
|
370
|
-
<h2 class="page-nav-title">Jump to Section</h2>
|
371
|
-
</div>
|
372
|
-
<!-- .page-nav-inside -->
|
373
|
-
</nav>
|
374
|
-
<!-- .page-nav -->
|
375
|
-
</div>
|
376
|
-
<!-- .guides-content -->
|
377
|
-
</div>
|
378
|
-
<!-- .inner-->
|
379
|
-
</main><!-- .site-content -->
|
380
|
-
<footer id="colophon" class="site-footer outer">
|
381
|
-
<div class="inner">
|
382
|
-
<div class="site-footer-inside">
|
383
|
-
<p class="site-info">
|
384
|
-
|
385
|
-
<span class="copyright">© Modern Treasury Inc. All rights reserved.</span>
|
386
|
-
<a class="" href="https://www.moderntreasury.com" target="_blank" rel="noopener" >
|
387
|
-
|
388
|
-
Maintained with ❤️ in San Francisco, CA by Modern Treasury
|
389
|
-
|
390
|
-
</a>
|
391
|
-
</p>
|
392
|
-
<!-- .site-info -->
|
393
|
-
|
394
|
-
<div class="social-links">
|
395
|
-
|
396
|
-
<a class="" href="https://www.netlify.com" target="_blank" rel="noopener" >
|
397
|
-
|
398
|
-
<img src="https://www.netlify.com/img/global/badges/netlify-dark.svg" alt="Deploys by Netlify" />
|
399
|
-
|
400
|
-
</a>
|
401
|
-
<a class="button button-icon" href="https://twitter.com/ModernTreasury" target="_blank" rel="noopener" >
|
402
|
-
|
403
|
-
<span class="icon fab fa-twitter" aria-hidden="true"></span><span class="screen-reader-text">Twitter</span>
|
404
|
-
|
405
|
-
</a>
|
406
|
-
<a class="button button-icon" href="https://www.linkedin.com/company/modern-treasury" target="_blank" rel="noopener" >
|
407
|
-
|
408
|
-
<span class="icon fab fa-linkedin" aria-hidden="true"></span><span class="screen-reader-text">LinkedIn</span>
|
409
|
-
|
410
|
-
</a>
|
411
|
-
<a class="button button-icon" href="https://github.com/LedgerSync/ledger_sync" target="_blank" rel="noopener" >
|
412
|
-
|
413
|
-
<span class="icon fab fa-github" aria-hidden="true"></span><span class="screen-reader-text">GitHub</span>
|
414
|
-
|
415
|
-
</a>
|
416
|
-
</div>
|
417
|
-
<!-- .social-links -->
|
418
|
-
|
419
|
-
</div>
|
420
|
-
<!-- .site-footer-inside -->
|
421
|
-
</div>
|
422
|
-
<!-- .inner -->
|
423
|
-
</footer>
|
424
|
-
<!-- .site-footer -->
|
425
|
-
</div><!-- .site -->
|
426
|
-
|
427
|
-
<!-- Scripts -->
|
428
|
-
<script src="/assets/js/plugins.js"></script>
|
429
|
-
<script src="/assets/js/prism.js" data-manual></script>
|
430
|
-
<script src="/assets/js/main.js"></script>
|
431
|
-
</body>
|
432
|
-
|
433
|
-
</html>
|
@@ -1,531 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html lang="en">
|
3
|
-
|
4
|
-
<head>
|
5
|
-
|
6
|
-
<title>LedgerSync - Quick Start - 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 active">
|
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 current">
|
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">
|
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">Quick Start</h1>
|
329
|
-
</header>
|
330
|
-
<!-- .post-header -->
|
331
|
-
<div class="post-content">
|
332
|
-
<h2 id="overview">Overview</h2>
|
333
|
-
|
334
|
-
<p>To use LedgerSync, you must carry out an <code class="highlighter-rouge">Operation</code>. The operation will be ledger-specific and will require the
|
335
|
-
following:</p>
|
336
|
-
|
337
|
-
<ol>
|
338
|
-
<li>Client</li>
|
339
|
-
<li>Resource(s)</li>
|
340
|
-
</ol>
|
341
|
-
|
342
|
-
<h2 id="1-create-a-client">1. Create a client</h2>
|
343
|
-
|
344
|
-
<p>Clients are responsible for the authentication and requests for a specific ledger. In this example, we will assume you
|
345
|
-
are using the QuickBooks Online ledger.</p>
|
346
|
-
|
347
|
-
<div class="note"><strong>Note:</strong> Each ledger has different requirements for authentication. Please visit the
|
348
|
-
ledger-specific pages to learn more.</div>
|
349
|
-
|
350
|
-
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">client</span> <span class="o">=</span> <span class="no">LedgerSync</span><span class="o">::</span><span class="no">Ledgers</span><span class="o">::</span><span class="no">QuickBooksOnline</span><span class="o">::</span><span class="no">Client</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span>
|
351
|
-
<span class="ss">access_token: </span><span class="n">access_token</span><span class="p">,</span> <span class="c1"># assuming this is defined</span>
|
352
|
-
<span class="ss">client_id: </span><span class="no">ENV</span><span class="p">[</span><span class="s1">'QUICKBOOKS_ONLINE_CLIENT_ID'</span><span class="p">],</span>
|
353
|
-
<span class="ss">client_secret: </span><span class="no">ENV</span><span class="p">[</span><span class="s1">'QUICKBOOKS_ONLINE_CLIENT_SECRET'</span><span class="p">],</span>
|
354
|
-
<span class="ss">realm_id: </span><span class="no">ENV</span><span class="p">[</span><span class="s1">'QUICKBOOKS_ONLINE_REALM_ID'</span><span class="p">],</span>
|
355
|
-
<span class="ss">refresh_token: </span><span class="n">refresh_token</span> <span class="c1"># assuming this is defined</span>
|
356
|
-
<span class="p">)</span>
|
357
|
-
</code></pre></div></div>
|
358
|
-
|
359
|
-
<h2 id="2-create-resources">2. Create resource(s)</h2>
|
360
|
-
|
361
|
-
<p>Create a resource on which to operate. Some resources have references to other resources. You can use
|
362
|
-
<code class="highlighter-rouge">Util::ResourcesBuilder</code> to create resources and relationships from a structured hash.</p>
|
363
|
-
|
364
|
-
<div class="note"><strong>Note:</strong> Resources are ledger-specific, meaning they may have different attributes and
|
365
|
-
references compared to other ledgers. Please visit [the Reference](/reference) to learn about resource
|
366
|
-
attributes.</div>
|
367
|
-
|
368
|
-
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">resource</span> <span class="o">=</span> <span class="no">LedgerSync</span><span class="o">::</span><span class="no">Ledgers</span><span class="o">::</span><span class="no">QuickBooksOnline</span><span class="o">::</span><span class="no">Customer</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span>
|
369
|
-
<span class="no">DisplayName</span><span class="p">:</span> <span class="s1">'Sample Customer'</span><span class="p">,</span>
|
370
|
-
<span class="ss">external_id: </span><span class="n">customer_external_id</span> <span class="c1"># A unique ID from your platform</span>
|
371
|
-
<span class="p">)</span>
|
372
|
-
</code></pre></div></div>
|
373
|
-
|
374
|
-
<h2 id="3-create-an-operation">3. Create an operation</h2>
|
375
|
-
|
376
|
-
<p>Given our <code class="highlighter-rouge">client</code> and <code class="highlighter-rouge">resource</code> from above, we can now create an <code class="highlighter-rouge">Operation</code>. Operations are typically CRUD-like
|
377
|
-
methods, typically (though not always) only making a single request.</p>
|
378
|
-
|
379
|
-
<p>Operations automatically determine a <code class="highlighter-rouge">Serializer</code> and <code class="highlighter-rouge">Deserializer</code>. These serializers are used to translate to and
|
380
|
-
the from the ruby <code class="highlighter-rouge">Resource</code> in the format required by the ledger.</p>
|
381
|
-
|
382
|
-
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">operation</span> <span class="o">=</span> <span class="no">LedgerSync</span><span class="o">::</span><span class="no">Ledgers</span><span class="o">::</span><span class="no">QuickBooksOnline</span><span class="o">::</span><span class="no">Customer</span><span class="o">::</span><span class="no">Operations</span><span class="o">::</span><span class="no">Create</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span>
|
383
|
-
<span class="ss">client: </span><span class="n">client</span><span class="p">,</span>
|
384
|
-
<span class="ss">resource: </span><span class="n">resource</span>
|
385
|
-
<span class="p">)</span>
|
386
|
-
</code></pre></div></div>
|
387
|
-
|
388
|
-
<h2 id="4-perform-the-operation">4. Perform the operation</h2>
|
389
|
-
|
390
|
-
<p>The next step is to perform the operation. You can do this by simply calling <code class="highlighter-rouge">perform</code>.</p>
|
391
|
-
|
392
|
-
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">result</span> <span class="o">=</span> <span class="n">operation</span><span class="p">.</span><span class="nf">perform</span> <span class="c1"># Returns a LedgerSync::OperationResult</span>
|
393
|
-
</code></pre></div></div>
|
394
|
-
|
395
|
-
<p>This method will return a
|
396
|
-
<code class="highlighter-rouge">LedgerSync::OperationResult</code> which is a special object allowing you to determine the success of the operation, access
|
397
|
-
responses values (serialized and deserialized), and investigate failures.</p>
|
398
|
-
|
399
|
-
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">if</span> <span class="n">result</span><span class="p">.</span><span class="nf">success?</span>
|
400
|
-
<span class="n">resource</span> <span class="o">=</span> <span class="n">result</span><span class="p">.</span><span class="nf">operation</span><span class="p">.</span><span class="nf">resource</span>
|
401
|
-
<span class="c1"># Do something with resource</span>
|
402
|
-
<span class="k">else</span> <span class="c1"># result.failure?</span>
|
403
|
-
<span class="k">raise</span> <span class="n">result</span><span class="p">.</span><span class="nf">error</span>
|
404
|
-
<span class="k">end</span>
|
405
|
-
</code></pre></div></div>
|
406
|
-
|
407
|
-
<h2 id="5-save-updates-to-authentication">5. Save updates to authentication</h2>
|
408
|
-
|
409
|
-
<p>Because QuickBooks Online uses Oauth 2, you must always be sure to save the access_token, refresh_token, and expirations
|
410
|
-
as they can change with any API call. Operations will always save values back to the client.</p>
|
411
|
-
|
412
|
-
<h3 id="automatically-update-values-in-env">Automatically update values in .env</h3>
|
413
|
-
|
414
|
-
<p>If you have a <code class="highlighter-rouge">.env</code> file present in the root directory of your project, the client will automatically comment out old values and update new
|
415
|
-
values.</p>
|
416
|
-
|
417
|
-
<p>If you want to disable this functionality, you can do so by setting <code class="highlighter-rouge">update_dotenv</code> to <code class="highlighter-rouge">false</code> when instantiating the
|
418
|
-
object:</p>
|
419
|
-
|
420
|
-
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">client</span> <span class="o">=</span> <span class="no">LedgerSync</span><span class="o">::</span><span class="no">Ledgers</span><span class="o">::</span><span class="no">QuickBooksOnline</span><span class="o">::</span><span class="no">Client</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span>
|
421
|
-
<span class="ss">access_token: </span><span class="n">access_token</span><span class="p">,</span> <span class="c1"># assuming this is defined</span>
|
422
|
-
<span class="ss">client_id: </span><span class="no">ENV</span><span class="p">[</span><span class="s1">'QUICKBOOKS_ONLINE_CLIENT_ID'</span><span class="p">],</span>
|
423
|
-
<span class="ss">client_secret: </span><span class="no">ENV</span><span class="p">[</span><span class="s1">'QUICKBOOKS_ONLINE_CLIENT_SECRET'</span><span class="p">],</span>
|
424
|
-
<span class="ss">realm_id: </span><span class="no">ENV</span><span class="p">[</span><span class="s1">'QUICKBOOKS_ONLINE_REALM_ID'</span><span class="p">],</span>
|
425
|
-
<span class="ss">refresh_token: </span><span class="n">refresh_token</span><span class="p">,</span> <span class="c1"># assuming this is defined</span>
|
426
|
-
<span class="ss">update_dotenv: </span><span class="kp">false</span>
|
427
|
-
<span class="p">)</span>
|
428
|
-
</code></pre></div></div>
|
429
|
-
|
430
|
-
<h3 id="manually-save-values">Manually save values</h3>
|
431
|
-
|
432
|
-
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">result</span><span class="p">.</span><span class="nf">operation</span><span class="p">.</span><span class="nf">client</span><span class="p">.</span><span class="nf">ledger_attributes_to_save</span><span class="p">.</span><span class="nf">each</span> <span class="k">do</span> <span class="o">|</span><span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="o">|</span>
|
433
|
-
<span class="c1"># save values</span>
|
434
|
-
<span class="k">end</span>
|
435
|
-
</code></pre></div></div>
|
436
|
-
|
437
|
-
<h2 id="summary">Summary</h2>
|
438
|
-
|
439
|
-
<p>That’s it! Assuming proper authentication values and valid values on the resource, this will result in a new customer
|
440
|
-
being created in QuickBooks Online.</p>
|
441
|
-
|
442
|
-
<p>There are many other resources and operations that can be performed in QuickBooks Online. For a complete guide of these
|
443
|
-
and other ledgers, visit <a href="/reference">the Reference</a>.</p>
|
444
|
-
|
445
|
-
<hr />
|
446
|
-
|
447
|
-
<div>Related articles:</div><br />
|
448
|
-
|
449
|
-
<ul class="guides-section-items">
|
450
|
-
|
451
|
-
<li class="guides-section-item"><a href="/guides/getting-started/installation/" class="guides-item-link">Installation<span class="icon-angle-right" aria-hidden="true"></span></a></li>
|
452
|
-
|
453
|
-
<li class="guides-section-item"><a href="/guides/getting-started/quick-start/" class="guides-item-link">Quick Start<span class="icon-angle-right" aria-hidden="true"></span></a></li>
|
454
|
-
|
455
|
-
<li class="guides-section-item"><a href="/guides/getting-started/get-help/" class="guides-item-link">Get Help<span class="icon-angle-right" aria-hidden="true"></span></a></li>
|
456
|
-
|
457
|
-
</ul>
|
458
|
-
<!-- .guides-section-pages -->
|
459
|
-
|
460
|
-
</div>
|
461
|
-
<!-- .post-content -->
|
462
|
-
</div>
|
463
|
-
<!-- .post-inside -->
|
464
|
-
</article>
|
465
|
-
<!-- .post -->
|
466
|
-
<nav id="page-nav" class="page-nav">
|
467
|
-
<div id="page-nav-inside" class="page-nav-inside sticky">
|
468
|
-
<h2 class="page-nav-title">Jump to Section</h2>
|
469
|
-
</div>
|
470
|
-
<!-- .page-nav-inside -->
|
471
|
-
</nav>
|
472
|
-
<!-- .page-nav -->
|
473
|
-
</div>
|
474
|
-
<!-- .guides-content -->
|
475
|
-
</div>
|
476
|
-
<!-- .inner-->
|
477
|
-
</main><!-- .site-content -->
|
478
|
-
<footer id="colophon" class="site-footer outer">
|
479
|
-
<div class="inner">
|
480
|
-
<div class="site-footer-inside">
|
481
|
-
<p class="site-info">
|
482
|
-
|
483
|
-
<span class="copyright">© Modern Treasury Inc. All rights reserved.</span>
|
484
|
-
<a class="" href="https://www.moderntreasury.com" target="_blank" rel="noopener" >
|
485
|
-
|
486
|
-
Maintained with ❤️ in San Francisco, CA by Modern Treasury
|
487
|
-
|
488
|
-
</a>
|
489
|
-
</p>
|
490
|
-
<!-- .site-info -->
|
491
|
-
|
492
|
-
<div class="social-links">
|
493
|
-
|
494
|
-
<a class="" href="https://www.netlify.com" target="_blank" rel="noopener" >
|
495
|
-
|
496
|
-
<img src="https://www.netlify.com/img/global/badges/netlify-dark.svg" alt="Deploys by Netlify" />
|
497
|
-
|
498
|
-
</a>
|
499
|
-
<a class="button button-icon" href="https://twitter.com/ModernTreasury" target="_blank" rel="noopener" >
|
500
|
-
|
501
|
-
<span class="icon fab fa-twitter" aria-hidden="true"></span><span class="screen-reader-text">Twitter</span>
|
502
|
-
|
503
|
-
</a>
|
504
|
-
<a class="button button-icon" href="https://www.linkedin.com/company/modern-treasury" target="_blank" rel="noopener" >
|
505
|
-
|
506
|
-
<span class="icon fab fa-linkedin" aria-hidden="true"></span><span class="screen-reader-text">LinkedIn</span>
|
507
|
-
|
508
|
-
</a>
|
509
|
-
<a class="button button-icon" href="https://github.com/LedgerSync/ledger_sync" target="_blank" rel="noopener" >
|
510
|
-
|
511
|
-
<span class="icon fab fa-github" aria-hidden="true"></span><span class="screen-reader-text">GitHub</span>
|
512
|
-
|
513
|
-
</a>
|
514
|
-
</div>
|
515
|
-
<!-- .social-links -->
|
516
|
-
|
517
|
-
</div>
|
518
|
-
<!-- .site-footer-inside -->
|
519
|
-
</div>
|
520
|
-
<!-- .inner -->
|
521
|
-
</footer>
|
522
|
-
<!-- .site-footer -->
|
523
|
-
</div><!-- .site -->
|
524
|
-
|
525
|
-
<!-- Scripts -->
|
526
|
-
<script src="/assets/js/plugins.js"></script>
|
527
|
-
<script src="/assets/js/prism.js" data-manual></script>
|
528
|
-
<script src="/assets/js/main.js"></script>
|
529
|
-
</body>
|
530
|
-
|
531
|
-
</html>
|