@leaddreamer/inventorylogic 0.0.3-beta.29 → 0.0.3-beta.37

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.
package/README.md CHANGED
@@ -19,10 +19,21 @@ services.</p>
19
19
  <dd><p>A collection of Business logic and database functions. Shared between ReactJS
20
20
  frontEnd and NodeJS BackEnd</p>
21
21
  </dd>
22
+ <dt><a href="#module_Addresses">Addresses</a></dt>
23
+ <dd><p>Types and functins for handling addresses</p>
24
+ </dd>
25
+ <dt><a href="#module_BusinessData">BusinessData</a></dt>
26
+ <dd><p>Functions for managing (potentially)private data for an organization.
27
+ Unified structure as a sub-record of organization, or CityManager accounts</p>
28
+ </dd>
22
29
  <dt><a href="#module_Commodities">Commodities</a></dt>
23
30
  <dd><p>Typedefs, constants, support functions and database operations related to Commodity Matrials
24
31
  users</p>
25
32
  </dd>
33
+ <dt><a href="#module_Fundamentals">Fundamentals</a></dt>
34
+ <dd><p>Typedefs, constants, support functions and database operations related to Fundamental
35
+ setting from the Database *</p>
36
+ </dd>
26
37
  <dt><a href="#module_LineItem">LineItem</a></dt>
27
38
  <dd><p>Typedefs, constants, support functions and database operations related to LineItem Matrials
28
39
  users</p>
@@ -36,6 +47,10 @@ users</p>
36
47
  to an individual user. These do not <em>particularly</em> represent a paymentProvider - they are meant
37
48
  as an abstraction above a specific payment processor.</p>
38
49
  </dd>
50
+ <dt><a href="#module_PrivateData">PrivateData</a></dt>
51
+ <dd><p>Functions for managing (potentially)private data for a user or organization.
52
+ Unified structure as a sub-record of fan, organization, or CityManager accounts</p>
53
+ </dd>
39
54
  <dt><a href="#module_Product">Product</a></dt>
40
55
  <dd><p>Typedefs, constants, support functions and database operations related to Products</p>
41
56
  </dd>
@@ -178,6 +193,343 @@ called from a cloud environment
178
193
  | measurementId: | <code>string</code> | (optional) Analytics/Measurement ID from Firebase Console |
179
194
  | mapsAPIKey | <code>string</code> | (optional) App ID for Google Maps API, from Google |
180
195
 
