ledger_sync 1.3.2 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (988) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +13 -2
  3. data/.rubocop.yml +14 -1
  4. data/.rubocop_todo.yml +0 -3
  5. data/.travis.yml +7 -2
  6. data/Dockerfile +2 -2
  7. data/Gemfile.lock +61 -55
  8. data/LICENSE.txt +5 -21
  9. data/README.md +9 -393
  10. data/bin/quickbooks_online_oauth_server.rb +102 -0
  11. data/docs/CNAME +1 -0
  12. data/docs/assets/css/brands.min.css +5 -0
  13. data/docs/assets/css/fontawesome.min.css +5 -0
  14. data/docs/assets/css/main.css +1924 -0
  15. data/docs/assets/css/monokai.css +441 -0
  16. data/docs/assets/js/main.js +214 -0
  17. data/docs/assets/js/plugins.js +22 -0
  18. data/docs/assets/js/prism.js +9 -0
  19. data/docs/assets/webfonts/fa-brands-400.eot +0 -0
  20. data/docs/assets/webfonts/fa-brands-400.svg +3452 -0
  21. data/docs/assets/webfonts/fa-brands-400.ttf +0 -0
  22. data/docs/assets/webfonts/fa-brands-400.woff +0 -0
  23. data/docs/assets/webfonts/fa-brands-400.woff2 +0 -0
  24. data/docs/blog/index.html +282 -0
  25. data/docs/guides/architecture/clients/index.html +458 -0
  26. data/docs/guides/architecture/index.html +435 -0
  27. data/docs/guides/architecture/operations/index.html +465 -0
  28. data/docs/guides/architecture/resources/index.html +461 -0
  29. data/docs/guides/architecture/results/index.html +426 -0
  30. data/docs/guides/architecture/searchers/index.html +446 -0
  31. data/docs/guides/architecture/serialization/index.html +476 -0
  32. data/docs/guides/community/index.html +412 -0
  33. data/docs/guides/contribute/console/index.html +424 -0
  34. data/docs/guides/contribute/deployment/index.html +434 -0
  35. data/docs/guides/contribute/documentation/index.html +450 -0
  36. data/docs/guides/contribute/index.html +434 -0
  37. data/docs/guides/contribute/qa/index.html +436 -0
  38. data/docs/guides/contribute/testing/index.html +424 -0
  39. data/docs/guides/customization/custom_resources/index.html +461 -0
  40. data/docs/guides/customization/custom_serializers/index.html +460 -0
  41. data/docs/guides/customization/index.html +431 -0
  42. data/docs/guides/customization/resource_converters/index.html +491 -0
  43. data/docs/guides/getting-started/get-help/index.html +427 -0
  44. data/docs/guides/getting-started/index.html +421 -0
  45. data/docs/guides/getting-started/installation/index.html +433 -0
  46. data/docs/guides/getting-started/quick-start/index.html +531 -0
  47. data/docs/guides/index.html +428 -0
  48. data/docs/guides/ledgers/index.html +429 -0
  49. data/docs/guides/ledgers/netsuite/index.html +424 -0
  50. data/docs/guides/ledgers/netsuite_soap/index.html +424 -0
  51. data/docs/guides/ledgers/quickbooks_online/index.html +424 -0
  52. data/docs/guides/ledgers/stripe/index.html +424 -0
  53. data/docs/guides/modern-treasury/index.html +411 -0
  54. data/docs/guides/tips_and_more/index.html +471 -0
  55. data/docs/images/1.jpg +0 -0
  56. data/docs/images/10.jpg +0 -0
  57. data/docs/images/2.jpg +0 -0
  58. data/docs/images/3.jpg +0 -0
  59. data/docs/images/4.jpg +0 -0
  60. data/docs/images/5.jpg +0 -0
  61. data/docs/images/6.jpg +0 -0
  62. data/docs/images/7.jpg +0 -0
  63. data/docs/images/8.jpg +0 -0
  64. data/docs/images/9.jpg +0 -0
  65. data/docs/images/logo.svg +8 -0
  66. data/docs/index.html +379 -0
  67. data/docs/overview/index.html +409 -0
  68. data/docs/posts/introducing-docs/index.html +270 -0
  69. data/docs/posts/netsuite-authentication/index.html +624 -0
  70. data/docs/reference/architecture/clients/index.html +332 -0
  71. data/docs/reference/architecture/index.html +311 -0
  72. data/docs/reference/architecture/operations/index.html +302 -0
  73. data/docs/reference/architecture/resources/index.html +335 -0
  74. data/docs/reference/architecture/results/index.html +302 -0
  75. data/docs/reference/architecture/searchers/index.html +302 -0
  76. data/docs/reference/architecture/serialization/index.html +302 -0
  77. data/docs/reference/index.html +281 -0
  78. data/docs/reference/netsuite/authentication/index.html +392 -0
  79. data/docs/reference/netsuite/authentication/token_based_authentication/index.html +486 -0
  80. data/docs/reference/netsuite/index.html +388 -0
  81. data/docs/reference/netsuite/resources/account/index.html +484 -0
  82. data/docs/reference/netsuite/resources/check/index.html +492 -0
  83. data/docs/reference/netsuite/resources/check_line_item/index.html +460 -0
  84. data/docs/reference/netsuite/resources/currency/index.html +476 -0
  85. data/docs/reference/netsuite/resources/customer/index.html +488 -0
  86. data/docs/reference/netsuite/resources/customer_deposit/index.html +480 -0
  87. data/docs/reference/netsuite/resources/department/index.html +484 -0
  88. data/docs/reference/netsuite/resources/deposit/index.html +468 -0
  89. data/docs/reference/netsuite/resources/deposit_line_item/index.html +460 -0
  90. data/docs/reference/netsuite/resources/index.html +436 -0
  91. data/docs/reference/netsuite/resources/invoice/index.html +468 -0
  92. data/docs/reference/netsuite/resources/invoice_line_item/index.html +456 -0
  93. data/docs/reference/netsuite/resources/item/index.html +444 -0
  94. data/docs/reference/netsuite/resources/journal_entry/index.html +488 -0
  95. data/docs/reference/netsuite/resources/journal_entry_line_item/index.html +464 -0
  96. data/docs/reference/netsuite/resources/ledger_class/index.html +484 -0
  97. data/docs/reference/netsuite/resources/location/index.html +468 -0
  98. data/docs/reference/netsuite/resources/resource/index.html +440 -0
  99. data/docs/reference/netsuite/resources/subsidiary/index.html +448 -0
  100. data/docs/reference/netsuite/resources/vendor/index.html +492 -0
  101. data/docs/reference/netsuite_soap/index.html +303 -0
  102. data/docs/reference/netsuite_soap/resources/customer/index.html +364 -0
  103. data/docs/reference/netsuite_soap/resources/index.html +316 -0
  104. data/docs/reference/netsuite_soap/resources/resource/index.html +336 -0
  105. data/docs/reference/netsuite_soap/resources/subsidiary/index.html +356 -0
  106. data/docs/reference/quickbooks_online/authentication/index.html +442 -0
  107. data/docs/reference/quickbooks_online/errors/index.html +395 -0
  108. data/docs/reference/quickbooks_online/index.html +393 -0
  109. data/docs/reference/quickbooks_online/resources/account/index.html +530 -0
  110. data/docs/reference/quickbooks_online/resources/bill/index.html +534 -0
  111. data/docs/reference/quickbooks_online/resources/bill_line_item/index.html +496 -0
  112. data/docs/reference/quickbooks_online/resources/bill_payment/index.html +550 -0
  113. data/docs/reference/quickbooks_online/resources/bill_payment_line_item/index.html +488 -0
  114. data/docs/reference/quickbooks_online/resources/currency/index.html +492 -0
  115. data/docs/reference/quickbooks_online/resources/customer/index.html +514 -0
  116. data/docs/reference/quickbooks_online/resources/department/index.html +518 -0
  117. data/docs/reference/quickbooks_online/resources/deposit/index.html +526 -0
  118. data/docs/reference/quickbooks_online/resources/deposit_line_item/index.html +500 -0
  119. data/docs/reference/quickbooks_online/resources/expense/index.html +538 -0
  120. data/docs/reference/quickbooks_online/resources/expense_line_item/index.html +496 -0
  121. data/docs/reference/quickbooks_online/resources/index.html +484 -0
  122. data/docs/reference/quickbooks_online/resources/invoice/index.html +526 -0
  123. data/docs/reference/quickbooks_online/resources/invoice_sales_line_item/index.html +496 -0
  124. data/docs/reference/quickbooks_online/resources/item/index.html +484 -0
  125. data/docs/reference/quickbooks_online/resources/journal_entry/index.html +518 -0
  126. data/docs/reference/quickbooks_online/resources/journal_entry_line_item/index.html +504 -0
  127. data/docs/reference/quickbooks_online/resources/ledger_class/index.html +518 -0
  128. data/docs/reference/quickbooks_online/resources/payment/index.html +538 -0
  129. data/docs/reference/quickbooks_online/resources/payment_line_item/index.html +488 -0
  130. data/docs/reference/quickbooks_online/resources/preferences/index.html +526 -0
  131. data/docs/reference/quickbooks_online/resources/primary_email_addr/index.html +484 -0
  132. data/docs/reference/quickbooks_online/resources/primary_phone/index.html +484 -0
  133. data/docs/reference/quickbooks_online/resources/resource/index.html +480 -0
  134. data/docs/reference/quickbooks_online/resources/subsidiary/index.html +488 -0
  135. data/docs/reference/quickbooks_online/resources/transfer/index.html +522 -0
  136. data/docs/reference/quickbooks_online/resources/vendor/index.html +526 -0
  137. data/docs/reference/quickbooks_online/webhooks/index.html +427 -0
  138. data/docs/reference/stripe/index.html +293 -0
  139. data/docs/reference/stripe/resources/customer/index.html +366 -0
  140. data/docs/reference/stripe/resources/index.html +309 -0
  141. data/docs/reference/stripe/resources/resource/index.html +330 -0
  142. data/docs/style-guide/index.html +375 -0
  143. data/documentation/build.sh +8 -0
  144. data/documentation/generate.rb +32 -0
  145. data/documentation/generators/generator.rb +80 -0
  146. data/documentation/generators/guides/generator.rb +36 -0
  147. data/documentation/generators/reference/generator.rb +76 -0
  148. data/documentation/generators/reference/ledger/generator.rb +74 -0
  149. data/documentation/generators/template.rb +22 -0
  150. data/documentation/helper_methods.rb +17 -0
  151. data/documentation/site/CNAME +1 -0
  152. data/documentation/site/Gemfile +11 -0
  153. data/documentation/site/Gemfile.lock +69 -0
  154. data/documentation/site/LICENSE.md +40 -0
  155. data/documentation/site/README.md +8 -0
  156. data/documentation/site/_config.yml +119 -0
  157. data/documentation/site/_data/guides_sections.yml +10 -0
  158. data/documentation/site/_data/reference_sections.yml +5 -0
  159. data/documentation/site/_includes/action_link.html +11 -0
  160. data/documentation/site/_includes/alerts/base.html +3 -0
  161. data/documentation/site/_includes/alerts/danger.html +1 -0
  162. data/documentation/site/_includes/alerts/info.html +1 -0
  163. data/documentation/site/_includes/alerts/success.html +1 -0
  164. data/documentation/site/_includes/alerts/warning.html +1 -0
  165. data/documentation/site/_includes/cta_buttons.html +4 -0
  166. data/documentation/site/_includes/example.md +8 -0
  167. data/documentation/site/_includes/footer.html +20 -0
  168. data/documentation/site/_includes/getting_help.md +8 -0
  169. data/documentation/site/_includes/guides_menu.html +29 -0
  170. data/documentation/site/_includes/guides_submenu.html +7 -0
  171. data/documentation/site/_includes/header.html +35 -0
  172. data/documentation/site/_includes/installation_instructions.md +17 -0
  173. data/documentation/site/_includes/ledgers/Stripe_summary.md +1 -0
  174. data/documentation/site/_includes/ledgers/netsuite_soap_summary.md +1 -0
  175. data/documentation/site/_includes/ledgers/netsuite_summary.md +1 -0
  176. data/documentation/site/_includes/ledgers/netsuite_summary_shared.md +1 -0
  177. data/documentation/site/_includes/ledgers/quickbooks_online_summary.md +1 -0
  178. data/documentation/site/_includes/reference/netsuite/authentication/_token_based_authentication.md +99 -0
  179. data/documentation/site/_includes/reference/netsuite/authentication/index.md +15 -0
  180. data/documentation/site/_includes/reference/netsuite/authentication/token_based_authentication.md +6 -0
  181. data/documentation/site/_includes/reference/netsuite/index.md +25 -0
  182. data/documentation/site/_includes/reference/netsuite_soap/index.md +11 -0
  183. data/documentation/site/_includes/reference/quickbooks_online/authentication/index.md +55 -0
  184. data/documentation/site/_includes/reference/quickbooks_online/errors/index.md +9 -0
  185. data/documentation/site/_includes/reference/quickbooks_online/index.md +6 -0
  186. data/documentation/site/_includes/reference/quickbooks_online/webhooks/index.md +42 -0
  187. data/documentation/site/_includes/reference/stripe/index.md +6 -0
  188. data/documentation/site/_includes/section_content.html +34 -0
  189. data/documentation/site/_includes/section_cta.html +28 -0
  190. data/documentation/site/_includes/section_grid.html +60 -0
  191. data/documentation/site/_includes/section_guides.html +35 -0
  192. data/documentation/site/_includes/section_hero.html +28 -0
  193. data/documentation/site/_includes/submenu.html +8 -0
  194. data/documentation/site/_layouts/advanced.html +9 -0
  195. data/documentation/site/_layouts/base.html +34 -0
  196. data/documentation/site/_layouts/blog.html +51 -0
  197. data/documentation/site/_layouts/body.html +11 -0
  198. data/documentation/site/_layouts/guides.html +46 -0
  199. data/documentation/site/_layouts/page.html +26 -0
  200. data/documentation/site/_layouts/post.html +52 -0
  201. data/documentation/site/_layouts/reference.html +46 -0
  202. data/documentation/site/_layouts/reference_netsuite.html +46 -0
  203. data/documentation/site/_layouts/reference_netsuite_soap.html +46 -0
  204. data/documentation/site/_layouts/reference_quickbooks_online.html +46 -0
  205. data/documentation/site/_layouts/reference_stripe.html +46 -0
  206. data/documentation/site/_plugins/filters.rb +122 -0
  207. data/documentation/site/_plugins/hooks.rb +9 -0
  208. data/documentation/site/_posts/2020-06-01-introducing-docs.md +17 -0
  209. data/documentation/site/_posts/2020-06-10-netsuite-authentication.md +382 -0
  210. data/documentation/site/_sass/imports/_animations.scss +19 -0
  211. data/documentation/site/_sass/imports/_footer.scss +94 -0
  212. data/documentation/site/_sass/imports/_functions.scss +69 -0
  213. data/documentation/site/_sass/imports/_general.scss +687 -0
  214. data/documentation/site/_sass/imports/_guides.scss +300 -0
  215. data/documentation/site/_sass/imports/_header.scss +358 -0
  216. data/documentation/site/_sass/imports/_icons.scss +90 -0
  217. data/documentation/site/_sass/imports/_post-navigation.scss +67 -0
  218. data/documentation/site/_sass/imports/_posts-pages.scss +165 -0
  219. data/documentation/site/_sass/imports/_prism.scss +174 -0
  220. data/documentation/site/_sass/imports/_reset.scss +210 -0
  221. data/documentation/site/_sass/imports/_sections.scss +370 -0
  222. data/documentation/site/_sass/imports/_structure.scss +44 -0
  223. data/documentation/site/_templates/_layouts/reference_ledger.html.erb +46 -0
  224. data/documentation/site/_templates/guides/ledger.md.erb +9 -0
  225. data/documentation/site/_templates/reference/resources/index.md.erb +9 -0
  226. data/documentation/site/_templates/reference/resources/resource.md.erb +27 -0
  227. data/documentation/site/assets/css/brands.min.css +5 -0
  228. data/documentation/site/assets/css/fontawesome.min.css +5 -0
  229. data/documentation/site/assets/css/main.scss +45 -0
  230. data/documentation/site/assets/css/monokai.css +441 -0
  231. data/documentation/site/assets/js/main.js +214 -0
  232. data/documentation/site/assets/js/plugins.js +22 -0
  233. data/documentation/site/assets/js/prism.js +9 -0
  234. data/documentation/site/assets/webfonts/fa-brands-400.eot +0 -0
  235. data/documentation/site/assets/webfonts/fa-brands-400.svg +3452 -0
  236. data/documentation/site/assets/webfonts/fa-brands-400.ttf +0 -0
  237. data/documentation/site/assets/webfonts/fa-brands-400.woff +0 -0
  238. data/documentation/site/assets/webfonts/fa-brands-400.woff2 +0 -0
  239. data/documentation/site/blog/index.md +6 -0
  240. data/documentation/site/guides/architecture/clients.md +35 -0
  241. data/documentation/site/guides/architecture/index.md +14 -0
  242. data/documentation/site/guides/architecture/operations.md +45 -0
  243. data/documentation/site/guides/architecture/resources.md +40 -0
  244. data/documentation/site/guides/architecture/results.md +6 -0
  245. data/documentation/site/guides/architecture/searchers.md +28 -0
  246. data/documentation/site/guides/architecture/serialization.md +59 -0
  247. data/documentation/site/guides/community/index.md +8 -0
  248. data/documentation/site/guides/contribute/console.md +6 -0
  249. data/documentation/site/guides/contribute/deployment.md +17 -0
  250. data/documentation/site/guides/contribute/documentation.md +37 -0
  251. data/documentation/site/guides/contribute/index.md +18 -0
  252. data/documentation/site/guides/contribute/qa.md +16 -0
  253. data/documentation/site/guides/contribute/testing.md +6 -0
  254. data/documentation/site/guides/customization/custom_resources.md +50 -0
  255. data/documentation/site/guides/customization/custom_serializers.md +47 -0
  256. data/documentation/site/guides/customization/index.md +15 -0
  257. data/documentation/site/guides/customization/resource_converters.md +79 -0
  258. data/documentation/site/guides/getting-started/get-help.md +7 -0
  259. data/documentation/site/guides/getting-started/index.md +8 -0
  260. data/documentation/site/guides/getting-started/installation.md +7 -0
  261. data/documentation/site/guides/getting-started/quick-start.md +123 -0
  262. data/documentation/site/guides/index.md +16 -0
  263. data/documentation/site/guides/ledgers/index.md +12 -0
  264. data/documentation/site/guides/ledgers/netsuite.md +9 -0
  265. data/documentation/site/guides/ledgers/netsuite_soap.md +9 -0
  266. data/documentation/site/guides/ledgers/quickbooks_online.md +9 -0
  267. data/documentation/site/guides/ledgers/stripe.md +9 -0
  268. data/documentation/site/guides/modern-treasury/index.md +14 -0
  269. data/documentation/site/guides/tips_and_more/index.md +76 -0
  270. data/documentation/site/images/1.jpg +0 -0
  271. data/documentation/site/images/10.jpg +0 -0
  272. data/documentation/site/images/2.jpg +0 -0
  273. data/documentation/site/images/3.jpg +0 -0
  274. data/documentation/site/images/4.jpg +0 -0
  275. data/documentation/site/images/5.jpg +0 -0
  276. data/documentation/site/images/6.jpg +0 -0
  277. data/documentation/site/images/7.jpg +0 -0
  278. data/documentation/site/images/8.jpg +0 -0
  279. data/documentation/site/images/9.jpg +0 -0
  280. data/documentation/site/images/logo.svg +8 -0
  281. data/documentation/site/index.md +99 -0
  282. data/documentation/site/overview.md +21 -0
  283. data/documentation/site/reference/architecture/clients.md +33 -0
  284. data/documentation/site/reference/architecture/index.md +14 -0
  285. data/documentation/site/reference/architecture/operations.md +6 -0
  286. data/documentation/site/reference/architecture/resources.md +38 -0
  287. data/documentation/site/reference/architecture/results.md +6 -0
  288. data/documentation/site/reference/architecture/searchers.md +6 -0
  289. data/documentation/site/reference/architecture/serialization.md +6 -0
  290. data/documentation/site/reference/index.md +6 -0
  291. data/documentation/site/reference/netsuite/authentication/_token_based_authentication.md +99 -0
  292. data/documentation/site/reference/netsuite/authentication/index.md +15 -0
  293. data/documentation/site/reference/netsuite/authentication/token_based_authentication.md +6 -0
  294. data/documentation/site/reference/netsuite/index.md +25 -0
  295. data/documentation/site/reference/netsuite/resources/account.md +38 -0
  296. data/documentation/site/reference/netsuite/resources/check.md +49 -0
  297. data/documentation/site/reference/netsuite/resources/check_line_item.md +23 -0
  298. data/documentation/site/reference/netsuite/resources/currency.md +45 -0
  299. data/documentation/site/reference/netsuite/resources/customer.md +48 -0
  300. data/documentation/site/reference/netsuite/resources/customer_deposit.md +46 -0
  301. data/documentation/site/reference/netsuite/resources/department.md +47 -0
  302. data/documentation/site/reference/netsuite/resources/deposit.md +25 -0
  303. data/documentation/site/reference/netsuite/resources/deposit_line_item.md +23 -0
  304. data/documentation/site/reference/netsuite/resources/index.md +25 -0
  305. data/documentation/site/reference/netsuite/resources/invoice.md +25 -0
  306. data/documentation/site/reference/netsuite/resources/invoice_line_item.md +22 -0
  307. data/documentation/site/reference/netsuite/resources/item.md +19 -0
  308. data/documentation/site/reference/netsuite/resources/journal_entry.md +48 -0
  309. data/documentation/site/reference/netsuite/resources/journal_entry_line_item.md +24 -0
  310. data/documentation/site/reference/netsuite/resources/ledger_class.md +47 -0
  311. data/documentation/site/reference/netsuite/resources/location.md +43 -0
  312. data/documentation/site/reference/netsuite/resources/resource.md +18 -0
  313. data/documentation/site/reference/netsuite/resources/subsidiary.md +20 -0
  314. data/documentation/site/reference/netsuite/resources/vendor.md +49 -0
  315. data/documentation/site/reference/netsuite_soap/index.md +11 -0
  316. data/documentation/site/reference/netsuite_soap/resources/customer.md +34 -0
  317. data/documentation/site/reference/netsuite_soap/resources/index.md +9 -0
  318. data/documentation/site/reference/netsuite_soap/resources/resource.md +18 -0
  319. data/documentation/site/reference/netsuite_soap/resources/subsidiary.md +32 -0
  320. data/documentation/site/reference/quickbooks_online/authentication/index.md +55 -0
  321. data/documentation/site/reference/quickbooks_online/errors/index.md +9 -0
  322. data/documentation/site/reference/quickbooks_online/index.md +6 -0
  323. data/documentation/site/reference/quickbooks_online/resources/account.md +44 -0
  324. data/documentation/site/reference/quickbooks_online/resources/bill.md +45 -0
  325. data/documentation/site/reference/quickbooks_online/resources/bill_line_item.md +22 -0
  326. data/documentation/site/reference/quickbooks_online/resources/bill_payment.md +49 -0
  327. data/documentation/site/reference/quickbooks_online/resources/bill_payment_line_item.md +20 -0
  328. data/documentation/site/reference/quickbooks_online/resources/currency.md +21 -0
  329. data/documentation/site/reference/quickbooks_online/resources/customer.md +40 -0
  330. data/documentation/site/reference/quickbooks_online/resources/department.md +41 -0
  331. data/documentation/site/reference/quickbooks_online/resources/deposit.md +43 -0
  332. data/documentation/site/reference/quickbooks_online/resources/deposit_line_item.md +23 -0
  333. data/documentation/site/reference/quickbooks_online/resources/expense.md +46 -0
  334. data/documentation/site/reference/quickbooks_online/resources/expense_line_item.md +22 -0
  335. data/documentation/site/reference/quickbooks_online/resources/index.md +33 -0
  336. data/documentation/site/reference/quickbooks_online/resources/invoice.md +43 -0
  337. data/documentation/site/reference/quickbooks_online/resources/invoice_sales_line_item.md +22 -0
  338. data/documentation/site/reference/quickbooks_online/resources/item.md +19 -0
  339. data/documentation/site/reference/quickbooks_online/resources/journal_entry.md +41 -0
  340. data/documentation/site/reference/quickbooks_online/resources/journal_entry_line_item.md +24 -0
  341. data/documentation/site/reference/quickbooks_online/resources/ledger_class.md +41 -0
  342. data/documentation/site/reference/quickbooks_online/resources/payment.md +46 -0
  343. data/documentation/site/reference/quickbooks_online/resources/payment_line_item.md +20 -0
  344. data/documentation/site/reference/quickbooks_online/resources/preferences.md +34 -0
  345. data/documentation/site/reference/quickbooks_online/resources/primary_email_addr.md +19 -0
  346. data/documentation/site/reference/quickbooks_online/resources/primary_phone.md +19 -0
  347. data/documentation/site/reference/quickbooks_online/resources/resource.md +18 -0
  348. data/documentation/site/reference/quickbooks_online/resources/subsidiary.md +20 -0
  349. data/documentation/site/reference/quickbooks_online/resources/transfer.md +42 -0
  350. data/documentation/site/reference/quickbooks_online/resources/vendor.md +43 -0
  351. data/documentation/site/reference/quickbooks_online/webhooks/index.md +42 -0
  352. data/documentation/site/reference/stripe/index.md +6 -0
  353. data/documentation/site/reference/stripe/resources/customer.md +45 -0
  354. data/documentation/site/reference/stripe/resources/index.md +8 -0
  355. data/documentation/site/reference/stripe/resources/resource.md +18 -0
  356. data/documentation/site/style-guide.md +137 -0
  357. data/ledger_sync.gemspec +3 -2
  358. data/lib/ledger_sync.rb +46 -58
  359. data/lib/ledger_sync/core_ext/resonad.rb +2 -3
  360. data/lib/ledger_sync/deserializer.rb +108 -0
  361. data/lib/ledger_sync/error.rb +48 -0
  362. data/lib/ledger_sync/error/ledger_errors.rb +72 -0
  363. data/lib/ledger_sync/error/operation_errors.rb +0 -10
  364. data/lib/ledger_sync/error/resource_errors.rb +48 -19
  365. data/lib/ledger_sync/ledger_configuration.rb +61 -0
  366. data/lib/ledger_sync/ledger_configuration_store.rb +56 -0
  367. data/lib/ledger_sync/ledgers/client.rb +112 -0
  368. data/lib/ledger_sync/ledgers/contract.rb +16 -0
  369. data/lib/ledger_sync/ledgers/dashboard_url_helper.rb +23 -0
  370. data/lib/ledger_sync/ledgers/mixins/infer_client_mixin.rb +28 -0
  371. data/lib/ledger_sync/ledgers/mixins/infer_resource_class_mixin.rb +25 -0
  372. data/lib/ledger_sync/ledgers/mixins/infer_serializer_mixin.rb +52 -0
  373. data/lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb +27 -0
  374. data/lib/ledger_sync/ledgers/mixins/offset_and_limit_pagination_searcher_mixin.rb +37 -0
  375. data/lib/ledger_sync/ledgers/mixins/serialization_mixin.rb +41 -0
  376. data/lib/ledger_sync/ledgers/netsuite/account/deserializer.rb +23 -0
  377. data/lib/ledger_sync/ledgers/netsuite/account/operations/create.rb +28 -0
  378. data/lib/ledger_sync/ledgers/netsuite/account/operations/find.rb +28 -0
  379. data/lib/ledger_sync/ledgers/netsuite/account/searcher.rb +12 -0
  380. data/lib/ledger_sync/ledgers/netsuite/account/searcher_deserializer.rb +29 -0
  381. data/lib/ledger_sync/ledgers/netsuite/account/serializer.rb +21 -0
  382. data/lib/ledger_sync/ledgers/netsuite/check/deserializer.rb +29 -0
  383. data/lib/ledger_sync/ledgers/netsuite/check/operations/create.rb +27 -0
  384. data/lib/ledger_sync/ledgers/netsuite/check/operations/delete.rb +27 -0
  385. data/lib/ledger_sync/ledgers/netsuite/check/operations/find.rb +27 -0
  386. data/lib/ledger_sync/ledgers/netsuite/check/operations/update.rb +27 -0
  387. data/lib/ledger_sync/ledgers/netsuite/check/searcher.rb +15 -0
  388. data/lib/ledger_sync/ledgers/netsuite/check/searcher_deserializer.rb +16 -0
  389. data/lib/ledger_sync/ledgers/netsuite/check/serializer.rb +51 -0
  390. data/lib/ledger_sync/ledgers/netsuite/check_line_item/deserializer.rb +17 -0
  391. data/lib/ledger_sync/ledgers/netsuite/check_line_item/serializer.rb +25 -0
  392. data/lib/ledger_sync/ledgers/netsuite/client.rb +184 -0
  393. data/lib/ledger_sync/ledgers/netsuite/config.rb +5 -0
  394. data/lib/ledger_sync/ledgers/netsuite/currency/deserializer.rb +23 -0
  395. data/lib/ledger_sync/ledgers/netsuite/currency/operations/create.rb +25 -0
  396. data/lib/ledger_sync/ledgers/netsuite/currency/operations/delete.rb +23 -0
  397. data/lib/ledger_sync/ledgers/netsuite/currency/operations/find.rb +23 -0
  398. data/lib/ledger_sync/ledgers/netsuite/currency/operations/update.rb +23 -0
  399. data/lib/ledger_sync/ledgers/netsuite/currency/serializer.rb +21 -0
  400. data/lib/ledger_sync/ledgers/netsuite/customer/deserializer.rb +22 -0
  401. data/lib/ledger_sync/ledgers/netsuite/customer/operations/create.rb +26 -0
  402. data/lib/ledger_sync/ledgers/netsuite/customer/operations/delete.rb +26 -0
  403. data/lib/ledger_sync/ledgers/netsuite/customer/operations/find.rb +26 -0
  404. data/lib/ledger_sync/ledgers/netsuite/customer/operations/update.rb +26 -0
  405. data/lib/ledger_sync/ledgers/netsuite/customer/searcher.rb +12 -0
  406. data/lib/ledger_sync/ledgers/netsuite/customer/searcher_deserializer.rb +18 -0
  407. data/lib/ledger_sync/ledgers/netsuite/customer/serializer.rb +29 -0
  408. data/lib/ledger_sync/ledgers/netsuite/customer_deposit/deserializer.rb +20 -0
  409. data/lib/ledger_sync/ledgers/netsuite/customer_deposit/operations/create.rb +24 -0
  410. data/lib/ledger_sync/ledgers/netsuite/customer_deposit/operations/delete.rb +24 -0
  411. data/lib/ledger_sync/ledgers/netsuite/customer_deposit/operations/find.rb +24 -0
  412. data/lib/ledger_sync/ledgers/netsuite/customer_deposit/operations/update.rb +24 -0
  413. data/lib/ledger_sync/ledgers/netsuite/customer_deposit/searcher.rb +12 -0
  414. data/lib/ledger_sync/ledgers/netsuite/customer_deposit/searcher_deserializer.rb +16 -0
  415. data/lib/ledger_sync/ledgers/netsuite/customer_deposit/serializer.rb +25 -0
  416. data/lib/ledger_sync/ledgers/netsuite/dashboard_url_helper.rb +28 -0
  417. data/lib/ledger_sync/ledgers/netsuite/department/deserializer.rb +15 -0
  418. data/lib/ledger_sync/ledgers/netsuite/department/operations/create.rb +25 -0
  419. data/lib/ledger_sync/ledgers/netsuite/department/operations/delete.rb +25 -0
  420. data/lib/ledger_sync/ledgers/netsuite/department/operations/find.rb +25 -0
  421. data/lib/ledger_sync/ledgers/netsuite/department/operations/update.rb +25 -0
  422. data/lib/ledger_sync/ledgers/netsuite/department/searcher.rb +12 -0
  423. data/lib/ledger_sync/ledgers/netsuite/department/searcher_deserializer.rb +19 -0
  424. data/lib/ledger_sync/ledgers/netsuite/department/serializer.rb +13 -0
  425. data/lib/ledger_sync/ledgers/netsuite/deserializer.rb +18 -0
  426. data/lib/ledger_sync/ledgers/netsuite/error.rb +18 -0
  427. data/lib/ledger_sync/ledgers/netsuite/journal_entry/deserializer.rb +31 -0
  428. data/lib/ledger_sync/ledgers/netsuite/journal_entry/operations/create.rb +26 -0
  429. data/lib/ledger_sync/ledgers/netsuite/journal_entry/operations/delete.rb +26 -0
  430. data/lib/ledger_sync/ledgers/netsuite/journal_entry/operations/find.rb +26 -0
  431. data/lib/ledger_sync/ledgers/netsuite/journal_entry/operations/update.rb +30 -0
  432. data/lib/ledger_sync/ledgers/netsuite/journal_entry/serializer.rb +36 -0
  433. data/lib/ledger_sync/ledgers/netsuite/journal_entry_line_item/deserializer.rb +23 -0
  434. data/lib/ledger_sync/ledgers/netsuite/journal_entry_line_item/serializer.rb +21 -0
  435. data/lib/ledger_sync/ledgers/netsuite/ledger_class/deserializer.rb +15 -0
  436. data/lib/ledger_sync/ledgers/netsuite/ledger_class/operations/create.rb +25 -0
  437. data/lib/ledger_sync/ledgers/netsuite/ledger_class/operations/delete.rb +25 -0
  438. data/lib/ledger_sync/ledgers/netsuite/ledger_class/operations/find.rb +25 -0
  439. data/lib/ledger_sync/ledgers/netsuite/ledger_class/operations/update.rb +25 -0
  440. data/lib/ledger_sync/ledgers/netsuite/ledger_class/searcher.rb +12 -0
  441. data/lib/ledger_sync/ledgers/netsuite/ledger_class/searcher_deserializer.rb +19 -0
  442. data/lib/ledger_sync/ledgers/netsuite/ledger_class/serializer.rb +13 -0
  443. data/lib/ledger_sync/ledgers/netsuite/location/deserializer.rb +15 -0
  444. data/lib/ledger_sync/ledgers/netsuite/location/operations/create.rb +21 -0
  445. data/lib/ledger_sync/ledgers/netsuite/location/operations/delete.rb +21 -0
  446. data/lib/ledger_sync/ledgers/netsuite/location/operations/find.rb +21 -0
  447. data/lib/ledger_sync/ledgers/netsuite/location/operations/update.rb +21 -0
  448. data/lib/ledger_sync/ledgers/netsuite/location/searcher.rb +12 -0
  449. data/lib/ledger_sync/ledgers/netsuite/location/serializer.rb +13 -0
  450. data/lib/ledger_sync/ledgers/netsuite/operation.rb +40 -0
  451. data/lib/ledger_sync/ledgers/netsuite/operation/create.rb +58 -0
  452. data/lib/ledger_sync/ledgers/netsuite/operation/delete.rb +49 -0
  453. data/lib/ledger_sync/ledgers/netsuite/operation/find.rb +60 -0
  454. data/lib/ledger_sync/ledgers/netsuite/operation/update.rb +61 -0
  455. data/lib/ledger_sync/ledgers/netsuite/record/http_method.rb +33 -0
  456. data/lib/ledger_sync/ledgers/netsuite/record/metadata.rb +105 -0
  457. data/lib/ledger_sync/ledgers/netsuite/record/parameter.rb +20 -0
  458. data/lib/ledger_sync/ledgers/netsuite/record/property.rb +22 -0
  459. data/lib/ledger_sync/ledgers/netsuite/reference/serializer.rb +13 -0
  460. data/lib/ledger_sync/ledgers/netsuite/resource.rb +10 -0
  461. data/lib/ledger_sync/ledgers/netsuite/resources/account.rb +44 -0
  462. data/lib/ledger_sync/ledgers/netsuite/resources/check.rb +23 -0
  463. data/lib/ledger_sync/ledgers/netsuite/resources/check_line_item.rb +15 -0
  464. data/lib/ledger_sync/ledgers/netsuite/resources/currency.rb +13 -0
  465. data/lib/ledger_sync/ledgers/netsuite/resources/customer.rb +19 -0
  466. data/lib/ledger_sync/ledgers/netsuite/resources/customer_deposit.rb +15 -0
  467. data/lib/ledger_sync/ledgers/netsuite/resources/department.rb +16 -0
  468. data/lib/ledger_sync/ledgers/netsuite/resources/deposit.rb +28 -0
  469. data/lib/ledger_sync/ledgers/netsuite/resources/deposit_line_item.rb +25 -0
  470. data/lib/ledger_sync/ledgers/netsuite/resources/invoice.rb +28 -0
  471. data/lib/ledger_sync/ledgers/netsuite/resources/invoice_line_item.rb +21 -0
  472. data/lib/ledger_sync/ledgers/netsuite/resources/item.rb +11 -0
  473. data/lib/ledger_sync/ledgers/netsuite/resources/journal_entry.rb +26 -0
  474. data/lib/ledger_sync/ledgers/netsuite/resources/journal_entry_line_item.rb +24 -0
  475. data/lib/ledger_sync/ledgers/netsuite/resources/ledger_class.rb +16 -0
  476. data/lib/ledger_sync/ledgers/netsuite/resources/location.rb +11 -0
  477. data/lib/ledger_sync/ledgers/netsuite/resources/subsidiary.rb +12 -0
  478. data/lib/ledger_sync/ledgers/netsuite/resources/vendor.rb +23 -0
  479. data/lib/ledger_sync/ledgers/netsuite/searcher.rb +64 -0
  480. data/lib/ledger_sync/ledgers/netsuite/serializer.rb +13 -0
  481. data/lib/ledger_sync/ledgers/netsuite/subsidiary/deserializer.rb +17 -0
  482. data/lib/ledger_sync/ledgers/netsuite/subsidiary/searcher.rb +12 -0
  483. data/lib/ledger_sync/ledgers/netsuite/subsidiary/searcher_deserializer.rb +15 -0
  484. data/lib/ledger_sync/ledgers/netsuite/subsidiary/serializer.rb +15 -0
  485. data/lib/ledger_sync/ledgers/netsuite/token.rb +158 -0
  486. data/lib/ledger_sync/ledgers/netsuite/type/deserializer_active_type.rb +32 -0
  487. data/lib/ledger_sync/ledgers/netsuite/type/deserializer_customer_type.rb +33 -0
  488. data/lib/ledger_sync/ledgers/netsuite/type/deserializer_entity_type.rb +30 -0
  489. data/lib/ledger_sync/ledgers/netsuite/type/deserializer_subsidiary_type.rb +33 -0
  490. data/lib/ledger_sync/ledgers/netsuite/vendor/deserializer.rb +30 -0
  491. data/lib/ledger_sync/ledgers/netsuite/vendor/operations/create.rb +27 -0
  492. data/lib/ledger_sync/ledgers/netsuite/vendor/operations/delete.rb +27 -0
  493. data/lib/ledger_sync/ledgers/netsuite/vendor/operations/find.rb +27 -0
  494. data/lib/ledger_sync/ledgers/netsuite/vendor/operations/update.rb +27 -0
  495. data/lib/ledger_sync/ledgers/netsuite/vendor/searcher.rb +12 -0
  496. data/lib/ledger_sync/ledgers/netsuite/vendor/searcher_deserializer.rb +21 -0
  497. data/lib/ledger_sync/ledgers/netsuite/vendor/serializer.rb +30 -0
  498. data/lib/ledger_sync/ledgers/netsuite_soap/client.rb +92 -0
  499. data/lib/ledger_sync/ledgers/netsuite_soap/config.rb +5 -0
  500. data/lib/ledger_sync/ledgers/netsuite_soap/customer/operations/create.rb +64 -0
  501. data/lib/ledger_sync/ledgers/netsuite_soap/customer/operations/find.rb +49 -0
  502. data/lib/ledger_sync/ledgers/netsuite_soap/operation.rb +40 -0
  503. data/lib/ledger_sync/ledgers/netsuite_soap/operation/create.rb +29 -0
  504. data/lib/ledger_sync/ledgers/netsuite_soap/operation/find.rb +15 -0
  505. data/lib/ledger_sync/ledgers/netsuite_soap/resource.rb +10 -0
  506. data/lib/ledger_sync/ledgers/netsuite_soap/resources/customer.rb +29 -0
  507. data/lib/ledger_sync/ledgers/netsuite_soap/resources/subsidiary.rb +12 -0
  508. data/lib/ledger_sync/ledgers/netsuite_soap/subsidiary/operations/create.rb +42 -0
  509. data/lib/ledger_sync/ledgers/netsuite_soap/subsidiary/operations/find.rb +38 -0
  510. data/lib/ledger_sync/ledgers/operation.rb +181 -0
  511. data/lib/ledger_sync/ledgers/quickbooks_online/account/deserializer.rb +43 -0
  512. data/lib/ledger_sync/ledgers/quickbooks_online/account/operations/create.rb +26 -0
  513. data/lib/ledger_sync/ledgers/quickbooks_online/account/operations/find.rb +26 -0
  514. data/lib/ledger_sync/ledgers/quickbooks_online/account/operations/update.rb +30 -0
  515. data/lib/ledger_sync/ledgers/quickbooks_online/account/searcher.rb +15 -0
  516. data/lib/ledger_sync/ledgers/quickbooks_online/account/serializer.rb +37 -0
  517. data/lib/ledger_sync/ledgers/quickbooks_online/bill/deserializer.rb +45 -0
  518. data/lib/ledger_sync/ledgers/quickbooks_online/bill/operations/create.rb +27 -0
  519. data/lib/ledger_sync/ledgers/quickbooks_online/bill/operations/find.rb +27 -0
  520. data/lib/ledger_sync/ledgers/quickbooks_online/bill/operations/update.rb +27 -0
  521. data/lib/ledger_sync/ledgers/quickbooks_online/bill/searcher.rb +14 -0
  522. data/lib/ledger_sync/ledgers/quickbooks_online/bill/serializer.rb +44 -0
  523. data/lib/ledger_sync/ledgers/quickbooks_online/bill_line_item/deserializer.rb +25 -0
  524. data/lib/ledger_sync/ledgers/quickbooks_online/bill_line_item/serializer.rb +29 -0
  525. data/lib/ledger_sync/ledgers/quickbooks_online/bill_payment/deserializer.rb +59 -0
  526. data/lib/ledger_sync/ledgers/quickbooks_online/bill_payment/operations/create.rb +33 -0
  527. data/lib/ledger_sync/ledgers/quickbooks_online/bill_payment/operations/find.rb +33 -0
  528. data/lib/ledger_sync/ledgers/quickbooks_online/bill_payment/operations/update.rb +33 -0
  529. data/lib/ledger_sync/ledgers/quickbooks_online/bill_payment/serializer.rb +77 -0
  530. data/lib/ledger_sync/ledgers/quickbooks_online/bill_payment_line_item/deserializer.rb +18 -0
  531. data/lib/ledger_sync/ledgers/quickbooks_online/bill_payment_line_item/serializer.rb +18 -0
  532. data/lib/ledger_sync/ledgers/quickbooks_online/client.rb +258 -0
  533. data/lib/ledger_sync/ledgers/quickbooks_online/config.rb +8 -0
  534. data/lib/ledger_sync/ledgers/quickbooks_online/currency/deserializer.rb +17 -0
  535. data/lib/ledger_sync/ledgers/quickbooks_online/currency/serializer.rb +16 -0
  536. data/lib/ledger_sync/ledgers/quickbooks_online/customer/deserializer.rb +19 -0
  537. data/lib/ledger_sync/ledgers/quickbooks_online/customer/operations/create.rb +26 -0
  538. data/lib/ledger_sync/ledgers/quickbooks_online/customer/operations/find.rb +26 -0
  539. data/lib/ledger_sync/ledgers/quickbooks_online/customer/operations/update.rb +26 -0
  540. data/lib/ledger_sync/ledgers/quickbooks_online/customer/searcher.rb +13 -0
  541. data/lib/ledger_sync/ledgers/quickbooks_online/customer/serializer.rb +19 -0
  542. data/lib/ledger_sync/ledgers/quickbooks_online/dashboard_url_helper.rb +34 -0
  543. data/lib/ledger_sync/ledgers/quickbooks_online/department/deserializer.rb +28 -0
  544. data/lib/ledger_sync/ledgers/quickbooks_online/department/operations/create.rb +23 -0
  545. data/lib/ledger_sync/ledgers/quickbooks_online/department/operations/find.rb +23 -0
  546. data/lib/ledger_sync/ledgers/quickbooks_online/department/operations/update.rb +25 -0
  547. data/lib/ledger_sync/ledgers/quickbooks_online/department/searcher.rb +17 -0
  548. data/lib/ledger_sync/ledgers/quickbooks_online/department/serializer.rb +49 -0
  549. data/lib/ledger_sync/ledgers/quickbooks_online/deposit/deserializer.rb +39 -0
  550. data/lib/ledger_sync/ledgers/quickbooks_online/deposit/operations/create.rb +25 -0
  551. data/lib/ledger_sync/ledgers/quickbooks_online/deposit/operations/find.rb +25 -0
  552. data/lib/ledger_sync/ledgers/quickbooks_online/deposit/operations/update.rb +27 -0
  553. data/lib/ledger_sync/ledgers/quickbooks_online/deposit/searcher.rb +13 -0
  554. data/lib/ledger_sync/ledgers/quickbooks_online/deposit/serializer.rb +39 -0
  555. data/lib/ledger_sync/ledgers/quickbooks_online/deposit_line_item/deserializer.rb +38 -0
  556. data/lib/ledger_sync/ledgers/quickbooks_online/deposit_line_item/serializer.rb +41 -0
  557. data/lib/ledger_sync/ledgers/quickbooks_online/deserializer.rb +98 -0
  558. data/lib/ledger_sync/ledgers/quickbooks_online/expense/deserializer.rb +58 -0
  559. data/lib/ledger_sync/ledgers/quickbooks_online/expense/operations/create.rb +28 -0
  560. data/lib/ledger_sync/ledgers/quickbooks_online/expense/operations/find.rb +28 -0
  561. data/lib/ledger_sync/ledgers/quickbooks_online/expense/operations/update.rb +28 -0
  562. data/lib/ledger_sync/ledgers/quickbooks_online/expense/searcher.rb +14 -0
  563. data/lib/ledger_sync/ledgers/quickbooks_online/expense/serializer.rb +59 -0
  564. data/lib/ledger_sync/ledgers/quickbooks_online/expense_line_item/deserializer.rb +25 -0
  565. data/lib/ledger_sync/ledgers/quickbooks_online/expense_line_item/serializer.rb +27 -0
  566. data/lib/ledger_sync/ledgers/quickbooks_online/invoice/deserializer.rb +35 -0
  567. data/lib/ledger_sync/ledgers/quickbooks_online/invoice/operations/create.rb +27 -0
  568. data/lib/ledger_sync/ledgers/quickbooks_online/invoice/operations/find.rb +25 -0
  569. data/lib/ledger_sync/ledgers/quickbooks_online/invoice/operations/update.rb +25 -0
  570. data/lib/ledger_sync/ledgers/quickbooks_online/invoice/serializer.rb +35 -0
  571. data/lib/ledger_sync/ledgers/quickbooks_online/invoice_sales_line_item/deserializer.rb +25 -0
  572. data/lib/ledger_sync/ledgers/quickbooks_online/invoice_sales_line_item/serializer.rb +29 -0
  573. data/lib/ledger_sync/ledgers/quickbooks_online/item/deserializer.rb +13 -0
  574. data/lib/ledger_sync/ledgers/quickbooks_online/item/serializer.rb +12 -0
  575. data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry/deserializer.rb +33 -0
  576. data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry/operations/create.rb +23 -0
  577. data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry/operations/find.rb +23 -0
  578. data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry/operations/update.rb +23 -0
  579. data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry/searcher.rb +14 -0
  580. data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry/serializer.rb +33 -0
  581. data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry_line_item/deserializer.rb +32 -0
  582. data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry_line_item/serializer.rb +36 -0
  583. data/lib/ledger_sync/ledgers/quickbooks_online/ledger_class/deserializer.rb +29 -0
  584. data/lib/ledger_sync/ledgers/quickbooks_online/ledger_class/operations/create.rb +23 -0
  585. data/lib/ledger_sync/ledgers/quickbooks_online/ledger_class/operations/find.rb +23 -0
  586. data/lib/ledger_sync/ledgers/quickbooks_online/ledger_class/operations/update.rb +25 -0
  587. data/lib/ledger_sync/ledgers/quickbooks_online/ledger_class/searcher.rb +15 -0
  588. data/lib/ledger_sync/ledgers/quickbooks_online/ledger_class/serializer.rb +24 -0
  589. data/lib/ledger_sync/ledgers/quickbooks_online/oauth_client.rb +93 -0
  590. data/lib/ledger_sync/ledgers/quickbooks_online/operation.rb +61 -0
  591. data/lib/ledger_sync/ledgers/quickbooks_online/operation/create.rb +26 -0
  592. data/lib/ledger_sync/ledgers/quickbooks_online/operation/find.rb +25 -0
  593. data/lib/ledger_sync/ledgers/quickbooks_online/operation/full_update.rb +44 -0
  594. data/lib/ledger_sync/ledgers/quickbooks_online/operation/sparse_update.rb +29 -0
  595. data/lib/ledger_sync/ledgers/quickbooks_online/payment/deserializer.rb +48 -0
  596. data/lib/ledger_sync/ledgers/quickbooks_online/payment/operations/create.rb +30 -0
  597. data/lib/ledger_sync/ledgers/quickbooks_online/payment/operations/find.rb +28 -0
  598. data/lib/ledger_sync/ledgers/quickbooks_online/payment/operations/update.rb +28 -0
  599. data/lib/ledger_sync/ledgers/quickbooks_online/payment/serializer.rb +48 -0
  600. data/lib/ledger_sync/ledgers/quickbooks_online/payment_line_item/deserializer.rb +18 -0
  601. data/lib/ledger_sync/ledgers/quickbooks_online/payment_line_item/serializer.rb +18 -0
  602. data/lib/ledger_sync/ledgers/quickbooks_online/preferences/deserializer.rb +43 -0
  603. data/lib/ledger_sync/ledgers/quickbooks_online/preferences/operations/find.rb +30 -0
  604. data/lib/ledger_sync/ledgers/quickbooks_online/preferences/serializer.rb +43 -0
  605. data/lib/ledger_sync/ledgers/quickbooks_online/request.rb +98 -0
  606. data/lib/ledger_sync/ledgers/quickbooks_online/resource.rb +10 -0
  607. data/lib/ledger_sync/ledgers/quickbooks_online/resources/account.rb +355 -0
  608. data/lib/ledger_sync/ledgers/quickbooks_online/resources/bill.rb +31 -0
  609. data/lib/ledger_sync/ledgers/quickbooks_online/resources/bill_line_item.rb +21 -0
  610. data/lib/ledger_sync/ledgers/quickbooks_online/resources/bill_payment.rb +42 -0
  611. data/lib/ledger_sync/ledgers/quickbooks_online/resources/bill_payment_line_item.rb +19 -0
  612. data/lib/ledger_sync/ledgers/quickbooks_online/resources/currency.rb +13 -0
  613. data/lib/ledger_sync/ledgers/quickbooks_online/resources/customer.rb +19 -0
  614. data/lib/ledger_sync/ledgers/quickbooks_online/resources/department.rb +16 -0
  615. data/lib/ledger_sync/ledgers/quickbooks_online/resources/deposit.rb +28 -0
  616. data/lib/ledger_sync/ledgers/quickbooks_online/resources/deposit_line_item.rb +25 -0
  617. data/lib/ledger_sync/ledgers/quickbooks_online/resources/expense.rb +40 -0
  618. data/lib/ledger_sync/ledgers/quickbooks_online/resources/expense_line_item.rb +21 -0
  619. data/lib/ledger_sync/ledgers/quickbooks_online/resources/invoice.rb +28 -0
  620. data/lib/ledger_sync/ledgers/quickbooks_online/resources/invoice_sales_line_item.rb +21 -0
  621. data/lib/ledger_sync/ledgers/quickbooks_online/resources/item.rb +11 -0
  622. data/lib/ledger_sync/ledgers/quickbooks_online/resources/journal_entry.rb +24 -0
  623. data/lib/ledger_sync/ledgers/quickbooks_online/resources/journal_entry_line_item.rb +29 -0
  624. data/lib/ledger_sync/ledgers/quickbooks_online/resources/ledger_class.rb +16 -0
  625. data/lib/ledger_sync/ledgers/quickbooks_online/resources/payment.rb +31 -0
  626. data/lib/ledger_sync/ledgers/quickbooks_online/resources/payment_line_item.rb +19 -0
  627. data/lib/ledger_sync/ledgers/quickbooks_online/resources/preferences.rb +24 -0
  628. data/lib/ledger_sync/ledgers/quickbooks_online/resources/primary_email_addr.rb +11 -0
  629. data/lib/ledger_sync/ledgers/quickbooks_online/resources/primary_phone.rb +11 -0
  630. data/lib/ledger_sync/ledgers/quickbooks_online/resources/subsidiary.rb +12 -0
  631. data/lib/ledger_sync/ledgers/quickbooks_online/resources/transfer.rb +24 -0
  632. data/lib/ledger_sync/ledgers/quickbooks_online/resources/vendor.rb +23 -0
  633. data/lib/ledger_sync/ledgers/quickbooks_online/searcher.rb +60 -0
  634. data/lib/ledger_sync/ledgers/quickbooks_online/serialization/type/amount_float_to_integer_type.rb +21 -0
  635. data/lib/ledger_sync/ledgers/quickbooks_online/serialization/type/deserialize_transaction_reference_type.rb +30 -0
  636. data/lib/ledger_sync/ledgers/quickbooks_online/serialization/type/integer_to_amount_float_type.rb +21 -0
  637. data/lib/ledger_sync/ledgers/quickbooks_online/serialization/type/serialize_transaction_reference_type.rb +30 -0
  638. data/lib/ledger_sync/ledgers/quickbooks_online/serializer.rb +71 -0
  639. data/lib/ledger_sync/ledgers/quickbooks_online/serialziation/type/mapping_type.rb +25 -0
  640. data/lib/ledger_sync/ledgers/quickbooks_online/transfer/deserializer.rb +34 -0
  641. data/lib/ledger_sync/ledgers/quickbooks_online/transfer/operations/create.rb +24 -0
  642. data/lib/ledger_sync/ledgers/quickbooks_online/transfer/operations/find.rb +24 -0
  643. data/lib/ledger_sync/ledgers/quickbooks_online/transfer/operations/update.rb +26 -0
  644. data/lib/ledger_sync/ledgers/quickbooks_online/transfer/serializer.rb +34 -0
  645. data/lib/ledger_sync/ledgers/quickbooks_online/util/error_matcher.rb +54 -0
  646. data/lib/ledger_sync/ledgers/quickbooks_online/util/error_parser.rb +27 -0
  647. data/lib/ledger_sync/ledgers/quickbooks_online/util/ledger_error_parser.rb +103 -0
  648. data/lib/ledger_sync/ledgers/quickbooks_online/util/operation_error_parser.rb +99 -0
  649. data/lib/ledger_sync/ledgers/quickbooks_online/vendor/deserializer.rb +25 -0
  650. data/lib/ledger_sync/ledgers/quickbooks_online/vendor/operations/create.rb +27 -0
  651. data/lib/ledger_sync/ledgers/quickbooks_online/vendor/operations/find.rb +27 -0
  652. data/lib/ledger_sync/ledgers/quickbooks_online/vendor/operations/update.rb +27 -0
  653. data/lib/ledger_sync/ledgers/quickbooks_online/vendor/searcher.rb +15 -0
  654. data/lib/ledger_sync/ledgers/quickbooks_online/vendor/serializer.rb +25 -0
  655. data/lib/ledger_sync/ledgers/quickbooks_online/webhook.rb +58 -0
  656. data/lib/ledger_sync/ledgers/quickbooks_online/webhook_event.rb +79 -0
  657. data/lib/ledger_sync/ledgers/quickbooks_online/webhook_notification.rb +42 -0
  658. data/lib/ledger_sync/ledgers/request.rb +57 -0
  659. data/lib/ledger_sync/ledgers/response.rb +55 -0
  660. data/lib/ledger_sync/ledgers/searcher.rb +73 -0
  661. data/lib/ledger_sync/ledgers/stripe/client.rb +37 -0
  662. data/lib/ledger_sync/ledgers/stripe/config.rb +5 -0
  663. data/lib/ledger_sync/ledgers/stripe/customer/operations/create.rb +44 -0
  664. data/lib/ledger_sync/ledgers/stripe/customer/operations/delete.rb +35 -0
  665. data/lib/ledger_sync/ledgers/stripe/customer/operations/find.rb +44 -0
  666. data/lib/ledger_sync/ledgers/stripe/customer/operations/update.rb +43 -0
  667. data/lib/ledger_sync/ledgers/stripe/dashboard_url_helper.rb +21 -0
  668. data/lib/ledger_sync/ledgers/stripe/operation.rb +35 -0
  669. data/lib/ledger_sync/ledgers/stripe/operation/create.rb +17 -0
  670. data/lib/ledger_sync/ledgers/stripe/operation/delete.rb +17 -0
  671. data/lib/ledger_sync/ledgers/stripe/operation/find.rb +15 -0
  672. data/lib/ledger_sync/ledgers/stripe/operation/update.rb +17 -0
  673. data/lib/ledger_sync/ledgers/stripe/resource.rb +10 -0
  674. data/lib/ledger_sync/ledgers/stripe/resources/customer.rb +13 -0
  675. data/lib/ledger_sync/operation.rb +23 -0
  676. data/lib/ledger_sync/resource.rb +22 -10
  677. data/lib/ledger_sync/resource_adaptor.rb +52 -0
  678. data/lib/ledger_sync/resource_attribute.rb +31 -9
  679. data/lib/ledger_sync/resource_attribute/dirty_mixin.rb +4 -0
  680. data/lib/ledger_sync/resource_attribute/mixin.rb +14 -24
  681. data/lib/ledger_sync/resource_attribute/reference/many.rb +21 -23
  682. data/lib/ledger_sync/resource_attribute/reference/one.rb +16 -5
  683. data/lib/ledger_sync/resource_attribute_set.rb +3 -7
  684. data/lib/ledger_sync/result.rb +3 -3
  685. data/lib/ledger_sync/serialization/attribute.rb +41 -0
  686. data/lib/ledger_sync/serialization/attribute_set_mixin.rb +27 -0
  687. data/lib/ledger_sync/serialization/deserializer_attribute.rb +78 -0
  688. data/lib/ledger_sync/serialization/deserializer_attribute_set.rb +22 -0
  689. data/lib/ledger_sync/serialization/mixin.rb +70 -0
  690. data/lib/ledger_sync/serialization/serializer_attribute.rb +64 -0
  691. data/lib/ledger_sync/serialization/serializer_attribute_set.rb +22 -0
  692. data/lib/ledger_sync/serialization/type/deserializer_references_many_type.rb +26 -0
  693. data/lib/ledger_sync/serialization/type/deserializer_references_one_type.rb +12 -0
  694. data/lib/ledger_sync/serialization/type/deserializer_type.rb +29 -0
  695. data/lib/ledger_sync/serialization/type/format_date_type.rb +23 -0
  696. data/lib/ledger_sync/serialization/type/mapping_type.rb +23 -0
  697. data/lib/ledger_sync/serialization/type/parse_date_type.rb +23 -0
  698. data/lib/ledger_sync/serialization/type/serializer_references_many_type.rb +21 -0
  699. data/lib/ledger_sync/serialization/type/serializer_references_one_type.rb +12 -0
  700. data/lib/ledger_sync/serialization/type/serializer_type.rb +23 -0
  701. data/lib/ledger_sync/serializer.rb +95 -0
  702. data/lib/ledger_sync/type/boolean.rb +2 -0
  703. data/lib/ledger_sync/type/date.rb +3 -1
  704. data/lib/ledger_sync/type/float.rb +2 -0
  705. data/lib/ledger_sync/type/hash.rb +38 -0
  706. data/lib/ledger_sync/type/id.rb +8 -2
  707. data/lib/ledger_sync/type/integer.rb +2 -0
  708. data/lib/ledger_sync/type/reference_many.rb +15 -5
  709. data/lib/ledger_sync/type/reference_one.rb +9 -18
  710. data/lib/ledger_sync/type/string.rb +2 -0
  711. data/lib/ledger_sync/type/string_from_set.rb +43 -0
  712. data/lib/ledger_sync/type/value_mixin.rb +37 -7
  713. data/lib/ledger_sync/util/mixins/delegate_iterable_methods_mixin.rb +43 -0
  714. data/lib/ledger_sync/util/mixins/dupable_mixin.rb +13 -0
  715. data/lib/ledger_sync/util/mixins/resource_registerable_mixin.rb +29 -0
  716. data/lib/ledger_sync/util/read_only_object.rb +54 -0
  717. data/lib/ledger_sync/util/resource_converter.rb +113 -0
  718. data/lib/ledger_sync/util/resource_converter/attribute.rb +131 -0
  719. data/lib/ledger_sync/util/resource_converter/attribute_set.rb +42 -0
  720. data/lib/ledger_sync/util/resource_converter/type/references_many_type.rb +27 -0
  721. data/lib/ledger_sync/util/resource_converter/type/references_one_type.rb +14 -0
  722. data/lib/ledger_sync/util/resource_converter/type/resource_converter_type.rb +26 -0
  723. data/lib/ledger_sync/util/resources_builder.rb +19 -11
  724. data/lib/ledger_sync/util/string_helpers.rb +3 -3
  725. data/lib/ledger_sync/util/url_helpers.rb +38 -0
  726. data/lib/ledger_sync/util/validator.rb +3 -1
  727. data/lib/ledger_sync/version.rb +1 -1
  728. data/licenses/BSL.txt +97 -0
  729. data/licenses/documentation_site.txt +7 -0
  730. metadata +712 -263
  731. data/_config.yml +0 -1
  732. data/lib/ledger_sync/adaptor_configuration.rb +0 -61
  733. data/lib/ledger_sync/adaptor_configuration_store.rb +0 -56
  734. data/lib/ledger_sync/adaptors/adaptor.rb +0 -74
  735. data/lib/ledger_sync/adaptors/contract.rb +0 -16
  736. data/lib/ledger_sync/adaptors/ledger_serializer.rb +0 -151
  737. data/lib/ledger_sync/adaptors/ledger_serializer_attribute.rb +0 -178
  738. data/lib/ledger_sync/adaptors/ledger_serializer_attribute_set.rb +0 -58
  739. data/lib/ledger_sync/adaptors/ledger_serializer_type/mapping_type.rb +0 -41
  740. data/lib/ledger_sync/adaptors/ledger_serializer_type/references_many_type.rb +0 -24
  741. data/lib/ledger_sync/adaptors/ledger_serializer_type/references_one_type.rb +0 -22
  742. data/lib/ledger_sync/adaptors/ledger_serializer_type/value_type.rb +0 -17
  743. data/lib/ledger_sync/adaptors/mixins/infer_adaptor_class_mixin.rb +0 -24
  744. data/lib/ledger_sync/adaptors/mixins/infer_ledger_serializer_mixin.rb +0 -31
  745. data/lib/ledger_sync/adaptors/mixins/infer_resource_class_mixin.rb +0 -22
  746. data/lib/ledger_sync/adaptors/mixins/offset_and_limit_pagination_searcher_mixin.rb +0 -37
  747. data/lib/ledger_sync/adaptors/netsuite/account/ledger_deserializer.rb +0 -24
  748. data/lib/ledger_sync/adaptors/netsuite/account/ledger_serializer.rb +0 -22
  749. data/lib/ledger_sync/adaptors/netsuite/account/operations/create.rb +0 -28
  750. data/lib/ledger_sync/adaptors/netsuite/account/operations/find.rb +0 -28
  751. data/lib/ledger_sync/adaptors/netsuite/account/searcher.rb +0 -28
  752. data/lib/ledger_sync/adaptors/netsuite/adaptor.rb +0 -145
  753. data/lib/ledger_sync/adaptors/netsuite/config.rb +0 -6
  754. data/lib/ledger_sync/adaptors/netsuite/currency/deledger_serializer.rb +0 -28
  755. data/lib/ledger_sync/adaptors/netsuite/currency/ledger_serializer.rb +0 -25
  756. data/lib/ledger_sync/adaptors/netsuite/currency/operations/create.rb +0 -25
  757. data/lib/ledger_sync/adaptors/netsuite/currency/operations/delete.rb +0 -23
  758. data/lib/ledger_sync/adaptors/netsuite/currency/operations/find.rb +0 -23
  759. data/lib/ledger_sync/adaptors/netsuite/currency/operations/update.rb +0 -23
  760. data/lib/ledger_sync/adaptors/netsuite/customer/ledger_deserializer.rb +0 -27
  761. data/lib/ledger_sync/adaptors/netsuite/customer/ledger_serializer.rb +0 -38
  762. data/lib/ledger_sync/adaptors/netsuite/customer/operations/create.rb +0 -24
  763. data/lib/ledger_sync/adaptors/netsuite/customer/operations/delete.rb +0 -24
  764. data/lib/ledger_sync/adaptors/netsuite/customer/operations/find.rb +0 -24
  765. data/lib/ledger_sync/adaptors/netsuite/customer/operations/update.rb +0 -24
  766. data/lib/ledger_sync/adaptors/netsuite/ledger_serializer.rb +0 -30
  767. data/lib/ledger_sync/adaptors/netsuite/ledger_serializer_type/reference_type.rb +0 -24
  768. data/lib/ledger_sync/adaptors/netsuite/ledger_serializer_type/subsidiary_type.rb +0 -22
  769. data/lib/ledger_sync/adaptors/netsuite/operation.rb +0 -25
  770. data/lib/ledger_sync/adaptors/netsuite/operation/create.rb +0 -65
  771. data/lib/ledger_sync/adaptors/netsuite/operation/delete.rb +0 -49
  772. data/lib/ledger_sync/adaptors/netsuite/operation/find.rb +0 -56
  773. data/lib/ledger_sync/adaptors/netsuite/operation/update.rb +0 -68
  774. data/lib/ledger_sync/adaptors/netsuite/record/http_method.rb +0 -38
  775. data/lib/ledger_sync/adaptors/netsuite/record/metadata.rb +0 -75
  776. data/lib/ledger_sync/adaptors/netsuite/record/property.rb +0 -45
  777. data/lib/ledger_sync/adaptors/netsuite/searcher.rb +0 -17
  778. data/lib/ledger_sync/adaptors/netsuite/token.rb +0 -162
  779. data/lib/ledger_sync/adaptors/netsuite/vendor/ledger_deserializer.rb +0 -32
  780. data/lib/ledger_sync/adaptors/netsuite/vendor/ledger_serializer.rb +0 -35
  781. data/lib/ledger_sync/adaptors/netsuite/vendor/operations/create.rb +0 -27
  782. data/lib/ledger_sync/adaptors/netsuite/vendor/operations/delete.rb +0 -27
  783. data/lib/ledger_sync/adaptors/netsuite/vendor/operations/find.rb +0 -27
  784. data/lib/ledger_sync/adaptors/netsuite/vendor/operations/update.rb +0 -27
  785. data/lib/ledger_sync/adaptors/netsuite_soap/adaptor.rb +0 -92
  786. data/lib/ledger_sync/adaptors/netsuite_soap/config.rb +0 -5
  787. data/lib/ledger_sync/adaptors/netsuite_soap/customer/ledger_serializer.rb +0 -13
  788. data/lib/ledger_sync/adaptors/netsuite_soap/customer/operations/create.rb +0 -64
  789. data/lib/ledger_sync/adaptors/netsuite_soap/customer/operations/find.rb +0 -49
  790. data/lib/ledger_sync/adaptors/netsuite_soap/ledger_serializer.rb +0 -25
  791. data/lib/ledger_sync/adaptors/netsuite_soap/operation.rb +0 -40
  792. data/lib/ledger_sync/adaptors/netsuite_soap/operation/create.rb +0 -29
  793. data/lib/ledger_sync/adaptors/netsuite_soap/operation/find.rb +0 -15
  794. data/lib/ledger_sync/adaptors/netsuite_soap/subsidiary/operations/create.rb +0 -42
  795. data/lib/ledger_sync/adaptors/netsuite_soap/subsidiary/operations/find.rb +0 -38
  796. data/lib/ledger_sync/adaptors/operation.rb +0 -215
  797. data/lib/ledger_sync/adaptors/quickbooks_online/account/ledger_serializer.rb +0 -37
  798. data/lib/ledger_sync/adaptors/quickbooks_online/account/operations/create.rb +0 -26
  799. data/lib/ledger_sync/adaptors/quickbooks_online/account/operations/find.rb +0 -26
  800. data/lib/ledger_sync/adaptors/quickbooks_online/account/operations/update.rb +0 -30
  801. data/lib/ledger_sync/adaptors/quickbooks_online/account/searcher.rb +0 -15
  802. data/lib/ledger_sync/adaptors/quickbooks_online/adaptor.rb +0 -258
  803. data/lib/ledger_sync/adaptors/quickbooks_online/bill/ledger_serializer.rb +0 -43
  804. data/lib/ledger_sync/adaptors/quickbooks_online/bill/operations/create.rb +0 -26
  805. data/lib/ledger_sync/adaptors/quickbooks_online/bill/operations/find.rb +0 -26
  806. data/lib/ledger_sync/adaptors/quickbooks_online/bill/operations/update.rb +0 -26
  807. data/lib/ledger_sync/adaptors/quickbooks_online/bill/searcher.rb +0 -14
  808. data/lib/ledger_sync/adaptors/quickbooks_online/bill_line_item/ledger_serializer.rb +0 -27
  809. data/lib/ledger_sync/adaptors/quickbooks_online/config.rb +0 -8
  810. data/lib/ledger_sync/adaptors/quickbooks_online/currency/ledger_serializer.rb +0 -17
  811. data/lib/ledger_sync/adaptors/quickbooks_online/customer/ledger_serializer.rb +0 -23
  812. data/lib/ledger_sync/adaptors/quickbooks_online/customer/operations/create.rb +0 -22
  813. data/lib/ledger_sync/adaptors/quickbooks_online/customer/operations/find.rb +0 -22
  814. data/lib/ledger_sync/adaptors/quickbooks_online/customer/operations/update.rb +0 -24
  815. data/lib/ledger_sync/adaptors/quickbooks_online/customer/searcher.rb +0 -13
  816. data/lib/ledger_sync/adaptors/quickbooks_online/dashboard_url_helper.rb +0 -57
  817. data/lib/ledger_sync/adaptors/quickbooks_online/department/ledger_serializer.rb +0 -38
  818. data/lib/ledger_sync/adaptors/quickbooks_online/department/operations/create.rb +0 -23
  819. data/lib/ledger_sync/adaptors/quickbooks_online/department/operations/find.rb +0 -23
  820. data/lib/ledger_sync/adaptors/quickbooks_online/department/operations/update.rb +0 -25
  821. data/lib/ledger_sync/adaptors/quickbooks_online/department/searcher.rb +0 -17
  822. data/lib/ledger_sync/adaptors/quickbooks_online/deposit/ledger_serializer.rb +0 -40
  823. data/lib/ledger_sync/adaptors/quickbooks_online/deposit/operations/create.rb +0 -25
  824. data/lib/ledger_sync/adaptors/quickbooks_online/deposit/operations/find.rb +0 -25
  825. data/lib/ledger_sync/adaptors/quickbooks_online/deposit/operations/update.rb +0 -27
  826. data/lib/ledger_sync/adaptors/quickbooks_online/deposit/searcher.rb +0 -13
  827. data/lib/ledger_sync/adaptors/quickbooks_online/deposit_line_item/ledger_serializer.rb +0 -31
  828. data/lib/ledger_sync/adaptors/quickbooks_online/expense/ledger_serializer.rb +0 -49
  829. data/lib/ledger_sync/adaptors/quickbooks_online/expense/operations/create.rb +0 -27
  830. data/lib/ledger_sync/adaptors/quickbooks_online/expense/operations/find.rb +0 -27
  831. data/lib/ledger_sync/adaptors/quickbooks_online/expense/operations/update.rb +0 -27
  832. data/lib/ledger_sync/adaptors/quickbooks_online/expense/searcher.rb +0 -14
  833. data/lib/ledger_sync/adaptors/quickbooks_online/expense_line_item/ledger_serializer.rb +0 -27
  834. data/lib/ledger_sync/adaptors/quickbooks_online/invoice/ledger_serializer.rb +0 -36
  835. data/lib/ledger_sync/adaptors/quickbooks_online/invoice/operations/create.rb +0 -27
  836. data/lib/ledger_sync/adaptors/quickbooks_online/invoice/operations/find.rb +0 -25
  837. data/lib/ledger_sync/adaptors/quickbooks_online/invoice/operations/update.rb +0 -25
  838. data/lib/ledger_sync/adaptors/quickbooks_online/invoice_sales_line_item/ledger_serializer.rb +0 -30
  839. data/lib/ledger_sync/adaptors/quickbooks_online/item/ledger_serializer.rb +0 -13
  840. data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry/ledger_serializer.rb +0 -34
  841. data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry/operations/create.rb +0 -23
  842. data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry/operations/find.rb +0 -23
  843. data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry/operations/update.rb +0 -23
  844. data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry/searcher.rb +0 -14
  845. data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry_line_item/ledger_serializer.rb +0 -31
  846. data/lib/ledger_sync/adaptors/quickbooks_online/ledger_class/ledger_serializer.rb +0 -25
  847. data/lib/ledger_sync/adaptors/quickbooks_online/ledger_class/operations/create.rb +0 -23
  848. data/lib/ledger_sync/adaptors/quickbooks_online/ledger_class/operations/find.rb +0 -23
  849. data/lib/ledger_sync/adaptors/quickbooks_online/ledger_class/operations/update.rb +0 -25
  850. data/lib/ledger_sync/adaptors/quickbooks_online/ledger_class/searcher.rb +0 -15
  851. data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer.rb +0 -131
  852. data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/account_sub_type.rb +0 -305
  853. data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/account_type.rb +0 -51
  854. data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/amount_type.rb +0 -23
  855. data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/classification_type.rb +0 -23
  856. data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/date_type.rb +0 -23
  857. data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/entity_reference_type.rb +0 -49
  858. data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/journal_entry_line_item_type.rb +0 -20
  859. data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/payment_type.rb +0 -21
  860. data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/transaction_reference_type.rb +0 -49
  861. data/lib/ledger_sync/adaptors/quickbooks_online/oauth_client.rb +0 -93
  862. data/lib/ledger_sync/adaptors/quickbooks_online/operation.rb +0 -60
  863. data/lib/ledger_sync/adaptors/quickbooks_online/operation/create.rb +0 -26
  864. data/lib/ledger_sync/adaptors/quickbooks_online/operation/find.rb +0 -31
  865. data/lib/ledger_sync/adaptors/quickbooks_online/operation/full_update.rb +0 -45
  866. data/lib/ledger_sync/adaptors/quickbooks_online/operation/sparse_update.rb +0 -29
  867. data/lib/ledger_sync/adaptors/quickbooks_online/payment/ledger_serializer.rb +0 -50
  868. data/lib/ledger_sync/adaptors/quickbooks_online/payment/operations/create.rb +0 -30
  869. data/lib/ledger_sync/adaptors/quickbooks_online/payment/operations/find.rb +0 -28
  870. data/lib/ledger_sync/adaptors/quickbooks_online/payment/operations/update.rb +0 -28
  871. data/lib/ledger_sync/adaptors/quickbooks_online/payment_line_item/ledger_serializer.rb +0 -19
  872. data/lib/ledger_sync/adaptors/quickbooks_online/request.rb +0 -98
  873. data/lib/ledger_sync/adaptors/quickbooks_online/searcher.rb +0 -61
  874. data/lib/ledger_sync/adaptors/quickbooks_online/transfer/ledger_serializer.rb +0 -36
  875. data/lib/ledger_sync/adaptors/quickbooks_online/transfer/operations/create.rb +0 -24
  876. data/lib/ledger_sync/adaptors/quickbooks_online/transfer/operations/find.rb +0 -24
  877. data/lib/ledger_sync/adaptors/quickbooks_online/transfer/operations/update.rb +0 -26
  878. data/lib/ledger_sync/adaptors/quickbooks_online/util/adaptor_error_parser.rb +0 -103
  879. data/lib/ledger_sync/adaptors/quickbooks_online/util/error_matcher.rb +0 -54
  880. data/lib/ledger_sync/adaptors/quickbooks_online/util/error_parser.rb +0 -27
  881. data/lib/ledger_sync/adaptors/quickbooks_online/util/operation_error_parser.rb +0 -99
  882. data/lib/ledger_sync/adaptors/quickbooks_online/vendor/ledger_serializer.rb +0 -25
  883. data/lib/ledger_sync/adaptors/quickbooks_online/vendor/operations/create.rb +0 -27
  884. data/lib/ledger_sync/adaptors/quickbooks_online/vendor/operations/find.rb +0 -27
  885. data/lib/ledger_sync/adaptors/quickbooks_online/vendor/operations/update.rb +0 -27
  886. data/lib/ledger_sync/adaptors/quickbooks_online/vendor/searcher.rb +0 -15
  887. data/lib/ledger_sync/adaptors/quickbooks_online/webhook.rb +0 -58
  888. data/lib/ledger_sync/adaptors/quickbooks_online/webhook_event.rb +0 -79
  889. data/lib/ledger_sync/adaptors/quickbooks_online/webhook_notification.rb +0 -42
  890. data/lib/ledger_sync/adaptors/request.rb +0 -53
  891. data/lib/ledger_sync/adaptors/response.rb +0 -55
  892. data/lib/ledger_sync/adaptors/searcher.rb +0 -68
  893. data/lib/ledger_sync/adaptors/stripe/adaptor.rb +0 -45
  894. data/lib/ledger_sync/adaptors/stripe/config.rb +0 -6
  895. data/lib/ledger_sync/adaptors/stripe/customer/operations/create.rb +0 -44
  896. data/lib/ledger_sync/adaptors/stripe/customer/operations/delete.rb +0 -35
  897. data/lib/ledger_sync/adaptors/stripe/customer/operations/find.rb +0 -44
  898. data/lib/ledger_sync/adaptors/stripe/customer/operations/update.rb +0 -43
  899. data/lib/ledger_sync/adaptors/stripe/operation.rb +0 -35
  900. data/lib/ledger_sync/adaptors/stripe/operation/create.rb +0 -17
  901. data/lib/ledger_sync/adaptors/stripe/operation/delete.rb +0 -17
  902. data/lib/ledger_sync/adaptors/stripe/operation/find.rb +0 -15
  903. data/lib/ledger_sync/adaptors/stripe/operation/update.rb +0 -17
  904. data/lib/ledger_sync/adaptors/test/account/operations/create.rb +0 -57
  905. data/lib/ledger_sync/adaptors/test/account/operations/find.rb +0 -42
  906. data/lib/ledger_sync/adaptors/test/account/operations/invalid.rb +0 -26
  907. data/lib/ledger_sync/adaptors/test/account/operations/update.rb +0 -56
  908. data/lib/ledger_sync/adaptors/test/account/operations/valid.rb +0 -32
  909. data/lib/ledger_sync/adaptors/test/account/searcher.rb +0 -40
  910. data/lib/ledger_sync/adaptors/test/adaptor.rb +0 -47
  911. data/lib/ledger_sync/adaptors/test/config.rb +0 -6
  912. data/lib/ledger_sync/adaptors/test/customer/operations/create.rb +0 -52
  913. data/lib/ledger_sync/adaptors/test/customer/operations/find.rb +0 -38
  914. data/lib/ledger_sync/adaptors/test/customer/operations/invalid.rb +0 -22
  915. data/lib/ledger_sync/adaptors/test/customer/operations/update.rb +0 -22
  916. data/lib/ledger_sync/adaptors/test/customer/operations/valid.rb +0 -24
  917. data/lib/ledger_sync/adaptors/test/customer/searcher.rb +0 -40
  918. data/lib/ledger_sync/adaptors/test/error/adaptor_error/operations/throttle_error.rb +0 -28
  919. data/lib/ledger_sync/adaptors/test/expense/operations/create.rb +0 -29
  920. data/lib/ledger_sync/adaptors/test/expense/operations/find.rb +0 -29
  921. data/lib/ledger_sync/adaptors/test/expense/operations/update.rb +0 -27
  922. data/lib/ledger_sync/adaptors/test/ledger_serializer.rb +0 -64
  923. data/lib/ledger_sync/adaptors/test/operation/create.rb +0 -27
  924. data/lib/ledger_sync/adaptors/test/operation/find.rb +0 -29
  925. data/lib/ledger_sync/adaptors/test/operation/update.rb +0 -34
  926. data/lib/ledger_sync/adaptors/test/payment/operations/create.rb +0 -51
  927. data/lib/ledger_sync/adaptors/test/payment/operations/find.rb +0 -44
  928. data/lib/ledger_sync/adaptors/test/payment/operations/update.rb +0 -28
  929. data/lib/ledger_sync/adaptors/test/transfer/operations/create.rb +0 -24
  930. data/lib/ledger_sync/adaptors/test/transfer/operations/find.rb +0 -24
  931. data/lib/ledger_sync/adaptors/test/transfer/operations/update.rb +0 -24
  932. data/lib/ledger_sync/adaptors/test/vendor/operations/create.rb +0 -56
  933. data/lib/ledger_sync/adaptors/test/vendor/operations/find.rb +0 -43
  934. data/lib/ledger_sync/adaptors/test/vendor/operations/invalid.rb +0 -27
  935. data/lib/ledger_sync/adaptors/test/vendor/operations/update.rb +0 -27
  936. data/lib/ledger_sync/adaptors/test/vendor/operations/valid.rb +0 -33
  937. data/lib/ledger_sync/adaptors/test/vendor/searcher.rb +0 -41
  938. data/lib/ledger_sync/error/adaptor_errors.rb +0 -72
  939. data/lib/ledger_sync/resources/account.rb +0 -17
  940. data/lib/ledger_sync/resources/bill.rb +0 -25
  941. data/lib/ledger_sync/resources/bill_line_item.rb +0 -15
  942. data/lib/ledger_sync/resources/currency.rb +0 -9
  943. data/lib/ledger_sync/resources/customer.rb +0 -25
  944. data/lib/ledger_sync/resources/department.rb +0 -14
  945. data/lib/ledger_sync/resources/deposit.rb +0 -24
  946. data/lib/ledger_sync/resources/deposit_line_item.rb +0 -19
  947. data/lib/ledger_sync/resources/expense.rb +0 -31
  948. data/lib/ledger_sync/resources/expense_line_item.rb +0 -15
  949. data/lib/ledger_sync/resources/invoice.rb +0 -24
  950. data/lib/ledger_sync/resources/invoice_sales_line_item.rb +0 -17
  951. data/lib/ledger_sync/resources/item.rb +0 -5
  952. data/lib/ledger_sync/resources/journal_entry.rb +0 -20
  953. data/lib/ledger_sync/resources/journal_entry_line_item.rb +0 -16
  954. data/lib/ledger_sync/resources/ledger_class.rb +0 -14
  955. data/lib/ledger_sync/resources/payment.rb +0 -27
  956. data/lib/ledger_sync/resources/payment_line_item.rb +0 -15
  957. data/lib/ledger_sync/resources/subsidiary.rb +0 -8
  958. data/lib/ledger_sync/resources/transfer.rb +0 -20
  959. data/lib/ledger_sync/resources/vendor.rb +0 -19
  960. data/lib/ledger_sync/util/debug.rb +0 -16
  961. data/qa/env_spec.rb +0 -5
  962. data/qa/netsuite/account_spec.rb +0 -20
  963. data/qa/netsuite/currency_spec.rb +0 -16
  964. data/qa/netsuite/customer.rb +0 -76
  965. data/qa/netsuite/customer_spec.rb +0 -21
  966. data/qa/netsuite/vendor.rb +0 -76
  967. data/qa/netsuite/vendor_spec.rb +0 -23
  968. data/qa/netsuite_soap/customer_spec.rb +0 -21
  969. data/qa/netsuite_soap/subsidiary_spec.rb +0 -0
  970. data/qa/netsuite_test.rb +0 -42
  971. data/qa/qa_helper.rb +0 -58
  972. data/qa/quickbooks_online/account_spec.rb +0 -14
  973. data/qa/quickbooks_online/customer_spec.rb +0 -13
  974. data/qa/quickbooks_online/expense_spec.rb +0 -31
  975. data/qa/quickbooks_online/vendor_spec.rb +0 -13
  976. data/qa/stripe/customers_spec.rb +0 -15
  977. data/qa/support/adaptor_helpers.rb +0 -99
  978. data/qa/support/adaptor_support_setup.rb +0 -23
  979. data/qa/support/netsuite_helpers.rb +0 -33
  980. data/qa/support/netsuite_shared_examples.rb +0 -30
  981. data/qa/support/netsuite_soap_helpers.rb +0 -33
  982. data/qa/support/netsuite_soap_shared_examples.rb +0 -10
  983. data/qa/support/quickbooks_online_helpers.rb +0 -42
  984. data/qa/support/quickbooks_online_shared_examples.rb +0 -82
  985. data/qa/support/shared_examples.rb +0 -127
  986. data/qa/support/stripe_helpers.rb +0 -22
  987. data/qa/support/stripe_shared_examples.rb +0 -10
  988. data/qa/test.rb +0 -67
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05667fe1a37dc8edfcb33121d2eb5f08ad076b8b635ecaaf33809b663c830f68
4
- data.tar.gz: 3b3a6c68af8ecf2ce04a8f789854fb1002b3d90d5e747e71d398aa1b1b8b4c9f
3
+ metadata.gz: e26314a127f29f788b6b2ac02f2d996f0d983989b122ee14767db4902f82e03a
4
+ data.tar.gz: 51752378e28c3eda1ac253ed5fa05a65afb9b95706281975b5d610a4c0763cb3
5
5
  SHA512:
