ledger_sync 1.3.5 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +11 -2
- data/.travis.yml +4 -0
- data/Gemfile.lock +13 -13
- data/LICENSE.txt +5 -97
- data/README.md +8 -505
- data/bin/quickbooks_online_oauth_server.rb +10 -9
- data/docs/CNAME +1 -0
- data/docs/assets/css/brands.min.css +5 -0
- data/docs/assets/css/fontawesome.min.css +5 -0
- data/docs/assets/css/main.css +1924 -0
- data/docs/assets/css/monokai.css +441 -0
- data/docs/assets/js/main.js +214 -0
- data/docs/assets/js/plugins.js +22 -0
- data/docs/assets/js/prism.js +9 -0
- data/docs/assets/webfonts/fa-brands-400.eot +0 -0
- data/docs/assets/webfonts/fa-brands-400.svg +3452 -0
- data/docs/assets/webfonts/fa-brands-400.ttf +0 -0
- data/docs/assets/webfonts/fa-brands-400.woff +0 -0
- data/docs/assets/webfonts/fa-brands-400.woff2 +0 -0
- data/docs/blog/index.html +303 -0
- data/docs/guides/architecture/clients/index.html +479 -0
- data/docs/guides/architecture/index.html +456 -0
- data/docs/guides/architecture/operations/index.html +486 -0
- data/docs/guides/architecture/resources/index.html +482 -0
- data/docs/guides/architecture/results/index.html +447 -0
- data/docs/guides/architecture/searchers/index.html +467 -0
- data/docs/guides/architecture/serialization/index.html +497 -0
- data/docs/guides/community/index.html +433 -0
- data/docs/guides/contribute/console/index.html +445 -0
- data/docs/guides/contribute/deployment/index.html +455 -0
- data/docs/guides/contribute/documentation/index.html +471 -0
- data/docs/guides/contribute/index.html +455 -0
- data/docs/guides/contribute/qa/index.html +457 -0
- data/docs/guides/contribute/testing/index.html +445 -0
- data/docs/guides/customization/custom_resources/index.html +482 -0
- data/docs/guides/customization/custom_serializers/index.html +481 -0
- data/docs/guides/customization/index.html +452 -0
- data/docs/guides/customization/resource_converters/index.html +512 -0
- data/docs/guides/getting-started/get-help/index.html +448 -0
- data/docs/guides/getting-started/index.html +442 -0
- data/docs/guides/getting-started/installation/index.html +454 -0
- data/docs/guides/getting-started/quick-start/index.html +552 -0
- data/docs/guides/index.html +449 -0
- data/docs/guides/ledgers/index.html +450 -0
- data/docs/guides/ledgers/netsuite/index.html +445 -0
- data/docs/guides/ledgers/netsuite_soap/index.html +445 -0
- data/docs/guides/ledgers/quickbooks_online/index.html +445 -0
- data/docs/guides/ledgers/stripe/index.html +445 -0
- data/docs/guides/modern-treasury/index.html +432 -0
- data/docs/guides/tips_and_more/index.html +492 -0
- data/docs/images/1.jpg +0 -0
- data/docs/images/10.jpg +0 -0
- data/docs/images/2.jpg +0 -0
- data/docs/images/3.jpg +0 -0
- data/docs/images/4.jpg +0 -0
- data/docs/images/5.jpg +0 -0
- data/docs/images/6.jpg +0 -0
- data/docs/images/7.jpg +0 -0
- data/docs/images/8.jpg +0 -0
- data/docs/images/9.jpg +0 -0
- data/docs/images/logo.svg +8 -0
- data/docs/index.html +400 -0
- data/docs/overview/index.html +430 -0
- data/docs/posts/introducing-docs/index.html +291 -0
- data/docs/posts/netsuite-authentication/index.html +645 -0
- data/docs/reference/architecture/clients/index.html +353 -0
- data/docs/reference/architecture/index.html +332 -0
- data/docs/reference/architecture/operations/index.html +323 -0
- data/docs/reference/architecture/resources/index.html +356 -0
- data/docs/reference/architecture/results/index.html +323 -0
- data/docs/reference/architecture/searchers/index.html +323 -0
- data/docs/reference/architecture/serialization/index.html +323 -0
- data/docs/reference/index.html +302 -0
- data/docs/reference/netsuite/authentication/index.html +413 -0
- data/docs/reference/netsuite/authentication/token_based_authentication/index.html +507 -0
- data/docs/reference/netsuite/index.html +409 -0
- data/docs/reference/netsuite/resources/account/index.html +505 -0
- data/docs/reference/netsuite/resources/check/index.html +513 -0
- data/docs/reference/netsuite/resources/check_line_item/index.html +481 -0
- data/docs/reference/netsuite/resources/currency/index.html +497 -0
- data/docs/reference/netsuite/resources/customer/index.html +509 -0
- data/docs/reference/netsuite/resources/customer_deposit/index.html +501 -0
- data/docs/reference/netsuite/resources/department/index.html +505 -0
- data/docs/reference/netsuite/resources/deposit/index.html +489 -0
- data/docs/reference/netsuite/resources/deposit_line_item/index.html +481 -0
- data/docs/reference/netsuite/resources/index.html +457 -0
- data/docs/reference/netsuite/resources/invoice/index.html +489 -0
- data/docs/reference/netsuite/resources/invoice_line_item/index.html +477 -0
- data/docs/reference/netsuite/resources/item/index.html +465 -0
- data/docs/reference/netsuite/resources/journal_entry/index.html +509 -0
- data/docs/reference/netsuite/resources/journal_entry_line_item/index.html +485 -0
- data/docs/reference/netsuite/resources/ledger_class/index.html +505 -0
- data/docs/reference/netsuite/resources/location/index.html +489 -0
- data/docs/reference/netsuite/resources/resource/index.html +461 -0
- data/docs/reference/netsuite/resources/subsidiary/index.html +469 -0
- data/docs/reference/netsuite/resources/vendor/index.html +513 -0
- data/docs/reference/netsuite_soap/index.html +324 -0
- data/docs/reference/netsuite_soap/resources/customer/index.html +385 -0
- data/docs/reference/netsuite_soap/resources/index.html +337 -0
- data/docs/reference/netsuite_soap/resources/resource/index.html +357 -0
- data/docs/reference/netsuite_soap/resources/subsidiary/index.html +377 -0
- data/docs/reference/quickbooks_online/authentication/index.html +463 -0
- data/docs/reference/quickbooks_online/errors/index.html +416 -0
- data/docs/reference/quickbooks_online/index.html +414 -0
- data/docs/reference/quickbooks_online/resources/account/index.html +551 -0
- data/docs/reference/quickbooks_online/resources/bill/index.html +555 -0
- data/docs/reference/quickbooks_online/resources/bill_line_item/index.html +517 -0
- data/docs/reference/quickbooks_online/resources/bill_payment/index.html +571 -0
- data/docs/reference/quickbooks_online/resources/bill_payment_line_item/index.html +509 -0
- data/docs/reference/quickbooks_online/resources/currency/index.html +513 -0
- data/docs/reference/quickbooks_online/resources/customer/index.html +535 -0
- data/docs/reference/quickbooks_online/resources/department/index.html +539 -0
- data/docs/reference/quickbooks_online/resources/deposit/index.html +547 -0
- data/docs/reference/quickbooks_online/resources/deposit_line_item/index.html +521 -0
- data/docs/reference/quickbooks_online/resources/expense/index.html +559 -0
- data/docs/reference/quickbooks_online/resources/expense_line_item/index.html +517 -0
- data/docs/reference/quickbooks_online/resources/index.html +505 -0
- data/docs/reference/quickbooks_online/resources/invoice/index.html +547 -0
- data/docs/reference/quickbooks_online/resources/invoice_sales_line_item/index.html +517 -0
- data/docs/reference/quickbooks_online/resources/item/index.html +505 -0
- data/docs/reference/quickbooks_online/resources/journal_entry/index.html +539 -0
- data/docs/reference/quickbooks_online/resources/journal_entry_line_item/index.html +525 -0
- data/docs/reference/quickbooks_online/resources/ledger_class/index.html +539 -0
- data/docs/reference/quickbooks_online/resources/payment/index.html +559 -0
- data/docs/reference/quickbooks_online/resources/payment_line_item/index.html +509 -0
- data/docs/reference/quickbooks_online/resources/preferences/index.html +547 -0
- data/docs/reference/quickbooks_online/resources/primary_email_addr/index.html +505 -0
- data/docs/reference/quickbooks_online/resources/primary_phone/index.html +505 -0
- data/docs/reference/quickbooks_online/resources/resource/index.html +501 -0
- data/docs/reference/quickbooks_online/resources/subsidiary/index.html +509 -0
- data/docs/reference/quickbooks_online/resources/transfer/index.html +543 -0
- data/docs/reference/quickbooks_online/resources/vendor/index.html +547 -0
- data/docs/reference/quickbooks_online/webhooks/index.html +448 -0
- data/docs/reference/stripe/index.html +314 -0
- data/docs/reference/stripe/resources/customer/index.html +387 -0
- data/docs/reference/stripe/resources/index.html +330 -0
- data/docs/reference/stripe/resources/resource/index.html +351 -0
- data/docs/style-guide/index.html +396 -0
- data/documentation/build.sh +8 -0
- data/documentation/generate.rb +32 -0
- data/documentation/generators/generator.rb +80 -0
- data/documentation/generators/guides/generator.rb +36 -0
- data/documentation/generators/reference/generator.rb +76 -0
- data/documentation/generators/reference/ledger/generator.rb +74 -0
- data/documentation/generators/template.rb +22 -0
- data/documentation/helper_methods.rb +17 -0
- data/documentation/site/CNAME +1 -0
- data/documentation/site/Gemfile +11 -0
- data/documentation/site/Gemfile.lock +69 -0
- data/documentation/site/LICENSE.md +40 -0
- data/documentation/site/README.md +8 -0
- data/documentation/site/_config.yml +113 -0
- data/documentation/site/_data/guides_sections.yml +10 -0
- data/documentation/site/_data/reference_sections.yml +5 -0
- data/documentation/site/_includes/action_link.html +8 -0
- data/documentation/site/_includes/alerts/base.html +3 -0
- data/documentation/site/_includes/alerts/danger.html +1 -0
- data/documentation/site/_includes/alerts/info.html +1 -0
- data/documentation/site/_includes/alerts/success.html +1 -0
- data/documentation/site/_includes/alerts/warning.html +1 -0
- data/documentation/site/_includes/cta_buttons.html +4 -0
- data/documentation/site/_includes/example.md +8 -0
- data/documentation/site/_includes/footer.html +25 -0
- data/documentation/site/_includes/getting_help.md +8 -0
- data/documentation/site/_includes/guides_menu.html +29 -0
- data/documentation/site/_includes/guides_submenu.html +7 -0
- data/documentation/site/_includes/header.html +35 -0
- data/documentation/site/_includes/installation_instructions.md +17 -0
- data/documentation/site/_includes/ledgers/Stripe_summary.md +1 -0
- data/documentation/site/_includes/ledgers/netsuite_soap_summary.md +1 -0
- data/documentation/site/_includes/ledgers/netsuite_summary.md +1 -0
- data/documentation/site/_includes/ledgers/netsuite_summary_shared.md +1 -0
- data/documentation/site/_includes/ledgers/quickbooks_online_summary.md +1 -0
- data/documentation/site/_includes/reference/netsuite/authentication/_token_based_authentication.md +99 -0
- data/documentation/site/_includes/reference/netsuite/authentication/index.md +15 -0
- data/documentation/site/_includes/reference/netsuite/authentication/token_based_authentication.md +6 -0
- data/documentation/site/_includes/reference/netsuite/index.md +25 -0
- data/documentation/site/_includes/reference/netsuite_soap/index.md +11 -0
- data/documentation/site/_includes/reference/quickbooks_online/authentication/index.md +55 -0
- data/documentation/site/_includes/reference/quickbooks_online/errors/index.md +9 -0
- data/documentation/site/_includes/reference/quickbooks_online/index.md +6 -0
- data/documentation/site/_includes/reference/quickbooks_online/webhooks/index.md +42 -0
- data/documentation/site/_includes/reference/stripe/index.md +6 -0
- data/documentation/site/_includes/section_content.html +34 -0
- data/documentation/site/_includes/section_cta.html +28 -0
- data/documentation/site/_includes/section_grid.html +60 -0
- data/documentation/site/_includes/section_guides.html +35 -0
- data/documentation/site/_includes/section_hero.html +28 -0
- data/documentation/site/_includes/submenu.html +8 -0
- data/documentation/site/_layouts/advanced.html +9 -0
- data/documentation/site/_layouts/base.html +34 -0
- data/documentation/site/_layouts/blog.html +51 -0
- data/documentation/site/_layouts/body.html +11 -0
- data/documentation/site/_layouts/guides.html +46 -0
- data/documentation/site/_layouts/page.html +26 -0
- data/documentation/site/_layouts/post.html +52 -0
- data/documentation/site/_layouts/reference.html +46 -0
- data/documentation/site/_layouts/reference_netsuite.html +46 -0
- data/documentation/site/_layouts/reference_netsuite_soap.html +46 -0
- data/documentation/site/_layouts/reference_quickbooks_online.html +46 -0
- data/documentation/site/_layouts/reference_stripe.html +46 -0
- data/documentation/site/_plugins/filters.rb +122 -0
- data/documentation/site/_plugins/hooks.rb +9 -0
- data/documentation/site/_posts/2020-06-01-introducing-docs.md +17 -0
- data/documentation/site/_posts/2020-06-10-netsuite-authentication.md +382 -0
- data/documentation/site/_sass/imports/_animations.scss +19 -0
- data/documentation/site/_sass/imports/_footer.scss +94 -0
- data/documentation/site/_sass/imports/_functions.scss +69 -0
- data/documentation/site/_sass/imports/_general.scss +687 -0
- data/documentation/site/_sass/imports/_guides.scss +300 -0
- data/documentation/site/_sass/imports/_header.scss +358 -0
- data/documentation/site/_sass/imports/_icons.scss +90 -0
- data/documentation/site/_sass/imports/_post-navigation.scss +67 -0
- data/documentation/site/_sass/imports/_posts-pages.scss +165 -0
- data/documentation/site/_sass/imports/_prism.scss +174 -0
- data/documentation/site/_sass/imports/_reset.scss +210 -0
- data/documentation/site/_sass/imports/_sections.scss +370 -0
- data/documentation/site/_sass/imports/_structure.scss +44 -0
- data/documentation/site/_templates/_layouts/reference_ledger.html.erb +46 -0
- data/documentation/site/_templates/guides/ledger.md.erb +9 -0
- data/documentation/site/_templates/reference/resources/index.md.erb +9 -0
- data/documentation/site/_templates/reference/resources/resource.md.erb +27 -0
- data/documentation/site/assets/css/brands.min.css +5 -0
- data/documentation/site/assets/css/fontawesome.min.css +5 -0
- data/documentation/site/assets/css/main.scss +45 -0
- data/documentation/site/assets/css/monokai.css +441 -0
- data/documentation/site/assets/js/main.js +214 -0
- data/documentation/site/assets/js/plugins.js +22 -0
- data/documentation/site/assets/js/prism.js +9 -0
- data/documentation/site/assets/webfonts/fa-brands-400.eot +0 -0
- data/documentation/site/assets/webfonts/fa-brands-400.svg +3452 -0
- data/documentation/site/assets/webfonts/fa-brands-400.ttf +0 -0
- data/documentation/site/assets/webfonts/fa-brands-400.woff +0 -0
- data/documentation/site/assets/webfonts/fa-brands-400.woff2 +0 -0
- data/documentation/site/blog/index.md +6 -0
- data/documentation/site/guides/architecture/clients.md +35 -0
- data/documentation/site/guides/architecture/index.md +14 -0
- data/documentation/site/guides/architecture/operations.md +45 -0
- data/documentation/site/guides/architecture/resources.md +40 -0
- data/documentation/site/guides/architecture/results.md +6 -0
- data/documentation/site/guides/architecture/searchers.md +28 -0
- data/documentation/site/guides/architecture/serialization.md +59 -0
- data/documentation/site/guides/community/index.md +8 -0
- data/documentation/site/guides/contribute/console.md +6 -0
- data/documentation/site/guides/contribute/deployment.md +17 -0
- data/documentation/site/guides/contribute/documentation.md +37 -0
- data/documentation/site/guides/contribute/index.md +18 -0
- data/documentation/site/guides/contribute/qa.md +16 -0
- data/documentation/site/guides/contribute/testing.md +6 -0
- data/documentation/site/guides/customization/custom_resources.md +50 -0
- data/documentation/site/guides/customization/custom_serializers.md +47 -0
- data/documentation/site/guides/customization/index.md +15 -0
- data/documentation/site/guides/customization/resource_converters.md +79 -0
- data/documentation/site/guides/getting-started/get-help.md +7 -0
- data/documentation/site/guides/getting-started/index.md +8 -0
- data/documentation/site/guides/getting-started/installation.md +7 -0
- data/documentation/site/guides/getting-started/quick-start.md +123 -0
- data/documentation/site/guides/index.md +16 -0
- data/documentation/site/guides/ledgers/index.md +12 -0
- data/documentation/site/guides/ledgers/netsuite.md +9 -0
- data/documentation/site/guides/ledgers/netsuite_soap.md +9 -0
- data/documentation/site/guides/ledgers/quickbooks_online.md +9 -0
- data/documentation/site/guides/ledgers/stripe.md +9 -0
- data/documentation/site/guides/modern-treasury/index.md +14 -0
- data/documentation/site/guides/tips_and_more/index.md +76 -0
- data/documentation/site/images/1.jpg +0 -0
- data/documentation/site/images/10.jpg +0 -0
- data/documentation/site/images/2.jpg +0 -0
- data/documentation/site/images/3.jpg +0 -0
- data/documentation/site/images/4.jpg +0 -0
- data/documentation/site/images/5.jpg +0 -0
- data/documentation/site/images/6.jpg +0 -0
- data/documentation/site/images/7.jpg +0 -0
- data/documentation/site/images/8.jpg +0 -0
- data/documentation/site/images/9.jpg +0 -0
- data/documentation/site/images/logo.svg +8 -0
- data/documentation/site/index.md +99 -0
- data/documentation/site/overview.md +21 -0
- data/documentation/site/reference/architecture/clients.md +33 -0
- data/documentation/site/reference/architecture/index.md +14 -0
- data/documentation/site/reference/architecture/operations.md +6 -0
- data/documentation/site/reference/architecture/resources.md +38 -0
- data/documentation/site/reference/architecture/results.md +6 -0
- data/documentation/site/reference/architecture/searchers.md +6 -0
- data/documentation/site/reference/architecture/serialization.md +6 -0
- data/documentation/site/reference/index.md +6 -0
- data/documentation/site/reference/netsuite/authentication/_token_based_authentication.md +99 -0
- data/documentation/site/reference/netsuite/authentication/index.md +15 -0
- data/documentation/site/reference/netsuite/authentication/token_based_authentication.md +6 -0
- data/documentation/site/reference/netsuite/index.md +25 -0
- data/documentation/site/reference/netsuite/resources/account.md +38 -0
- data/documentation/site/reference/netsuite/resources/check.md +49 -0
- data/documentation/site/reference/netsuite/resources/check_line_item.md +23 -0
- data/documentation/site/reference/netsuite/resources/currency.md +45 -0
- data/documentation/site/reference/netsuite/resources/customer.md +48 -0
- data/documentation/site/reference/netsuite/resources/customer_deposit.md +46 -0
- data/documentation/site/reference/netsuite/resources/department.md +47 -0
- data/documentation/site/reference/netsuite/resources/deposit.md +25 -0
- data/documentation/site/reference/netsuite/resources/deposit_line_item.md +23 -0
- data/documentation/site/reference/netsuite/resources/index.md +25 -0
- data/documentation/site/reference/netsuite/resources/invoice.md +25 -0
- data/documentation/site/reference/netsuite/resources/invoice_line_item.md +22 -0
- data/documentation/site/reference/netsuite/resources/item.md +19 -0
- data/documentation/site/reference/netsuite/resources/journal_entry.md +48 -0
- data/documentation/site/reference/netsuite/resources/journal_entry_line_item.md +24 -0
- data/documentation/site/reference/netsuite/resources/ledger_class.md +47 -0
- data/documentation/site/reference/netsuite/resources/location.md +43 -0
- data/documentation/site/reference/netsuite/resources/resource.md +18 -0
- data/documentation/site/reference/netsuite/resources/subsidiary.md +20 -0
- data/documentation/site/reference/netsuite/resources/vendor.md +49 -0
- data/documentation/site/reference/netsuite_soap/index.md +11 -0
- data/documentation/site/reference/netsuite_soap/resources/customer.md +34 -0
- data/documentation/site/reference/netsuite_soap/resources/index.md +9 -0
- data/documentation/site/reference/netsuite_soap/resources/resource.md +18 -0
- data/documentation/site/reference/netsuite_soap/resources/subsidiary.md +32 -0
- data/documentation/site/reference/quickbooks_online/authentication/index.md +55 -0
- data/documentation/site/reference/quickbooks_online/errors/index.md +9 -0
- data/documentation/site/reference/quickbooks_online/index.md +6 -0
- data/documentation/site/reference/quickbooks_online/resources/account.md +44 -0
- data/documentation/site/reference/quickbooks_online/resources/bill.md +45 -0
- data/documentation/site/reference/quickbooks_online/resources/bill_line_item.md +22 -0
- data/documentation/site/reference/quickbooks_online/resources/bill_payment.md +49 -0
- data/documentation/site/reference/quickbooks_online/resources/bill_payment_line_item.md +20 -0
- data/documentation/site/reference/quickbooks_online/resources/currency.md +21 -0
- data/documentation/site/reference/quickbooks_online/resources/customer.md +40 -0
- data/documentation/site/reference/quickbooks_online/resources/department.md +41 -0
- data/documentation/site/reference/quickbooks_online/resources/deposit.md +43 -0
- data/documentation/site/reference/quickbooks_online/resources/deposit_line_item.md +23 -0
- data/documentation/site/reference/quickbooks_online/resources/expense.md +46 -0
- data/documentation/site/reference/quickbooks_online/resources/expense_line_item.md +22 -0
- data/documentation/site/reference/quickbooks_online/resources/index.md +33 -0
- data/documentation/site/reference/quickbooks_online/resources/invoice.md +43 -0
- data/documentation/site/reference/quickbooks_online/resources/invoice_sales_line_item.md +22 -0
- data/documentation/site/reference/quickbooks_online/resources/item.md +19 -0
- data/documentation/site/reference/quickbooks_online/resources/journal_entry.md +41 -0
- data/documentation/site/reference/quickbooks_online/resources/journal_entry_line_item.md +24 -0
- data/documentation/site/reference/quickbooks_online/resources/ledger_class.md +41 -0
- data/documentation/site/reference/quickbooks_online/resources/payment.md +46 -0
- data/documentation/site/reference/quickbooks_online/resources/payment_line_item.md +20 -0
- data/documentation/site/reference/quickbooks_online/resources/preferences.md +34 -0
- data/documentation/site/reference/quickbooks_online/resources/primary_email_addr.md +19 -0
- data/documentation/site/reference/quickbooks_online/resources/primary_phone.md +19 -0
- data/documentation/site/reference/quickbooks_online/resources/resource.md +18 -0
- data/documentation/site/reference/quickbooks_online/resources/subsidiary.md +20 -0
- data/documentation/site/reference/quickbooks_online/resources/transfer.md +42 -0
- data/documentation/site/reference/quickbooks_online/resources/vendor.md +43 -0
- data/documentation/site/reference/quickbooks_online/webhooks/index.md +42 -0
- data/documentation/site/reference/stripe/index.md +6 -0
- data/documentation/site/reference/stripe/resources/customer.md +45 -0
- data/documentation/site/reference/stripe/resources/index.md +8 -0
- data/documentation/site/reference/stripe/resources/resource.md +18 -0
- data/documentation/site/style-guide.md +137 -0
- data/ledger_sync.gemspec +1 -1
- data/lib/ledger_sync.rb +40 -65
- data/lib/ledger_sync/core_ext/resonad.rb +2 -2
- data/lib/ledger_sync/deserializer.rb +55 -6
- data/lib/ledger_sync/error.rb +15 -0
- data/lib/ledger_sync/error/ledger_errors.rb +72 -0
- data/lib/ledger_sync/error/resource_errors.rb +34 -4
- data/lib/ledger_sync/ledger_configuration.rb +61 -0
- data/lib/ledger_sync/ledger_configuration_store.rb +56 -0
- data/lib/ledger_sync/ledgers/client.rb +112 -0
- data/lib/ledger_sync/ledgers/contract.rb +16 -0
- data/lib/ledger_sync/ledgers/dashboard_url_helper.rb +23 -0
- data/lib/ledger_sync/ledgers/mixins/infer_client_mixin.rb +28 -0
- data/lib/ledger_sync/ledgers/mixins/infer_resource_class_mixin.rb +25 -0
- data/lib/ledger_sync/ledgers/mixins/infer_serializer_mixin.rb +52 -0
- data/lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb +27 -0
- data/lib/ledger_sync/ledgers/mixins/offset_and_limit_pagination_searcher_mixin.rb +37 -0
- data/lib/ledger_sync/ledgers/mixins/serialization_mixin.rb +41 -0
- data/lib/ledger_sync/ledgers/netsuite/account/deserializer.rb +23 -0
- data/lib/ledger_sync/ledgers/netsuite/account/operations/create.rb +28 -0
- data/lib/ledger_sync/ledgers/netsuite/account/operations/find.rb +28 -0
- data/lib/ledger_sync/ledgers/netsuite/account/searcher.rb +12 -0
- data/lib/ledger_sync/ledgers/netsuite/account/searcher_deserializer.rb +29 -0
- data/lib/ledger_sync/ledgers/netsuite/account/serializer.rb +21 -0
- data/lib/ledger_sync/ledgers/netsuite/check/deserializer.rb +29 -0
- data/lib/ledger_sync/ledgers/netsuite/check/operations/create.rb +27 -0
- data/lib/ledger_sync/ledgers/netsuite/check/operations/delete.rb +27 -0
- data/lib/ledger_sync/ledgers/netsuite/check/operations/find.rb +27 -0
- data/lib/ledger_sync/ledgers/netsuite/check/operations/update.rb +27 -0
- data/lib/ledger_sync/ledgers/netsuite/check/searcher.rb +15 -0
- data/lib/ledger_sync/ledgers/netsuite/check/searcher_deserializer.rb +16 -0
- data/lib/ledger_sync/ledgers/netsuite/check/serializer.rb +50 -0
- data/lib/ledger_sync/ledgers/netsuite/check_line_item/deserializer.rb +17 -0
- data/lib/ledger_sync/ledgers/netsuite/check_line_item/serializer.rb +25 -0
- data/lib/ledger_sync/ledgers/netsuite/client.rb +184 -0
- data/lib/ledger_sync/ledgers/netsuite/config.rb +5 -0
- data/lib/ledger_sync/ledgers/netsuite/currency/deserializer.rb +23 -0
- data/lib/ledger_sync/ledgers/netsuite/currency/operations/create.rb +25 -0
- data/lib/ledger_sync/ledgers/netsuite/currency/operations/delete.rb +23 -0
- data/lib/ledger_sync/ledgers/netsuite/currency/operations/find.rb +23 -0
- data/lib/ledger_sync/ledgers/netsuite/currency/operations/update.rb +23 -0
- data/lib/ledger_sync/ledgers/netsuite/currency/serializer.rb +21 -0
- data/lib/ledger_sync/ledgers/netsuite/customer/deserializer.rb +22 -0
- data/lib/ledger_sync/ledgers/netsuite/customer/operations/create.rb +26 -0
- data/lib/ledger_sync/ledgers/netsuite/customer/operations/delete.rb +26 -0
- data/lib/ledger_sync/ledgers/netsuite/customer/operations/find.rb +26 -0
- data/lib/ledger_sync/ledgers/netsuite/customer/operations/update.rb +26 -0
- data/lib/ledger_sync/ledgers/netsuite/customer/searcher.rb +12 -0
- data/lib/ledger_sync/ledgers/netsuite/customer/searcher_deserializer.rb +18 -0
- data/lib/ledger_sync/ledgers/netsuite/customer/serializer.rb +29 -0
- data/lib/ledger_sync/ledgers/netsuite/customer_deposit/deserializer.rb +20 -0
- data/lib/ledger_sync/ledgers/netsuite/customer_deposit/operations/create.rb +24 -0
- data/lib/ledger_sync/ledgers/netsuite/customer_deposit/operations/delete.rb +24 -0
- data/lib/ledger_sync/ledgers/netsuite/customer_deposit/operations/find.rb +24 -0
- data/lib/ledger_sync/ledgers/netsuite/customer_deposit/operations/update.rb +24 -0
- data/lib/ledger_sync/ledgers/netsuite/customer_deposit/searcher.rb +12 -0
- data/lib/ledger_sync/ledgers/netsuite/customer_deposit/searcher_deserializer.rb +16 -0
- data/lib/ledger_sync/ledgers/netsuite/customer_deposit/serializer.rb +25 -0
- data/lib/ledger_sync/ledgers/netsuite/dashboard_url_helper.rb +28 -0
- data/lib/ledger_sync/ledgers/netsuite/department/deserializer.rb +15 -0
- data/lib/ledger_sync/ledgers/netsuite/department/operations/create.rb +25 -0
- data/lib/ledger_sync/ledgers/netsuite/department/operations/delete.rb +25 -0
- data/lib/ledger_sync/ledgers/netsuite/department/operations/find.rb +25 -0
- data/lib/ledger_sync/ledgers/netsuite/department/operations/update.rb +25 -0
- data/lib/ledger_sync/ledgers/netsuite/department/searcher.rb +12 -0
- data/lib/ledger_sync/ledgers/netsuite/department/searcher_deserializer.rb +19 -0
- data/lib/ledger_sync/ledgers/netsuite/department/serializer.rb +13 -0
- data/lib/ledger_sync/ledgers/netsuite/deserializer.rb +18 -0
- data/lib/ledger_sync/ledgers/netsuite/error.rb +18 -0
- data/lib/ledger_sync/ledgers/netsuite/journal_entry/deserializer.rb +31 -0
- data/lib/ledger_sync/ledgers/netsuite/journal_entry/operations/create.rb +26 -0
- data/lib/ledger_sync/ledgers/netsuite/journal_entry/operations/delete.rb +26 -0
- data/lib/ledger_sync/ledgers/netsuite/journal_entry/operations/find.rb +26 -0
- data/lib/ledger_sync/ledgers/netsuite/journal_entry/operations/update.rb +30 -0
- data/lib/ledger_sync/ledgers/netsuite/journal_entry/serializer.rb +36 -0
- data/lib/ledger_sync/ledgers/netsuite/journal_entry_line_item/deserializer.rb +23 -0
- data/lib/ledger_sync/ledgers/netsuite/journal_entry_line_item/serializer.rb +21 -0
- data/lib/ledger_sync/ledgers/netsuite/ledger_class/deserializer.rb +15 -0
- data/lib/ledger_sync/ledgers/netsuite/ledger_class/operations/create.rb +25 -0
- data/lib/ledger_sync/ledgers/netsuite/ledger_class/operations/delete.rb +25 -0
- data/lib/ledger_sync/ledgers/netsuite/ledger_class/operations/find.rb +25 -0
- data/lib/ledger_sync/ledgers/netsuite/ledger_class/operations/update.rb +25 -0
- data/lib/ledger_sync/ledgers/netsuite/ledger_class/searcher.rb +12 -0
- data/lib/ledger_sync/ledgers/netsuite/ledger_class/searcher_deserializer.rb +19 -0
- data/lib/ledger_sync/ledgers/netsuite/ledger_class/serializer.rb +13 -0
- data/lib/ledger_sync/ledgers/netsuite/location/deserializer.rb +15 -0
- data/lib/ledger_sync/ledgers/netsuite/location/operations/create.rb +21 -0
- data/lib/ledger_sync/ledgers/netsuite/location/operations/delete.rb +21 -0
- data/lib/ledger_sync/ledgers/netsuite/location/operations/find.rb +21 -0
- data/lib/ledger_sync/ledgers/netsuite/location/operations/update.rb +21 -0
- data/lib/ledger_sync/ledgers/netsuite/location/searcher.rb +12 -0
- data/lib/ledger_sync/ledgers/netsuite/location/serializer.rb +13 -0
- data/lib/ledger_sync/ledgers/netsuite/operation.rb +40 -0
- data/lib/ledger_sync/ledgers/netsuite/operation/create.rb +58 -0
- data/lib/ledger_sync/ledgers/netsuite/operation/delete.rb +49 -0
- data/lib/ledger_sync/ledgers/netsuite/operation/find.rb +60 -0
- data/lib/ledger_sync/ledgers/netsuite/operation/update.rb +61 -0
- data/lib/ledger_sync/ledgers/netsuite/record/http_method.rb +33 -0
- data/lib/ledger_sync/ledgers/netsuite/record/metadata.rb +105 -0
- data/lib/ledger_sync/ledgers/netsuite/record/parameter.rb +20 -0
- data/lib/ledger_sync/ledgers/netsuite/record/property.rb +22 -0
- data/lib/ledger_sync/ledgers/netsuite/reference/serializer.rb +13 -0
- data/lib/ledger_sync/ledgers/netsuite/resource.rb +10 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/account.rb +44 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/check.rb +23 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/check_line_item.rb +15 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/currency.rb +13 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/customer.rb +19 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/customer_deposit.rb +15 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/department.rb +16 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/deposit.rb +28 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/deposit_line_item.rb +25 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/invoice.rb +28 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/invoice_line_item.rb +21 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/item.rb +11 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/journal_entry.rb +26 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/journal_entry_line_item.rb +24 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/ledger_class.rb +16 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/location.rb +11 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/subsidiary.rb +12 -0
- data/lib/ledger_sync/ledgers/netsuite/resources/vendor.rb +23 -0
- data/lib/ledger_sync/ledgers/netsuite/searcher.rb +64 -0
- data/lib/ledger_sync/ledgers/netsuite/serializer.rb +13 -0
- data/lib/ledger_sync/ledgers/netsuite/subsidiary/deserializer.rb +17 -0
- data/lib/ledger_sync/ledgers/netsuite/subsidiary/searcher.rb +12 -0
- data/lib/ledger_sync/ledgers/netsuite/subsidiary/searcher_deserializer.rb +15 -0
- data/lib/ledger_sync/ledgers/netsuite/subsidiary/serializer.rb +15 -0
- data/lib/ledger_sync/ledgers/netsuite/token.rb +158 -0
- data/lib/ledger_sync/ledgers/netsuite/type/deserializer_active_type.rb +32 -0
- data/lib/ledger_sync/ledgers/netsuite/type/deserializer_customer_type.rb +33 -0
- data/lib/ledger_sync/ledgers/netsuite/type/deserializer_entity_type.rb +30 -0
- data/lib/ledger_sync/ledgers/netsuite/type/deserializer_subsidiary_type.rb +33 -0
- data/lib/ledger_sync/ledgers/netsuite/vendor/deserializer.rb +30 -0
- data/lib/ledger_sync/ledgers/netsuite/vendor/operations/create.rb +27 -0
- data/lib/ledger_sync/ledgers/netsuite/vendor/operations/delete.rb +27 -0
- data/lib/ledger_sync/ledgers/netsuite/vendor/operations/find.rb +27 -0
- data/lib/ledger_sync/ledgers/netsuite/vendor/operations/update.rb +27 -0
- data/lib/ledger_sync/ledgers/netsuite/vendor/searcher.rb +12 -0
- data/lib/ledger_sync/ledgers/netsuite/vendor/searcher_deserializer.rb +21 -0
- data/lib/ledger_sync/ledgers/netsuite/vendor/serializer.rb +30 -0
- data/lib/ledger_sync/ledgers/netsuite_soap/client.rb +92 -0
- data/lib/ledger_sync/ledgers/netsuite_soap/config.rb +5 -0
- data/lib/ledger_sync/ledgers/netsuite_soap/customer/operations/create.rb +64 -0
- data/lib/ledger_sync/ledgers/netsuite_soap/customer/operations/find.rb +49 -0
- data/lib/ledger_sync/ledgers/netsuite_soap/operation.rb +40 -0
- data/lib/ledger_sync/ledgers/netsuite_soap/operation/create.rb +29 -0
- data/lib/ledger_sync/ledgers/netsuite_soap/operation/find.rb +15 -0
- data/lib/ledger_sync/ledgers/netsuite_soap/resource.rb +10 -0
- data/lib/ledger_sync/ledgers/netsuite_soap/resources/customer.rb +29 -0
- data/lib/ledger_sync/ledgers/netsuite_soap/resources/subsidiary.rb +12 -0
- data/lib/ledger_sync/ledgers/netsuite_soap/subsidiary/operations/create.rb +42 -0
- data/lib/ledger_sync/ledgers/netsuite_soap/subsidiary/operations/find.rb +38 -0
- data/lib/ledger_sync/ledgers/operation.rb +181 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/account/deserializer.rb +43 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/account/operations/create.rb +26 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/account/operations/find.rb +26 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/account/operations/update.rb +30 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/account/searcher.rb +15 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/account/serializer.rb +37 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/bill/deserializer.rb +45 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/bill/operations/create.rb +27 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/bill/operations/find.rb +27 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/bill/operations/update.rb +27 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/bill/searcher.rb +14 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/bill/serializer.rb +44 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/bill_line_item/deserializer.rb +25 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/bill_line_item/serializer.rb +29 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/bill_payment/deserializer.rb +59 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/bill_payment/operations/create.rb +33 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/bill_payment/operations/find.rb +33 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/bill_payment/operations/update.rb +33 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/bill_payment/serializer.rb +77 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/bill_payment_line_item/deserializer.rb +18 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/bill_payment_line_item/serializer.rb +18 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/client.rb +258 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/config.rb +8 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/currency/deserializer.rb +17 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/currency/serializer.rb +16 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/customer/deserializer.rb +19 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/customer/operations/create.rb +26 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/customer/operations/find.rb +26 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/customer/operations/update.rb +26 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/customer/searcher.rb +13 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/customer/serializer.rb +19 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/dashboard_url_helper.rb +34 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/department/deserializer.rb +28 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/department/operations/create.rb +23 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/department/operations/find.rb +23 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/department/operations/update.rb +25 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/department/searcher.rb +17 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/department/serializer.rb +49 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/deposit/deserializer.rb +39 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/deposit/operations/create.rb +25 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/deposit/operations/find.rb +25 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/deposit/operations/update.rb +27 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/deposit/searcher.rb +13 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/deposit/serializer.rb +39 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/deposit_line_item/deserializer.rb +38 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/deposit_line_item/serializer.rb +41 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/deserializer.rb +98 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/expense/deserializer.rb +58 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/expense/operations/create.rb +28 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/expense/operations/find.rb +28 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/expense/operations/update.rb +28 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/expense/searcher.rb +14 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/expense/serializer.rb +59 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/expense_line_item/deserializer.rb +25 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/expense_line_item/serializer.rb +27 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/invoice/deserializer.rb +35 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/invoice/operations/create.rb +27 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/invoice/operations/find.rb +25 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/invoice/operations/update.rb +25 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/invoice/serializer.rb +35 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/invoice_sales_line_item/deserializer.rb +25 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/invoice_sales_line_item/serializer.rb +29 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/item/deserializer.rb +13 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/item/serializer.rb +12 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry/deserializer.rb +33 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry/operations/create.rb +23 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry/operations/find.rb +23 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry/operations/update.rb +23 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry/searcher.rb +14 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry/serializer.rb +33 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry_line_item/deserializer.rb +32 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry_line_item/serializer.rb +36 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/ledger_class/deserializer.rb +29 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/ledger_class/operations/create.rb +23 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/ledger_class/operations/find.rb +23 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/ledger_class/operations/update.rb +25 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/ledger_class/searcher.rb +15 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/ledger_class/serializer.rb +24 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/oauth_client.rb +93 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/operation.rb +61 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/operation/create.rb +26 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/operation/find.rb +25 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/operation/full_update.rb +44 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/operation/sparse_update.rb +29 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/payment/deserializer.rb +48 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/payment/operations/create.rb +30 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/payment/operations/find.rb +28 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/payment/operations/update.rb +28 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/payment/serializer.rb +48 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/payment_line_item/deserializer.rb +18 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/payment_line_item/serializer.rb +18 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/preferences/deserializer.rb +43 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/preferences/operations/find.rb +30 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/preferences/serializer.rb +43 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/request.rb +98 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resource.rb +10 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/account.rb +355 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/bill.rb +31 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/bill_line_item.rb +21 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/bill_payment.rb +42 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/bill_payment_line_item.rb +19 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/currency.rb +13 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/customer.rb +19 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/department.rb +16 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/deposit.rb +28 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/deposit_line_item.rb +25 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/expense.rb +40 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/expense_line_item.rb +21 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/invoice.rb +28 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/invoice_sales_line_item.rb +21 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/item.rb +11 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/journal_entry.rb +24 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/journal_entry_line_item.rb +29 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/ledger_class.rb +16 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/payment.rb +31 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/payment_line_item.rb +19 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/preferences.rb +24 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/primary_email_addr.rb +11 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/primary_phone.rb +11 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/subsidiary.rb +12 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/transfer.rb +24 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/resources/vendor.rb +23 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/searcher.rb +60 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/serialization/type/amount_float_to_integer_type.rb +21 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/serialization/type/deserialize_transaction_reference_type.rb +30 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/serialization/type/integer_to_amount_float_type.rb +21 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/serialization/type/serialize_transaction_reference_type.rb +30 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/serializer.rb +71 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/serialziation/type/mapping_type.rb +25 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/transfer/deserializer.rb +34 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/transfer/operations/create.rb +24 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/transfer/operations/find.rb +24 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/transfer/operations/update.rb +26 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/transfer/serializer.rb +34 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/util/error_matcher.rb +54 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/util/error_parser.rb +27 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/util/ledger_error_parser.rb +103 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/util/operation_error_parser.rb +99 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/vendor/deserializer.rb +25 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/vendor/operations/create.rb +27 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/vendor/operations/find.rb +27 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/vendor/operations/update.rb +27 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/vendor/searcher.rb +15 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/vendor/serializer.rb +25 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/webhook.rb +58 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/webhook_event.rb +79 -0
- data/lib/ledger_sync/ledgers/quickbooks_online/webhook_notification.rb +42 -0
- data/lib/ledger_sync/ledgers/request.rb +57 -0
- data/lib/ledger_sync/ledgers/response.rb +55 -0
- data/lib/ledger_sync/ledgers/searcher.rb +73 -0
- data/lib/ledger_sync/ledgers/stripe/client.rb +37 -0
- data/lib/ledger_sync/ledgers/stripe/config.rb +5 -0
- data/lib/ledger_sync/ledgers/stripe/customer/operations/create.rb +44 -0
- data/lib/ledger_sync/ledgers/stripe/customer/operations/delete.rb +35 -0
- data/lib/ledger_sync/ledgers/stripe/customer/operations/find.rb +44 -0
- data/lib/ledger_sync/ledgers/stripe/customer/operations/update.rb +43 -0
- data/lib/ledger_sync/ledgers/stripe/dashboard_url_helper.rb +21 -0
- data/lib/ledger_sync/ledgers/stripe/operation.rb +35 -0
- data/lib/ledger_sync/ledgers/stripe/operation/create.rb +17 -0
- data/lib/ledger_sync/ledgers/stripe/operation/delete.rb +17 -0
- data/lib/ledger_sync/ledgers/stripe/operation/find.rb +15 -0
- data/lib/ledger_sync/ledgers/stripe/operation/update.rb +17 -0
- data/lib/ledger_sync/ledgers/stripe/resource.rb +10 -0
- data/lib/ledger_sync/ledgers/stripe/resources/customer.rb +13 -0
- data/lib/ledger_sync/operation.rb +23 -0
- data/lib/ledger_sync/resource.rb +12 -1
- data/lib/ledger_sync/resource_adaptor.rb +52 -0
- data/lib/ledger_sync/resource_attribute.rb +6 -7
- data/lib/ledger_sync/resource_attribute/dirty_mixin.rb +4 -0
- data/lib/ledger_sync/resource_attribute/mixin.rb +1 -1
- data/lib/ledger_sync/resource_attribute/reference/many.rb +10 -18
- data/lib/ledger_sync/resource_attribute/reference/one.rb +6 -1
- data/lib/ledger_sync/result.rb +3 -3
- data/lib/ledger_sync/serialization/attribute.rb +4 -10
- data/lib/ledger_sync/serialization/attribute_set_mixin.rb +1 -1
- data/lib/ledger_sync/serialization/deserializer_attribute.rb +30 -12
- data/lib/ledger_sync/serialization/deserializer_attribute_set.rb +1 -1
- data/lib/ledger_sync/serialization/mixin.rb +12 -14
- data/lib/ledger_sync/serialization/serializer_attribute.rb +16 -3
- data/lib/ledger_sync/serialization/serializer_attribute_set.rb +1 -1
- data/lib/ledger_sync/serialization/type/deserializer_references_many_type.rb +26 -0
- data/lib/ledger_sync/serialization/type/deserializer_references_one_type.rb +12 -0
- data/lib/ledger_sync/serialization/type/deserializer_type.rb +29 -0
- data/lib/ledger_sync/serialization/type/format_date_type.rb +23 -0
- data/lib/ledger_sync/serialization/type/mapping_type.rb +23 -0
- data/lib/ledger_sync/serialization/type/parse_date_type.rb +23 -0
- data/lib/ledger_sync/serialization/type/serializer_references_many_type.rb +21 -0
- data/lib/ledger_sync/serialization/type/serializer_references_one_type.rb +12 -0
- data/lib/ledger_sync/serialization/type/serializer_type.rb +5 -5
- data/lib/ledger_sync/serializer.rb +49 -0
- data/lib/ledger_sync/type/boolean.rb +2 -0
- data/lib/ledger_sync/type/date.rb +1 -1
- data/lib/ledger_sync/type/float.rb +2 -0
- data/lib/ledger_sync/type/hash.rb +6 -2
- data/lib/ledger_sync/type/id.rb +6 -2
- data/lib/ledger_sync/type/integer.rb +2 -0
- data/lib/ledger_sync/type/reference_many.rb +15 -5
- data/lib/ledger_sync/type/reference_one.rb +9 -22
- data/lib/ledger_sync/type/string.rb +2 -0
- data/lib/ledger_sync/type/string_from_set.rb +43 -0
- data/lib/ledger_sync/type/value_mixin.rb +37 -7
- data/lib/ledger_sync/util/mixins/delegate_iterable_methods_mixin.rb +1 -0
- data/lib/ledger_sync/util/mixins/resource_registerable_mixin.rb +29 -0
- data/lib/ledger_sync/util/resource_converter.rb +113 -0
- data/lib/ledger_sync/util/resource_converter/attribute.rb +131 -0
- data/lib/ledger_sync/util/resource_converter/attribute_set.rb +42 -0
- data/lib/ledger_sync/util/resource_converter/type/references_many_type.rb +27 -0
- data/lib/ledger_sync/util/resource_converter/type/references_one_type.rb +14 -0
- data/lib/ledger_sync/util/resource_converter/type/resource_converter_type.rb +26 -0
- data/lib/ledger_sync/util/resources_builder.rb +19 -11
- data/lib/ledger_sync/util/string_helpers.rb +3 -3
- data/lib/ledger_sync/util/url_helpers.rb +38 -0
- data/lib/ledger_sync/util/validator.rb +3 -1
- data/lib/ledger_sync/version.rb +1 -1
- data/licenses/BSL.txt +97 -0
- data/licenses/documentation_site.txt +7 -0
- metadata +683 -243
- data/.ruby-version +0 -1
- data/_config.yml +0 -1
- data/lib/ledger_sync/adaptor_configuration.rb +0 -61
- data/lib/ledger_sync/adaptor_configuration_store.rb +0 -56
- data/lib/ledger_sync/adaptors/adaptor.rb +0 -100
- data/lib/ledger_sync/adaptors/contract.rb +0 -16
- data/lib/ledger_sync/adaptors/dashboard_url_helper.rb +0 -23
- data/lib/ledger_sync/adaptors/ledger_serializer.rb +0 -143
- data/lib/ledger_sync/adaptors/ledger_serializer_attribute.rb +0 -178
- data/lib/ledger_sync/adaptors/ledger_serializer_attribute_set.rb +0 -56
- data/lib/ledger_sync/adaptors/ledger_serializer_type/mapping_type.rb +0 -41
- data/lib/ledger_sync/adaptors/ledger_serializer_type/references_many_type.rb +0 -24
- data/lib/ledger_sync/adaptors/ledger_serializer_type/references_one_type.rb +0 -22
- data/lib/ledger_sync/adaptors/ledger_serializer_type/value_type.rb +0 -17
- data/lib/ledger_sync/adaptors/mixins/infer_adaptor_class_mixin.rb +0 -24
- data/lib/ledger_sync/adaptors/mixins/infer_ledger_serializer_mixin.rb +0 -61
- data/lib/ledger_sync/adaptors/mixins/infer_resource_class_mixin.rb +0 -22
- data/lib/ledger_sync/adaptors/mixins/infer_validation_contract_mixin.rb +0 -27
- data/lib/ledger_sync/adaptors/mixins/offset_and_limit_pagination_searcher_mixin.rb +0 -37
- data/lib/ledger_sync/adaptors/netsuite/account/ledger_deserializer.rb +0 -24
- data/lib/ledger_sync/adaptors/netsuite/account/ledger_serializer.rb +0 -22
- data/lib/ledger_sync/adaptors/netsuite/account/operations/create.rb +0 -28
- data/lib/ledger_sync/adaptors/netsuite/account/operations/find.rb +0 -28
- data/lib/ledger_sync/adaptors/netsuite/account/searcher.rb +0 -12
- data/lib/ledger_sync/adaptors/netsuite/account/searcher_ledger_deserializer.rb +0 -30
- data/lib/ledger_sync/adaptors/netsuite/adaptor.rb +0 -161
- data/lib/ledger_sync/adaptors/netsuite/config.rb +0 -5
- data/lib/ledger_sync/adaptors/netsuite/currency/deledger_serializer.rb +0 -28
- data/lib/ledger_sync/adaptors/netsuite/currency/ledger_serializer.rb +0 -25
- data/lib/ledger_sync/adaptors/netsuite/currency/operations/create.rb +0 -25
- data/lib/ledger_sync/adaptors/netsuite/currency/operations/delete.rb +0 -23
- data/lib/ledger_sync/adaptors/netsuite/currency/operations/find.rb +0 -23
- data/lib/ledger_sync/adaptors/netsuite/currency/operations/update.rb +0 -23
- data/lib/ledger_sync/adaptors/netsuite/customer/ledger_deserializer.rb +0 -27
- data/lib/ledger_sync/adaptors/netsuite/customer/ledger_serializer.rb +0 -38
- data/lib/ledger_sync/adaptors/netsuite/customer/operations/create.rb +0 -24
- data/lib/ledger_sync/adaptors/netsuite/customer/operations/delete.rb +0 -24
- data/lib/ledger_sync/adaptors/netsuite/customer/operations/find.rb +0 -24
- data/lib/ledger_sync/adaptors/netsuite/customer/operations/update.rb +0 -24
- data/lib/ledger_sync/adaptors/netsuite/customer/searcher.rb +0 -12
- data/lib/ledger_sync/adaptors/netsuite/customer/searcher_ledger_deserializer.rb +0 -23
- data/lib/ledger_sync/adaptors/netsuite/dashboard_url_helper.rb +0 -24
- data/lib/ledger_sync/adaptors/netsuite/department/ledger_serializer.rb +0 -17
- data/lib/ledger_sync/adaptors/netsuite/department/operations/create.rb +0 -25
- data/lib/ledger_sync/adaptors/netsuite/department/operations/delete.rb +0 -25
- data/lib/ledger_sync/adaptors/netsuite/department/operations/find.rb +0 -25
- data/lib/ledger_sync/adaptors/netsuite/department/operations/update.rb +0 -25
- data/lib/ledger_sync/adaptors/netsuite/department/searcher.rb +0 -12
- data/lib/ledger_sync/adaptors/netsuite/department/searcher_ledger_deserializer.rb +0 -21
- data/lib/ledger_sync/adaptors/netsuite/ledger_serializer.rb +0 -30
- data/lib/ledger_sync/adaptors/netsuite/ledger_serializer_type/active_type.rb +0 -26
- data/lib/ledger_sync/adaptors/netsuite/ledger_serializer_type/reference_type.rb +0 -24
- data/lib/ledger_sync/adaptors/netsuite/ledger_serializer_type/subsidiary_type.rb +0 -22
- data/lib/ledger_sync/adaptors/netsuite/location/ledger_serializer.rb +0 -18
- data/lib/ledger_sync/adaptors/netsuite/location/operations/create.rb +0 -21
- data/lib/ledger_sync/adaptors/netsuite/location/operations/delete.rb +0 -21
- data/lib/ledger_sync/adaptors/netsuite/location/operations/find.rb +0 -21
- data/lib/ledger_sync/adaptors/netsuite/location/operations/update.rb +0 -21
- data/lib/ledger_sync/adaptors/netsuite/location/searcher.rb +0 -12
- data/lib/ledger_sync/adaptors/netsuite/operation.rb +0 -19
- data/lib/ledger_sync/adaptors/netsuite/operation/create.rb +0 -65
- data/lib/ledger_sync/adaptors/netsuite/operation/delete.rb +0 -49
- data/lib/ledger_sync/adaptors/netsuite/operation/find.rb +0 -56
- data/lib/ledger_sync/adaptors/netsuite/operation/update.rb +0 -68
- data/lib/ledger_sync/adaptors/netsuite/record/http_method.rb +0 -33
- data/lib/ledger_sync/adaptors/netsuite/record/metadata.rb +0 -105
- data/lib/ledger_sync/adaptors/netsuite/record/parameter.rb +0 -20
- data/lib/ledger_sync/adaptors/netsuite/record/property.rb +0 -22
- data/lib/ledger_sync/adaptors/netsuite/searcher.rb +0 -58
- data/lib/ledger_sync/adaptors/netsuite/token.rb +0 -162
- data/lib/ledger_sync/adaptors/netsuite/vendor/ledger_deserializer.rb +0 -32
- data/lib/ledger_sync/adaptors/netsuite/vendor/ledger_serializer.rb +0 -35
- data/lib/ledger_sync/adaptors/netsuite/vendor/operations/create.rb +0 -27
- data/lib/ledger_sync/adaptors/netsuite/vendor/operations/delete.rb +0 -27
- data/lib/ledger_sync/adaptors/netsuite/vendor/operations/find.rb +0 -27
- data/lib/ledger_sync/adaptors/netsuite/vendor/operations/update.rb +0 -27
- data/lib/ledger_sync/adaptors/netsuite/vendor/searcher.rb +0 -12
- data/lib/ledger_sync/adaptors/netsuite/vendor/searcher_ledger_deserializer.rb +0 -23
- data/lib/ledger_sync/adaptors/netsuite_soap/adaptor.rb +0 -92
- data/lib/ledger_sync/adaptors/netsuite_soap/config.rb +0 -5
- data/lib/ledger_sync/adaptors/netsuite_soap/customer/ledger_serializer.rb +0 -13
- data/lib/ledger_sync/adaptors/netsuite_soap/customer/operations/create.rb +0 -64
- data/lib/ledger_sync/adaptors/netsuite_soap/customer/operations/find.rb +0 -49
- data/lib/ledger_sync/adaptors/netsuite_soap/ledger_serializer.rb +0 -25
- data/lib/ledger_sync/adaptors/netsuite_soap/operation.rb +0 -40
- data/lib/ledger_sync/adaptors/netsuite_soap/operation/create.rb +0 -29
- data/lib/ledger_sync/adaptors/netsuite_soap/operation/find.rb +0 -15
- data/lib/ledger_sync/adaptors/netsuite_soap/subsidiary/operations/create.rb +0 -42
- data/lib/ledger_sync/adaptors/netsuite_soap/subsidiary/operations/find.rb +0 -38
- data/lib/ledger_sync/adaptors/operation.rb +0 -180
- data/lib/ledger_sync/adaptors/quickbooks_online/account/ledger_serializer.rb +0 -37
- data/lib/ledger_sync/adaptors/quickbooks_online/account/operations/create.rb +0 -26
- data/lib/ledger_sync/adaptors/quickbooks_online/account/operations/find.rb +0 -26
- data/lib/ledger_sync/adaptors/quickbooks_online/account/operations/update.rb +0 -30
- data/lib/ledger_sync/adaptors/quickbooks_online/account/searcher.rb +0 -15
- data/lib/ledger_sync/adaptors/quickbooks_online/adaptor.rb +0 -258
- data/lib/ledger_sync/adaptors/quickbooks_online/bill/ledger_serializer.rb +0 -46
- data/lib/ledger_sync/adaptors/quickbooks_online/bill/operations/create.rb +0 -27
- data/lib/ledger_sync/adaptors/quickbooks_online/bill/operations/find.rb +0 -27
- data/lib/ledger_sync/adaptors/quickbooks_online/bill/operations/update.rb +0 -27
- data/lib/ledger_sync/adaptors/quickbooks_online/bill/searcher.rb +0 -14
- data/lib/ledger_sync/adaptors/quickbooks_online/bill_line_item/ledger_serializer.rb +0 -30
- data/lib/ledger_sync/adaptors/quickbooks_online/bill_payment/ledger_serializer.rb +0 -76
- data/lib/ledger_sync/adaptors/quickbooks_online/bill_payment/operations/create.rb +0 -33
- data/lib/ledger_sync/adaptors/quickbooks_online/bill_payment/operations/find.rb +0 -33
- data/lib/ledger_sync/adaptors/quickbooks_online/bill_payment/operations/update.rb +0 -33
- data/lib/ledger_sync/adaptors/quickbooks_online/bill_payment_line_item/ledger_serializer.rb +0 -19
- data/lib/ledger_sync/adaptors/quickbooks_online/config.rb +0 -8
- data/lib/ledger_sync/adaptors/quickbooks_online/currency/ledger_serializer.rb +0 -17
- data/lib/ledger_sync/adaptors/quickbooks_online/customer/ledger_serializer.rb +0 -23
- data/lib/ledger_sync/adaptors/quickbooks_online/customer/operations/create.rb +0 -22
- data/lib/ledger_sync/adaptors/quickbooks_online/customer/operations/find.rb +0 -22
- data/lib/ledger_sync/adaptors/quickbooks_online/customer/operations/update.rb +0 -24
- data/lib/ledger_sync/adaptors/quickbooks_online/customer/searcher.rb +0 -13
- data/lib/ledger_sync/adaptors/quickbooks_online/dashboard_url_helper.rb +0 -34
- data/lib/ledger_sync/adaptors/quickbooks_online/department/ledger_serializer.rb +0 -41
- data/lib/ledger_sync/adaptors/quickbooks_online/department/operations/create.rb +0 -23
- data/lib/ledger_sync/adaptors/quickbooks_online/department/operations/find.rb +0 -23
- data/lib/ledger_sync/adaptors/quickbooks_online/department/operations/update.rb +0 -25
- data/lib/ledger_sync/adaptors/quickbooks_online/department/searcher.rb +0 -17
- data/lib/ledger_sync/adaptors/quickbooks_online/deposit/ledger_serializer.rb +0 -40
- data/lib/ledger_sync/adaptors/quickbooks_online/deposit/operations/create.rb +0 -25
- data/lib/ledger_sync/adaptors/quickbooks_online/deposit/operations/find.rb +0 -25
- data/lib/ledger_sync/adaptors/quickbooks_online/deposit/operations/update.rb +0 -27
- data/lib/ledger_sync/adaptors/quickbooks_online/deposit/searcher.rb +0 -13
- data/lib/ledger_sync/adaptors/quickbooks_online/deposit_line_item/ledger_serializer.rb +0 -34
- data/lib/ledger_sync/adaptors/quickbooks_online/expense/ledger_serializer.rb +0 -52
- data/lib/ledger_sync/adaptors/quickbooks_online/expense/operations/create.rb +0 -28
- data/lib/ledger_sync/adaptors/quickbooks_online/expense/operations/find.rb +0 -28
- data/lib/ledger_sync/adaptors/quickbooks_online/expense/operations/update.rb +0 -28
- data/lib/ledger_sync/adaptors/quickbooks_online/expense/searcher.rb +0 -14
- data/lib/ledger_sync/adaptors/quickbooks_online/expense_line_item/ledger_serializer.rb +0 -30
- data/lib/ledger_sync/adaptors/quickbooks_online/invoice/ledger_serializer.rb +0 -36
- data/lib/ledger_sync/adaptors/quickbooks_online/invoice/operations/create.rb +0 -27
- data/lib/ledger_sync/adaptors/quickbooks_online/invoice/operations/find.rb +0 -25
- data/lib/ledger_sync/adaptors/quickbooks_online/invoice/operations/update.rb +0 -25
- data/lib/ledger_sync/adaptors/quickbooks_online/invoice_sales_line_item/ledger_serializer.rb +0 -30
- data/lib/ledger_sync/adaptors/quickbooks_online/item/ledger_serializer.rb +0 -13
- data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry/ledger_serializer.rb +0 -34
- data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry/operations/create.rb +0 -23
- data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry/operations/find.rb +0 -23
- data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry/operations/update.rb +0 -23
- data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry/searcher.rb +0 -14
- data/lib/ledger_sync/adaptors/quickbooks_online/journal_entry_line_item/ledger_serializer.rb +0 -37
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_class/ledger_serializer.rb +0 -25
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_class/operations/create.rb +0 -23
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_class/operations/find.rb +0 -23
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_class/operations/update.rb +0 -25
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_class/searcher.rb +0 -15
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer.rb +0 -131
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/account_sub_type.rb +0 -305
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/account_type.rb +0 -51
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/amount_type.rb +0 -23
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/classification_type.rb +0 -23
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/date_type.rb +0 -23
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/department_reference_type.rb +0 -26
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/entity_reference_type.rb +0 -49
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/journal_entry_line_item_type.rb +0 -20
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/payment_type.rb +0 -21
- data/lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/transaction_reference_type.rb +0 -49
- data/lib/ledger_sync/adaptors/quickbooks_online/oauth_client.rb +0 -93
- data/lib/ledger_sync/adaptors/quickbooks_online/operation.rb +0 -60
- data/lib/ledger_sync/adaptors/quickbooks_online/operation/create.rb +0 -26
- data/lib/ledger_sync/adaptors/quickbooks_online/operation/find.rb +0 -25
- data/lib/ledger_sync/adaptors/quickbooks_online/operation/full_update.rb +0 -44
- data/lib/ledger_sync/adaptors/quickbooks_online/operation/sparse_update.rb +0 -29
- data/lib/ledger_sync/adaptors/quickbooks_online/payment/ledger_serializer.rb +0 -50
- data/lib/ledger_sync/adaptors/quickbooks_online/payment/operations/create.rb +0 -30
- data/lib/ledger_sync/adaptors/quickbooks_online/payment/operations/find.rb +0 -28
- data/lib/ledger_sync/adaptors/quickbooks_online/payment/operations/update.rb +0 -28
- data/lib/ledger_sync/adaptors/quickbooks_online/payment_line_item/ledger_serializer.rb +0 -19
- data/lib/ledger_sync/adaptors/quickbooks_online/preferences/ledger_serializer.rb +0 -45
- data/lib/ledger_sync/adaptors/quickbooks_online/preferences/operations/find.rb +0 -38
- data/lib/ledger_sync/adaptors/quickbooks_online/request.rb +0 -98
- data/lib/ledger_sync/adaptors/quickbooks_online/resources/preferences.rb +0 -24
- data/lib/ledger_sync/adaptors/quickbooks_online/searcher.rb +0 -61
- data/lib/ledger_sync/adaptors/quickbooks_online/transfer/ledger_serializer.rb +0 -36
- data/lib/ledger_sync/adaptors/quickbooks_online/transfer/operations/create.rb +0 -24
- data/lib/ledger_sync/adaptors/quickbooks_online/transfer/operations/find.rb +0 -24
- data/lib/ledger_sync/adaptors/quickbooks_online/transfer/operations/update.rb +0 -26
- data/lib/ledger_sync/adaptors/quickbooks_online/util/adaptor_error_parser.rb +0 -103
- data/lib/ledger_sync/adaptors/quickbooks_online/util/error_matcher.rb +0 -54
- data/lib/ledger_sync/adaptors/quickbooks_online/util/error_parser.rb +0 -27
- data/lib/ledger_sync/adaptors/quickbooks_online/util/operation_error_parser.rb +0 -99
- data/lib/ledger_sync/adaptors/quickbooks_online/vendor/ledger_serializer.rb +0 -25
- data/lib/ledger_sync/adaptors/quickbooks_online/vendor/operations/create.rb +0 -27
- data/lib/ledger_sync/adaptors/quickbooks_online/vendor/operations/find.rb +0 -27
- data/lib/ledger_sync/adaptors/quickbooks_online/vendor/operations/update.rb +0 -27
- data/lib/ledger_sync/adaptors/quickbooks_online/vendor/searcher.rb +0 -15
- data/lib/ledger_sync/adaptors/quickbooks_online/webhook.rb +0 -58
- data/lib/ledger_sync/adaptors/quickbooks_online/webhook_event.rb +0 -79
- data/lib/ledger_sync/adaptors/quickbooks_online/webhook_notification.rb +0 -42
- data/lib/ledger_sync/adaptors/request.rb +0 -53
- data/lib/ledger_sync/adaptors/response.rb +0 -55
- data/lib/ledger_sync/adaptors/searcher.rb +0 -72
- data/lib/ledger_sync/adaptors/stripe/adaptor.rb +0 -37
- data/lib/ledger_sync/adaptors/stripe/config.rb +0 -5
- data/lib/ledger_sync/adaptors/stripe/customer/operations/create.rb +0 -44
- data/lib/ledger_sync/adaptors/stripe/customer/operations/delete.rb +0 -35
- data/lib/ledger_sync/adaptors/stripe/customer/operations/find.rb +0 -44
- data/lib/ledger_sync/adaptors/stripe/customer/operations/update.rb +0 -43
- data/lib/ledger_sync/adaptors/stripe/dashboard_url_helper.rb +0 -21
- data/lib/ledger_sync/adaptors/stripe/operation.rb +0 -35
- data/lib/ledger_sync/adaptors/stripe/operation/create.rb +0 -17
- data/lib/ledger_sync/adaptors/stripe/operation/delete.rb +0 -17
- data/lib/ledger_sync/adaptors/stripe/operation/find.rb +0 -15
- data/lib/ledger_sync/adaptors/stripe/operation/update.rb +0 -17
- data/lib/ledger_sync/adaptors/test/customer/ledger_serializer.rb +0 -12
- data/lib/ledger_sync/adaptors/test/ledger_serializer.rb +0 -12
- data/lib/ledger_sync/error/adaptor_errors.rb +0 -72
- data/lib/ledger_sync/resources/account.rb +0 -17
- data/lib/ledger_sync/resources/bill.rb +0 -27
- data/lib/ledger_sync/resources/bill_line_item.rb +0 -17
- data/lib/ledger_sync/resources/bill_payment.rb +0 -32
- data/lib/ledger_sync/resources/bill_payment_line_item.rb +0 -15
- data/lib/ledger_sync/resources/currency.rb +0 -9
- data/lib/ledger_sync/resources/customer.rb +0 -25
- data/lib/ledger_sync/resources/department.rb +0 -14
- data/lib/ledger_sync/resources/deposit.rb +0 -24
- data/lib/ledger_sync/resources/deposit_line_item.rb +0 -22
- data/lib/ledger_sync/resources/expense.rb +0 -33
- data/lib/ledger_sync/resources/expense_line_item.rb +0 -17
- data/lib/ledger_sync/resources/invoice.rb +0 -24
- data/lib/ledger_sync/resources/invoice_sales_line_item.rb +0 -17
- data/lib/ledger_sync/resources/item.rb +0 -5
- data/lib/ledger_sync/resources/journal_entry.rb +0 -20
- data/lib/ledger_sync/resources/journal_entry_line_item.rb +0 -20
- data/lib/ledger_sync/resources/ledger_class.rb +0 -14
- data/lib/ledger_sync/resources/location.rb +0 -7
- data/lib/ledger_sync/resources/payment.rb +0 -27
- data/lib/ledger_sync/resources/payment_line_item.rb +0 -15
- data/lib/ledger_sync/resources/subsidiary.rb +0 -8
- data/lib/ledger_sync/resources/transfer.rb +0 -20
- data/lib/ledger_sync/resources/vendor.rb +0 -19
- data/lib/ledger_sync/serialization/deserializer_delegator.rb +0 -17
- data/lib/ledger_sync/serialization/serializer_delegator.rb +0 -17
- data/lib/ledger_sync/serialization/type/references_many_type.rb +0 -19
- data/lib/ledger_sync/serialization/type/references_one_type.rb +0 -12
- data/lib/ledger_sync/serialization/type/value_type.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdb7e0b41f99399eb3e925430d3b26062cd2b065ab9fff94dd7e223fda8ce0ce
|
4
|
+
data.tar.gz: aa9f1aa2a45fbbfddde1fec0907b766a0ad7f737fe54e858920f79a0081841f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad461a494e300b434a340259dfb3452868c774bbc4b803cee77879c8df67b9a8ae6e2a252100d5b0b15fc99b16c49a2f0fcc79e8e8f457b4bc17c1f6793e7d01
|
7
|
+
data.tar.gz: df9082d23560e8b1fcc19b64a5459fb10aabada94801f4b5406bb1289ad5b848556d5d214b0c7b41da7800e5f56dfcf37f8e7b541e0f6dbbe41294543bc759b4
|
data/.gitignore
CHANGED
@@ -10,11 +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
|
|
25
|
+
# dotenv
|
18
26
|
.env
|
19
27
|
|
20
|
-
.tool-versions
|
28
|
+
.tool-versions
|
29
|
+
.ruby-version
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ledger_sync (1.
|
4
|
+
ledger_sync (1.4.0)
|
5
5
|
activemodel
|
6
6
|
colorize
|
7
7
|
coveralls
|
@@ -17,20 +17,20 @@ PATH
|
|
17
17
|
oauth2
|
18
18
|
pd_ruby
|
19
19
|
resonad
|
20
|
-
simply_serializable (>= 1.
|
20
|
+
simply_serializable (>= 1.5.1)
|
21
21
|
stripe
|
22
22
|
|
23
23
|
GEM
|
24
24
|
remote: https://rubygems.org/
|
25
25
|
specs:
|
26
|
-
activemodel (6.0.
|
27
|
-
activesupport (= 6.0.
|
28
|
-
activesupport (6.0.
|
26
|
+
activemodel (6.0.3.1)
|
27
|
+
activesupport (= 6.0.3.1)
|
28
|
+
activesupport (6.0.3.1)
|
29
29
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
30
30
|
i18n (>= 0.7, < 2)
|
31
31
|
minitest (~> 5.1)
|
32
32
|
tzinfo (~> 1.1)
|
33
|
-
zeitwerk (~> 2.2)
|
33
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
34
34
|
addressable (2.7.0)
|
35
35
|
public_suffix (>= 2.0.2, < 5.0)
|
36
36
|
akami (1.3.1)
|
@@ -70,7 +70,7 @@ GEM
|
|
70
70
|
concurrent-ruby (~> 1.0)
|
71
71
|
dry-core (~> 0.2)
|
72
72
|
dry-equalizer (~> 0.2)
|
73
|
-
dry-schema (1.5.
|
73
|
+
dry-schema (1.5.1)
|
74
74
|
concurrent-ruby (~> 1.0)
|
75
75
|
dry-configurable (~> 0.8, >= 0.8.3)
|
76
76
|
dry-core (~> 0.4)
|
@@ -114,7 +114,7 @@ GEM
|
|
114
114
|
json (2.3.0)
|
115
115
|
jwt (2.2.1)
|
116
116
|
mini_portile2 (2.4.0)
|
117
|
-
minitest (5.14.
|
117
|
+
minitest (5.14.1)
|
118
118
|
multi_json (1.14.1)
|
119
119
|
multi_xml (0.6.0)
|
120
120
|
multipart-post (2.1.1)
|
@@ -176,18 +176,18 @@ GEM
|
|
176
176
|
json (>= 1.8, < 3)
|
177
177
|
simplecov-html (~> 0.10.0)
|
178
178
|
simplecov-html (0.10.2)
|
179
|
-
simply_serializable (1.
|
179
|
+
simply_serializable (1.5.1)
|
180
180
|
fingerprintable (>= 1.2.1)
|
181
181
|
socksify (1.7.1)
|
182
|
-
stripe (5.
|
182
|
+
stripe (5.22.0)
|
183
183
|
sync (0.5.0)
|
184
184
|
term-ansicolor (1.7.1)
|
185
185
|
tins (~> 1.0)
|
186
186
|
thor (1.0.1)
|
187
187
|
thread_safe (0.3.6)
|
188
|
-
tins (1.
|
188
|
+
tins (1.25.0)
|
189
189
|
sync
|
190
|
-
tzinfo (1.2.
|
190
|
+
tzinfo (1.2.7)
|
191
191
|
thread_safe (~> 0.1)
|
192
192
|
unicode-display_width (1.6.1)
|
193
193
|
vcr (5.1.0)
|
@@ -198,7 +198,7 @@ GEM
|
|
198
198
|
addressable (>= 2.3.6)
|
199
199
|
crack (>= 0.3.2)
|
200
200
|
hashdiff (>= 0.4.0, < 2.0.0)
|
201
|
-
zeitwerk (2.
|
201
|
+
zeitwerk (2.3.0)
|
202
202
|
|
203
203
|
PLATFORMS
|
204
204
|
ruby
|
data/LICENSE.txt
CHANGED
@@ -1,97 +1,5 @@
|
|
1
|
-
Business Source
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
Licensed Work: LedgerSync
|
7
|
-
The Licensed Work is (c) 2020 Modern Treasury Corp.
|
8
|
-
Additional Use Grant: You may make use of the Licensed Work, provided that you
|
9
|
-
may not use the Licensed Work for a Connector Service.
|
10
|
-
|
11
|
-
A “Connector Service” is a commercial offering that
|
12
|
-
allows third parties (other than your employees and
|
13
|
-
contractors) to access the functionality of the Licensed
|
14
|
-
Work by connecting to and exchanging information with
|
15
|
-
general ledgers, accounting software, or other adaptors
|
16
|
-
defined in the library that are controlled by such
|
17
|
-
third parties.
|
18
|
-
|
19
|
-
Notice
|
20
|
-
|
21
|
-
The Business Source License (this document, or the “License”) is not an Open
|
22
|
-
Source license. However, the Licensed Work will eventually be made available
|
23
|
-
under an Open Source License, as stated in this License.
|
24
|
-
|
25
|
-
License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
|
26
|
-
“Business Source License” is a trademark of MariaDB Corporation Ab.
|
27
|
-
|
28
|
-
-----------------------------------------------------------------------------
|
29
|
-
|
30
|
-
Business Source License 1.1
|
31
|
-
|
32
|
-
Terms
|
33
|
-
|
34
|
-
The Licensor hereby grants you the right to copy, modify, create derivative
|
35
|
-
works, redistribute, and make non-production use of the Licensed Work. The
|
36
|
-
Licensor may make an Additional Use Grant, above, permitting limited
|
37
|
-
production use.
|
38
|
-
|
39
|
-
Effective on the Change Date, or the fourth anniversary of the first publicly
|
40
|
-
available distribution of a specific version of the Licensed Work under this
|
41
|
-
License, whichever comes first, the Licensor hereby grants you rights under
|
42
|
-
the terms of the Change License, and the rights granted in the paragraph
|
43
|
-
above terminate.
|
44
|
-
|
45
|
-
If your use of the Licensed Work does not comply with the requirements
|
46
|
-
currently in effect as described in this License, you must purchase a
|
47
|
-
commercial license from the Licensor, its affiliated entities, or authorized
|
48
|
-
resellers, or you must refrain from using the Licensed Work.
|
49
|
-
|
50
|
-
All copies of the original and modified Licensed Work, and derivative works
|
51
|
-
of the Licensed Work, are subject to this License. This License applies
|
52
|
-
separately for each version of the Licensed Work and the Change Date may vary
|
53
|
-
for each version of the Licensed Work released by Licensor.
|
54
|
-
|
55
|
-
You must conspicuously display this License on each original or modified copy
|
56
|
-
of the Licensed Work. If you receive the Licensed Work in original or
|
57
|
-
modified form from a third party, the terms and conditions set forth in this
|
58
|
-
License apply to your use of that work.
|
59
|
-
|
60
|
-
Any use of the Licensed Work in violation of this License will automatically
|
61
|
-
terminate your rights under this License for the current and all other
|
62
|
-
versions of the Licensed Work.
|
63
|
-
|
64
|
-
This License does not grant you any right in any trademark or logo of
|
65
|
-
Licensor or its affiliates (provided that you may use a trademark or logo of
|
66
|
-
Licensor as expressly required by this License).
|
67
|
-
|
68
|
-
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
69
|
-
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
70
|
-
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
71
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
72
|
-
TITLE.
|
73
|
-
|
74
|
-
MariaDB hereby grants you permission to use this License’s text to license
|
75
|
-
your works, and to refer to it using the trademark “Business Source License”,
|
76
|
-
as long as you comply with the Covenants of Licensor below.
|
77
|
-
|
78
|
-
Covenants of Licensor
|
79
|
-
|
80
|
-
In consideration of the right to use this License’s text and the “Business
|
81
|
-
Source License” name and trademark, Licensor covenants to MariaDB, and to all
|
82
|
-
other recipients of the licensed work to be provided by Licensor:
|
83
|
-
|
84
|
-
1. To specify as the Change License the GPL Version 2.0 or any later version,
|
85
|
-
or a license that is compatible with GPL Version 2.0 or a later version,
|
86
|
-
where “compatible” means that software provided under the Change License can
|
87
|
-
be included in a program with software provided under GPL Version 2.0 or a
|
88
|
-
later version. Licensor may specify additional Change Licenses without
|
89
|
-
limitation.
|
90
|
-
|
91
|
-
2. To either: (a) specify an additional grant of rights to use that does not
|
92
|
-
impose any additional restriction on the right granted in this License, as
|
93
|
-
the Additional Use Grant; or (b) insert the text “None”.
|
94
|
-
|
95
|
-
3. To specify a Change Date.
|
96
|
-
|
97
|
-
4. Not to modify this License in any other way.
|
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
@@ -6,518 +6,21 @@
|
|
6
6
|
|
7
7
|
## Join the Conversation
|
8
8
|
|
9
|
-
[Click here](https://join.slack.com/t/ledger-sync/shared_invite/zt-
|
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
|
-
##
|
11
|
+
## Documentation
|
12
12
|
|
13
|
-
|
13
|
+
The most up-to-date documentation can be found at [www.ledgersync.dev](http://www.ledgersync.dev)
|
14
14
|
|
15
|
-
|
16
|
-
gem 'ledger_sync'
|
17
|
-
```
|
15
|
+
## License
|
18
16
|
|
19
|
-
|
17
|
+
The gem is available as open source under the terms of the licenses detailed in `LICENSE.txt`.
|
20
18
|
|
21
|
-
|
22
|
-
$ bundle
|
23
|
-
```
|
24
|
-
|
25
|
-
Or install it yourself as:
|
26
|
-
|
27
|
-
```bash
|
28
|
-
$ gem install ledger_sync
|
29
|
-
```
|
30
|
-
|
31
|
-
## Usage
|
32
|
-
|
33
|
-
To use LedgerSync, you must create an `Operation`. The operation will be ledger-specific and will require the following:
|
34
|
-
|
35
|
-
1. Adaptor
|
36
|
-
2. Resource(s)
|
37
|
-
|
38
|
-
The code may look like the following:
|
39
|
-
|
40
|
-
```ruby
|
41
|
-
# First we create an adaptor, which is our connection to a ledger.
|
42
|
-
# Each ledger may require different keys, so check the
|
43
|
-
# documentation below for specifics.
|
44
|
-
adaptor = LedgerSync::Adaptors::QuickBooksOnline::Adaptor.new(
|
45
|
-
access_token: access_token, # assuming this is defined
|
46
|
-
client_id: ENV['QUICKBOOKS_ONLINE_CLIENT_ID'],
|
47
|
-
client_secret: ENV['QUICKBOOKS_ONLINE_CLIENT_SECRET'],
|
48
|
-
realm_id: ENV['QUICKBOOKS_ONLINE_REALM_ID'],
|
49
|
-
refresh_token: refresh_token, # assuming this is defined
|
50
|
-
)
|
51
|
-
|
52
|
-
# Create a resource on which to operate. Some resources have
|
53
|
-
# relationships with other resources. You can use
|
54
|
-
# `Util::ResourcesBuilder` to create resources and relationships from
|
55
|
-
# a structured hash.
|
56
|
-
resource = LedgerSync::Customer.new(
|
57
|
-
name: 'Sample Customer',
|
58
|
-
email: 'test@example.com'
|
59
|
-
)
|
60
|
-
|
61
|
-
# Create the operation we want to perform.
|
62
|
-
operation = LedgerSync::Adaptors::QuickBooksOnline::Customer::Operations::Create.new(
|
63
|
-
adaptor: adaptor,
|
64
|
-
resource: resource
|
65
|
-
)
|
66
|
-
|
67
|
-
result = operation.perform # Returns a LedgerSync::OperationResult
|
68
|
-
|
69
|
-
if result.success?
|
70
|
-
resource = result.operation.resource
|
71
|
-
# Do something with resource
|
72
|
-
else # result.failure?
|
73
|
-
raise result.error
|
74
|
-
end
|
75
|
-
|
76
|
-
# Because QuickBooks Online uses Oauth 2, you must always be sure to
|
77
|
-
# save the access_token, refresh_token, and expirations as they can
|
78
|
-
# change with any API call.
|
79
|
-
result.operation.adaptor.ledger_attributes_to_save.each do |key, value|
|
80
|
-
# save values
|
81
|
-
end
|
82
|
-
```
|
83
|
-
|
84
|
-
## How it Works
|
85
|
-
|
86
|
-
This library consists of two important layers:
|
87
|
-
|
88
|
-
1. Resources
|
89
|
-
2. Adaptors
|
90
|
-
|
91
|
-
### Resources
|
92
|
-
|
93
|
-
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.
|
94
|
-
|
95
|
-
You can find supported resources by calling `LedgerSync.resources`.
|
96
|
-
|
97
|
-
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`.
|
98
|
-
|
99
|
-
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`.
|
100
|
-
|
101
|
-
#### Custom Attributes
|
102
|
-
|
103
|
-
Some ledgers (e.g. NetSuite) allow for custom attributes (or "fields"), which can vary by account and user. To allow for custom attributes, you can create new resources, ledger serializers (see below), and validation contracts (see below). Assuming your ledger supports the string attribute `foo` for customers, you could do the following:
|
104
|
-
|
105
|
-
```ruby
|
106
|
-
class CustomCustomer < LedgerSync::Customer
|
107
|
-
attribute :foo, type: LedgerSync::Type::String
|
108
|
-
end
|
109
|
-
```
|
110
|
-
|
111
|
-
Depending on your use of LedgerSync, you may need to define resources dynamically with different custom attributes. You could do so using something like the following:
|
112
|
-
|
113
|
-
```ruby
|
114
|
-
custom_attributes_for_customers = [
|
115
|
-
[
|
116
|
-
[:foo, LedgerSync::Type::String]
|
117
|
-
],
|
118
|
-
[
|
119
|
-
[:foo, LedgerSync::Type::Integer],
|
120
|
-
[:bar, LedgerSync::Type::Boolean]
|
121
|
-
]
|
122
|
-
]
|
123
|
-
|
124
|
-
custom_customer_classes = custom_attributes_for_customers.map do |attributes|
|
125
|
-
customer_class = Class.new(LedgerSync::Customer)
|
126
|
-
attributes.each do |name, type|
|
127
|
-
customer_class.attribute name, type: type
|
128
|
-
end
|
129
|
-
customer_class
|
130
|
-
end
|
131
|
-
|
132
|
-
customer_class_1, customer_class_2 = custom_customer_classes
|
133
|
-
|
134
|
-
# First Custom Customer Class
|
135
|
-
customer_class_1.resource_attributes.include?(:foo) # => true
|
136
|
-
customer_class_1.resource_attributes[:foo].type # => #<LedgerSync::Type::String:0x00007fe04e9529b0 @precision=nil, @scale=nil, @limit=nil>
|
137
|
-
customer_class_1.resource_attributes.include?(:bar) # => false
|
138
|
-
|
139
|
-
# Second Custom Customer Class
|
140
|
-
customer_class_2.resource_attributes.include?(:foo) # => true
|
141
|
-
customer_class_2.resource_attributes[:foo].type # => #<LedgerSync::Type::Integer:0x00007fe04e2c7898 @precision=nil, @scale=nil, @limit=nil, @range=-2147483648...2147483648>
|
142
|
-
customer_class_2.resource_attributes.include?(:bar) # => true
|
143
|
-
customer_class_2.resource_attributes[:bar].type # => #<LedgerSync::Type::Boolean:0x00007fe04e2e4f10 @precision=nil, @scale=nil, @limit=nil>
|
144
|
-
```
|
145
|
-
|
146
|
-
You can now use these custom resources in operations that require custom attributes.
|
147
|
-
|
148
|
-
### Adaptors
|
149
|
-
|
150
|
-
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:
|
151
|
-
|
152
|
-
- adaptor
|
153
|
-
- serializers
|
154
|
-
- operations
|
155
|
-
- searchers
|
156
|
-
|
157
|
-
#### Adaptor
|
158
|
-
|
159
|
-
The adaptor handles authentication and requests to the ledger. Each adaptors initializer will vary based on the needs of that ledger.
|
160
|
-
|
161
|
-
#### Serializers
|
162
|
-
|
163
|
-
Operations depend on `LedgerSync::Adaptor::LedgerSerializer`s to serialize and deserialize objects. Most resources have a default serializer per adaptor which may acts as both a serializer and deserializer. You can provide custom serializers, which is necessary when working with custom attributes. For example, given the following:
|
164
|
-
- `custom_resource` that is a `LedgerSync::Customer` (see above)
|
165
|
-
- the attribute `foo` is used in both the request and response bodies
|
166
|
-
- using the `NetSuite` adaptor
|
167
|
-
|
168
|
-
you could implement custom serializers using the following code:
|
169
|
-
|
170
|
-
```ruby
|
171
|
-
class CustomSerializer < LedgerSync::Adaptors::NetSuite::Customer::LedgerSerializer
|
172
|
-
attribute ledger_attribute: :foo,
|
173
|
-
resource_attribute: :foo,
|
174
|
-
deserialize: true, # optional, default: true
|
175
|
-
serialize: true # optional, default: true
|
176
|
-
end
|
177
|
-
|
178
|
-
# Serializing
|
179
|
-
custom_resource = CustomCustomer.new(foo: 'asdf') # See above under Resources -> Custom Attributes
|
180
|
-
serializer = CustomSerializer.new(resource: custom_resource)
|
181
|
-
serializer.to_ledger_hash # => {"foo"=>"asdf"}
|
182
|
-
|
183
|
-
# Deserializing
|
184
|
-
deserialized_resource = serializer.deserialize(hash: { foo: 'qwerty' })
|
185
|
-
deserialized_resource.foo # => 'qwerty'
|
186
|
-
custom_resource.foo # => 'asdf'
|
187
|
-
|
188
|
-
op = LedgerSync::Adaptors::NetSuite::Customer::Operations::Create.new(
|
189
|
-
adaptor: adaptor,
|
190
|
-
ledger_deserializer_class: CustomSerializer, # You must specify, though you could use a separate class
|
191
|
-
ledger_serializer_class: CustomSerializer,
|
192
|
-
resource: custom_resource
|
193
|
-
)
|
194
|
-
```
|
195
|
-
|
196
|
-
Note that in the above example, we extend an existing customer serializer in the NetSuite adaptor. In most cases, serializers have the following inheritance pattern: `LedgerSync::Adaptors::[ADAPTOR]::[RESOURCE]::LedgerSerializer < LedgerSync::Adaptors::[ADAPTOR]::LedgerSerializer < LedgerSync::Adaptors::LedgerSerializer`
|
197
|
-
|
198
|
-
So in this example, it would be `LedgerSync::Adaptors::NetSuite::Customer::LedgerSerializer < LedgerSync::Adaptors::NetSuite::LedgerSerializer < LedgerSync::Adaptors::LedgerSerializer`. The more specific the serializer, the more helper methods are available that are adaptor and/or resource specific.
|
199
|
-
|
200
|
-
#### Operation
|
201
|
-
|
202
|
-
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:
|
203
|
-
|
204
|
-
- a `Contract` class which is used to validate the resource using the `dry-validation` gem
|
205
|
-
- a `perform` instance method, which handles the actual API requests and response/error handling.
|
206
|
-
|
207
|
-
Note: Adaptors may support different operations for each resource type.
|
208
|
-
|
209
|
-
##### Contracts
|
210
|
-
|
211
|
-
Contracts are dry-validation schemas, which determine if an operation can be performed. You can create custom schemas and pass them to operations. Assuming you have an `operation_class` variable and `foo` is an attribute of a `custom_resource` (see above) that is required to be a string, you can implement it with the following:
|
212
|
-
|
213
|
-
```ruby
|
214
|
-
class CustomContract < LedgerSync::Adaptors::Contract
|
215
|
-
params do
|
216
|
-
required(:foo).filled(:string)
|
217
|
-
end
|
218
|
-
end
|
219
|
-
|
220
|
-
# A valid case
|
221
|
-
custom_resource = CustomResource.new(foo: 'asdf')
|
222
|
-
op = operation_class.new(
|
223
|
-
adaptor: adaptor,
|
224
|
-
resource: resource,
|
225
|
-
validation_contract: CustomContract
|
226
|
-
)
|
227
|
-
op.valid? # => true
|
228
|
-
|
229
|
-
# An invalid case
|
230
|
-
custom_resource = CustomResource.new(foo: nil)
|
231
|
-
operation_class.new(
|
232
|
-
adaptor: adaptor,
|
233
|
-
resource: resource,
|
234
|
-
validation_contract: CustomContract
|
235
|
-
)
|
236
|
-
op.valid? # => false
|
237
|
-
|
238
|
-
```
|
239
|
-
|
240
|
-
#### Searcher
|
241
|
-
|
242
|
-
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:
|
243
|
-
|
244
|
-
```ruby
|
245
|
-
searcher = LedgerSync::Adaptors::QuickBooksOnline::Customer::Searcher.new(
|
246
|
-
adaptor: adaptor # assuming this is defined,
|
247
|
-
query: 'test'
|
248
|
-
)
|
249
|
-
|
250
|
-
result = searcher.search # returns a LedgerSync::SearchResult
|
251
|
-
|
252
|
-
if result.success?
|
253
|
-
resources = result.resources
|
254
|
-
# Do something with found resources
|
255
|
-
else # result.failure?
|
256
|
-
raise result.error
|
257
|
-
end
|
258
|
-
|
259
|
-
# Different ledgers may use different pagination strategies. In order
|
260
|
-
# to get the next and previous set of results, you can use the following:
|
261
|
-
next_searcher = searcher.next_searcher
|
262
|
-
previous_searcher = searcher.previous_searcher
|
263
|
-
```
|
264
|
-
|
265
|
-
## NetSuite
|
266
|
-
|
267
|
-
The NetSuite adaptor leverages NetSuite's REST API.
|
268
|
-
|
269
|
-
### Resource Metadata and Schemas
|
270
|
-
|
271
|
-
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.
|
272
|
-
|
273
|
-
To retrieve the metadata for a record:
|
274
|
-
|
275
|
-
```ruby
|
276
|
-
metadata = LedgerSync::Adaptors::NetSuite::Record::Metadata.new(
|
277
|
-
adaptor: netsuite_adaptor, # Assuming this is previous defined
|
278
|
-
record: :customer
|
279
|
-
)
|
280
|
-
|
281
|
-
puts metadata.http_methods # Returns a list of LedgerSync::Adaptors::NetSuite::Record::HTTPMethod objects
|
282
|
-
puts metadata.properties # Returns a list of LedgerSync::Adaptors::NetSuite::Record::Property objects
|
283
|
-
```
|
284
|
-
|
285
|
-
### Reference
|
286
|
-
|
287
|
-
- [NetSuite REST API Documentation](https://docs.oracle.com/cloud/latest/netsuitecs_gs/NSTRW/NSTRW.pdf)
|
288
|
-
|
289
|
-
## NetSuite SOAP
|
290
|
-
|
291
|
-
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.
|
292
|
-
|
293
|
-
### Reference
|
294
|
-
|
295
|
-
- [NetSuite SOAP API Documentation](https://docs.oracle.com/cloud/latest/netsuitecs_gs/NSTWR/NSTWR.pdf)
|
296
|
-
|
297
|
-
|
298
|
-
## QuickBooks Online
|
299
|
-
|
300
|
-
### OAuth
|
301
|
-
|
302
|
-
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.
|
303
|
-
|
304
|
-
#### Retrieve Access Token
|
305
|
-
|
306
|
-
The library contains a lightweight script that is helpful in retrieving and refreshing access tokens. To use, do the following:
|
307
|
-
|
308
|
-
1. Create a `.env` file in the library root.
|
309
|
-
2. Add values for `QUICKBOOKS_ONLINE_CLIENT_ID` and `QUICKBOOKS_ONLINE_CLIENT_SECRET` (you can copy `.env.template`).
|
310
|
-
3. Ensure your developer application in [the QuickBooks Online developer portal](https://developer.intuit.com) contains this redirect URI: `http://localhost:5678` (note: no trailing slash and port configurable with `PORT` environment variable)
|
311
|
-
4. Run `ruby bin/quickbooks_online_oauth_server.rb` from the library root (note: it must run from the root in order to update `.env`).
|
312
|
-
5. Visit the URL output in the terminal.
|
313
|
-
6. Upon redirect back to your `localhost`, the new values will be printed to the console and saved back to your `.env`
|
314
|
-
|
315
|
-
#### Adaptor Helper Methods
|
316
|
-
|
317
|
-
The adaptor also implements some helper methods for getting tokens. For example, you can set up an adaptor using the following:
|
318
|
-
|
319
|
-
```ruby
|
320
|
-
# Retrieve the following values from Intuit app settings
|
321
|
-
client_id = 'ID'
|
322
|
-
client_secret = 'SECRET'
|
323
|
-
redirect_uri = 'http://localhost:3000'
|
324
|
-
|
325
|
-
oauth_client = LedgerSync::Adaptors::QuickBooksOnline::OAuthClientHelper.new(
|
326
|
-
client_id: client_id,
|
327
|
-
client_secret: client_secret
|
328
|
-
)
|
329
|
-
|
330
|
-
puts oauth_client.authorization_url(redirect_uri: redirect_uri)
|
331
|
-
|
332
|
-
# Visit on the output URL and authorize a company.
|
333
|
-
# You will be redirected back to the redirect_uri.
|
334
|
-
# Copy the full url from your browser:
|
335
|
-
|
336
|
-
uri = 'https://localhost:3000/?code=FOO&state=BAR&realm_id=BAZ'
|
337
|
-
|
338
|
-
adaptor = LedgerSync::Adaptors::QuickBooksOnline::Adaptor.new_from_oauth_client_uri(
|
339
|
-
oauth_client: oauth_client,
|
340
|
-
uri: uri
|
341
|
-
)
|
342
|
-
|
343
|
-
# You can test that the auth works:
|
344
|
-
|
345
|
-
adaptor.refresh!
|
346
|
-
```
|
347
|
-
|
348
|
-
**Note: If you have a `.env` file storing your secrets, the adaptor will automatically update the variables and record previous values whenever values change**
|
349
|
-
|
350
|
-
### Webhooks
|
351
|
-
|
352
|
-
Reference: [QuickBooks Online Webhook Documentation](https://developer.intuit.com/app/developer/qbo/docs/develop/webhooks/managing-webhooks-notifications#validating-the-notification)
|
353
|
-
|
354
|
-
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:
|
355
|
-
|
356
|
-
```ruby
|
357
|
-
# Assuming `request` is the webhook request received from Quickbooks Online
|
358
|
-
webhook = LedgerSync::Adaptors::QuickBooksOnline::Webhook.new(
|
359
|
-
payload: request.body.read # It accepts a JSON string or hash
|
360
|
-
)
|
361
|
-
|
362
|
-
verification_token = WEBHOOK_VERIFICATION_TOKEN # You get this token when you create webhooks in the QuickBooks Online dashboard
|
363
|
-
signature = request.headers['intuit-signature']
|
364
|
-
raise 'Not valid' unless webhook.valid?(signature: signature, verification_token: verification_token)
|
365
|
-
|
366
|
-
# Although not yet used, webhooks may include notifications for multiple realms
|
367
|
-
webhook.notifications.each do |notification|
|
368
|
-
puts notification.realm_id
|
369
|
-
|
370
|
-
# Multiple events may be referenced.
|
371
|
-
notification.events.each do |event|
|
372
|
-
puts event.resource # Returns a LedgerSync resource with the `ledger_id` set
|
373
|
-
|
374
|
-
# Other helpful methods
|
375
|
-
notification.find_operation_class(adaptor: your_quickbooks_adaptor_instance) # The respective Find class
|
376
|
-
notification.find_operation(adaptor: your_quickbooks_adaptor_instance) # The initialized respective Find operation
|
377
|
-
notification.find(adaptor: your_quickbooks_adaptor_instance) # Performs a Find operation for the resource retrieving the latest version from QuickBooks Online
|
378
|
-
end
|
379
|
-
|
380
|
-
# Other helpful methods
|
381
|
-
notification.resources # All resources for a given webhook across all events
|
382
|
-
end
|
383
|
-
|
384
|
-
# Other helpful methods
|
385
|
-
webhook.events # All events for a given webhook across all realms
|
386
|
-
webhook.resources # All events for a given webhook across all realms and events
|
387
|
-
```
|
388
|
-
|
389
|
-
### Errors
|
390
|
-
|
391
|
-
- [QuickBooks Online Error Documentation](https://developer.intuit.com/app/developer/qbo/docs/develop/troubleshooting/error-codes)
|
392
|
-
|
393
|
-
## Tips and More
|
394
|
-
|
395
|
-
### Keyword Arguments
|
396
|
-
|
397
|
-
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)`.
|
398
|
-
|
399
|
-
### Fingerprints
|
400
|
-
|
401
|
-
Most objects in LedgerSync can be fingerprinted by calling the instance method `fingerprint`. For example:
|
402
|
-
|
403
|
-
```ruby
|
404
|
-
puts LedgerSync::Customer.new.fingerprint # "b3eab7ec00431a4ae0468fee72e5ba8f"
|
405
|
-
|
406
|
-
puts LedgerSync::Customer.new.fingerprint == LedgerSync::Customer.new.fingerprint # true
|
407
|
-
puts LedgerSync::Customer.new.fingerprint == LedgerSync::Customer.new(name: :foo).fingerprint # false
|
408
|
-
puts LedgerSync::Customer.new.fingerprint == LedgerSync::Payment.new.fingerprint # false
|
409
|
-
```
|
410
|
-
|
411
|
-
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).
|
412
|
-
|
413
|
-
### Serialization
|
414
|
-
|
415
|
-
Most objects in LedgerSync can be serialized by calling the instance method `serialize`. For example:
|
416
|
-
|
417
|
-
```ruby
|
418
|
-
puts LedgerSync::Payment.new(
|
419
|
-
customer: LedgerSync::Customer.new
|
420
|
-
)
|
421
|
-
|
422
|
-
{
|
423
|
-
root: "LedgerSync::Payment/8eed81c0177801a001f2544f0c85e21d",
|
424
|
-
objects: {
|
425
|
-
"LedgerSync::Payment/8eed81c0177801a001f2544f0c85e21d": {
|
426
|
-
id: "LedgerSync::Payment/8eed81c0177801a001f2544f0c85e21d",
|
427
|
-
object: "LedgerSync::Payment",
|
428
|
-
fingeprint: "8eed81c0177801a001f2544f0c85e21d",
|
429
|
-
data: {
|
430
|
-
currency: nil,
|
431
|
-
amount: nil,
|
432
|
-
customer: {
|
433
|
-
object: "reference",
|
434
|
-
id: "LedgerSync::Customer/b3eab7ec00431a4ae0468fee72e5ba8f"
|
435
|
-
},
|
436
|
-
external_id: "",
|
437
|
-
ledger_id: nil,
|
438
|
-
|
439
|
-
}
|
440
|
-
},
|
441
|
-
"LedgerSync::Customer/b3eab7ec00431a4ae0468fee72e5ba8f": {
|
442
|
-
id: "LedgerSync::Customer/b3eab7ec00431a4ae0468fee72e5ba8f",
|
443
|
-
object: "LedgerSync::Customer",
|
444
|
-
fingeprint: "b3eab7ec00431a4ae0468fee72e5ba8f",
|
445
|
-
data: {
|
446
|
-
name: nil,
|
447
|
-
email: nil,
|
448
|
-
phone_number: nil,
|
449
|
-
external_id: "",
|
450
|
-
ledger_id: nil
|
451
|
-
}
|
452
|
-
}
|
453
|
-
}
|
454
|
-
}
|
455
|
-
```
|
456
|
-
|
457
|
-
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:
|
458
|
-
|
459
|
-
```ruby
|
460
|
-
{
|
461
|
-
object: "reference",
|
462
|
-
id: "LedgerSync::Customer/b3eab7ec00431a4ae0468fee72e5ba8f"
|
463
|
-
}
|
464
|
-
```
|
465
|
-
|
466
|
-
## Development
|
467
|
-
|
468
|
-
After checking out the repo, run `bin/setup` to install dependencies.
|
469
|
-
|
470
|
-
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)
|
471
|
-
|
472
|
-
### Testing
|
473
|
-
|
474
|
-
Run `bundle exec rspec` to run all unit, feature, and integration tests. Unlike QA Tests, all external HTTP requests and responses are stubbed.
|
475
|
-
|
476
|
-
### QA Testing
|
477
|
-
|
478
|
-
**BE SURE TO USE A TEST ENVIRONMENT ON YOUR LEDGER.**
|
479
|
-
|
480
|
-
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.
|
481
|
-
|
482
|
-
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.
|
483
|
-
|
484
|
-
**WARNINGS:**
|
485
|
-
|
486
|
-
- **BE SURE TO USE A TEST ENVIRONMENT ON YOUR LEDGER.**
|
487
|
-
- **NEVER CHECK IN YOUR SECRETS (e.g. the `.env` file).**
|
488
|
-
- 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.
|
489
|
-
|
490
|
-
### Console
|
491
|
-
|
492
|
-
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.
|
493
|
-
|
494
|
-
## Deployment
|
495
|
-
|
496
|
-
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:
|
497
|
-
|
498
|
-
```bash
|
499
|
-
# Version Format: MAJOR.MINOR.PATCH
|
500
|
-
./release.sh patch # to bump X in 1.1.X
|
501
|
-
./release.sh minor # to bump X in 1.X.1
|
502
|
-
./release.sh major # to bump X in X.1.1
|
503
|
-
```
|
504
|
-
|
505
|
-
### Contributing
|
506
|
-
|
507
|
-
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.
|
508
|
-
|
509
|
-
### License
|
510
|
-
|
511
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
512
|
-
|
513
|
-
### Code of Conduct
|
514
|
-
|
515
|
-
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).
|
516
|
-
|
517
|
-
# Maintainers
|
19
|
+
## Maintainers
|
518
20
|
|
519
21
|
A big thank you to our maintainers:
|
520
22
|
|
521
23
|
- [@ryanwjackson](https://github.com/ryanwjackson)
|
522
24
|
- [@jozefvaclavik](https://github.com/jozefvaclavik)
|
523
|
-
-
|
25
|
+
- [@SeanBolt](https://github.com/SeanBolt)
|
26
|
+
- And the whole [Modern Treasury](https://www.moderntreasury.com) team
|