ledger_sync 1.4.2 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/.overcommit.yml +30 -0
  3. data/.travis.yml +6 -1
  4. data/Gemfile +2 -0
  5. data/Gemfile.lock +11 -5
  6. data/Rakefile +2 -0
  7. data/bin/console +1 -0
  8. data/bin/quickbooks_online_oauth_server.rb +5 -4
  9. data/documentation/generators/generator.rb +4 -4
  10. data/documentation/site/LICENSE.md +14 -14
  11. data/documentation/site/_includes/header.html +34 -34
  12. data/documentation/site/_includes/section_content.html +25 -30
  13. data/documentation/site/_includes/section_cta.html +20 -24
  14. data/documentation/site/_includes/section_grid.html +39 -54
  15. data/documentation/site/_includes/section_hero.html +19 -24
  16. data/documentation/site/_includes/submenu.html +6 -7
  17. data/documentation/site/_layouts/advanced.html +0 -1
  18. data/documentation/site/_layouts/guides.html +2 -2
  19. data/documentation/site/_layouts/page.html +2 -2
  20. data/documentation/site/_plugins/filters.rb +3 -3
  21. data/documentation/site/_templates/reference/resources/resource.md.erb +14 -0
  22. data/documentation/site/assets/js/plugins.js +1 -1
  23. data/documentation/site/guides/architecture/searchers.md +3 -3
  24. data/documentation/site/reference/netsuite/resources/account.md +6 -0
  25. data/documentation/site/reference/netsuite/resources/check.md +6 -0
  26. data/documentation/site/reference/netsuite/resources/check_line_item.md +4 -0
  27. data/documentation/site/reference/netsuite/resources/currency.md +4 -0
  28. data/documentation/site/reference/netsuite/resources/customer.md +6 -0
  29. data/documentation/site/reference/netsuite/resources/customer_deposit.md +6 -0
  30. data/documentation/site/reference/netsuite/resources/department.md +6 -0
  31. data/documentation/site/reference/netsuite/resources/deposit.md +4 -0
  32. data/documentation/site/reference/netsuite/resources/deposit_line_item.md +4 -0
  33. data/documentation/site/reference/netsuite/resources/invoice.md +4 -0
  34. data/documentation/site/reference/netsuite/resources/invoice_line_item.md +4 -0
  35. data/documentation/site/reference/netsuite/resources/item.md +4 -0
  36. data/documentation/site/reference/netsuite/resources/journal_entry.md +4 -0
  37. data/documentation/site/reference/netsuite/resources/journal_entry_line_item.md +4 -0
  38. data/documentation/site/reference/netsuite/resources/ledger_class.md +6 -0
  39. data/documentation/site/reference/netsuite/resources/location.md +6 -0
  40. data/documentation/site/reference/netsuite/resources/resource.md +4 -0
  41. data/documentation/site/reference/netsuite/resources/subsidiary.md +6 -0
  42. data/documentation/site/reference/netsuite/resources/vendor.md +6 -0
  43. data/documentation/site/reference/netsuite_soap/resources/customer.md +4 -0
  44. data/documentation/site/reference/netsuite_soap/resources/resource.md +4 -0
  45. data/documentation/site/reference/netsuite_soap/resources/subsidiary.md +4 -0
  46. data/documentation/site/reference/quickbooks_online/resources/account.md +6 -0
  47. data/documentation/site/reference/quickbooks_online/resources/bill.md +6 -0
  48. data/documentation/site/reference/quickbooks_online/resources/bill_line_item.md +4 -0
  49. data/documentation/site/reference/quickbooks_online/resources/bill_payment.md +4 -0
  50. data/documentation/site/reference/quickbooks_online/resources/bill_payment_line_item.md +4 -0
  51. data/documentation/site/reference/quickbooks_online/resources/currency.md +4 -0
  52. data/documentation/site/reference/quickbooks_online/resources/customer.md +6 -0
  53. data/documentation/site/reference/quickbooks_online/resources/department.md +6 -0
  54. data/documentation/site/reference/quickbooks_online/resources/deposit.md +6 -0
  55. data/documentation/site/reference/quickbooks_online/resources/deposit_line_item.md +4 -0
  56. data/documentation/site/reference/quickbooks_online/resources/expense.md +6 -0
  57. data/documentation/site/reference/quickbooks_online/resources/expense_line_item.md +4 -0
  58. data/documentation/site/reference/quickbooks_online/resources/invoice.md +4 -0
  59. data/documentation/site/reference/quickbooks_online/resources/invoice_sales_line_item.md +4 -0
  60. data/documentation/site/reference/quickbooks_online/resources/item.md +4 -0
  61. data/documentation/site/reference/quickbooks_online/resources/journal_entry.md +6 -0
  62. data/documentation/site/reference/quickbooks_online/resources/journal_entry_line_item.md +4 -0
  63. data/documentation/site/reference/quickbooks_online/resources/ledger_class.md +6 -0
  64. data/documentation/site/reference/quickbooks_online/resources/payment.md +4 -0
  65. data/documentation/site/reference/quickbooks_online/resources/payment_line_item.md +4 -0
  66. data/documentation/site/reference/quickbooks_online/resources/preferences.md +4 -0
  67. data/documentation/site/reference/quickbooks_online/resources/primary_email_addr.md +4 -0
  68. data/documentation/site/reference/quickbooks_online/resources/primary_phone.md +4 -0
  69. data/documentation/site/reference/quickbooks_online/resources/resource.md +4 -0
  70. data/documentation/site/reference/quickbooks_online/resources/subsidiary.md +4 -0
  71. data/documentation/site/reference/quickbooks_online/resources/transfer.md +4 -0
  72. data/documentation/site/reference/quickbooks_online/resources/vendor.md +6 -0
  73. data/documentation/site/reference/stripe/resources/customer.md +4 -0
  74. data/documentation/site/reference/stripe/resources/resource.md +4 -0
  75. data/ledger_sync.gemspec +3 -1
  76. data/lib/ledger_sync.rb +3 -1
  77. data/lib/ledger_sync/concerns/validatable.rb +2 -0
  78. data/lib/ledger_sync/error/operation_errors.rb +1 -1
  79. data/lib/ledger_sync/error/resource_errors.rb +3 -2
  80. data/lib/ledger_sync/ledger_configuration_store.rb +5 -1
  81. data/lib/ledger_sync/ledgers/client.rb +12 -4
  82. data/lib/ledger_sync/ledgers/mixins/infer_serializer_mixin.rb +3 -1
  83. data/lib/ledger_sync/ledgers/netsuite/account/operations/find.rb +1 -1
  84. data/lib/ledger_sync/ledgers/netsuite/client.rb +2 -2
  85. data/lib/ledger_sync/ledgers/netsuite/dashboard_url_helper.rb +1 -1
  86. data/lib/ledger_sync/ledgers/netsuite/error.rb +1 -0
  87. data/lib/ledger_sync/ledgers/netsuite/journal_entry_line_item/deserializer.rb +0 -3
  88. data/lib/ledger_sync/ledgers/netsuite/resources/account.rb +1 -2
  89. data/lib/ledger_sync/ledgers/netsuite/searcher.rb +3 -1
  90. data/lib/ledger_sync/ledgers/netsuite/token.rb +1 -1
  91. data/lib/ledger_sync/ledgers/netsuite/type/deserializer_entity_type.rb +6 -6
  92. data/lib/ledger_sync/ledgers/netsuite/vendor/operations/create.rb +1 -1
  93. data/lib/ledger_sync/ledgers/netsuite/vendor/operations/delete.rb +1 -1
  94. data/lib/ledger_sync/ledgers/netsuite/vendor/operations/find.rb +1 -1
  95. data/lib/ledger_sync/ledgers/netsuite/vendor/operations/update.rb +1 -1
  96. data/lib/ledger_sync/ledgers/netsuite_soap/client.rb +15 -21
  97. data/lib/ledger_sync/ledgers/netsuite_soap/customer/operations/create.rb +2 -0
  98. data/lib/ledger_sync/ledgers/operation.rb +5 -3
  99. data/lib/ledger_sync/ledgers/quickbooks_online/account/operations/create.rb +2 -0
  100. data/lib/ledger_sync/ledgers/quickbooks_online/account/operations/find.rb +2 -0
  101. data/lib/ledger_sync/ledgers/quickbooks_online/bill/operations/create.rb +2 -0
  102. data/lib/ledger_sync/ledgers/quickbooks_online/bill/operations/find.rb +2 -0
  103. data/lib/ledger_sync/ledgers/quickbooks_online/bill/operations/update.rb +2 -0
  104. data/lib/ledger_sync/ledgers/quickbooks_online/client.rb +12 -4
  105. data/lib/ledger_sync/ledgers/quickbooks_online/customer/searcher.rb +2 -0
  106. data/lib/ledger_sync/ledgers/quickbooks_online/dashboard_url_helper.rb +22 -22
  107. data/lib/ledger_sync/ledgers/quickbooks_online/department/operations/create.rb +2 -0
  108. data/lib/ledger_sync/ledgers/quickbooks_online/department/operations/find.rb +2 -0
  109. data/lib/ledger_sync/ledgers/quickbooks_online/deposit/operations/create.rb +2 -0
  110. data/lib/ledger_sync/ledgers/quickbooks_online/deposit/operations/find.rb +2 -0
  111. data/lib/ledger_sync/ledgers/quickbooks_online/deposit/searcher.rb +1 -0
  112. data/lib/ledger_sync/ledgers/quickbooks_online/deserializer.rb +4 -2
  113. data/lib/ledger_sync/ledgers/quickbooks_online/expense/deserializer.rb +3 -2
  114. data/lib/ledger_sync/ledgers/quickbooks_online/expense/operations/create.rb +2 -0
  115. data/lib/ledger_sync/ledgers/quickbooks_online/expense/operations/find.rb +2 -0
  116. data/lib/ledger_sync/ledgers/quickbooks_online/expense/operations/update.rb +2 -0
  117. data/lib/ledger_sync/ledgers/quickbooks_online/invoice/operations/find.rb +2 -0
  118. data/lib/ledger_sync/ledgers/quickbooks_online/invoice/operations/update.rb +2 -0
  119. data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry/operations/create.rb +2 -0
  120. data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry/operations/find.rb +2 -0
  121. data/lib/ledger_sync/ledgers/quickbooks_online/journal_entry/operations/update.rb +2 -0
  122. data/lib/ledger_sync/ledgers/quickbooks_online/ledger_class/deserializer.rb +0 -1
  123. data/lib/ledger_sync/ledgers/quickbooks_online/ledger_class/operations/create.rb +2 -0
  124. data/lib/ledger_sync/ledgers/quickbooks_online/ledger_class/operations/find.rb +2 -0
  125. data/lib/ledger_sync/ledgers/quickbooks_online/operation.rb +1 -1
  126. data/lib/ledger_sync/ledgers/quickbooks_online/payment/operations/find.rb +2 -0
  127. data/lib/ledger_sync/ledgers/quickbooks_online/payment/operations/update.rb +2 -0
  128. data/lib/ledger_sync/ledgers/quickbooks_online/resources/customer.rb +4 -0
  129. data/lib/ledger_sync/ledgers/quickbooks_online/transfer/operations/create.rb +2 -0
  130. data/lib/ledger_sync/ledgers/quickbooks_online/transfer/operations/find.rb +2 -0
  131. data/lib/ledger_sync/ledgers/quickbooks_online/util/error_matcher.rb +8 -5
  132. data/lib/ledger_sync/ledgers/quickbooks_online/util/ledger_error_parser.rb +3 -3
  133. data/lib/ledger_sync/ledgers/quickbooks_online/util/operation_error_parser.rb +2 -2
  134. data/lib/ledger_sync/ledgers/quickbooks_online/webhook_event.rb +3 -1
  135. data/lib/ledger_sync/ledgers/quickbooks_online/webhook_notification.rb +4 -3
  136. data/lib/ledger_sync/ledgers/response.rb +3 -1
  137. data/lib/ledger_sync/ledgers/stripe/client.rb +1 -1
  138. data/lib/ledger_sync/ledgers/stripe/dashboard_url_helper.rb +1 -1
  139. data/lib/ledger_sync/ledgers/stripe/operation/create.rb +0 -2
  140. data/lib/ledger_sync/ledgers/stripe/operation/delete.rb +0 -2
  141. data/lib/ledger_sync/ledgers/stripe/operation/update.rb +0 -2
  142. data/lib/ledger_sync/resource.rb +3 -1
  143. data/lib/ledger_sync/resource_attribute/dirty_mixin.rb +1 -1
  144. data/lib/ledger_sync/resource_attribute/mixin.rb +3 -3
  145. data/lib/ledger_sync/resource_attribute_set.rb +1 -1
  146. data/lib/ledger_sync/result.rb +7 -12
  147. data/lib/ledger_sync/serialization/deserializer_attribute.rb +6 -2
  148. data/lib/ledger_sync/serializer.rb +3 -1
  149. data/lib/ledger_sync/type/reference_one.rb +1 -1
  150. data/lib/ledger_sync/util/hash_helpers.rb +12 -2
  151. data/lib/ledger_sync/util/mixins/delegate_iterable_methods_mixin.rb +1 -0
  152. data/lib/ledger_sync/util/read_only_object.rb +1 -1
  153. data/lib/ledger_sync/util/resource_converter.rb +12 -8
  154. data/lib/ledger_sync/util/resource_converter/attribute.rb +3 -1
  155. data/lib/ledger_sync/util/resource_converter/attribute_set.rb +2 -1
  156. data/lib/ledger_sync/util/resources_builder.rb +5 -5
  157. data/lib/ledger_sync/version.rb +3 -1
  158. metadata +17 -10
  159. data/documentation/site/reference/architecture/clients.md +0 -33
  160. data/documentation/site/reference/architecture/index.md +0 -14
  161. data/documentation/site/reference/architecture/operations.md +0 -6
  162. data/documentation/site/reference/architecture/resources.md +0 -38
  163. data/documentation/site/reference/architecture/results.md +0 -6
  164. data/documentation/site/reference/architecture/searchers.md +0 -6
  165. data/documentation/site/reference/architecture/serialization.md +0 -6