6
- metadata.gz: 14cdebe2e5342838d44202fbe9b11c28e09a6e18ccbb4827145d0b098833c1549c9e922bd8760555708358058df74ff5574a46b91aa67d48f347a99d2e5a0129
7
- data.tar.gz: 8a48a4251273a4aa7a2cca65cc1eaed38c87d385caa2aeb1c3eaf63c76f0d67bf5af3099dcb16a1c4df82517e79c3bd35c8b41584a1a5197a584bce5c951ca5f
6
+ metadata.gz: f9e27db648598e80447f64c7f71db53dc6f4865afac33e4cd300a22c0cd2d67eafd480814228dfdd90de79a50c807ec82aa1e0438338739f416a10a0a4bd745e
7
+ data.tar.gz: '0492d830ce91dc92ca1ed08bd285ff35f63e2190eafa5029e202490b0f706fe6b5d52af3b15fd7b1b730b306eab695ebed0e725395247fca811913fc76136c1f'
data/.gitignore CHANGED
@@ -10,9 +10,20 @@
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
12
 
13
+ ### Jekyll ###
14
+ _site/
15
+ .sass-cache/
16
+ .jekyll-cache/
17
+ .jekyll-metadata
18
+
19
+ # byebug
13
20
  .byebug_history
14
- .qa_config.yml
15
21
 
