PostalPoint_Plugins/dev/search/search_index.json

1 line
203 KiB
JSON
Raw Normal View History

{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"Overview","text":"<p>PostalPoint\u00ae supports JavaScript plugin extensions. Plugins can hook into PostalPoint to add features and integrations.</p>"},{"location":"#what-plugins-can-do","title":"What plugins can do","text":"<ul> <li>Process card payments and handle saved payment methods</li> <li>Process cryptocurrency payments</li> <li>Add additional carriers, providing shipping rates and labels</li> <li>Print to label and receipt printers, letting PostalPoint handle hardware support and drivers</li> <li>Extend support for prepaid label acceptance, prepaid barcode recognition, and carrier dropoff QR codes</li> <li>Install pages in the Tools menu, creating new interfaces and features</li> <li>Receive transaction receipts for ingestion into third-party accounting or business software</li> <li>Display interactive HTML5 content on the customer-facing screen</li> <li>Run both Node.JS and browser code.</li> </ul>"},{"location":"#plugin-package-structure","title":"Plugin Package Structure","text":"<p>A plugin is distributed as a simple ZIP file, containing a folder. The folder then has at least one file, named <code>plugin.js</code>. The <code>exports.init</code> function in <code>plugin.js</code> is executed when PostalPoint launches, allowing the plugin to request involvement with various events in PostalPoint.</p> <p>PostalPoint installs plugin packages by unzipping their contents into a plugins folder. Plugins are uninstalled by deleting their folder.</p>"},{"location":"#postalpoint-plugin-api","title":"PostalPoint Plugin API","text":"<p>The PostalPoint plugin API is a globally-available object named <code>global.apis</code>. It contains many useful functions for integrating with PostalPoint. All the APIs listed under the Plugin API section must be prefixed with <code>global.apis.</code> in order to work.</p>"},{"location":"#minimal-plugin-code","title":"Minimal Plugin Code","text":"plugin-name/plugin.js<pre><code>exports.init = function () {\n global.apis.alert(\"This message appears when PostalPoint launches.\", \"Hello!\");\n};\n</code></pre> <p>Yes, the smallest plugin really is just two lines of code, and accessing PostalPoint features really is that easy.</p>"},{"location":"#plugin-metadata-file","title":"Plugin Metadata File","text":"<p>While not strictly required, a <code>package.json</code> is encouraged, and allows specifying the plugin's display name, PostalPoint version compatibility, and other metadata.</p> <p>Sample:</p> <pre><code>{\n \"name\": \"plugin-id-here\",\n \"main\": \"plugin.js\",\n \"description\": \"Human-readable description of the plugin\",\n \"version\": \"1.0.0\",\n \"author\": \"Your Name\",\n \"license\": \"Code license name\",\n \"postalpoint\": {\n \"pluginname\": \"Display Name for Plugin\",\n \"minVersion\": \"000034\",\n \"maxVersion\": \"001000\"\n }\n}\n</code></pre> <p>PostalPoint version codes are MMMnnn where MMM is the major version and nnn is the minor version, zero-padded. So version 0.35 is \"000035\", and 1.23 is \"001023\".</p>"},{"location":"Docs/Address/","title":"Address object","text":"<pre><code>export default class Address {\n constructor(uuid = \"\", name = \"\", company = \"\", street1 = \"\", street2 = \"\", zip = \"\", city = \"\", state = \"\", country = \"\", phone = \"\", email = \"\", taxid = \"\") {\n this.uuid = uuid;\n this.name = name;\n this.company = company;\n this.street1 = street1;\n this.street2 = street2;\n this.zip = zip;\n this.city = city;\n this.state = state;\n this.country = country;\n this.phone = phone;\n this.email = email;\n this.taxid = taxid;\n this.residential = null;\n }\n\n static fromObject(address) {\n if (address instanceof Address) {\n return address;\n }\n var