@@ -1,28 +1,23 @@
1
1
  {% assign section = include.section %}
2
2
  <section id="{{ section.section_id }}" class="block block-hero has-gradient outer">
3
- {% assign image_is_not_empty = section.image | is_not_empty %}
4
- {% if image_is_not_empty %}
5
- <div class="bg-img" style="background-image: url('{{ section.image | relative_url }}')"></div>
6
- {% endif %}
7
- <div class="inner-sm">
8
- {% assign title_is_not_empty = section.title | is_not_empty %}
9
- {% if title_is_not_empty %}
10
- <div class="block-header">
11
- <h1 class="block-title">{{ section.title }}</h1>
12
- </div>
13
- {% endif %}
14
- {% assign content_is_not_empty = section.content | is_not_empty %}
15
- {% if content_is_not_empty %}
16
- <div class="block-content">
17
- {{ section.content | markdownify }}
18
- </div>
3
+ {% assign image_is_not_empty = section.image | is_not_empty %} {% if image_is_not_empty %}
4
+ <div class="bg-img" style="background-image: url('{{ section.image | relative_url }}')"></div>
19
5
  {% endif %}
20
- {% assign actions_is_not_empty = section.actions | is_not_empty %}
21
- {% if actions_is_not_empty %}
22
- <div class="block-buttons">
23
-
24
- {% include cta_buttons.html actions=section.actions %}
6
+ <div class="inner-sm">
7
+ {% assign title_is_not_empty = section.title | is_not_empty %} {% if title_is_not_empty %}
8
+ <div class="block-header">
9
+ <h1 class="block-title">{{ section.title }}</h1>
10
+ </div>
11
+ {% endif %} {% assign content_is_not_empty = section.content | is_not_empty %} {% if content_is_not_empty %}
12
+ <div class="block-content">
13
+ {{ section.content | markdownify }}
14
+ </div>
15
+ {% endif %} {% assign actions_is_not_empty = section.actions | is_not_empty %} {% if actions_is_not_empty %}
16
+ <div class="block-buttons">
17
+
18
+ {% include cta_buttons.html actions=section.actions %}
19
+ </div>
20
+ {% endif %}
25
21
  </div>