22
+ # Mac
16
23
  .DS_Store
17
24
 
18
- .env
25
+ # dotenv
26
+ .env
27
+
28
+ .tool-versions
29
+ .ruby-version
@@ -1,4 +1,17 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
3
  AllCops:
4
- TargetRubyVersion: 2.6
4
+ TargetRubyVersion: 2.6
5
+
6
+ Layout/LineLength:
7
+ Enabled: True
8
+ Max: 120
9
+
10
+ Style/HashEachMethods:
11
+ Enabled: True
12
+
13
+ Style/HashTransformKeys:
14
+ Enabled: True
15
+
16
+ Style/HashTransformValues:
17
+ Enabled: True
@@ -15,9 +15,6 @@ Metrics/BlockLength:
15
15
  Metrics/ClassLength:
16
16
  Enabled: False
17
17
 
18
- Metrics/LineLength:
19
- Enabled: False
20
-
21
18
  Metrics/MethodLength:
22
19
  Enabled: False
23
20
 
@@ -1,9 +1,14 @@
1
1
  ---
2
- sudo: false
3
2
  language: ruby
4
3
  cache: bundler
5
4
  rvm:
6
- - 2.5.1
5
+ - 2.5.8
6
+ - 2.6.6
7
+ - 2.6.3
8
+ - 2.7.1
9
+ # - ruby-head
7
10
  before_install:
8
11
  - gem update --system
9
12
  - gem install bundler:1.17.3
13
+ script:
14
+ - bundle exec rspec --order rand
data/Dockerfile CHANGED
@@ -1,8 +1,8 @@
1
- FROM ruby:2.5.1
1
+ FROM ruby:2.6.6
2
2
 
3
3
  WORKDIR /lib
4
4
 
5
5
  COPY . .
6
6
  RUN bundle install
7
7
 
8
- CMD ["bundle", "exec", "rspec"]
8
+ CMD ["bundle", "exec", "rspec", "--order rand"]
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ledger_sync (1.3.2)
4
+ ledger_sync (1.4.1)
5
5
  activemodel
6
6
  colorize
7
7
  coveralls
@@ -15,21 +15,22 @@ PATH
15
15
  netsuite
16
16
  nokogiri
17
17
  oauth2
18
+ pd_ruby
18
19
  resonad
19
- simply_serializable (>= 1.3.0)
20
+ simply_serializable (>= 1.5.1)
20
21
  stripe
21
22
 
22
23
  GEM
23
24
  remote: https://rubygems.org/
24
25
  specs:
25
- activemodel (6.0.1)
26
- activesupport (= 6.0.1)
27
- activesupport (6.0.1)
26
+ activemodel (6.0.3.1)
27
+ activesupport (= 6.0.3.1)
28
+ activesupport (6.0.3.1)
28
29
  concurrent-ruby (~> 1.0, >= 1.0.2)