196
+ <a name="module_Addresses"></a>
197
+
198
+ ## Addresses
199
+ Types and functins for handling addresses
200
+
201
+
202
+ * [Addresses](#module_Addresses)
203
+ * _static_
204
+ * [.AddressDefault](#module_Addresses.AddressDefault) : <code>AddressType</code>
205
+ * [.AddressForm](#module_Addresses.AddressForm) : <code>AddressType</code>
206
+ * [.maplink](#module_Addresses.maplink) : <code>MapLink</code>
207
+ * [.deleteAddress(address)](#module_Addresses.deleteAddress) ⇒ <code>Promise.&lt;void&gt;</code>
208
+ * [.deleteAddressByIdAndParent(addressId, parent, batch)](#module_Addresses.deleteAddressByIdAndParent) ⇒ <code>Promise.ChainType</code>
209
+ * [.formatAddress(address)](#module_Addresses.formatAddress) ⇒ <code>string</code>
210
+ * [.saveAddress(address, paraentRefPath)](#module_Addresses.saveAddress) ⇒ <code>Promise.&lt;AddressType&gt;</code>
211
+ * [.fetchAddresses(account)](#module_Addresses.fetchAddresses) ⇒ <code>Promise.&lt;Array.AddressType&gt;</code>
212
+ * _inner_
213
+ * [~AddressType](#module_Addresses..AddressType) : <code>object</code>
214
+ * [~MapLink](#module_Addresses..MapLink) : <code>object</code>
215
+ * [~ChainType](#module_Addresses..ChainType) : <code>WriteBatch</code> \| <code>Transaction</code> \| <code>void</code>
216
+
217
+ <a name="module_Addresses.AddressDefault"></a>
218
+
219
+ ### Addresses.AddressDefault : <code>AddressType</code>
220
+ **Kind**: static constant of [<code>Addresses</code>](#module_Addresses)
221
+ <a name="module_Addresses.AddressForm"></a>
222
+
223
+ ### Addresses.AddressForm : <code>AddressType</code>
224
+ **Kind**: static constant of [<code>Addresses</code>](#module_Addresses)
225
+ <a name="module_Addresses.maplink"></a>
226
+
227
+ ### Addresses.maplink : <code>MapLink</code>
228
+ **Kind**: static constant of [<code>Addresses</code>](#module_Addresses)
229
+ **Read only**: true
230
+ <a name="module_Addresses.deleteAddress"></a>
231
+
232
+ ### Addresses.deleteAddress(address) ⇒ <code>Promise.&lt;void&gt;</code>
233
+ Deletes an existing address record from the database, based on it's own refPath
234
+
235
+ **Kind**: static method of [<code>Addresses</code>](#module_Addresses)
236
+
237
+ | Param | Type |
238
+ | --- | --- |
239
+ | address | <code>AddressType</code> |
240
+ | address.refPath | <code>string</code> |
241
+
242
+ <a name="module_Addresses.deleteAddressByIdAndParent"></a>
243
+
244
+ ### Addresses.deleteAddressByIdAndParent(addressId, parent, batch) ⇒ <code>Promise.ChainType</code>
245
+ Deletes an existing address record from the database, based on it's parent
246
+ record and Id
247
+
248
+ **Kind**: static method of [<code>Addresses</code>](#module_Addresses)
249
+
250
+ | Param | Type |
251
+ | --- | --- |
252
+ | addressId | <code>string</code> |
253
+ | parent | <code>OrganizationType</code> |
254
+ | parent.refPath | <code>string</code> |
255
+ | batch | <code>ChainType</code> |
256
+
257
+ <a name="module_Addresses.formatAddress"></a>
258
+
259
+ ### Addresses.formatAddress(address) ⇒ <code>string</code>
260
+ Builds a formatted string from a provided address record
261
+
262
+ **Kind**: static method of [<code>Addresses</code>](#module_Addresses)
263
+
264
+ | Param | Type |
265
+ | --- | --- |
266
+ | address | <code>AddressType</code> |
267
+
268
+ <a name="module_Addresses.saveAddress"></a>
269
+
270
+ ### Addresses.saveAddress(address, paraentRefPath) ⇒ <code>Promise.&lt;AddressType&gt;</code>
271
+ Saves an address record to the database below the provided parentRefPath,
272
+ whether exsiting or not
273
+
274
+ **Kind**: static method of [<code>Addresses</code>](#module_Addresses)
275
+
276
+ | Param | Type | Description |
277
+ | --- | --- | --- |
278
+ | address | <code>AddressType</code> | |
279
+ | address.refPath | <code>string</code> | if present, writes back |
280
+ | paraentRefPath | <code>string</code> | required if new record |
281
+
282
+ <a name="module_Addresses.fetchAddresses"></a>
283
+
284
+ ### Addresses.fetchAddresses(account) ⇒ <code>Promise.&lt;Array.AddressType&gt;</code>
285
+ Fetches all address records for an account
286
+
287
+ **Kind**: static method of [<code>Addresses</code>](#module_Addresses)
288
+
289
+ | Param | Type |
290
+ | --- | --- |
291
+ | account | <code>Record</code> |
292
+ | account.refPath | <code>string</code> |
293
+
294
+ <a name="module_Addresses..AddressType"></a>
295
+
296
+ ### Addresses~AddressType : <code>object</code>
297
+ **Kind**: inner typedef of [<code>Addresses</code>](#module_Addresses)
298
+ **Properties**
299
+
300
+ | Name | Type | Description |
301
+ | --- | --- | --- |
302
+ | Id | <code>string</code> | will be populated for existing record; null or missing for new/minimal object |
303
+ | refPath | <code>string</code> | will be populated for existing record; null or missing for new/minimal object |
304
+ | address_line_1 | <code>string</code> | |
305
+ | address_line_2 | <code>string</code> | |
306
+ | city | <code>string</code> | |
307
+ | region | <code>string</code> | selected from a list of supported Cities/Regions |
308
+ | state | <code>string</code> | |
309
+ | zip | <code>zip</code> | |
310
+ | mapLink | <code>maplink</code> | link to Google map location |
311
+
312
+ <a name="module_Addresses..MapLink"></a>
313
+
314
+ ### Addresses~MapLink : <code>object</code>
315
+ **Kind**: inner typedef of [<code>Addresses</code>](#module_Addresses)
316
+ **Properties**
317
+
318
+ | Name | Type | Description |
319
+ | --- | --- | --- |
320
+ | placeId | <code>string</code> | as defined by Google |
321
+ | latlng | <code>object</code> | coordinates tuple |
322
+ | latlng.lat | <code>string</code> | lattitude |
323
+ | latlng.lng | <code>string</code> | longitude |
324
+ | url | <code>string</code> | link to place/map entry |
325
+ | formatted_address | <code>string</code> | printable string of address |
326
+
327
+ <a name="module_Addresses..ChainType"></a>
328
+
329
+ ### Addresses~ChainType : <code>WriteBatch</code> \| <code>Transaction</code> \| <code>void</code>
330
+ **Kind**: inner typedef of [<code>Addresses</code>](#module_Addresses)
331
+ <a name="module_BusinessData"></a>
332
+
333
+ ## BusinessData
334
+ Functions for managing (potentially)private data for an organization.
335
+ Unified structure as a sub-record of organization, or CityManager accounts
336
+
337
+
338
+ * [BusinessData](#module_BusinessData)
339
+ * _static_
340
+ * [.fetchFullAccount(account)](#module_BusinessData.fetchFullAccount) ⇒ <code>Promise.AccountType</code>
341
+ * [.fetchBusinessData(account)](#module_BusinessData.fetchBusinessData) ⇒ <code>Promise.BusinessData</code>
342
+ * [.accountPage(account, origin)](#module_BusinessData.accountPage) ⇒ <code>string</code>
343
+ * [.createBusinessData(account, batch)](#module_BusinessData.createBusinessData) ⇒ <code>Promise.&lt;ChainType&gt;</code>
344
+ * [.saveBusinessData(businessData)](#module_BusinessData.saveBusinessData) ⇒ <code>Promise.&lt;BusinessData&gt;</code>
345
+ * [.deleteBusinessData(businessData)](#module_BusinessData.deleteBusinessData) ⇒ <code>Promise.&lt;void&gt;</code>
346
+ * [.businessDataPath(account)](#module_BusinessData.businessDataPath) ⇒ <code>string</code>
347
+ * [.profileComplete(account, businessData)](#module_BusinessData.profileComplete) ⇒ <code>Boolean</code>
348
+ * [.profileIncomplete(account, businessData)](#module_BusinessData.profileIncomplete) ⇒ <code>string</code> \| <code>null</code>
349
+ * [.setOpenIssues(businessData)](#module_BusinessData.setOpenIssues) ⇒ <code>Promise.boolean</code>
350
+ * [.clearOpenIssues(businessData)](#module_BusinessData.clearOpenIssues) ⇒ <code>Promise.boolean</code>
351
+ * _inner_
352
+ * [~BusinessDefault](#module_BusinessData..BusinessDefault) : <code>BusinessData</code>
353
+ * [~BusinessAccountForm](#module_BusinessData..BusinessAccountForm) : <code>BusinessData</code>
354
+ * [~contact](#module_BusinessData..contact) : <code>object</code>
355
+ * [~BusinessData](#module_BusinessData..BusinessData) : <code>object</code>
356
+ * [~ChainType](#module_BusinessData..ChainType) : <code>WriteBatch</code> \| <code>Transaction</code> \| <code>void</code>
357
+
358
+ <a name="module_BusinessData.fetchFullAccount"></a>
359
+
360
+ ### BusinessData.fetchFullAccount(account) ⇒ <code>Promise.AccountType</code>
361
+ Fetches a fulll object representation of an account, including BusinessData
362
+
363
+ **Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
364
+
365
+ | Param | Type |
366
+ | --- | --- |
367
+ | account | <code>AccountType</code> |
368
+
369
+ <a name="module_BusinessData.fetchBusinessData"></a>
370
+
371
+ ### BusinessData.fetchBusinessData(account) ⇒ <code>Promise.BusinessData</code>
372
+ Fetches the BusinessData (corporate, addresses, etc) for an account
373
+
374
+ **Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
375
+
376
+ | Param | Type |
377
+ | --- | --- |
378
+ | account | <code>AccountType</code> |
379
+
380
+ <a name="module_BusinessData.accountPage"></a>
381
+
382
+ ### BusinessData.accountPage(account, origin) ⇒ <code>string</code>
383
+ Composes a URL for an "account page" from the account, and passed base URL
384
+
385
+ **Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
386
+ **Returns**: <code>string</code> - full URL for business accouont
387
+
388
+ | Param | Type | Description |
389
+ | --- | --- | --- |
390
+ | account | <code>AccountType</code> | |
391
+ | origin | <code>string</code> | base URL for the application |
392
+
393
+ <a name="module_BusinessData.createBusinessData"></a>
394
+
395
+ ### BusinessData.createBusinessData(account, batch) ⇒ <code>Promise.&lt;ChainType&gt;</code>
396
+ **Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
397
+ **Returns**: <code>Promise.&lt;ChainType&gt;</code> - WriteBatch, Transaction or Void
398
+
399
+ | Param | Type | Description |
400
+ | --- | --- | --- |
401
+ | account | <code>AccountType</code> | |
402
+ | batch | <code>ChainType</code> | batching object. Transaction will be added to the batch |
403
+
404
+ <a name="module_BusinessData.saveBusinessData"></a>
405
+
406
+ ### BusinessData.saveBusinessData(businessData) ⇒ <code>Promise.&lt;BusinessData&gt;</code>
407
+ Writes the "Business" data to the database
408
+
409
+ **Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
410
+
411
+ | Param | Type |
412
+ | --- | --- |
413
+ | businessData | <code>BusinessData</code> |
414
+
415
+ <a name="module_BusinessData.deleteBusinessData"></a>
416
+
417
+ ### BusinessData.deleteBusinessData(businessData) ⇒ <code>Promise.&lt;void&gt;</code>
418
+ Deletes a BusinessData record (rarely used if ever)
419
+
420
+ **Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
421
+
422
+ | Param | Type |
423
+ | --- | --- |
424
+ | businessData | <code>BusinessData</code> |
425
+ | businessData.refPath | <code>string</code> |
426
+
427
+ <a name="module_BusinessData.businessDataPath"></a>
428
+
429
+ ### BusinessData.businessDataPath(account) ⇒ <code>string</code>
430
+ creates the "base path" (refPath) to store addresses based on an account (refPath)
431
+
432
+ **Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
433
+
434
+ | Param | Type |
435
+ | --- | --- |
436
+ | account | <code>Record</code> |
437
+ | account.refPath | <code>string</code> |
438
+
439
+ <a name="module_BusinessData.profileComplete"></a>
440
+
441
+ ### BusinessData.profileComplete(account, businessData) ⇒ <code>Boolean</code>
442
+ verifies that all needed information has been filled in
443
+
444
+ **Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
445
+
446
+ | Param | Type | Description |
447
+ | --- | --- | --- |
448
+ | account | <code>AccountType</code> | |
449
+ | businessData | <code>BusinessData</code> | record |
450
+
451
+ <a name="module_BusinessData.profileIncomplete"></a>
452
+
453
+ ### BusinessData.profileIncomplete(account, businessData) ⇒ <code>string</code> \| <code>null</code>
454
+ verifies that all needed information has been filled in
455
+
456
+ **Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
457
+
458
+ | Param | Type | Description |
459
+ | --- | --- | --- |
460
+ | account | <code>AccountType</code> | |
461
+ | businessData | <code>BusinessData</code> | record |
462
+
463
+ <a name="module_BusinessData.setOpenIssues"></a>
464
+
465
+ ### BusinessData.setOpenIssues(businessData) ⇒ <code>Promise.boolean</code>
466
+ Sets the "openIssues" flag in an account's BUSINESSDATA record
467
+ The account's refPath is attached to the Payment system's record, and
468
+ used here to find the Payment Account
469
+
470
+ **Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
471
+
472
+ | Param | Type |
473
+ | --- | --- |
474
+ | businessData | <code>BusinessData</code> |
475
+
476
+ <a name="module_BusinessData.clearOpenIssues"></a>
477
+
478
+ ### BusinessData.clearOpenIssues(businessData) ⇒ <code>Promise.boolean</code>
479
+ Clears the "openIssues" flag in an account's BUSINESSDATA record
480
+ The account's refPath is attached to the Payment system's record, and
481
+ used here to find the Payment Account
482
+
483
+ **Kind**: static method of [<code>BusinessData</code>](#module_BusinessData)
484
+
485
+ | Param | Type |
486
+ | --- | --- |
487
+ | businessData | <code>BusinessData</code> |
488
+
489
+ <a name="module_BusinessData..BusinessDefault"></a>
490
+
491
+ ### BusinessData~BusinessDefault : <code>BusinessData</code>
492
+ **Kind**: inner constant of [<code>BusinessData</code>](#module_BusinessData)
493
+ **Default**: <code>{&quot;Id&quot;:null,&quot;email&quot;:null,&quot;business_type&quot;:null,&quot;contact&quot;:null,&quot;business_address&quot;:null,&quot;mailing_address&quot;:null,&quot;billing_address&quot;:null,&quot;tel&quot;:null,&quot;mcc&quot;:null,&quot;tax_rate&quot;:null,&quot;openIssues&quot;:false}</code>
494
+ <a name="module_BusinessData..BusinessAccountForm"></a>
495
+
496
+ ### BusinessData~BusinessAccountForm : <code>BusinessData</code>
497
+ **Kind**: inner constant of [<code>BusinessData</code>](#module_BusinessData)
498
+ **Default**: <code>{&quot;refPath&quot;:&quot;hidden:text&quot;,&quot;email&quot;:&quot;email&quot;,&quot;business_type&quot;:&quot;&quot;,&quot;contact&quot;:&quot;&quot;,&quot;business_address&quot;:&quot;&quot;,&quot;mailing_address&quot;:&quot;&quot;,&quot;billing_address&quot;:&quot;&quot;,&quot;tel&quot;:&quot;tel&quot;,&quot;mcc&quot;:&quot;&quot;}</code>
499
+ <a name="module_BusinessData..contact"></a>
500
+
501
+ ### BusinessData~contact : <code>object</code>
502
+ **Kind**: inner typedef of [<code>BusinessData</code>](#module_BusinessData)
503
+ **Properties**
504
+
505
+ | Name | Type | Description |
506
+ | --- | --- | --- |
507
+ | contact.Id | <code>string</code> | |
508
+ | contact.first_name | <code>string</code> | |
509
+ | contact.last_name | <code>string</code> | |
510
+ | contact.tel | <code>string</code> | |
511
+ | contact.email | <code>string</code> | must be filled in to make profile public |
512
+
513
+ <a name="module_BusinessData..BusinessData"></a>
514
+
515
+ ### BusinessData~BusinessData : <code>object</code>
516
+ **Kind**: inner typedef of [<code>BusinessData</code>](#module_BusinessData)
517
+ **Properties**
518
+
519
+ | Name | Type | Description |
520
+ | --- | --- | --- |
521
+ | email | <code>string</code> | must be filled in to make profile public |
522
+ | contact | <code>contact</code> | |
523
+ | tel | <code>string</code> | |
524
+ | business_type | <code>string</code> | |
525
+ | business_address | <code>AddressType</code> | |
526
+ | mailing_address | <code>AddressType</code> | |
527
+ | billing_address | <code>AddressType</code> | |
528
+
529
+ <a name="module_BusinessData..ChainType"></a>
530
+
531
+ ### BusinessData~ChainType : <code>WriteBatch</code> \| <code>Transaction</code> \| <code>void</code>
532
+ **Kind**: inner typedef of [<code>BusinessData</code>](#module_BusinessData)
181
533
  <a name="module_Commodities"></a>
182
534
 
183
535
  ## Commodities
@@ -389,6 +741,166 @@ An object to allow for paginating a table read from Firestore. REQUIRES a sortin
389
741
  | PageForward | <code>method</code> | pages the fetch forward |
390
742
  | PageBack | <code>method</code> | pages the fetch backward |
391
743
 
744
+ <a name="module_Fundamentals"></a>
745
+
746
+ ## Fundamentals
747
+ Typedefs, constants, support functions and database operations related to Fundamental
748
+ setting from the Database *
749
+
750
+
751
+ * [Fundamentals](#module_Fundamentals)
752
+ * _static_
753
+ * [.fetchFundamentals()](#module_Fundamentals.fetchFundamentals) ⇒ <code>Promise.&lt;Fundamentals&gt;</code>
754
+ * [.fetchRates()](#module_Fundamentals.fetchRates) ⇒ <code>Promise.&lt;Rates&gt;</code>
755
+ * [.fetchPayoutRates()](#module_Fundamentals.fetchPayoutRates) ⇒ <code>Promise.&lt;PaymentProcessor&gt;</code>
756
+ * [.fetchMCCs()](#module_Fundamentals.fetchMCCs) ⇒ <code>Promise.&lt;Array.MCCType&gt;</code>
757
+ * [.fetchBusinessTypes()](#module_Fundamentals.fetchBusinessTypes) ⇒ <code>Promise.&lt;Array.BusinessType&gt;</code>
758
+ * _inner_
759
+ * [~Rates](#module_Fundamentals..Rates) : <code>Rates</code>
760
+ * [~paymentProcessor](#module_Fundamentals..paymentProcessor) : <code>PaymentProcessor</code>
761
+ * [~MCCDefault](#module_Fundamentals..MCCDefault) : <code>MCCType</code>
762
+ * [~BusinessTypeDefault](#module_Fundamentals..BusinessTypeDefault) : <code>BusinessType</code>
763
+ * [~OrganizationFundamentals](#module_Fundamentals..OrganizationFundamentals) : <code>object</code>
764
+ * [~Rates](#module_Fundamentals..Rates) : <code>object</code>
765
+ * [~PaymentProcessor](#module_Fundamentals..PaymentProcessor) : <code>object</code>
766
+ * [~MCCType](#module_Fundamentals..MCCType) : <code>object</code>
767
+ * [~BusinessType](#module_Fundamentals..BusinessType) : <code>object</code>
768
+ * [~Fundamentals](#module_Fundamentals..Fundamentals) : <code>object</code>
769
+
770
+ <a name="module_Fundamentals.fetchFundamentals"></a>
771
+
772
+ ### Fundamentals.fetchFundamentals() ⇒ <code>Promise.&lt;Fundamentals&gt;</code>
773
+ returns a Promise which resolves with an
774
+ array of all Fundamentals Objects (or err)
775
+
776
+ **Kind**: static method of [<code>Fundamentals</code>](#module_Fundamentals)
777
+ <a name="module_Fundamentals.fetchRates"></a>
778
+
779
+ ### Fundamentals.fetchRates() ⇒ <code>Promise.&lt;Rates&gt;</code>
780
+ returns a Promise that resolves with the Rates record from the database
781
+
782
+ **Kind**: static method of [<code>Fundamentals</code>](#module_Fundamentals)
783
+ <a name="module_Fundamentals.fetchPayoutRates"></a>
784
+
785
+ ### Fundamentals.fetchPayoutRates() ⇒ <code>Promise.&lt;PaymentProcessor&gt;</code>
786
+ returns a Promise that resolves with the Rates record from the database
787
+
788
+ **Kind**: static method of [<code>Fundamentals</code>](#module_Fundamentals)
789
+ <a name="module_Fundamentals.fetchMCCs"></a>
790
+
791
+ ### Fundamentals.fetchMCCs() ⇒ <code>Promise.&lt;Array.MCCType&gt;</code>
792
+ returns an array of all MCC (Merchant Commerce Code) available
793
+
794
+ **Kind**: static method of [<code>Fundamentals</code>](#module_Fundamentals)
795
+ <a name="module_Fundamentals.fetchBusinessTypes"></a>
796
+
797
+ ### Fundamentals.fetchBusinessTypes() ⇒ <code>Promise.&lt;Array.BusinessType&gt;</code>
798
+ returns an array of all MCC (Merchant Commerce Code) available
799
+
800
+ **Kind**: static method of [<code>Fundamentals</code>](#module_Fundamentals)
801
+ <a name="module_Fundamentals..Rates"></a>
802
+
803
+ ### Fundamentals~Rates : <code>Rates</code>
804
+ **Kind**: inner constant of [<code>Fundamentals</code>](#module_Fundamentals)
805
+ **Default**: <code>{&quot;Id&quot;:null,&quot;service_charge&quot;:&quot;&quot;}</code>
806
+ <a name="module_Fundamentals..paymentProcessor"></a>
807
+
808
+ ### Fundamentals~paymentProcessor : <code>PaymentProcessor</code>
809
+ **Kind**: inner constant of [<code>Fundamentals</code>](#module_Fundamentals)
810
+ **Default**: <code>{&quot;connected_active&quot;:200,&quot;processing_concurrency&quot;:10,&quot;processing_rate&quot;:25,&quot;processing_time_window&quot;:1000,&quot;per_payout&quot;:25,&quot;rate_payout&quot;:25,&quot;rate_payout_scale&quot;:10000}</code>
811
+ <a name="module_Fundamentals..MCCDefault"></a>
812
+
813
+ ### Fundamentals~MCCDefault : <code>MCCType</code>
814
+ **Kind**: inner constant of [<code>Fundamentals</code>](#module_Fundamentals)
815
+ **Default**: <code>{&quot;Id&quot;:null,&quot;MCC&quot;:null,&quot;name&quot;:null,&quot;description&quot;:null,&quot;long&quot;:null,&quot;type&quot;:null}</code>
816
+ <a name="module_Fundamentals..BusinessTypeDefault"></a>
817
+
818
+ ### Fundamentals~BusinessTypeDefault : <code>BusinessType</code>
819
+ **Kind**: inner constant of [<code>Fundamentals</code>](#module_Fundamentals)
820
+ **Default**: <code>{&quot;Id&quot;:null,&quot;business_type&quot;:null,&quot;name&quot;:null,&quot;description&quot;:null}</code>
821
+ <a name="module_Fundamentals..OrganizationFundamentals"></a>
822
+
823
+ ### Fundamentals~OrganizationFundamentals : <code>object</code>
824
+ **Kind**: inner typedef of [<code>Fundamentals</code>](#module_Fundamentals)
825
+ **Properties**
826
+
827
+ | Name | Type | Description |
828
+ | --- | --- | --- |
829
+ | Types | <code>Array.string</code> | Allowed organization types |
830
+
831
+ <a name="module_Fundamentals..Rates"></a>
832
+
833
+ ### Fundamentals~Rates : <code>object</code>
834
+ **Kind**: inner typedef of [<code>Fundamentals</code>](#module_Fundamentals)
835
+ **Properties**
836
+
837
+ | Name | Type | Description |
838
+ | --- | --- | --- |
839
+ | Id | <code>string</code> | |
840
+ | service_charge | <code>object</code> | |
841
+ | service_charge.minimum | <code>number</code> | |
842
+ | service_charge.rate | <code>number</code> | percentage |
843
+ | service_charge.rounding_factor | <code>number</code> | |
844
+
845
+ <a name="module_Fundamentals..PaymentProcessor"></a>
846
+
847
+ ### Fundamentals~PaymentProcessor : <code>object</code>
848
+ **Kind**: inner typedef of [<code>Fundamentals</code>](#module_Fundamentals)
849
+ **Properties**
850
+
851
+ | Name | Type | Description |
852
+ | --- | --- | --- |
853
+ | connected_active | <code>number</code> | allowed active connections |
854
+ | processing_concurrency | <code>number</code> | |
855
+ | processing_rate | <code>number</code> | |
856
+ | processing_time_window | <code>number</code> | |
857
+ | per_payout | <code>number</code> | |
858
+ | rate_payout | <code>number</code> | |
859
+ | rate_payout_scale | <code>number</code> | |
860
+
861
+ <a name="module_Fundamentals..MCCType"></a>
862
+
863
+ ### Fundamentals~MCCType : <code>object</code>
864
+ **Kind**: inner typedef of [<code>Fundamentals</code>](#module_Fundamentals)
865
+ **Properties**
866
+
867
+ | Name | Type | Description |
868
+ | --- | --- | --- |
869
+ | Id | <code>string</code> | |
870
+ | MCC | <code>string</code> | Merchant Class Code |
871
+ | name | <code>string</code> | Merchant Class Code |
872
+ | description | <code>string</code> | description of Merchant Class Code |
873
+ | long | <code>string</code> | long description of Merchant Class Code |
874
+ | type | <code>string</code> | Applicable business model - "Artists", "Venues" or "Brands" |
875
+
876
+ <a name="module_Fundamentals..BusinessType"></a>
877
+
878
+ ### Fundamentals~BusinessType : <code>object</code>
879
+ **Kind**: inner typedef of [<code>Fundamentals</code>](#module_Fundamentals)
880
+ **Properties**
881
+
882
+ | Name | Type | Description |
883
+ | --- | --- | --- |
884
+ | Id | <code>string</code> | |
885
+ | business_type | <code>string</code> | allowed business type value |
886
+ | name | <code>string</code> | business type value |
887
+ | description | <code>string</code> | description ofbusiness type value |
888
+
889
+ <a name="module_Fundamentals..Fundamentals"></a>
890
+
891
+ ### Fundamentals~Fundamentals : <code>object</code>
892
+ **Kind**: inner typedef of [<code>Fundamentals</code>](#module_Fundamentals)
893
+ **Properties**
894
+
895
+ | Name | Type | Description |
896
+ | --- | --- | --- |
897
+ | Rates | <code>Rates</code> | |
898
+ | PaymentProcessor | <code>PaymentProcessor</code> | |
899
+ | Defaults | <code>object</code> | |
900
+ | Defaults.MCC | <code>MCCType</code> | |
901
+ | Organizations | <code>OrganizationFundamentals</code> | |
902
+ | Organizations.Types | <code>Array.string</code> | Allowed organization types |
903
+
392
904
  <a name="module_LineItem"></a>
393
905
 
394
906
  ## LineItem
@@ -1136,6 +1648,127 @@ Changes the paidQ label on a receipt associated with a pledgeTicket
1136
1648
 
1137
1649
  ### Payment~AccountObject : <code>UserObject</code>
1138
1650
  **Kind**: inner typedef of [<code>Payment</code>](#module_Payment)
1651
+ <a name="module_PrivateData"></a>
1652
+
1653
+ ## PrivateData
1654
+ Functions for managing (potentially)private data for a user or organization.
1655
+ Unified structure as a sub-record of fan, organization, or CityManager accounts
1656
+
1657
+
1658
+ * [PrivateData](#module_PrivateData)
1659
+ * _static_
1660
+ * [.fetchPrivateData(account)](#module_PrivateData.fetchPrivateData) ⇒ <code>Promise.PrivateData</code>
1661
+ * [.createPrivateData(account, batch)](#module_PrivateData.createPrivateData) ⇒ <code>Promise.&lt;ChainType&gt;</code>
1662
+ * [.savePrivateData(privateData)](#module_PrivateData.savePrivateData) ⇒ <code>Promise.&lt;PrivateData&gt;</code>
1663
+ * [.deletePrivateData(privateData)](#module_PrivateData.deletePrivateData) ⇒ <code>Promise.&lt;void&gt;</code>
1664
+ * [.privateDataPath(account)](#module_PrivateData.privateDataPath) ⇒ <code>string</code>
1665
+ * _inner_
1666
+ * [~PrivateDefault](#module_PrivateData..PrivateDefault) : <code>PrivateData</code>
1667
+ * [~PrivateAccountForm](#module_PrivateData..PrivateAccountForm) : <code>PrivateData</code>
1668
+ * [~contact](#module_PrivateData..contact) : <code>object</code>
1669
+ * [~PrivateData](#module_PrivateData..PrivateData) : <code>object</code>
1670
+ * [~ChainType](#module_PrivateData..ChainType) : <code>WriteBatch</code> \| <code>Transaction</code> \| <code>void</code>
1671
+
1672
+ <a name="module_PrivateData.fetchPrivateData"></a>
1673
+
1674
+ ### PrivateData.fetchPrivateData(account) ⇒ <code>Promise.PrivateData</code>
1675
+ Fecthes the PrivateData (email, tel, addresses, etc) for a Fan account
1676
+
1677
+ **Kind**: static method of [<code>PrivateData</code>](#module_PrivateData)
1678
+
1679
+ | Param | Type |
1680
+ | --- | --- |
1681
+ | account | <code>AccountType</code> |
1682
+
1683
+ <a name="module_PrivateData.createPrivateData"></a>
1684
+
1685
+ ### PrivateData.createPrivateData(account, batch) ⇒ <code>Promise.&lt;ChainType&gt;</code>
1686
+ **Kind**: static method of [<code>PrivateData</code>](#module_PrivateData)
1687
+ **Returns**: <code>Promise.&lt;ChainType&gt;</code> - WriteBatch, Transaction or Void
1688
+
1689
+ | Param | Type | Description |
1690
+ | --- | --- | --- |
1691
+ | account | <code>AccountType</code> | |
1692
+ | batch | <code>ChainType</code> | batching object. Transaction will be added to the batch |
1693
+
1694
+ <a name="module_PrivateData.savePrivateData"></a>
1695
+
1696
+ ### PrivateData.savePrivateData(privateData) ⇒ <code>Promise.&lt;PrivateData&gt;</code>
1697
+ Writes the "private" data to the database
1698
+
1699
+ **Kind**: static method of [<code>PrivateData</code>](#module_PrivateData)
1700
+
1701
+ | Param | Type |
1702
+ | --- | --- |
1703
+ | privateData | <code>PrivateData</code> |
1704
+
1705
+ <a name="module_PrivateData.deletePrivateData"></a>
1706
+
1707
+ ### PrivateData.deletePrivateData(privateData) ⇒ <code>Promise.&lt;void&gt;</code>
1708
+ Deletes a PrivateData record (rarely used if ever)
1709
+
1710
+ **Kind**: static method of [<code>PrivateData</code>](#module_PrivateData)
1711
+
1712
+ | Param | Type |
1713
+ | --- | --- |
1714
+ | privateData | <code>PrivateData</code> |
1715
+ | privateData.refPath | <code>string</code> |
1716
+
1717
+ <a name="module_PrivateData.privateDataPath"></a>
1718
+
1719
+ ### PrivateData.privateDataPath(account) ⇒ <code>string</code>
1720
+ creates the "base path" (refPath) to store addresses based on an account (refPath)
1721
+
1722
+ **Kind**: static method of [<code>PrivateData</code>](#module_PrivateData)
1723
+
1724
+ | Param | Type |
1725
+ | --- | --- |
1726
+ | account | <code>Record</code> |
1727
+ | account.refPath | <code>string</code> |
1728
+
1729
+ <a name="module_PrivateData..PrivateDefault"></a>
1730
+
1731
+ ### PrivateData~PrivateDefault : <code>PrivateData</code>
1732
+ **Kind**: inner constant of [<code>PrivateData</code>](#module_PrivateData)
1733
+ **Default**: <code>{&quot;Id&quot;:null,&quot;email&quot;:null,&quot;contact&quot;:null,&quot;business_address&quot;:null,&quot;mailing_address&quot;:null,&quot;billing_address&quot;:null,&quot;tel&quot;:null,&quot;tax_rate&quot;:null,&quot;openIssues&quot;:false}</code>
1734
+ <a name="module_PrivateData..PrivateAccountForm"></a>
1735
+
1736
+ ### PrivateData~PrivateAccountForm : <code>PrivateData</code>
1737
+ **Kind**: inner constant of [<code>PrivateData</code>](#module_PrivateData)
1738
+ **Default**: <code>{&quot;refPath&quot;:&quot;hidden:text&quot;,&quot;email&quot;:&quot;email&quot;,&quot;contact&quot;:&quot;&quot;,&quot;business_address&quot;:&quot;&quot;,&quot;mailing_address&quot;:&quot;&quot;,&quot;billing_address&quot;:&quot;&quot;,&quot;tel&quot;:&quot;tel&quot;}</code>
1739
+ <a name="module_PrivateData..contact"></a>
1740
+
1741
+ ### PrivateData~contact : <code>object</code>
1742
+ **Kind**: inner typedef of [<code>PrivateData</code>](#module_PrivateData)
1743
+ **Properties**
1744
+
1745
+ | Name | Type | Description |
1746
+ | --- | --- | --- |
1747
+ | contact.Id | <code>string</code> | |
1748
+ | contact.first_name | <code>string</code> | |
1749
+ | contact.last_name | <code>string</code> | |
1750
+ | contact.tel | <code>string</code> | |
1751
+ | contact.email | <code>string</code> | must be filled in to make profile public |
1752
+
1753
+ <a name="module_PrivateData..PrivateData"></a>
1754
+
1755
+ ### PrivateData~PrivateData : <code>object</code>
1756
+ **Kind**: inner typedef of [<code>PrivateData</code>](#module_PrivateData)
1757
+ **Properties**
1758
+
1759
+ | Name | Type | Description |
1760
+ | --- | --- | --- |
1761
+ | email | <code>string</code> | must be filled in to make profile public |
1762
+ | contact | <code>contact</code> | |
1763
+ | tel | <code>string</code> | |
1764
+ | business_address | <code>AddressType</code> | |
1765
+ | mailing_address | <code>AddressType</code> | |
1766
+ | billing_address | <code>AddressType</code> | |
1767
+
1768
+ <a name="module_PrivateData..ChainType"></a>
1769
+
1770
+ ### PrivateData~ChainType : <code>WriteBatch</code> \| <code>Transaction</code> \| <code>void</code>
1771
+ **Kind**: inner typedef of [<code>PrivateData</code>](#module_PrivateData)
1139
1772
  <a name="module_Product"></a>
1140
1773
 
1141
1774
  ## Product