26
- {% endif %}
27
- </div>
28
- </section><!-- .block -->
22
+ </section>
23
+ <!-- .block -->
@@ -1,8 +1,7 @@
1
1
  <ul class="{{ include.menu_class }}">
2
- {% for action in include.submenu %}
3
- <li class="menu-item{% if include.page.url == action.url %} current{% endif %}{% if action.type != 'link' %} menu-button{% endif %}">
4
-
5
- {% include action_link.html action=action %}
6
- </li>
7
- {% endfor %}
8
- </ul>
2
+ {% for action in include.submenu %}
3
+ <li class="menu-item{% if include.page.url == action.url %} current{% endif %}{% if action.type != 'link' %} menu-button{% endif %}">
4
+ {% include action_link.html action=action %}
5
+ </li>
6
+ {% endfor %}
7
+ </ul>
@@ -3,7 +3,6 @@ layout: body
3
3
  ---
4
4
 
5
5
  {% for section in page.sections %}
6
-
7
6
  {% assign component = section.type | append: ".html" %}
8
7
  {% include {{ component }} section=section site=site %}
9
8
  {% endfor %}
@@ -1,5 +1,5 @@
1
- ---
2
- layout: body
1
+ ---
2
+ layout: body
3
3
  ---
4
4
 
5
5
  <div class="inner outer">