29
30
  i18n (>= 0.7, < 2)
30
31
  minitest (~> 5.1)
31
32
  tzinfo (~> 1.1)
32
- zeitwerk (~> 2.2)
33
+ zeitwerk (~> 2.2, >= 2.2.2)
33
34
  addressable (2.7.0)
34
35
  public_suffix (>= 2.0.2, < 5.0)
35
36
  akami (1.3.1)
@@ -38,10 +39,10 @@ GEM
38
39
  ast (2.4.0)
39
40
  awesome_print (1.8.0)
40
41
  builder (3.2.4)
41
- bump (0.8.0)
42
- byebug (11.0.1)
42
+ bump (0.9.0)
43
+ byebug (11.1.1)
43
44
  colorize (0.8.1)
44
- concurrent-ruby (1.1.5)
45
+ concurrent-ruby (1.1.6)
45
46
  coveralls (0.8.23)
46
47
  json (>= 1.8, < 3)
47
48
  simplecov (~> 0.16.1)
@@ -53,9 +54,10 @@ GEM
53
54
  diff-lcs (1.3)
54
55
  docile (1.3.2)
55
56
  dotenv (2.7.5)
56
- dry-configurable (0.9.0)
57
+ dry-configurable (0.11.5)
57
58
  concurrent-ruby (~> 1.0)
58
59
  dry-core (~> 0.4, >= 0.4.7)
60
+ dry-equalizer (~> 0.2)
59
61
  dry-container (0.7.2)
60
62
  concurrent-ruby (~> 1.0)
61
63
  dry-configurable (~> 0.1, >= 0.1.3)
@@ -64,95 +66,99 @@ GEM
64
66
  dry-equalizer (0.3.0)
65
67
  dry-inflector (0.2.0)
66
68
  dry-initializer (3.0.3)
67
- dry-logic (1.0.5)
69
+ dry-logic (1.0.6)
68
70
  concurrent-ruby (~> 1.0)
69
71
  dry-core (~> 0.2)
70
72
  dry-equalizer (~> 0.2)
71
- dry-schema (1.4.3)
73
+ dry-schema (1.5.1)
72
74
  concurrent-ruby (~> 1.0)
73
75
  dry-configurable (~> 0.8, >= 0.8.3)
74
76
  dry-core (~> 0.4)
75
77
  dry-equalizer (~> 0.2)
76
78
  dry-initializer (~> 3.0)
77
79
  dry-logic (~> 1.0)
78
- dry-types (~> 1.2)
79
- dry-types (1.2.2)
80
+ dry-types (~> 1.4)
81
+ dry-types (1.4.0)
80
82
  concurrent-ruby (~> 1.0)