@@ -1,5 +1,5 @@
1
- ---
2
- layout: body
1
+ ---
2
+ layout: body
3
3
  ---
4
4
 
5
5
  <article class="post post-full">
@@ -34,7 +34,7 @@ module LedgerSync
34
34
  MSG
35
35
  end
36
36
 
37
- def is_empty(input)
37
+ def is_empty(input) # rubocop:disable Naming/PredicateName
38
38
  if input.respond_to?(:empty?)
39
39
  input.empty?
40
40
  else
@@ -42,11 +42,11 @@ module LedgerSync
42
42
  end
43
43
  end
44
44
 
45
- def is_not_empty(input)
45
+ def is_not_empty(input) # rubocop:disable Naming/PredicateName
46
46
  if input.respond_to?(:empty?)
47
47
  !input.empty?
48
48
  else
49
- !!input
49
+ !!input # rubocop:disable Style/DoubleNegation
50
50
  end
51
51
  end
52
52
 
@@ -24,4 +24,18 @@ layout: <%= "reference_#{client.root_key}" %>
24
24
 
25
25
  | Name | Type |
26
26
  | ---- | ---- |
27
+ <% end -%>
28
+
29
+ ## Searchers
30
+
31
+ <% searcher_class = begin -%>
32
+ <% client.searcher_class_for(resource_type: resource.resource_type) -%>
33
+ <% rescue NameError -%>
34
+ <% end -%>
35
+ <% if searcher_class.present? -%>
36
+ | Name |
37
+ | ---- |
38
+ | `<%= searcher_class %>` |
39
+ <% else -%>
40
+ There are no searchers for this resource.
27
41
  <% end -%>
@@ -16,7 +16,7 @@ Element.prototype.closest || (Element.prototype.matches || (Element.prototype.ma
16
16
  /*!
17
17
  * clipboard.js v2.0.4
18
18
  * https://zenorocha.github.io/clipboard.js
19
- *
19
+ *
20
20
  * Licensed MIT © Zeno Rocha
21
21
  */
22
22
  !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(n){var o={};function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}}(),a=o(n(1)),c=o(n(3)),u=o(n(4));function o(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function o(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return n.resolveOptions(e),n.listenClick(t),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,c.default),i(o,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===r(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,u.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new a.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return s("action",t)}},{key:"defaultTarget",value:function(t){var e=s("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return s("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),o}();function s(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}t.exports=l},function(t,e,n){"use strict";var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}}(),a=n(2),c=(o=a)&&o.__esModule?o:{default:o};var u=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}return i(e,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,c.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,c.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),e}();t.exports=u},function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,a=o.length;i<a;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=n},function(t,e,n){var d=n(5),h=n(6);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!d.string(e))throw new TypeError("Second argument must be a String");if(!d.fn(n))throw new TypeError("Third argument must be a Function");if(d.node(t))return s=e,f=n,(l=t).addEventListener(s,f),{destroy:function(){l.removeEventListener(s,f)}};if(d.nodeList(t))return a=t,c=e,u=n,Array.prototype.forEach.call(a,function(t){t.addEventListener(c,u)}),{destroy:function(){Array.prototype.forEach.call(a,function(t){t.removeEventListener(c,u)})}};if(d.string(t))return o=t,r=e,i=n,h(document.body,o,r,i);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,a,c,u,l,s,f}},function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e,n){var a=n(7);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=a(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},function(t,e){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}}])});
@@ -1,10 +1,10 @@
1
1
  ---
2
- title: Operations
2
+ title: Searchers
3
3
  weight: 5
4
4
  layout: guides
5
5
  ---
6
6
 
7
- Searchers are used to search objects in the ledger. A searcher takes an `client`, `query` string and optional `pagination` hash. For example, to search customer's by name:
7
+ Searchers are used to lookup and scan objects in the ledger. A searcher takes a `client`, `query` string and optional `pagination` hash. For example, to search customer's by name:
8
8
 