81
83
  dry-container (~> 0.3)
82
84
  dry-core (~> 0.4, >= 0.4.4)
83
85
  dry-equalizer (~> 0.3)
84
86
  dry-inflector (~> 0.1, >= 0.1.2)
85
87
  dry-logic (~> 1.0, >= 1.0.2)
86
- dry-validation (1.4.2)
88
+ dry-validation (1.5.0)
87
89
  concurrent-ruby (~> 1.0)
88
90
  dry-container (~> 0.7, >= 0.7.1)
89
91
  dry-core (~> 0.4)
90
92
  dry-equalizer (~> 0.2)
91
93
  dry-initializer (~> 3.0)
92
- dry-schema (~> 1.4, >= 1.4.3)
93
- factory_bot (4.11.1)
94
- activesupport (>= 3.0.0)
95
- faraday (0.17.3)
94
+ dry-schema (~> 1.5)
95
+ factory_bot (5.1.1)
96
+ activesupport (>= 4.2.0)
97
+ faraday (1.0.1)
96
98
  multipart-post (>= 1.2, < 3)
97
- faraday-detailed_logger (2.2.0)
99
+ faraday-detailed_logger (2.3.0)
98
100
  faraday (>= 0.8, < 2)
99
- faraday_middleware (0.14.0)
100
- faraday (>= 0.7.4, < 1.0)
101
+ faraday_middleware (1.0.0)
102
+ faraday (~> 1.0)
101
103
  fingerprintable (1.2.1)
102
104
  colorize
103
105
  gyoku (1.3.1)
104
106
  builder (>= 2.1.2)
105
- hashdiff (1.0.0)
107
+ hashdiff (1.0.1)
106
108
  httpi (2.4.4)
107
109
  rack
108
110
  socksify
109
- i18n (1.7.0)
111
+ i18n (1.8.2)
110
112
  concurrent-ruby (~> 1.0)
111
- jaro_winkler (1.5.3)
113
+ jaro_winkler (1.5.4)
112
114
  json (2.3.0)
113
115
  jwt (2.2.1)
114
116
  mini_portile2 (2.4.0)
115
- minitest (5.13.0)
117
+ minitest (5.14.1)
116
118
  multi_json (1.14.1)
117
119
  multi_xml (0.6.0)
118
120
  multipart-post (2.1.1)
119
121
  netsuite (0.8.5)
120
122
  savon (>= 2.3.0)
121
- nokogiri (1.10.7)
123
+ nokogiri (1.10.9)
122
124
  mini_portile2 (~> 2.4.0)
123
125
  nori (2.6.0)
124
- oauth2 (1.4.2)
126
+ oauth2 (1.4.4)
125
127
  faraday (>= 0.8, < 2.0)
126
128
  jwt (>= 1.0, < 3.0)
127
129
  multi_json (~> 1.3)
128
130
  multi_xml (~> 0.5)
129
131
  rack (>= 1.2, < 3)
130
- parallel (1.17.0)
131
- parser (2.6.4.1)
132
+ parallel (1.19.1)
133
+ parser (2.7.0.3)
132
134
  ast (~> 2.4.0)
133
- public_suffix (4.0.1)
134
- rack (2.1.1)
135
+ pd_ruby (0.2.3)
136
+ colorize
137
+ public_suffix (4.0.3)
138
+ rack (2.2.2)
135
139
  rainbow (3.0.0)
136
- rake (10.5.0)
140
+ rake (13.0.1)
137
141
  resonad (1.2.0)
138
- rspec (3.8.0)
139
- rspec-core (~> 3.8.0)
140
- rspec-expectations (~> 3.8.0)
141
- rspec-mocks (~> 3.8.0)
142
- rspec-core (3.8.2)
143
- rspec-support (~> 3.8.0)
144
- rspec-expectations (3.8.4)
142
+ rexml (3.2.4)
143
+ rspec (3.9.0)
144
+ rspec-core (~> 3.9.0)
145
+ rspec-expectations (~> 3.9.0)
146
+ rspec-mocks (~> 3.9.0)
147
+ rspec-core (3.9.1)
148
+ rspec-support (~> 3.9.1)
149
+ rspec-expectations (3.9.0)
145
150
  diff-lcs (>= 1.2.0, < 2.0)
146
- rspec-support (~> 3.8.0)
147
- rspec-mocks (3.8.1)
151
+ rspec-support (~> 3.9.0)
152
+ rspec-mocks (3.9.1)
148
153
  diff-lcs (>= 1.2.0, < 2.0)
149
- rspec-support (~> 3.8.0)
150
- rspec-support (3.8.2)
151
- rubocop (0.74.0)
154
+ rspec-support (~> 3.9.0)
155
+ rspec-support (3.9.2)
156
+ rubocop (0.80.0)
152
157
  jaro_winkler (~> 1.5.1)
153
158
  parallel (~> 1.10)
154
- parser (>= 2.6)
159
+ parser (>= 2.7.0.1)
155
160
  rainbow (>= 2.2.2, < 4.0)
161
+ rexml
156
162
  ruby-progressbar (~> 1.7)
157
163
  unicode-display_width (>= 1.4.0, < 1.7)
158
164
  ruby-progressbar (1.10.1)
@@ -170,29 +176,29 @@ GEM
170
176
  json (>= 1.8, < 3)
171
177
  simplecov-html (~> 0.10.0)
172
178
  simplecov-html (0.10.2)
173
- simply_serializable (1.4.2)
179
+ simply_serializable (1.5.1)
174
180
  fingerprintable (>= 1.2.1)
175
181
  socksify (1.7.1)
176
- stripe (5.14.0)
182
+ stripe (5.22.0)
177
183
  sync (0.5.0)
178
184
  term-ansicolor (1.7.1)
179
185
  tins (~> 1.0)
180
186
  thor (1.0.1)
181
187
  thread_safe (0.3.6)
182
- tins (1.24.0)
188
+ tins (1.25.0)
183
189
  sync
184
- tzinfo (1.2.5)
190
+ tzinfo (1.2.7)
185
191
  thread_safe (~> 0.1)
186
- unicode-display_width (1.6.0)
187
- vcr (5.0.0)
192
+ unicode-display_width (1.6.1)
193
+ vcr (5.1.0)
188
194
  wasabi (3.5.0)
189
195
  httpi (~> 2.0)
190
196
  nokogiri (>= 1.4.2)
191
- webmock (3.7.5)
197
+ webmock (3.8.2)
192
198
  addressable (>= 2.3.6)
193
199
  crack (>= 0.3.2)
194
200
  hashdiff (>= 0.4.0, < 2.0.0)
195
- zeitwerk (2.2.2)
201
+ zeitwerk (2.3.0)
196
202
 
197
203
  PLATFORMS
198
204
  ruby
@@ -204,7 +210,7 @@ DEPENDENCIES
204
210
  byebug
205
211
  factory_bot
206
212
  ledger_sync!
207
- rake (~> 10.0)
213
+ rake (~> 13.0)
208
214
  rspec (~> 3.2)
209
215
  rubocop
210
216
  vcr