9
9
  ```ruby
10
10
  searcher = LedgerSync::Ledgers::QuickBooksOnline::Customer::Searcher.new(
@@ -25,4 +25,4 @@ end
25
25
  # to get the next and previous set of results, you can use the following:
26
26
  next_searcher = searcher.next_searcher
27
27
  previous_searcher = searcher.previous_searcher
28
- ```
28
+ ```
@@ -36,3 +36,9 @@ layout: reference_netsuite
36
36
 
37
37
  | Name | Type |
38
38
  | ---- | ---- |
39
+
40
+ ## Searchers
41
+
42
+ | Name |
43
+ | ---- |
44
+ | `LedgerSync::Ledgers::NetSuite::Account::Searcher` |
@@ -47,3 +47,9 @@ layout: reference_netsuite
47
47
 
48
48
  | Name | Type |
49
49
  | ---- | ---- |
50
+
51
+ ## Searchers
52
+
53
+ | Name |
54
+ | ---- |
55
+ | `LedgerSync::Ledgers::NetSuite::Check::Searcher` |
@@ -21,3 +21,7 @@ layout: reference_netsuite
21
21
 
22
22
  ## Operations
23
23
 
24
+
25
+ ## Searchers
26
+
27
+ There are no searchers for this resource.
@@ -43,3 +43,7 @@ layout: reference_netsuite
43
43
 
44
44
  | Name | Type |
45
45
  | ---- | ---- |
46
+
47
+ ## Searchers
48
+
49
+ There are no searchers for this resource.
@@ -46,3 +46,9 @@ layout: reference_netsuite
46
46
 
47
47
  | Name | Type |
48
48
  | ---- | ---- |
49
+
50
+ ## Searchers
51
+
52
+ | Name |
53
+ | ---- |
54
+ | `LedgerSync::Ledgers::NetSuite::Customer::Searcher` |
@@ -44,3 +44,9 @@ layout: reference_netsuite
44
44
 
45
45
  | Name | Type |
46
46
  | ---- | ---- |
47
+
48
+ ## Searchers
49
+
50
+ | Name |
51
+ | ---- |
52
+ | `LedgerSync::Ledgers::NetSuite::CustomerDeposit::Searcher` |
@@ -45,3 +45,9 @@ layout: reference_netsuite
45
45
 
46
46
  | Name | Type |
47
47
  | ---- | ---- |
48
+
49
+ ## Searchers
50
+
51
+ | Name |
52
+ | ---- |
53
+ | `LedgerSync::Ledgers::NetSuite::Department::Searcher` |
@@ -23,3 +23,7 @@ layout: reference_netsuite
23
23
 
24
24
  ## Operations
25
25
 
26
+
27
+ ## Searchers
28
+
29
+ There are no searchers for this resource.
@@ -21,3 +21,7 @@ layout: reference_netsuite
21
21
 
22
22
  ## Operations
23
23
 
24
+
25
+ ## Searchers
26
+
27
+ There are no searchers for this resource.
@@ -23,3 +23,7 @@ layout: reference_netsuite
23
23
 
24
24
  ## Operations
25
25
 
26
+
27
+ ## Searchers
28
+
29
+ There are no searchers for this resource.
@@ -20,3 +20,7 @@ layout: reference_netsuite
20
20
 
21
21
  ## Operations
22
22
 
23
+
24
+ ## Searchers
25
+
26
+ There are no searchers for this resource.
@@ -17,3 +17,7 @@ layout: reference_netsuite
17
17
 
18
18
  ## Operations
19
19
 
20
+
21
+ ## Searchers
22
+
23
+ There are no searchers for this resource.
@@ -46,3 +46,7 @@ layout: reference_netsuite
46
46
 
47
47
  | Name | Type |
48
48
  | ---- | ---- |
49
+
50
+ ## Searchers
51
+
52
+ There are no searchers for this resource.
@@ -22,3 +22,7 @@ layout: reference_netsuite
22
22
 
23
23
  ## Operations
24
24
 
25
+
26
+ ## Searchers
27
+
28
+ There are no searchers for this resource.
@@ -45,3 +45,9 @@ layout: reference_netsuite
45
45
 
46
46
  | Name | Type |
47
47
  | ---- | ---- |
48
+
49
+ ## Searchers
50
+
51
+ | Name |
52
+ | ---- |
53
+ | `LedgerSync::Ledgers::NetSuite::LedgerClass::Searcher` |
@@ -41,3 +41,9 @@ layout: reference_netsuite
41
41
 
42
42
  | Name | Type |
43
43
  | ---- | ---- |
44
+
45
+ ## Searchers
46
+
47
+ | Name |
48
+ | ---- |
49
+ | `LedgerSync::Ledgers::NetSuite::Location::Searcher` |
@@ -16,3 +16,7 @@ layout: reference_netsuite
16
16
 
17
17
  ## Operations
18
18
 
19
+
20
+ ## Searchers
21
+
22
+ There are no searchers for this resource.
@@ -18,3 +18,9 @@ layout: reference_netsuite
18
18
 
19
19
  ## Operations
20
20
 
21
+
22
+ ## Searchers
23
+
24
+ | Name |
25
+ | ---- |
26
+ | `LedgerSync::Ledgers::NetSuite::Subsidiary::Searcher` |
@@ -47,3 +47,9 @@ layout: reference_netsuite
47
47
 
48
48
  | Name | Type |
49
49
  | ---- | ---- |
50
+
51
+ ## Searchers
52
+
53
+ | Name |
54
+ | ---- |
55
+ | `LedgerSync::Ledgers::NetSuite::Vendor::Searcher` |
@@ -32,3 +32,7 @@ layout: reference_netsuite_soap
32
32
 
33
33
  | Name | Type |
34
34
  | ---- | ---- |
35
+
36
+ ## Searchers
37
+
38
+ There are no searchers for this resource.
@@ -16,3 +16,7 @@ layout: reference_netsuite_soap
16
16
 
17
17
  ## Operations
18
18
 
19
+
20
+ ## Searchers
21
+
22
+ There are no searchers for this resource.
@@ -30,3 +30,7 @@ layout: reference_netsuite_soap
30
30
 
31
31
  | Name | Type |
32
32
  | ---- | ---- |
33
+
34
+ ## Searchers
35
+
36
+ There are no searchers for this resource.
@@ -42,3 +42,9 @@ layout: reference_quickbooks_online
42
42
 
43
43
  | Name | Type |
44
44
  | ---- | ---- |
45
+
46
+ ## Searchers
47
+
48
+ | Name |
49
+ | ---- |
50
+ | `LedgerSync::Ledgers::QuickBooksOnline::Account::Searcher` |
@@ -43,3 +43,9 @@ layout: reference_quickbooks_online
43
43
 
44
44
  | Name | Type |
45
45
  | ---- | ---- |
46
+
47
+ ## Searchers
48
+
49
+ | Name |
50
+ | ---- |
51
+ | `LedgerSync::Ledgers::QuickBooksOnline::Bill::Searcher` |
@@ -20,3 +20,7 @@ layout: reference_quickbooks_online
20
20
 
21
21
  ## Operations
22
22
 
23
+
24
+ ## Searchers
25
+
26
+ There are no searchers for this resource.
@@ -47,3 +47,7 @@ layout: reference_quickbooks_online
47
47
 
48
48
  | Name | Type |
49
49
  | ---- | ---- |
50
+
51
+ ## Searchers
52
+
53
+ There are no searchers for this resource.
@@ -18,3 +18,7 @@ layout: reference_quickbooks_online
18
18
 
19
19
  ## Operations
20
20
 
21
+
22
+ ## Searchers
23
+
24
+ There are no searchers for this resource.
@@ -19,3 +19,7 @@ layout: reference_quickbooks_online
19
19
 
20
20
  ## Operations
21
21
 
22
+
23
+ ## Searchers
24
+
25
+ There are no searchers for this resource.
@@ -38,3 +38,9 @@ layout: reference_quickbooks_online
38
38
 
39
39
  | Name | Type |
40
40
  | ---- | ---- |
41
+
42
+ ## Searchers
43
+
44
+ | Name |
45
+ | ---- |
46
+ | `LedgerSync::Ledgers::QuickBooksOnline::Customer::Searcher` |
@@ -39,3 +39,9 @@ layout: reference_quickbooks_online
39
39
 
40
40
  | Name | Type |
41
41
  | ---- | ---- |
42
+
43
+ ## Searchers
44
+
45
+ | Name |
46
+ | ---- |
47
+ | `LedgerSync::Ledgers::QuickBooksOnline::Department::Searcher` |