@@ -1,21 +1,5 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2019 Ryan Jackson
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ Source code in this repository is variously licensed under the Business Source
2
+ License 1.1 (BSL) and other licenses. A copy of each license can be found in the licenses
3
+ directory or the relative directories. Source code in a given file is licensed under the BSL and the
4
+ copyright belongs to Modern Treasury Inc. unless otherwise noted at the
5
+ beginning of the file or in a specific license file.
data/README.md CHANGED
@@ -4,407 +4,23 @@
4
4
  [![Gem Version](https://badge.fury.io/rb/ledger_sync.svg)](https://badge.fury.io/rb/ledger_sync)
5
5
  [![Coverage Status](https://coveralls.io/repos/github/LedgerSync/ledger_sync/badge.svg?branch=master)](https://coveralls.io/github/LedgerSync/ledger_sync?branch=master)
6
6
 
7
- ## Installation
7
+ ## Join the Conversation
8
8
 
9
- Add this line to your application's Gemfile:
9
+ [Click here](https://join.slack.com/t/ledger-sync/shared_invite/zt-e5nbl8qc-eOA~5k7bg3p16_l3J7OS~Q) to join our public Slack group.
10
10
 
11
- ```ruby
12
- gem 'ledger_sync'
13
- ```
11
+ ## Documentation
14
12
 
15
- And then execute:
13
+ The most up-to-date documentation can be found at [www.ledgersync.dev](http://www.ledgersync.dev)
16
14
 
17
- ```bash
18
- $ bundle
19
- ```
15
+ ## License
20
16
 
21
- Or install it yourself as:
17
+ The gem is available as open source under the terms of the licenses detailed in `LICENSE.txt`.
22
18
 
23
- ```bash
24
- $ gem install ledger_sync
25
- ```
26
-
27
- ## Usage
28
-
29
- To use LedgerSync, you must create an `Operation`. The operation will be ledger-specific and will require the following:
30
-
31
- 1. Adaptor
32
- 2. Resource(s)
33
-
34
- The code may look like the following:
35
-
36
- ```ruby
37
- # First we create an adaptor, which is our connection to a ledger.
38
- # Each ledger may require different keys, so check the
39
- # documentation below for specifics.
40
- adaptor = LedgerSync::Adaptors::QuickBooksOnline::Adaptor.new(
41
- access_token: access_token, # assuming this is defined
42
- client_id: ENV['QUICKBOOKS_ONLINE_CLIENT_ID'],
43
- client_secret: ENV['QUICKBOOKS_ONLINE_CLIENT_SECRET'],
44
- realm_id: ENV['QUICKBOOKS_ONLINE_REALM_ID'],
45
- refresh_token: refresh_token, # assuming this is defined
46
- )
47
-
48
- # Create a resource on which to operate. Some resources have
49
- # relationships with other resources. You can use
50
- # `Util::ResourcesBuilder` to create resources and relationships from
51
- # a structured hash.
52
- resource = LedgerSync::Customer.new(
53
- name: 'Sample Customer',
54
- email: 'test@example.com'
55
- )
56
-
57
- # Create the operation we want to perform.
58
- operation = LedgerSync::Adaptors::QuickBooksOnline::Customer::Operations::Create.new(
59
- adaptor: adaptor,
60
- resource: resource
61
- )
62
-
63
- result = operation.perform # Returns a LedgerSync::OperationResult
64
-
65
- if result.success?
66
- resource = result.operation.resource
67
- # Do something with resource
68
- else # result.failure?
69
- raise result.error
70
- end
71
-
72
- # Because QuickBooks Online uses Oauth 2, you must always be sure to
73
- # save the access_token, refresh_token, and expirations as they can
74
- # change with any API call.
75
- result.operation.adaptor.ledger_attributes_to_save.each do |key, value|
76
- # save values
77
- end
78
- ```
79
-
80
- ## How it Works
81
-
82
- ### The Library Structure
83
-
84
- This library consists of two important layers:
85
-
86
- 1. Resources
87
- 2. Adaptors
88
-
89
- #### Resources
90
-
91
- Resources are named ruby objects (e.g. `Customer`, `Payment`, etc.) with strict attributes (e.g. `name`, `amount`, etc.). They are a layer between your application and an adaptor. They can be validated using an adaptor. You can create and use the resources, and an adaptor will update resources as needed based on the intention and outcome of that operation.
92
-
93
- You can find supported resources by calling `LedgerSync.resources`.
94
-
95
- Resources have defined attributes. Attributes are explicitly defined. An error is thrown if an unknown attribute is passed to it. You can retrieve the attributes of a resource by calling `LedgerSync::Customer.attributes`.
96
-
97
- A subset of these `attributes` may be a `reference`, which is simply a special type of attribute that references another resource. You can retrieve the references of a resource by calling `LedgerSync::Customer.references`.
98
-
99
- ### Adaptors
100
-
101
- Adaptors are ledger-specific ruby objects that contain all the logic to authenticate to a ledger, perform ledger-specific operations, and validate resources based on the requirements of the ledger. Adaptors contain a number of useful objects:
102
-
103
- - adaptor
104
- - operations
105
- - searchers
106
-
107
- #### Adaptor
108
-
109
- The adaptor handles authentication and requests to the ledger. Each adaptors initializer will vary based on the needs of that ledger.
110
-
111
- #### Operation
112
-
113
- Each adaptor defines operations that can be performed on specific resources (e.g. `Customer::Operations::Update`, `Payment::Operations::Create`). The operation defines two key things:
114
-
115
- - a `Contract` class which is used to validate the resource using the `dry-validation` gem
116
- - a `perform` instance method, which handles the actual API requests and response/error handling.
117
-
118
- Note: Adaptors may support different operations for each resource type.
119
-
120
- #### Searcher
121
-
122
- Searchers are used to search objects in the ledger. A searcher takes an `adaptor`, `query` string and optional `pagination` hash. For example, to search customer's by name:
123
-
124
- ```ruby
125
- searcher = LedgerSync::Adaptors::QuickBooksOnline::Customer::Searcher.new(
126
- adaptor: adaptor # assuming this is defined,
127
- query: 'test'
128
- )
129
-
130
- result = searcher.search # returns a LedgerSync::SearchResult
131
-
132
- if result.success?
133
- resources = result.resources
134
- # Do something with found resources
135
- else # result.failure?
136
- raise result.error
137
- end
138
-
139
- # Different ledgers may use different pagination strategies. In order
140
- # to get the next and previous set of results, you can use the following:
141
- next_searcher = searcher.next_searcher
142
- previous_searcher = searcher.previous_searcher
143
- ```
144
-
145
- ## NetSuite
146
-
147
- The NetSuite adaptor leverages NetSuite's REST API.
148
-
149
- ### Resource Metadata and Schemas
150
-
151
- Due to NetSuites granular user permissions and custom attributes, resources and methods for those resources can vary from one user (a.k.a. token) to another. Because of this variance, there are some helper classes that allow you to retrieve NetSuite records, allowed methods, attributes/parameters, etc.
152
-
153
- To retrieve the metadata for a record:
154
-
155
- ```ruby
156
- metadata = LedgerSync::Adaptors::NetSuite::Record::Metadata.new(
157
- adaptor: netsuite_adaptor, # Assuming this is previous defined
158
- record: :customer
159
- )
160
-
161
- puts metadata.http_methods # Returns a list of LedgerSync::Adaptors::NetSuite::Record::HTTPMethod objects
162
- puts metadata.properties # Returns a list of LedgerSync::Adaptors::NetSuite::Record::Property objects
163
- ```
164
-
165
- ### Reference
166
-
167
- - [NetSuite REST API Documentation](https://docs.oracle.com/cloud/latest/netsuitecs_gs/NSTRW/NSTRW.pdf)
168
-
169
- ## NetSuite SOAP
170
-
171
- LedgerSync supports the NetSuite SOAP adaptor, leveraging [the NetSuite gem](https://github.com/NetSweet/netsuite). The adaptor and sample operations are provided, though the main NetSuite adaptor uses the REST API.
172
-
173
- ### Reference
174
-
175
- - [NetSuite SOAP API Documentation](https://docs.oracle.com/cloud/latest/netsuitecs_gs/NSTWR/NSTWR.pdf)
176
-
177
-
178
- ## QuickBooks Online
179
-
180
- ### OAuth
181
-
182
- QuickBooks Online utilizes OAuth 2.0, which requires frequent refreshing of the access token. The adaptor will handle this automatically, attempting a single token refresh on any single request authentication failure. Depending on how you use the library, every adaptor has implements a class method `ledger_attributes_to_save`, which is an array of attributes that may change as the adaptor is used. You can also call the instance method `ledger_attributes_to_save` which will be a hash of these values. It is a good practice to always store these attributes if you are saving access tokens in your database.
183
-
184
- The adaptor also implements some helper methods for getting tokens. For example, you can set up an adaptor using the following:
185
-
186
- ```ruby
187
- # Retrieve the following values from Intuit app settings
188
- client_id = 'ID'
189
- client_secret = 'SECRET'
190
- redirect_uri = 'http://localhost:3000'
191
-
192
- oauth_client = LedgerSync::Adaptors::QuickBooksOnline::OAuthClientHelper.new(
193
- client_id: client_id,
194
- client_secret: client_secret
195
- )
196
-
197
- puts oauth_client.authorization_url(redirect_uri: redirect_uri)
198
-
199
- # Visit on the output URL and authorize a company.
200
- # You will be redirected back to the redirect_uri.
201
- # Copy the full url from your browser:
202
-
203
- uri = 'https://localhost:3000/?code=FOO&state=BAR&realm_id=BAZ'
204
-
205
- adaptor = LedgerSync::Adaptors::QuickBooksOnline::Adaptor.new_from_oauth_client_uri(
206
- oauth_client: oauth_client,
207
- uri: uri
208
- )
209
-
210
- # You can test that the auth works:
211
-
212
- adaptor.refresh!
213
- ```
214
-
215
- **Note: If you have a `.env` file storing your secrets, the adaptor will automatically update the variables and record previous values whenever values change**
216
-
217
- ### Webhooks
218
-
219
- Reference: [QuickBooks Online Webhook Documentation](https://developer.intuit.com/app/developer/qbo/docs/develop/webhooks/managing-webhooks-notifications#validating-the-notification)
220
-
221
- LedgerSync offers an easy way to validate and parse webhook payloads. It also allows you to easily fetch the resources referenced. You can create and use a webhook with the following:
222
-
223
- ```ruby
224
- # Assuming `request` is the webhook request received from Quickbooks Online
225
- webhook = LedgerSync::Adaptors::QuickBooksOnline::Webhook.new(
226
- payload: request.body.read # It accepts a JSON string or hash
227
- )
228
-
229
- verification_token = WEBHOOK_VERIFICATION_TOKEN # You get this token when you create webhooks in the QuickBooks Online dashboard
230
- signature = request.headers['intuit-signature']
231
- raise 'Not valid' unless webhook.valid?(signature: signature, verification_token: verification_token)
232
-
233
- # Although not yet used, webhooks may include notifications for multiple realms
234
- webhook.notifications.each do |notification|
235
- puts notification.realm_id
236
-
237
- # Multiple events may be referenced.
238
- notification.events.each do |event|
239
- puts event.resource # Returns a LedgerSync resource with the `ledger_id` set
240
-
241
- # Other helpful methods
242
- notification.find_operation_class(adaptor: your_quickbooks_adaptor_instance) # The respective Find class
243
- notification.find_operation(adaptor: your_quickbooks_adaptor_instance) # The initialized respective Find operation
244
- notification.find(adaptor: your_quickbooks_adaptor_instance) # Performs a Find operation for the resource retrieving the latest version from QuickBooks Online
245
- end
246
-
247
- # Other helpful methods
248
- notification.resources # All resources for a given webhook across all events
249
- end
250
-
251
- # Other helpful methods
252
- webhook.events # All events for a given webhook across all realms
253
- webhook.resources # All events for a given webhook across all realms and events
254
- ```
255
-
256
- ### Errors
257
-
258
- - [QuickBooks Online Error Documentation](https://developer.intuit.com/app/developer/qbo/docs/develop/troubleshooting/error-codes)
259
-
260
- ## Tips and More
261
-
262
- ### Keyword Arguments
263
-
264
- LedgerSync heavily uses ruby keyword arguments so as to make it clear what values are being passed and which attributes are required. When this README says something like "the `fun_function` function takes the argument `foo`" that translates to `fun_function(foo: :some_value)`.
265
-
266
- ### Fingerprints
267
-
268
- Most objects in LedgerSync can be fingerprinted by calling the instance method `fingerprint`. For example:
269
-
270
- ```ruby
271
- puts LedgerSync::Customer.new.fingerprint # "b3eab7ec00431a4ae0468fee72e5ba8f"
272
-
273
- puts LedgerSync::Customer.new.fingerprint == LedgerSync::Customer.new.fingerprint # true
274
- puts LedgerSync::Customer.new.fingerprint == LedgerSync::Customer.new(name: :foo).fingerprint # false
275
- puts LedgerSync::Customer.new.fingerprint == LedgerSync::Payment.new.fingerprint # false
276
- ```
277
-
278
- Fingerprints are used to compare objects. This method is used in de-duping objects, as it only considers the data inside and not the instance itself (as shown above).
279
-
280
- ### Serialization
281
-
282
- Most objects in LedgerSync can be serialized by calling the instance method `serialize`. For example:
283
-
284
- ```ruby
285
- puts LedgerSync::Payment.new(
286
- customer: LedgerSync::Customer.new
287
- )
288
-
289
- {
290
- root: "LedgerSync::Payment/8eed81c0177801a001f2544f0c85e21d",
291
- objects: {
292
- "LedgerSync::Payment/8eed81c0177801a001f2544f0c85e21d": {
293
- id: "LedgerSync::Payment/8eed81c0177801a001f2544f0c85e21d",
294
- object: "LedgerSync::Payment",
295
- fingeprint: "8eed81c0177801a001f2544f0c85e21d",
296
- data: {
297
- currency: nil,
298
- amount: nil,
299
- customer: {
300
- object: "reference",
301
- id: "LedgerSync::Customer/b3eab7ec00431a4ae0468fee72e5ba8f"
302
- },
303
- external_id: "",
304
- ledger_id: nil,
305
-
306
- }
307
- },
308
- "LedgerSync::Customer/b3eab7ec00431a4ae0468fee72e5ba8f": {
309
- id: "LedgerSync::Customer/b3eab7ec00431a4ae0468fee72e5ba8f",
310
- object: "LedgerSync::Customer",
311
- fingeprint: "b3eab7ec00431a4ae0468fee72e5ba8f",
312
- data: {
313
- name: nil,
314
- email: nil,
315
- phone_number: nil,
316
- external_id: "",
317
- ledger_id: nil
318
- }
319
- }
320
- }
321
- }
322
- ```
323
-
324
- The serialization of any object follows the same structure. There is a `:root` key that holds the ID of the root object. There is also an `:objects` hash that contains all of the objects for this serialization. As you can see, unique nested objects listed in the `:objects` hash and referenced using a "reference object", in this case:
325
-
326
- ```ruby
327
- {
328
- object: "reference",
329
- id: "LedgerSync::Customer/b3eab7ec00431a4ae0468fee72e5ba8f"
330
- }
331
- ```
332
-
333
- ## Test Adaptor
334
-
335
- LedgerSync offers a test adaptor `LedgerSync::Adaptors::Test::Adaptor` that you can easily use and stub without requiring API requests. For example:
336
-
337
- ```ruby
338
-
339
- operation = LedgerSync::Adaptors::Test::Customer::Operations::Create.new(
340
- adaptor: LedgerSync::Adaptors::Test::Adaptor.new,
341
- resource: LedgerSync::Customer.new(name: 'Test Customer')
342
- )
343
-
344
- expect(operation).to be_valid
345
-
346
- result = operation.perform
347
- expect(result).to be_a(LedgerSync::OperationResult::Success)
348
- expect(result).to be_success
349
-
350
- expect { operation.perform }.to raise_error(PerformedOperationError)
351
- ```
352
-
353
- ## Development
354
-
355
- After checking out the repo, run `bin/setup` to install dependencies.
356
-
357
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org)
358
-
359
- ### Testing
360
-
361
- Run `bundle exec rspec` to run all unit, feature, and integration tests. Unlike QA Tests, all external HTTP requests and responses are stubbed.
362
-
363
- ### QA Testing
364
-
365
- **BE SURE TO USE A TEST ENVIRONMENT ON YOUR LEDGER.**
366
-
367
- To fully test the library against the actual ledgers, you can run `bin/qa` which will run all tests in the `qa/` directory. QA Tests are written in RSpec. Unlike tests in the `spec/` directory, QA tests allow external HTTP requests.
368
-
369
- As these interact with real ledgers, you will need to provide secrets. You can do so in a `.env` file in the root directory. Copy the `.env.template` file to get started.
370
-
371
- **WARNINGS:**
372
-
373
- - **BE SURE TO USE A TEST ENVIRONMENT ON YOUR LEDGER.**
374
- - **NEVER CHECK IN YOUR SECRETS (e.g. the `.env` file).**
375
- - Because these tests actually create and modify resources, they attempt to do "cleanup" by deleting any newly created resources. This process could fail, and you may need to delete these resources manually.
376
-
377
- ### Console
378
-
379
- Run `bundle console` to start and interactive console with the library already loaded. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
380
-
381
- ## Deployment
382
-
383
- To deploy a new version of the gem to RubyGems, you can use the `release.sh` script in the root. The script takes advantage of [the bump gem](https://github.com/gregorym/bump). So you may call the script using any of the following:
384
-
385
- ```bash
386
- # Version Format: MAJOR.MINOR.PATCH
387
- ./release.sh patch # to bump X in 1.1.X
388
- ./release.sh minor # to bump X in 1.X.1
389
- ./release.sh major # to bump X in X.1.1
390
- ```
391
-
392
- ### Contributing
393
-
394
- Bug reports and pull requests are welcome on GitHub at https://github.com/LedgerSync/ledger_sync. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
395
-
396
- ### License
397
-
398
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
399
-
400
- ### Code of Conduct
401
-
402
- Everyone interacting in the LedgerSync project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/LedgerSync/ledger_sync/blob/master/CODE_OF_CONDUCT.md).
403
-
404
- # Maintainers
19
+ ## Maintainers
405
20
 
406
21
  A big thank you to our maintainers:
407
22
 
408
23
  - [@ryanwjackson](https://github.com/ryanwjackson)
409
24
  - [@jozefvaclavik](https://github.com/jozefvaclavik)
410
- - And the whole [Modern Treasury](https://www.moderntreasury.com) team
25
+ - [@SeanBolt](https://github.com/SeanBolt)
26
+ - And the whole [Modern Treasury](https://www.moderntreasury.com) team